C# Port: BinaryToString

Discussion in 'Source Code' started by Skyfail, Feb 28, 2015.

  1. Skyfail

    Skyfail Administrator Staff Member Administrator Inventar

    Joined:
    Mar 21, 2013
    Messages:
    792
    Likes Received:
    1
    Hi,

    ich arbeite gerade an einem kleinen AutoIT Deobfuscator und brauche dafür die Funktion "BinaryToString" aus AutoIT in C#. Ich habe diese nirgendwo im Internet gefunden, daher poste ich mal meine Version davon hier.

    Code:
            private string BinaryToString(string str)
            {
                str = str.Replace("0x", "");
    
                string newstr = "";
    
                for(int i = 0; i < str.Length; i += 2)
                {
                    int hexStr = int.Parse(str, System.Globalization.NumberStyles.HexNumber);
                    newstr += (char)hexStr;
                }
    
                return newstr;
            }​
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.