Example #1
0
    public static void Main(string[] argv)
    {
        if (argv.Length == 2)
        {
            try
            {
                NBFSNet NBFS = new NBFSNet();

                if (argv[0].ToLower().Equals("encode"))
                {
                    Console.WriteLine(Convert.ToBase64String(NBFS.EncodeBinaryXML(System.Text.ASCIIEncoding.ASCII.GetString(Convert.FromBase64String(argv[1])))));
                }
                else
                {
                    Console.WriteLine(Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(NBFS.DecodeBinaryXML(Convert.FromBase64String(argv[1])))));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(e.Message)));
            }
        }
        else
        {
            Console.WriteLine("Usage: NBFS [encode|decode] Base64Data\n\nNOTE: All output, including exceptions, will be returned as a Base64 string.");
        }
    }
Example #2
0
    public static void Main(string[] argv)
    {
        if (argv.Length == 2)
        {
            string outputPathSuffix = "_out";
            string inputPath        = argv[1];

            try
            {
                NBFSNet NBFS = new NBFSNet();

                // Some antiviruses might block large console output, so, using file output instead
                if (argv[0].ToLower().Equals("encode"))
                {
                    //Console.WriteLine(Convert.ToBase64String(NBFS.EncodeBinaryXML(System.Text.ASCIIEncoding.ASCII.GetString(Convert.FromBase64String((new StreamReader(inputPath)).ReadToEnd())))));
                    File.WriteAllBytes(inputPath + outputPathSuffix, NBFS.EncodeBinaryXML(System.Text.ASCIIEncoding.ASCII.GetString(Convert.FromBase64String((new StreamReader(inputPath)).ReadToEnd()))));
                }
                else
                {
                    //Console.WriteLine(NBFS.DecodeBinaryXML(Convert.FromBase64String((new StreamReader(argv[1])).ReadToEnd())));
                    File.WriteAllText(inputPath + outputPathSuffix,
                                      NBFS.DecodeBinaryXML(Convert.FromBase64String((new StreamReader(inputPath)).ReadToEnd())));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message + " " + e.StackTrace);
            }
        }
        else
        {
            Console.WriteLine("Usage: NBFS [encode|decode] Base64DataFile.");
        }
    }
Example #3
0
        public void Test()
        {
            //var t =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qiYSf88U1HKvs3JYgVSN0eNdWoAn+6sqsAH+DRXmVJUBiL2N2KYD49b8iplE4opG5Qp5xyDzVIAG5glJqu9XVTK1Of1+nxbhc3dxBsrkjXge7RRQhMN2utG/LSlFBufU20sxhgkRcFitKZC63xa1QtEXcoj6NEdy7eUxxIX7Mex6zfYGXZJNdywA07ZlSRPcMCNKN+vwKFJY1jkJcJLBV6SeanIS5SXlnmpxEsrvKTw0hleWvXUr2AgwLvXzfKZ775ZiM183Pf5TxtL777O/QLYiP/Sz08Vz+05MP32t1dPman3wt17MZaHYLg0VEfyYR34P1YppzZh5t1bRcBSNKQ3H6zGITQGjfpJDOdoSCfJH8JhH7pr72a35dgncW8BiK4ODDUhHdlxSGEUDqJABzAu2s7jezYfegdR4IhvKyLn0J4fU8yYMJbNCSd0lc4RDcANYXyy7iExLYiCGBXi4t2dFE2PiKSwTGlsJBIR03HnFB3ahoUwptSaGfTh/kyWsOOk3HYufSQzubo2JqM72zaLcWJSwH3RhKTK5JRiK8HjTQRboR9sopjVS7rWShJuIpk3SkRz6x7mbyv1003UExQygWF0dWa8qDC1DepQEwmEItTWNhWfbFZRZ1M67C+tVIebuZGCSo9b5QI1WgmfaCLM6kV6fL6zXOAdOFG1Cc95OI7zceB/jvNyh7cLgVZzYkhy3KBbNhAYNxNc7fH4MQufzYXFcDwcFcOimIhEo9FIMhxPxeAxnkzAclQcEdOJVCQci4upVCLqx5NR1H6rer560b5if119E8ZP7Y2Q/X71Ajxet69WL4fq7+0b8Pa6veHHDjWUTifi4UgknIxFRw1acqoeI2cFjah6STCsrj8gn3asXHOp59009OOGnLA/AP6fgQTXQiDXDftm9bwjyg37c2fZlbO2fMX+CqjhtR87tRH7I5htgAaX7Kv2l/j9TftK9TWYbNjX4LsL1YshMQRfbthfANVlANwAvs5OFomAbk7j7kNlg/2RW58cWv/h+2BvLzc6YDqdwYRVa4zeGOT+BsO2nolXFAAA");
            //using (MemoryStream ms = new MemoryStream(t))
            //{
            //    StreamReader readStream = new StreamReader(ms);
            //    BinaryWriter b = new BinaryWriter(readStream.BaseStream);
            //  //  string data = readStream.ReadToEnd();
            //    result.Write(b);
            //   var tt = result.ToResult();
            //}



            NBFSNet NBFS = new NBFSNet();
            //   var filetext = File.ReadAllText("C:\\Users\\7751-00-099\\Desktop\\binary.txt");
            //  var en = Convert.ToBase64String(NBFS.EncodeBinaryXML(System.Text.ASCIIEncoding.ASCII.GetString(Convert.FromBase64String("H4sIAAem5mEA/+0cW2wc1XVnH7M7fsROIDwSkjgkhiT2rr1rrx3DpoqfyUKcOF4TKMZsZmev7YlndzYzs06cQilVHylKIdBCoVQlVFRV1Ra1qEofUqu2f1C+KvWjvIRKCq0E6kel8lGp6Tl3ZuzZ3Zn1rmM3DngiX8/cx7nnnHue9954f30in8qI2jBRVX6KBFr75UxGzkKZk7Mkq6khrMhnRYHXRDkbGlP4rJqTFS10rzC536+Qk3miahfeOepiXC7XZXjwNz51biiOl4CLZycVPqRXtzYdI4oKYPd1h9rxX2tTf17S8grZlyV5TeGl1qaRfEoShbvJ3Jg8Q7L7ot2pVNdeEo0KfLojkk7XeWCW+22QVg6JqWWA70NyuspQscCafl6Shok2LacNZvph6EYVptHIlEhUbO+Xsxo5rdXxylQ+A5AOiaq2JYa1Ci9oY3M58pmZZLKPF2bE7NSQSKT0jTEdZnH9tlgCZhERKwqyuP3WWGKaV0h6gNd4hy6bY72CJs6K2ly8BLzH5/F4PZ73mcScqpEMkCpJREA61dABkiWKKISAacd4KU9GeFE5HhkfN7omNAWgtDZlVEFWJOsqdFa6Cqnubj4qRLvCPR2dpH1vz0SrCfxI6gSgsbzAJ8Ynthng78kCNxJAHS+JZ+iyHpSlNFHajPZRMmmwITRMMimigCDINv2Di6hR4dqhDJ9zrxZOl6CuC1IobhElALxiKofrUWtQeCAvptGOcF4sfFiwWKBqcQEoarwfg82xdq+FWneSdydT7qTgTqbdSeJOTrqTU+7ktDspupMn3MkZ18IT8PvdxjMU+Sf34Q5y8NHmZ5Wah59524+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zxm7PFZpAwjIRoS3Y9fw+bXOH4dNr8eQNrRab9XGKW09KE//4TGKtSEeh65yrRxGDM0jJji2HDUfPOh2bkW7SY9ohBMoa9ViWb+xyav56IjPaOElywozivN8VXjC241xGCASGSKp/dL7S57cA9ikcQlvO8KbAsqb5WKj4yvNd5RPPzGO+Ot5r9nsMddlV195XikDs0K4sodp8uOVeMFVQSrHiiomkJ2oNxfbeVzdiws9RTTFk/hw3W9VuUXRYNeU24UFuTsmB5DViMcHIaL3AmElqxcJQJmu1/jlSmitfv1/17Q7vF62hcH0WK2DUKWOPfKNRpKVnttl5sxY08ugyqE2oa30tksFOsKN32MS8w57CeY/U5CcZ3NZo/RWcXOxOyMp8IbbTd9jO6z2H3K7H4KcSjcOOFO035zUKw39YY5YQ44A8XOns6ecDhNUsEwIZFgZ7R9MsjznUKwI9WZaifhjmhKMO9jP4QihhyoWj7odWcNRCHAG9fsWF3qNui/UErMC3jrFqrwLl6NLpb4Wp+2wmQYN8Mw1csq+zAg8w0zpuqlq746JJL9PMZ+y2hM2UfQ4xn6zX7BtaJ/aYN99BqNjdgvAuIb6Ja+oTl6ZFTDoI7Tv1SAPTjkH4dEsl+GYt8xWUw3lY6qKKLYzX4FQAwYMnhFkOiNWAatTNBQ8IXD8rOo7qpt02PYNGvbdA6b0HCg1jNz1j5fN/s8jk0PGU2FJ/TnkWlnXa6FKGttu60CKfQ/tsayall2bo1lVbKMQQ1GVfU/vsa7asXtvMmytTOESsVNvnz5Mp4jsE8By2623dI+JAszTAb64NY2903o58PiXNWRxEr/pRmn/ZPzS8o/VxLbanZGnsbiGeQ6vq0+WspkyW5KAEoW9yz2esZ1dbLf1SWqS8prn0MmotpxzyMnkZ31BUhS04e9MP9jvwNFpiSDWkmqOMyN2O9a8hkaj7MXVp2pYF90SieeN9OJF+fTCUSffQmK25ySgAJUd7Pfx5h7kbyhcAhNEF5gapn/AesnkfMrUgAA");
            //  var y = BitConverter.ToString(t);
            //   string r = Encoding.UTF8.GetString(t);

            //using (var receiveStream = Response.GetResponseStream())
            //{
            //    StreamReader readStream  new StreamReader(receiveStream);
            //    readStream = String.IsNullOrWhiteSpace(Response.CharacterSet) ? new StreamReader(receiveStream) : new StreamReader(receiveStream, Encoding.GetEncoding(Response.CharacterSet));
            //    string data = readStream.ReadToEnd();
            //    HtmlAgilityPack.HtmlDocument document = new HtmlAgilityPack.HtmlDocument();
            //    document.LoadHtml(data);
            //    HtmlNode formNode = document.DocumentNode.SelectSingleNode(findNode);

            //    inputParameter = formNode.Elements("input").Where(type => type.GetAttributeValue("type", "hidden") == "hidden").Cast<HtmlNode>()
            //        .Select(elem => $"{elem.GetAttributeValue("name", "default")}={elem.GetAttributeValue("value", "default")}")
            //        .Aggregate((element, next) => element + (string.IsNullOrWhiteSpace(element) ? string.Empty : "&") + next);
            //    if (isStep3)
            //    {
            //        inputParameterStep3 = formNode.Elements("input").Where(type => type.GetAttributeValue("type", "hidden") == "hidden").Cast<HtmlNode>()
            //            .Select(elem => $"------WebKitFormBoundaryTwIa3JXXvh1tOcrg\r\nContent-Disposition: form-data; name=\"{elem.GetAttributeValue("name", "default")}\"\r\n\r\n{elem.GetAttributeValue("value", "default")}")
            //            .Aggregate((element, next) => element + (string.IsNullOrWhiteSpace(element) ? string.Empty : "\r\n") + next);
            //    }
            //    readStream.Close();
            //    receiveStream.Close();
            //}


            var dec = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(NBFS.DecodeBinaryXML(
                                                                                    Convert.FromBase64String("H4sIAICt5mEA/+0cW2wc1XVnH7M7sZ04gfBISOK8H/auvWuvHcOmip9kwU6MNwSKMZvZ2Wt74tkdZ2bWyUa0tEhtKQqQ0IJKQSVUtFWlFhVU0VKpVds/aP8qPni0QiWFVipfVduPSk3PuTPjnd2d2YdjNw54kO/O3Me555x7nvfecLgpkUtlRG2UqCo/TQJtA3ImI2ehnJOzJKupIazIZUWB10Q5Gzqu8Fl1Tla00H3C1GG/Qk7niKpdch11MS6X6wo8+ItPoxuKk2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MpgTzxubDKGLIgbrlg16I1EAUArxxzY7VpW6D/oNSYl7AW1uowrt4a3SxxNemtBUmw7gZhqlfVtkvADLfMGOqPrrqK0Mi2S9i7LeExpR9BD2eod/sl1zL+m/x2S9fp7ER+yggvoFu6Ruao0dGaxjUcfpvmbEHh/zjkEj2K1AcoldVy0fVFFHsZ78KIAatl14XC4neiGXQygQNBS8clj+G6q7aNj2OTfO2TeexCQ0Haj2Tt/Z5wuzzJDY9bDQVn9BfQKY95nIVoqzV7bYapND/+CrL6mXZ+VWW1ckyBjUYVdX/5Crv6hW3CybLVs8QahU3+cqVK3iOwD4NLLvVdkt7RBZmmQz0wa1t7pvQz4fF+bojieX+f1E47Z9cWFT+uZzY1rMz8gwWzyLX8W3l0VIhS3ZTAlCyuG9hr2dd1yb7XVmiuqi89jlkIqod9zxyEtnZVIQkNX3YC/M/9gUoMmUZ1HJSxWFuxH7Hks/QeJy9tOJMBfuSUzrxvJlOvLSQTiD67MtQ7HFKAopQ3c9+D2PuKnlD8RCaILzINDD/Az4eBgdNTgAA"))));
            //H4sIAJuh5mEA / +
        }
Example #4
0
    public static void Main(string[] argv)
    {
        if (argv.Length == 2)
        {
            try
            {
                NBFSNet NBFS = new NBFSNet();

                if (argv[0].ToLower().Equals("encode"))
                {
                    Console.WriteLine(Convert.ToBase64String(NBFS.EncodeBinaryXML(System.Text.ASCIIEncoding.ASCII.GetString(Convert.FromBase64String(argv[1])))));
                }
                else
                {
                    Console.WriteLine(Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(NBFS.DecodeBinaryXML(Convert.FromBase64String(argv[1])))));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(e.Message)));
            }
        }
        else
        {
            Console.WriteLine("Usage: NBFS [encode|decode] Base64Data\n\nNOTE: All output, including exceptions, will be returned as a Base64 string.");
        }
    }