public static bool CreateAccount(string username, string email, string pwd, string fname, string proxy, string CreateMacro)
        {
            // READ iMacros Code
            // SET variables
            // Execute the code
            // Return success / failure --> Save to DB??

            bool Success = false;

            
            
            // tblaccts.Filter = Projects.ColumnNames.Id + " = " + nextemail;
            if (email != "")
            {

                m_app = new iMacros.App();
                iMacros.Status s;

                s = m_app.iimOpen("", true, m_timeout);
                s = m_app.iimSet("Username", username);
                s = m_app.iimSet("Email", email);
                s = m_app.iimSet("Password", pwd);
                s = m_app.iimSet("FirstName", fname);
                s = m_app.iimSet("Proxy", proxy);

                // Execute macro
                s = m_app.iimPlayCode(CreateMacro, m_timeout);
                // Success = m_app.iimGetExtract(1);
                try
                {
                    s = m_app.iimClose(close_timeout);
                }
                catch
                {
                    // 
                    goto JustContinue;
                }

            JustContinue:

                m_app = null;

                // Get variable from macro and return
            }


            // *************************************************
            Success = true; // TEMPORARY VALUE for DEBUGGING 
            // *************************************************

            return Success;
        }
Beispiel #2
0
        private void btStart_Click(object sender, EventArgs e) //start button
        {
            //List<SimpleStringString> users = GetUsers();
            //string IP = "10.0.30.46";

            if (tbUrl.Text != "" && lbIpList.Items.Count > 0)
            {
                lbResults.Items.Clear();
                pbProgress.Maximum = lbIpList.Items.Count;
                pbProgress.Minimum = 0;
                pbProgress.Value   = 0;
                pbProgress.Step    = 1;

                iMacros.App m_app = new iMacros.App();

                foreach (string IP in lbIpList.Items)
                {
                    DoWork(m_app, IP);
                    pbProgress.PerformStep();
                    label3.Text             = (pbProgress.Value * 100 / pbProgress.Maximum).ToString() + " %";
                    lbResults.SelectedIndex = lbResults.Items.Count - 1;
                    lbResults.SelectedIndex = -1;
                }

                m_app.iimExit();
            }
        }
        public static bool ConfirmAccount(string email, string pwd, string lnkstructure, string sdremail, string proxy, int ShiftLinkBy)
        {
            // GET iMacros code (or use a static code)
            // SET Variables
            // Execute the code
            // Return Success / Failure

            string LinkExtracted = HotmailPOP.ExtractConfLink(email, pwd, lnkstructure, sdremail, ShiftLinkBy);
            bool   Success       = false;

            if (LinkExtracted != null)
            {
                // Static Code for all programs
                string macro = "Version Build = 8032216" + "\r\n";
                macro = macro + "TAB T=1" + "\r\n";
                macro = macro + "TAB CLOSEALLOTHERS" + "\r\n";
                macro = macro + "URL GOTO=about:blank" + "\r\n";
                macro = macro + "WAIT SECONDS=3" + "\r\n";
                macro = macro + "PROXY ADDRESS={{Proxy}}" + "\r\n";
                // macro = macro + "ONLOGIN USER=Jukas PASSWORD=7qUzTq7V" + "\r\n";
                macro = macro + "URL GOTO={{ConfLink}}" + "\r\n";
                macro = macro + "WAIT SECONDS=3" + "\r\n";

                m_app = new iMacros.App();
                iMacros.Status s;

                s = m_app.iimOpen("", true, 5);
                s = m_app.iimSet("ConfLink", LinkExtracted);
                s = m_app.iimSet("Email", email);
                s = m_app.iimSet("Password", pwd);
                s = m_app.iimSet("Proxy", proxy);

                // Execute macro
                s = m_app.iimPlayCode(macro, m_timeout);
                // Success = m_app.iimGetExtract(1);
                try
                {
                    s = m_app.iimClose(close_timeout);
                }
                catch
                {
                    //
                    goto JustContinue;
                }

JustContinue:

                m_app = null;

                // Get variable from macro and return

                // *************************************************
                Success = true; // TEMPORARY VALUE for DEBUGGING
                // *************************************************
            }

            return(Success);
        }
        public static string PostQuestionAskCom(string Email, string Password, string Topic, string Proxy, string Macro)
        {
            // GET iMacros code
            // SET Variables
            // Execute the code
            // Return Success / Failure
            //bool Success = false;

            string QuestionLink = "";

            m_app = new iMacros.App();
            iMacros.Status s;

            s = m_app.iimOpen("", true, 5);

            s = m_app.iimSet("Email", Email);
            s = m_app.iimSet("Password", Password);
            s = m_app.iimSet("Proxy", Proxy);
            s = m_app.iimSet("Topic", Topic);

            // Execute macro
            s = m_app.iimPlayCode(Macro, m_timeout);

            try
            {
                QuestionLink = m_app.iimGetExtract(1);
            }
            catch
            {
                goto Continue1;
            }

Continue1:

            try
            {
                s = m_app.iimClose(close_timeout);
            }
            catch
            {
                //
                goto JustContinue;
            }

JustContinue:

            m_app = null;

            // Get variable from macro and return


            // *************************************************
            //Success = true; // TEMPORARY VALUE for DEBUGGING
            // *************************************************

            return(QuestionLink);
        }
Beispiel #5
0
        private void runLogin(string serverName, string userName, string password, string accountNumber)
        {
            int timeout = 60;

            iMacros.App oApp = new iMacros.App();
            // C# snippet generated by iMacros Editor.
            // See http://wiki.imacros.net/Web_Scripting for details on how to use the iMacros Scripting Interface.

            iMacros.AppClass iim = new iMacros.AppClass();
            // iMacros.Status status = iim.iimOpen("", true, timeout);
            iMacros.Status status;
            StringBuilder  macro = new StringBuilder();

            macro.AppendLine(@"VERSION BUILD=7401110 RECORDER=FX");
            macro.AppendLine(@"SET !TIMEOUT 180");
            macro.AppendLine(@"SET !ENCRYPTION NO");
            macro.AppendLine(@"SET !EXTRACT_TEST_POPUP NO");
            macro.AppendLine(@"TAB T=1");
            //macro.AppendLine(@"URL GOTO=https://qatelau40/CAT/Login.aspx?gru=000000000");
            //macro.AppendLine(@"URL GOTO=https://" + ServerName.Text + @"/CAT/Login.aspx?gru=000000000");
            macro.AppendLine(@"URL GOTO=https://" + serverName + @"/CAT/Login.aspx?gru=000000000");
            //macro.AppendLine(@"TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:Login1_UserName CONTENT=admin");
            //macro.AppendLine(@"TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:Login1_UserName CONTENT=" + UserName.Text);
            macro.AppendLine(@"TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:Login1_UserName CONTENT=" + userName);
            //macro.AppendLine(@"TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:form1 ATTR=ID:Login1_Password CONTENT=admin");
            //macro.AppendLine(@"TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:form1 ATTR=ID:Login1_Password CONTENT=" + Password.Text);
            macro.AppendLine(@"TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:form1 ATTR=ID:Login1_Password CONTENT=" + password);
            macro.AppendLine(@"TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form1 ATTR=ID:Login1_Login");
            macro.AppendLine(@"TAG POS=1 TYPE=SPAN ATTR=ID:MainNavigation1_lblClientName");
            macro.AppendLine(@"TAG POS=1 TYPE=TD ATTR=TXT:Telstra");
            macro.AppendLine(@"TAG POS=1 TYPE=TD ATTR=CLASS:homeleftcolumn");
            macro.AppendLine(@"TAG POS=1 TYPE=SPAN ATTR=TXT:Find<SP>Account");
            //macro.AppendLine(@"TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:AccountSearch1_SearchBox CONTENT=1525853400");
            //macro.AppendLine(@"TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:AccountSearch1_SearchBox CONTENT=" + AccountNumber.Text);
            macro.AppendLine(@"TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:AccountSearch1_SearchBox CONTENT=" + accountNumber);
            macro.AppendLine(@"TAG POS=1 TYPE=INPUT:RADIO FORM=ID:form1 ATTR=ID:AccountSearch1_rblSearchType_1");
            macro.AppendLine(@"TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form1 ATTR=ID:AccountSearch1_SearchButton");
            macro.AppendLine(@"'TAG POS=1 TYPE=TD ATTR=TXT:CSR<SP>Login");
            macro.AppendLine(@"TAG POS=1 TYPE=A ATTR=ID:FindAccountGridView_ctl02_linkCSRLogin");
            macro.AppendLine(@"FRAME F=2");
            macro.AppendLine(@"'TAG POS=1 TYPE=IMG ATTR=SRC:*cv/scripts/images/eng/telstra*/b_logout_off.gif");
            string macroCode = macro.ToString();

            //status = iim.iimOpen("-V7", true, timeout);
            status          = iim.iimOpen("-FX", true, timeout);
            OutputBox.Text += status.ToString() + "\r\n";
            status          = iim.iimDisplay("Interface version =\n" + iim.iimGetInterfaceVersion().ToString(), timeout);
            OutputBox.Text += status.ToString() + "\r\n";
            status          = iim.iimPlayCode(macroCode, timeout);
            OutputBox.Text += status.ToString() + "\r\n";
            status          = iim.iimClose(timeout);
            OutputBox.Text += status.ToString() + "\r\n";
        }
Beispiel #6
0
        private void runLogin(string serverName, string userName, string password, string accountNumber)
        {
            int timeout = 60;
            iMacros.App oApp = new iMacros.App();
            // C# snippet generated by iMacros Editor.
            // See http://wiki.imacros.net/Web_Scripting for details on how to use the iMacros Scripting Interface.

            iMacros.AppClass iim = new iMacros.AppClass();
            // iMacros.Status status = iim.iimOpen("", true, timeout);
            iMacros.Status status;
            StringBuilder macro = new StringBuilder();
            macro.AppendLine(@"VERSION BUILD=7401110 RECORDER=FX");
            macro.AppendLine(@"SET !TIMEOUT 180");
            macro.AppendLine(@"SET !ENCRYPTION NO");
            macro.AppendLine(@"SET !EXTRACT_TEST_POPUP NO");
            macro.AppendLine(@"TAB T=1");
            //macro.AppendLine(@"URL GOTO=https://qatelau40/CAT/Login.aspx?gru=000000000");
            //macro.AppendLine(@"URL GOTO=https://" + ServerName.Text + @"/CAT/Login.aspx?gru=000000000");
            macro.AppendLine(@"URL GOTO=https://" + serverName + @"/CAT/Login.aspx?gru=000000000");
            //macro.AppendLine(@"TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:Login1_UserName CONTENT=admin");
            //macro.AppendLine(@"TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:Login1_UserName CONTENT=" + UserName.Text);
            macro.AppendLine(@"TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:Login1_UserName CONTENT=" + userName);
            //macro.AppendLine(@"TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:form1 ATTR=ID:Login1_Password CONTENT=admin");
            //macro.AppendLine(@"TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:form1 ATTR=ID:Login1_Password CONTENT=" + Password.Text);
            macro.AppendLine(@"TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:form1 ATTR=ID:Login1_Password CONTENT=" + password);
            macro.AppendLine(@"TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form1 ATTR=ID:Login1_Login");
            macro.AppendLine(@"TAG POS=1 TYPE=SPAN ATTR=ID:MainNavigation1_lblClientName");
            macro.AppendLine(@"TAG POS=1 TYPE=TD ATTR=TXT:Telstra");
            macro.AppendLine(@"TAG POS=1 TYPE=TD ATTR=CLASS:homeleftcolumn");
            macro.AppendLine(@"TAG POS=1 TYPE=SPAN ATTR=TXT:Find<SP>Account");
            //macro.AppendLine(@"TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:AccountSearch1_SearchBox CONTENT=1525853400");
            //macro.AppendLine(@"TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:AccountSearch1_SearchBox CONTENT=" + AccountNumber.Text);
            macro.AppendLine(@"TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:AccountSearch1_SearchBox CONTENT=" + accountNumber);
            macro.AppendLine(@"TAG POS=1 TYPE=INPUT:RADIO FORM=ID:form1 ATTR=ID:AccountSearch1_rblSearchType_1");
            macro.AppendLine(@"TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form1 ATTR=ID:AccountSearch1_SearchButton");
            macro.AppendLine(@"'TAG POS=1 TYPE=TD ATTR=TXT:CSR<SP>Login");
            macro.AppendLine(@"TAG POS=1 TYPE=A ATTR=ID:FindAccountGridView_ctl02_linkCSRLogin");
            macro.AppendLine(@"FRAME F=2");
            macro.AppendLine(@"'TAG POS=1 TYPE=IMG ATTR=SRC:*cv/scripts/images/eng/telstra*/b_logout_off.gif");
            string macroCode = macro.ToString();

            //status = iim.iimOpen("-V7", true, timeout);
            status = iim.iimOpen("-FX", true, timeout);
            OutputBox.Text += status.ToString() + "\r\n";
            status = iim.iimDisplay("Interface version =\n" + iim.iimGetInterfaceVersion().ToString(), timeout);
            OutputBox.Text += status.ToString() + "\r\n";
            status = iim.iimPlayCode(macroCode, timeout);
            OutputBox.Text += status.ToString() + "\r\n";
            status = iim.iimClose(timeout);
            OutputBox.Text += status.ToString() + "\r\n";
        }
        public static bool CreateAccount(string username, string email, string pwd, string fname, string proxy, string CreateMacro)
        {
            // READ iMacros Code
            // SET variables
            // Execute the code
            // Return success / failure --> Save to DB??

            bool Success = false;



            // tblaccts.Filter = Projects.ColumnNames.Id + " = " + nextemail;
            if (email != "")
            {
                m_app = new iMacros.App();
                iMacros.Status s;

                s = m_app.iimOpen("", true, m_timeout);
                s = m_app.iimSet("Username", username);
                s = m_app.iimSet("Email", email);
                s = m_app.iimSet("Password", pwd);
                s = m_app.iimSet("FirstName", fname);
                s = m_app.iimSet("Proxy", proxy);

                // Execute macro
                s = m_app.iimPlayCode(CreateMacro, m_timeout);
                // Success = m_app.iimGetExtract(1);
                try
                {
                    s = m_app.iimClose(close_timeout);
                }
                catch
                {
                    //
                    goto JustContinue;
                }

JustContinue:

                m_app = null;

                // Get variable from macro and return
            }


            // *************************************************
            Success = true; // TEMPORARY VALUE for DEBUGGING
            // *************************************************

            return(Success);
        }
        public static bool LoginAndPost(string Username, string Email, string Password, string Proxy, string LinkToPost, string GeneratedResponse, string macro)
        {
            // GET iMacros code
            // SET Variables
            // Execute the code
            // Return Success / Failure
            bool Success = false;

            // Generate answer:

            // Post the Response iMacros

            m_app = new iMacros.App();
            iMacros.Status s;

            s = m_app.iimOpen("", true, 5);
            s = m_app.iimSet("Username", Username);
            s = m_app.iimSet("Email", Email);
            s = m_app.iimSet("Password", Password);
            s = m_app.iimSet("Proxy", Proxy);
            s = m_app.iimSet("LinkToPost", LinkToPost);
            s = m_app.iimSet("Answer", GeneratedResponse);

            // Execute macro
            s = m_app.iimPlayCode(macro, m_timeout);
            // Success = m_app.iimGetExtract(1);

            try
            {
                s = m_app.iimClose(close_timeout);
            }
            catch
            {
                //
                goto JustContinue;
            }

JustContinue:
            m_app = null;

            // Get variable from macro and return


            // *************************************************
            Success = true; // TEMPORARY VALUE for DEBUGGING
            // *************************************************


            return(Success);
        }
Beispiel #9
0
        private void cmdRun_Click(object sender, System.EventArgs e)
        {
            m_app = new iMacros.App();
            iMacros.Status s;
            string         macro = Iteration();

            MessageBox.Show(macro);
            // macro = textBox2.Text;
            s = m_app.iimInit("", true, "", "", "", 5);
            s = m_app.iimSet("Username", "Rita");
            s = m_app.iimPlayCode(macro, m_timeout);
            s = m_app.iimExit(m_timeout);
            /* */
            /// LogStatus(s);
        }
Beispiel #10
0
        private void btPlayOnly_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < 3; i++)
            {
                iMacros.App    m_app = new iMacros.App();
                iMacros.Status s     = m_app.iimInit("", false, "", "", "", 5);

                if (s == iMacros.Status.sOk || s == iMacros.Status.sInternal)
                {
                    s = m_app.iimPlay(tbIIM.Text, 300);
                }
                string result = m_app.iimGetLastError();
                System.Threading.Thread.Sleep(10000);
                m_app.iimExit();
            }
        }
Beispiel #11
0
        public string ImacrosTinyurlConvert(string longurl)
        {
            string shorturl = "";

ShortenAgain:
            iMacros.App m_app = new iMacros.App();
            iMacros.Status s;

            string macro = GetTinyURLmacro();

            s = m_app.iimOpen("", true, 5);
            s = m_app.iimSet("Longurl", longurl);
            // Execute macro
            s = m_app.iimPlayCode(macro, m_timeout);

            try
            {
                shorturl = m_app.iimGetExtract(1);
            }
            catch
            {
                //
                goto ShortenAgain;
            }

            try
            {
                s = m_app.iimClose(close_timeout);
            }
            catch
            {
                //
                goto JustContinue;
            }

JustContinue:

            m_app = null;

            // Get variable from macro and return


            return(shorturl);
        }
Beispiel #12
0
        public string ImacrosTinyurlConvert(string longurl)
        {
            string shorturl = "";

        ShortenAgain:
            iMacros.App m_app = new iMacros.App();
            iMacros.Status s;

            string macro = GetTinyURLmacro();

            s = m_app.iimOpen("", true, 5);
            s = m_app.iimSet("Longurl", longurl);
            // Execute macro
            s = m_app.iimPlayCode(macro, m_timeout);

            try
            {
                shorturl = m_app.iimGetExtract(1);
            }
            catch
            {
                //
                goto ShortenAgain;
            }

            try
            {
                s = m_app.iimClose(close_timeout);
            }
            catch
            {
                // 
                goto JustContinue;
            }

        JustContinue:

            m_app = null;

            // Get variable from macro and return


            return shorturl;
        }
Beispiel #13
0
        private bool DoWork(iMacros.App m_app, string IP)
        {
            iMacros.Status s = m_app.iimInit("", false, "", "", "", 5);

            if (s == iMacros.Status.sOk || s == iMacros.Status.sInternal)
            {
                m_app.iimSet("gotourl", string.Format(tbUrl.Text, IP));
                m_app.iimSet("username", tbUsername.Text);
                m_app.iimSet("password", tbPassword.Text);
                s = m_app.iimPlay(tbIIM.Text, 300);
                string result = m_app.iimGetLastError();

                lbResults.Items.Add(IP + "\t" + result);

                return(true);
            }
            else
            {
                //listBox1.Items.Add(IP + "\t " + m_app.iimGetLastError());
                return(false);
            }
        }
 private void cmdRun_Click(object sender, System.EventArgs e)
 {
     m_app = new iMacros.App();
     iMacros.Status s;
     string macro = Iteration();
     MessageBox.Show(macro);
     // macro = textBox2.Text;
     s = m_app.iimInit("", true, "", "", "", 5);
     s = m_app.iimSet("Username", "Rita");
     s = m_app.iimPlayCode(macro, m_timeout);
     s = m_app.iimExit(m_timeout);
     /* */
     /// LogStatus(s);
 }
        public static bool CreateAccountPurseBlog(string username, string email, string pwd, string fname, string proxy, string CreateMacro)
        {

            // STANDARD VARIABLES
            String result = "";
            int errors = 0;

            string ConfirmationTxt = "";
            int inc = 0;
            bool Success = false;
            if (email != "")
            {

                m_app = new iMacros.App();
                iMacros.Status s;
            
            TryAgain:
                try
                {
                    s = m_app.iimOpen("", true, m_timeout);
                    if (s != iMacros.Status.sOk) errors++;
                    result = result + "open " + Convert.ToString(s) + "; ";

                    s = m_app.iimSet("Username", username);
                    if (s != iMacros.Status.sOk) errors++;
                    result = result + "set " + Convert.ToString(s) + "; ";

                    s = m_app.iimSet("Email", email);
                    if (s != iMacros.Status.sOk) errors++;
                    result = result + "set " + Convert.ToString(s) + "; ";

                    s = m_app.iimSet("Password", pwd);
                    if (s != iMacros.Status.sOk) errors++;
                    result = result + "set " + Convert.ToString(s) + "; ";

                    s = m_app.iimSet("FirstName", fname);
                    if (s != iMacros.Status.sOk) errors++;
                    result = result + "set " + Convert.ToString(s) + "; ";

                    s = m_app.iimSet("Proxy", proxy);
                    if (s != iMacros.Status.sOk) errors++;
                    result = result + "set " + Convert.ToString(s) + "; ";

                    // Execute macro
                    s = m_app.iimPlayCode(CreateMacro, m_timeout);
                    if (s != iMacros.Status.sOk) errors++;
                    result = result + "play " + Convert.ToString(s) + "; ";

                    ConfirmationTxt = m_app.iimGetExtract(1);

                }
                catch
                {
                    MessageBox.Show("Result: " + result);
                    goto TryAgain;
                }
                
                string[] testsplit = ConfirmationTxt.Split(' ');
                
                if (ConfirmationTxt != "" && ConfirmationTxt != "NODATA" && ConfirmationTxt != "#EANF#" && testsplit.Count() >= 7)
                {
                    string FinishCreateMacro = "";
                
                    FinishCreateMacro = FinishCreateMacro + "WAIT SECONDS=3" + "\n";
                    FinishCreateMacro = FinishCreateMacro + "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:register ATTR=NAME:humanverify[input] CONTENT={{Solution}}" + "\n";
                    FinishCreateMacro = FinishCreateMacro + "TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:register ATTR=NAME:options[adminemail] CONTENT=NO" + "\n";
                    FinishCreateMacro = FinishCreateMacro + "WAIT SECONDS=3" + "\n";
                    FinishCreateMacro = FinishCreateMacro + "TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:register ATTR=CLASS:button" + "\n";
                    FinishCreateMacro = FinishCreateMacro + "WAIT SECONDS=3" + "\n";

                    s = m_app.iimSet("Solution", SolveCaptchaPurseBlog(ConfirmationTxt));
                    s = m_app.iimPlayCode(FinishCreateMacro, m_timeout);

                    Success = true; // TEMPORARY VALUE for DEBUGGING 
                
                }
                else
                {
                    inc++;
                    if (inc > 5)
                    {
                        Success = false; 
                        goto CloseApp;
                    }
                    s = m_app.iimClose();
                    m_app = null;
                    goto TryAgain;
                }

            CloseApp:
                try
                {
                    s = m_app.iimClose(close_timeout);
                }
                catch
                {
                    // 
                    goto JustContinue;
                }

            JustContinue:

                m_app = null;

                // Get variable from macro and return
            }


            // *************************************************
            // *************************************************

            return Success;
        }
        public static bool LoginAndPost(string Username, string Email, string Password, string Proxy, string LinkToPost, string GeneratedResponse, string macro)
        {
            // GET iMacros code
            // SET Variables
            // Execute the code
            // Return Success / Failure
            bool Success = false;

            // Generate answer:

            // Post the Response iMacros

                m_app = new iMacros.App();
                iMacros.Status s;

                s = m_app.iimOpen("", true, 5);
                s = m_app.iimSet("Username", Username);
                s = m_app.iimSet("Email", Email);
                s = m_app.iimSet("Password", Password);
                s = m_app.iimSet("Proxy", Proxy);
                s = m_app.iimSet("LinkToPost", LinkToPost);
                s = m_app.iimSet("Answer", GeneratedResponse);

                // Execute macro
                s = m_app.iimPlayCode(macro, m_timeout);
                // Success = m_app.iimGetExtract(1);

                try
                {
                    s = m_app.iimClose(close_timeout);
                }
                catch
                {
                    // 
                    goto JustContinue;
                }

            JustContinue:
                m_app = null;

                // Get variable from macro and return
            
            
            // *************************************************
            Success = true; // TEMPORARY VALUE for DEBUGGING 
            // *************************************************
          
            
            return Success;
        }
        public static bool ConfirmAccount(string email, string pwd, string lnkstructure, string sdremail, string proxy, int ShiftLinkBy)
        {
            // GET iMacros code (or use a static code)
            // SET Variables
            // Execute the code
            // Return Success / Failure

            string LinkExtracted = HotmailPOP.ExtractConfLink(email, pwd, lnkstructure, sdremail, ShiftLinkBy);
            bool Success = false;
            
            if (LinkExtracted != null)
            {

                // Static Code for all programs
                string macro = "Version Build = 8032216" + "\r\n";
                macro = macro + "TAB T=1" + "\r\n";
                macro = macro + "TAB CLOSEALLOTHERS" + "\r\n";
                macro = macro + "URL GOTO=about:blank" + "\r\n";
                macro = macro + "WAIT SECONDS=3" + "\r\n";
                macro = macro + "PROXY ADDRESS={{Proxy}}" + "\r\n";
                // macro = macro + "ONLOGIN USER=Jukas PASSWORD=7qUzTq7V" + "\r\n";
                macro = macro + "URL GOTO={{ConfLink}}" + "\r\n";
                macro = macro + "WAIT SECONDS=3" + "\r\n";

                m_app = new iMacros.App();
                iMacros.Status s;

                s = m_app.iimOpen("", true, 5);
                s = m_app.iimSet("ConfLink", LinkExtracted);
                s = m_app.iimSet("Email", email);
                s = m_app.iimSet("Password", pwd);
                s = m_app.iimSet("Proxy", proxy);

                // Execute macro
                s = m_app.iimPlayCode(macro, m_timeout);
                // Success = m_app.iimGetExtract(1);
                try
                {
                    s = m_app.iimClose(close_timeout);
                }
                catch
                {
                    // 
                    goto JustContinue;
                }

            JustContinue:

                m_app = null;

                // Get variable from macro and return

                // *************************************************
                Success = true; // TEMPORARY VALUE for DEBUGGING 
                // *************************************************
            }

            return Success;
        }
Beispiel #18
0
        public string[] CreateAccountWithCaptcha(Emailaccounts tblaccouts, string proxy, string CreateMacro)
        {
            string[] ErrAndId = new string[2];

            Dictionary <string, string> props = ParseProperties(tblaccouts.Allproperties);

            iMacros.App    m_app = new iMacros.App();
            iMacros.Status s     = new iMacros.Status();
            s = m_app.iimOpen("", true, m_timeout);

            /*
             * s = m_app.iimSet("Username", username);
             * s = m_app.iimSet("Email", email);
             * s = m_app.iimSet("Password", pwd);
             * s = m_app.iimSet("FirstName", fname);
             * s = m_app.iimSet("Proxy", proxy);
             * s = m_app.iimSet("Topic", topic);
             */

            // s = m_app.iimSet("Topic", topic);

            s = m_app.iimSet("Username", tblaccouts.Username);
            s = m_app.iimSet("Email", tblaccouts.Email);
            s = m_app.iimSet("Password", tblaccouts.Password);
            s = m_app.iimSet("FirstName", tblaccouts.FirstName);
            s = m_app.iimSet("LastName", tblaccouts.LastName);

            s = m_app.iimSet("BirthdayYYYYMMDD", tblaccouts.Birthday.ToString("yyyy-MM-dd"));
            s = m_app.iimSet("BirthdayDDMMYYYY", tblaccouts.Birthday.ToString("dd/MM/yyyy"));
            s = m_app.iimSet("BirthdayYYYY", tblaccouts.Birthday.ToString("yyyy"));
            s = m_app.iimSet("BirthdayYY", tblaccouts.Birthday.ToString("yy"));
            s = m_app.iimSet("BirthdayMM", tblaccouts.Birthday.ToString("MM"));
            s = m_app.iimSet("BirthdayMMM", tblaccouts.Birthday.ToString("MMM"));
            s = m_app.iimSet("BirthdayM", tblaccouts.Birthday.ToString("M"));
            s = m_app.iimSet("BirthdayDD", tblaccouts.Birthday.ToString("dd"));

            // FRENCH FORUMS:
            s = m_app.iimSet("StreetFR", tblaccouts.StreetFR);
            s = m_app.iimSet("PostalCodeFR", tblaccouts.PostalCodeFR);
            s = m_app.iimSet("CityFR", tblaccouts.CityFR);

            // AU and US:
            s = m_app.iimSet("PostalCodeAU", tblaccouts.PostalCodeAU);
            s = m_app.iimSet("PostalCodeUS", tblaccouts.PostalCodeFR);
            s = m_app.iimSet("PostalCodeDE", tblaccouts.PostalCodeDE);

            s = m_app.iimSet("Proxy", proxy);

            foreach (KeyValuePair <string, string> property in props)
            {
                s = m_app.iimSet(property.Key, property.Value);
            }


            // Execute macro
            s = m_app.iimPlayCode(CreateMacro, m_timeout);
            try
            {
                ErrAndId[1] = m_app.iimGetExtract(1);
                ErrAndId[0] = m_app.iimGetExtract(2);
            }
            catch
            {
            }

            try
            {
                s = m_app.iimClose(close_timeout);
            }
            catch
            {
                //
                goto JustContinue;
            }
JustContinue:
            m_app = null;

            return(ErrAndId);
        }
Beispiel #19
0
        public iMacrosPostReturnVars LoginAndPost(string Username, string Email, string Password, string Proxy, string LinkToPost, string GeneratedResponse, string macro)
        {
            string macrocheckifposted         = "";
            iMacrosPostReturnVars localposter = new iMacrosPostReturnVars();

            macrocheckifposted = getCheckifpostedmacro();

            iMacros.App    m_app = new iMacros.App();
            iMacros.Status s     = new iMacros.Status();

            s = m_app.iimOpen("", true, 5);
            s = m_app.iimSet("Username", Username);
            s = m_app.iimSet("Email", Email);
            s = m_app.iimSet("Password", Password);
            s = m_app.iimSet("Proxy", Proxy);
            s = m_app.iimSet("LinkToPost", LinkToPost);
            s = m_app.iimSet("Answer", GeneratedResponse);

            // Execute macro
            s = m_app.iimPlayCode(macro, m_timeout);

            string          pattern = @"http://.+/";
            Regex           rgx     = new Regex(pattern, RegexOptions.IgnoreCase);
            MatchCollection matches = rgx.Matches(GeneratedResponse);

            if (matches.Count > 0)
            {
                foreach (Match match in matches)
                {
                    s = m_app.iimSet("Shortener", match.Value);
                }
            }
            else
            {
                s = m_app.iimSet("Shortener", "http://eurl.me/");
            }

            s = m_app.iimPlayCode(macrocheckifposted, m_timeout);
            if (m_app.iimGetExtract(1) != "#EANF#" && m_app.iimGetExtract(1) != "NODATA")
            {
                localposter.setSuccess(true);
            }
            else
            {
                localposter.setSuccess(false);
            }

            if (m_app.iimGetExtract(2) != "NODATA")
            {
                localposter.setReturnURL(m_app.iimGetExtract(2));
            }

            try
            {
                s = m_app.iimClose(close_timeout);
            }
            catch
            {
                //
                goto JustContinue;
            }

JustContinue:
            m_app = null;

            return(localposter);
        }
Beispiel #20
0
        public bool ConfirmAccount(string email, ref string pwd, string lnkstructure, string sdremail, string proxy, int ShiftLinkBy)
        {
            // GET iMacros code (or use a static code)
            // SET Variables
            // Execute the code
            // Return Success / Failure

            confirmator = new HotmailPOP();

            string LinkExtracted = confirmator.ExtractConfLink(email, pwd, lnkstructure, sdremail, ShiftLinkBy);

            // bool Success = false;

            if (LinkExtracted != null && LinkExtracted != "")
            {
                if (LinkExtracted.Length > 3)
                {
                    if (LinkExtracted.Substring(0, 4) == "http")
                    {
                        // Static Code for all programs
                        string macro = "Version Build = 8032216" + "\r\n";
                        macro = macro + "TAB T=1" + "\r\n";
                        macro = macro + "TAB CLOSEALLOTHERS" + "\r\n";
                        macro = macro + "URL GOTO=about:blank" + "\r\n";
                        macro = macro + "WAIT SECONDS=3" + "\r\n";
                        macro = macro + "PROXY ADDRESS={{Proxy}}" + "\r\n";
                        macro = macro + "ONLOGIN USER=Jukas PASSWORD=7qUzTq7V" + "\r\n";
                        macro = macro + "URL GOTO={{ConfLink}}" + "\r\n";
                        macro = macro + "WAIT SECONDS=3" + "\r\n";

                        iMacros.App    m_app = new iMacros.App();
                        iMacros.Status s     = new iMacros.Status();

                        s = m_app.iimOpen("", true, 5);
                        s = m_app.iimSet("ConfLink", LinkExtracted);
                        s = m_app.iimSet("Email", email);
                        s = m_app.iimSet("Password", pwd);
                        s = m_app.iimSet("Proxy", proxy);

                        // Execute macro
                        s = m_app.iimPlayCode(macro, m_timeout);
                        // Success = m_app.iimGetExtract(1);
                        try
                        {
                            s = m_app.iimClose(close_timeout);
                        }
                        catch
                        {
                            //
                            goto JustContinue;
                        }

JustContinue:

                        m_app = null;

                        return(true);
                    }
                    else // if the extracted text is not HTTP, but a password:
                    {
                        pwd = LinkExtracted;
                        return(true);
                    }
                }
                else // if the extracted text is not HTTP, but a password:
                {
                    pwd = LinkExtracted;
                    return(true);
                }
            }
            else // if linkExtracted = null
            {
                return(false);
            }
        }
Beispiel #21
0
        // string username, string email, string pwd, string fname
        public bool CreateAccount(Emailaccounts tblaccouts, string proxy, string CreateMacro)
        {
            bool Success = false;

            if (tblaccouts.Email != "")
            {
                Dictionary <string, string> props = ParseProperties(tblaccouts.Allproperties);
                // string property;
                iMacros.App    m_app = new iMacros.App();
                iMacros.Status s     = new iMacros.Status();

                s = m_app.iimOpen("", true, m_timeout);

                // Set field values. Some are not existent in some iMacros scripts.
                // But they are set to cover the full spectrum of iMacros.

                s = m_app.iimSet("Username", tblaccouts.Username);
                s = m_app.iimSet("Email", tblaccouts.Email);
                s = m_app.iimSet("Password", tblaccouts.Password);
                s = m_app.iimSet("FirstName", tblaccouts.FirstName);
                s = m_app.iimSet("LastName", tblaccouts.LastName);
                s = m_app.iimSet("BirthdayYYYYMMDD", tblaccouts.Birthday.ToString("yyyy-MM-dd"));
                s = m_app.iimSet("BirthdayDDMMYYYY", tblaccouts.Birthday.ToString("dd/MM/yyyy"));
                s = m_app.iimSet("BirthdayYYYY", tblaccouts.Birthday.ToString("yyyy"));
                s = m_app.iimSet("BirthdayYY", tblaccouts.Birthday.ToString("yy"));
                s = m_app.iimSet("BirthdayMM", tblaccouts.Birthday.ToString("MM"));
                s = m_app.iimSet("BirthdayM", tblaccouts.Birthday.ToString("M"));
                s = m_app.iimSet("BirthdayMMM", tblaccouts.Birthday.ToString("MMM"));
                s = m_app.iimSet("BirthdayDD", tblaccouts.Birthday.ToString("dd"));

                // FRENCH FORUMS:
                s = m_app.iimSet("StreetFR", tblaccouts.StreetFR);
                s = m_app.iimSet("PostalCodeFR", tblaccouts.PostalCodeFR);
                s = m_app.iimSet("CityFR", tblaccouts.CityFR);

                // AU and DE:
                s = m_app.iimSet("PostalCodeAU", tblaccouts.PostalCodeAU);
                s = m_app.iimSet("PostalCodeUS", tblaccouts.PostalCodeFR);
                s = m_app.iimSet("PostalCodeDE", tblaccouts.PostalCodeDE);

                s = m_app.iimSet("Proxy", proxy);

                foreach (KeyValuePair <string, string> property in props)
                {
                    s = m_app.iimSet(property.Key, property.Value);
                }

                s = m_app.iimPlayCode(CreateMacro, m_timeout);

                try
                {
                    s = m_app.iimClose(close_timeout);
                }
                catch
                {
                    goto JustContinue;
                }

JustContinue:

                m_app = null;
            }


            // *************************************************
            Success = true; // TEMPORARY VALUE for DEBUGGING
            // *************************************************

            return(Success);
        }
        public static bool CreateAccountPurseBlog(string username, string email, string pwd, string fname, string proxy, string CreateMacro)
        {
            // STANDARD VARIABLES
            String result = "";
            int    errors = 0;

            string ConfirmationTxt = "";
            int    inc             = 0;
            bool   Success         = false;

            if (email != "")
            {
                m_app = new iMacros.App();
                iMacros.Status s;

TryAgain:
                try
                {
                    s = m_app.iimOpen("", true, m_timeout);
                    if (s != iMacros.Status.sOk)
                    {
                        errors++;
                    }
                    result = result + "open " + Convert.ToString(s) + "; ";

                    s = m_app.iimSet("Username", username);
                    if (s != iMacros.Status.sOk)
                    {
                        errors++;
                    }
                    result = result + "set " + Convert.ToString(s) + "; ";

                    s = m_app.iimSet("Email", email);
                    if (s != iMacros.Status.sOk)
                    {
                        errors++;
                    }
                    result = result + "set " + Convert.ToString(s) + "; ";

                    s = m_app.iimSet("Password", pwd);
                    if (s != iMacros.Status.sOk)
                    {
                        errors++;
                    }
                    result = result + "set " + Convert.ToString(s) + "; ";

                    s = m_app.iimSet("FirstName", fname);
                    if (s != iMacros.Status.sOk)
                    {
                        errors++;
                    }
                    result = result + "set " + Convert.ToString(s) + "; ";

                    s = m_app.iimSet("Proxy", proxy);
                    if (s != iMacros.Status.sOk)
                    {
                        errors++;
                    }
                    result = result + "set " + Convert.ToString(s) + "; ";

                    // Execute macro
                    s = m_app.iimPlayCode(CreateMacro, m_timeout);
                    if (s != iMacros.Status.sOk)
                    {
                        errors++;
                    }
                    result = result + "play " + Convert.ToString(s) + "; ";

                    ConfirmationTxt = m_app.iimGetExtract(1);
                }
                catch
                {
                    MessageBox.Show("Result: " + result);
                    goto TryAgain;
                }

                string[] testsplit = ConfirmationTxt.Split(' ');

                if (ConfirmationTxt != "" && ConfirmationTxt != "NODATA" && ConfirmationTxt != "#EANF#" && testsplit.Count() >= 7)
                {
                    string FinishCreateMacro = "";

                    FinishCreateMacro = FinishCreateMacro + "WAIT SECONDS=3" + "\n";
                    FinishCreateMacro = FinishCreateMacro + "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:register ATTR=NAME:humanverify[input] CONTENT={{Solution}}" + "\n";
                    FinishCreateMacro = FinishCreateMacro + "TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:register ATTR=NAME:options[adminemail] CONTENT=NO" + "\n";
                    FinishCreateMacro = FinishCreateMacro + "WAIT SECONDS=3" + "\n";
                    FinishCreateMacro = FinishCreateMacro + "TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:register ATTR=CLASS:button" + "\n";
                    FinishCreateMacro = FinishCreateMacro + "WAIT SECONDS=3" + "\n";

                    s = m_app.iimSet("Solution", SolveCaptchaPurseBlog(ConfirmationTxt));
                    s = m_app.iimPlayCode(FinishCreateMacro, m_timeout);

                    Success = true; // TEMPORARY VALUE for DEBUGGING
                }
                else
                {
                    inc++;
                    if (inc > 5)
                    {
                        Success = false;
                        goto CloseApp;
                    }
                    s     = m_app.iimClose();
                    m_app = null;
                    goto TryAgain;
                }

CloseApp:
                try
                {
                    s = m_app.iimClose(close_timeout);
                }
                catch
                {
                    //
                    goto JustContinue;
                }

JustContinue:

                m_app = null;

                // Get variable from macro and return
            }


            // *************************************************
            // *************************************************

            return(Success);
        }
        public static string PostQuestionAskCom(string Email, string Password, string Topic, string Proxy, string Macro)
        {
                        // GET iMacros code
            // SET Variables
            // Execute the code
            // Return Success / Failure
            //bool Success = false;

            string QuestionLink = "";
            
            m_app = new iMacros.App();
            iMacros.Status s;

            s = m_app.iimOpen("", true, 5);

            s = m_app.iimSet("Email", Email);
            s = m_app.iimSet("Password", Password);
            s = m_app.iimSet("Proxy", Proxy);
            s = m_app.iimSet("Topic", Topic);

            // Execute macro
            s = m_app.iimPlayCode(Macro, m_timeout);

            try
            {
                QuestionLink = m_app.iimGetExtract(1);
            }
            catch
            {
                goto Continue1;
            }

        Continue1:

            try
            {
                s = m_app.iimClose(close_timeout);
            }
            catch
            {
                // 
                goto JustContinue;
            }

        JustContinue:

            m_app = null;

            // Get variable from macro and return
            
            
        // *************************************************
        //Success = true; // TEMPORARY VALUE for DEBUGGING 
        // *************************************************

            return QuestionLink;
             
        }