X-Scripts

READY-MADE SOLUTIONS FOR YOUR BUSINESS

OUR CONTACTS:
Skype: igor_sev2
Email : order@x-scripts.com

Script recorder accounts on the website qip.ru.

Recently noticed that articles Humana has many tips on HOW to do the scripts, but few of the explanations WHY the best suited one or another way. I'll try to fix this problem on the example of video for Soaps qip.ru that and for personal use come in handy.

As usual, it all starts with creating a new script. Of course, there are several ways to start working in a different way, but we will not consider.

The standard template contains a string of commands directing our browser to Google. You can easily check this by running the script. And it is easy to guess that this transition is due to the line $browser->navigate("http://www.google.com"); Since my purpose is kvip, insert qip.ru in a string instead of Google and turn to this site for further study.

Registration is hiding in the form that appears after clicking the link "Enter the site". Through a menu opened by right clicking on the desired item, add in the script the line $anchor->click_by_inner_text('Enter the site',true); .

There is a choice of three:

$anchor->click_by_number(0);
$anchor->click_by_href("http://qip.ru/login",true);
$anchor->click_by_atribute("name","",true);

The first option can be used, but if the structure of the site will occur minor changes and we need a link will change its sequence number, then the script will stop working. The second is about as reliable as chosen by me, so it all depends on personal preference. Just if I see the words "Log in" in the function, I could look through her eyes on the page. In order to find the reference "http://qip.ru/login" must you hover over it with your mouse. Extra movement. For the same reason there is no option click_by_atribute. Extra fuss. In complicated situations this function is simply irreplaceable, but this is not the case.

Using the same menu, but issued for the purpose of link with the text "Register", add the function $anchor->click_by_inner_text('Register',true); Run the resulting script for the test (from the word "test" and not "dough")

Now before our eyes appeared the registration form with required fields to fill in, which I'm sure you have seen already hundreds. If not thousands. At first glance, the form is quite ordinary and simple. I hope there are no surprises in it isn't hidden.

By the way, before I forget, you need to add the function $browser->wait_for(); after $anchor->click_by_inner_text('Register',true); It will suspend the execution of the subsequent parts of the script until the page download, which means it will not work idling.

The fun begins. The form you need to fill in the data each time will be new. Why - to explain not necessary, I hope. Via the same right click on all the inputs, make a list of functions for working with them. Only function should contain click_by (that means "click on..."), and set_value_by ("set value..."). Then we passed to the function information to fill the inputs of site.

Stop. At first-glance at the suggestions of the features that catches the eye is too long a name for the input "User". It looks like a random jumble of letters and numbers, and it is possible that this name changes each time the page is refreshed. Therefore, set_value_by_name option in this situation is eliminated. Although a minute... set_value_by_name Function can be used to search not only the attribute “name” and “id”. Just in case it is worth checking that ID has needed inputs. Easier and faster to do it in HOUSE model that is in the drop-down menu "Debug".

At the top of the table "HOUSE model" have tabs responsible for different types of objects. We are interested in inputs, then the corresponding tab should open. Checked not for nothing is the id field really is regular and certainly a static name. Now, referring to the HOUSE model, you can easily add to the script function to work with all necessary inputs.

It turns out that such a list:

$input->set_value_by_name("reg_username", "");
$input->set_value_by_name("reg_pwd","");
$input->set_value_by_name("reg_pwd2","");
$input->set_value_by_name("reg_email","");

As can be understood from the explanatory text on the page, the fields "E-mail", "last Name", "Name", "Patronymic" and "City" are not mandatory, but something of them need to drive for the possible need to recover the password. Of course, such need will not arise, but kvip doesn't know about it, and therefore will stand on his own. Try to specify email and name with surname.

How to fill out the required fields we understand. Now THAT would be in to drive. Usually these tasks deals with personal Kumanovski bredogenerator object $submitter. Its database includes a list of names, surnames, streets, etc., as well as the generation of random text, numbers and nicknames. They will come up with usernames, passwords and fake soap.

After adding features from the submitter, the script has acquired the following form:

// go to website
$browser->navigate("qip.ru");
$browser->wait_for();

// move the cursor to the registration form
$anchor->click_by_inner_text("Log in",true);
$anchor->click_by_inner_text("Register",true);
$browser->wait_for();

// create random data for the profile
$user = $submitter->generate_random_text(rand(8,12),1);
$pass = $submitter->generate_random_text(rand(6,10),1);

// fill inputs
$input->set_value_by_name("reg_username",$user);
$input->set_value_by_name("reg_pwd",$pass);
$input->set_value_by_name("reg_pwd2",$pass);
$input->set_value_by_name("reg_email",$submitter->generate_random_text(rand(6,10),1)."@mail.ru");

As you can see, generate_random_text function takes two parameters: The number of characters in the generated text. In this case, I put rand(8,12) that will produce different numbers from 8 to 12. The type of generated text. 1 – English 2 – Russian.

The resulting can be run and admire, but that is not all. Next in line will drop ListBox prompting you to select the date of birth of the user. Here all so is simple, as before, right-click on each and add a function select_num_value_by_name for all three. This function will select the value in the dropdown menu ListBox on it (the values). So it will be much easier to create a random date of birth, what you will see later.

As a result, at the end of the script added the following three lines:

$listbox->select_num_value_by_name("b_day","1");
$listbox->select_num_value_by_name("b_month","1");
$listbox->select_name_by_inner_name("b_year","1");

Units in the second argument of each function I set. Just to check how the function works. After running the script with these changes the day and month of birth was exhibited at "1" and "February" respectively, but the year remained unchanged. Try 2000. Eureka!

As the dates of birth random, we use the saving function rand(); has already appeared earlier. Her own line has acquired the following form:

$listbox->select_num_value_by_name("b_day", rand(1,28));
$listbox->select_num_value_by_name("b_month", rand(1,12));
$listbox->select_name_by_inner_name("b_year", rand(1970,2001));

As you can see, the first line the last number is 28. This is done because castrated month of February, which also may fall. If you want, you can calculate and leap years and months with 30 or 31 in the afternoon, but all depends on the popular question "It is necessary to us?"

Next two required it's a simple matter (such a major point for tyrkanya the mouse), which, in theory, to detect the presence of Y-chromosome. Fortunately, we believe in the word, so that here, too, you can use a random selection of one of the proposed options.

Right click the mouse on the first (male) it's a simple matter, in addition to a heap of useless functions, displays it number: 0. And the second (female) is number 1. This situation is very suitable for the next function that we add in the script:

$radiobox->set_checked_by_number(rand(0,1),true);

At the beginning, I said that clicks on the room is better not to use, but the benefits from this move greatly reduces the time to find an alternative, and thus was adopted without objection.

The last mandatory field – a captcha, supposedly designed to stand on the face control and protect a resource from encroachment of robots. Holy innocence! The only thing keeping the robots from enslavement of this world – they do not need nafig. As the ability to recognize captchas, in principle. So, first we build in the script manual Recognizer, and later connect with anticaptcha hardworking Hindus.

To send the captcha to recognize or to show it in a separate dialog box, save the picture to your hard drive. So pay attention to the functions with the words "save_to_file_by" when you see a menu after that became a habit of right-clicking on the picture.

Features a choice of three:

$image->save_to_file_by_number(0,"C:\tmp.jpeg");
$image->save_to_file_by_name("img_captcha","C:\tmp.jpeg");
$image->save_to_file_by_url("http://qip.ru/api/captcha?n=register&k=1324745167","C:\tmp.jpeg",true);


First. The picture on the page only, and it is likely that it will remain so for a long time. Can be used without hesitation.
Second. The name of the picture does not look randomly generated, so using this function is also quite justified.
Third. The numbers in the url of the picture confused. If desired, you can save the picture and this feature, but part of the url will be cut. The function will look something like this: $image->save_to_file_by_url('http://qip.ru/api/captcha?','C:\tmp.jpeg',false); in Addition to trimming the url, I changed the third argument from true to false. This means that the path to the picture is not fully qualified, and the function will first look for a similar match.

After the line save open the menu "Add code" (Alt+control+right, if you have not watched the video on the website) and stick out of the object $app function dlg_captcha_from_url. As url specified 'C:\tmp.jpeg' from the previous function. You can run and check what happens. While there, one moment. What will the function return $app->dlg_captcha_from_url, should be placed in a variable. For example, $cap. And then paste the contents of that variable in a text input field with the captcha. If you are confused in all these explanations, here is the script text that should we get to this point:

// go to website
$browser->navigate("qip.ru");
$browser->wait_for();

// move the cursor to the registration form
$anchor->click_by_inner_text("Log in",true);
$anchor->click_by_inner_text("Register",true);
$browser->wait_for();

// create random data for the profile
$user = $submitter->generate_random_text(rand(8,12),1);
$pass = $submitter->generate_random_text(rand(6,10),1);

// fill inputs
$input->set_value_by_name("reg_username",$user);
$input->set_value_by_name("reg_pwd",$pass);
$input->set_value_by_name("reg_pwd2",$pass);
$input->set_value_by_name("reg_email",$submitter->generate_random_text(rand(6,10),1)."@mail.ru");

// create a random birthday
$listbox->select_num_value_by_name("b_day", rand(1,28));
$listbox->select_num_value_by_name("b_month", rand(1,12));
$listbox->select_name_by_inner_name("b_year", rand(1970,2001));

// gender selection
$radiobox->set_checked_by_number(rand(0,1),true);

// captcha
$image->save_to_file_by_name("img_captcha","C:\tmp.jpeg");
$cap = $app->dlg_captcha_from_url("C:\tmp.jpeg");
$input->set_value_by_name("captchan",$cap);

Can run this thing a couple of times, aware of the greatness of what is happening, to feel the moment and return to further work.

Left blank fields for name, surname and patronymic. The ListBox "Secret question" I decided not to touch for now, but if you want to make a script for him. Easiest thing to do if you select "mother's Maiden name" and fill the appeared fields random female name from the object submitter.

In addition to the inputs for the name, there was one caveat. Login tips, login whether busy or free, if the text should be typed manually. But we need insert data into the page directly, without the aid of such primitive means as a hand set. Because the form need to separately send the event, if we honestly and honorably, spoiling the eyesight and earning the scoliosis, hardworking and neatly print the required login fingers. This is done by using functions, in which there are words send_event.

Just before it is necessary to understand what kind of event awaits the input from the user. To know it's not that hard - just look again into the HOUSE model, in the inputs section. For events assigned to the elements, there is a separate column. The latest, called "events". Our input is only one bound event "onkeyup". Send it using the function $input->send_event_by_name('reg_username','onkeyup');

Hmm. Does not work. Try $input->send_event_by_number(2,'onkeyup'); how it works. It turned out that even though the function $input->set_value_by_name and running, besides a name, an element ID, $input->send_event_by_name only accepts the name. Sad discovery, but that's okay – there is an equivalent alternative. The function $input->send_event_by_atribute("id","reg_username",true,'onkeyup'); does exactly what we wanted.

Begins the most difficult to perceive. We need to teach the script to check the presence of the text "Username is busy." on the page and react appropriately.

First search. The current contents of the page in text form you can obtain the function $webpage->get_body(); somewhere in this content and will hang out seeking our phrase, which can discover using "pure" PHP based. She is looking for the position of occurrence of the text, and if you find – then the text is present. And if not – everything is in order and the login is available.

Look this function will be: based ($webpage->get_body(), "Username is busy"); arguments: 1) Where to search 2) What to look for.

But few find the text, you also have to decide on subsequent actions. But they assume a replacement is already registered by someone new on login. For this purpose, would be the best while loop in Russian means something like "Until then...". That is, the content of the loop will be performed until the condition specified at the beginning, will not be broken:

//checking availability of login
while (based ($webpage->get_body(), "Username is busy") != 0)
{
$user = $submitter->generate_random_text(rand(8,12),1);

$input->set_value_by_name("reg_username",$user);
$input->send_event_by_atribute("id","reg_username",true,"onkeyup");
sleep(5);
}

You may notice that at the end of cycle I should sleep(5) break in five seconds. This is the approximate time, the right form, to compare a new login with my database and give the answer if he's available. If we don't pause, the answer will appear too late and our check availability login won't work.

So, with the verification done. If in doubt with the location where you want to push the resulting code, feel free to put it immediately after you enter the captcha.

On the queue name. Patronymics in submittere, unfortunately, no, but they were not required.

At the beginning of the script there is a line, is responsible for the sex of the user. So, for greater credibility, the name and surname should correspond to this choice. By the way, that line will change according to current needs. One $radiobox->set_checked_by_number(rand(0,1),true); you'll get two:

//gender selection
$s = rand(0,1);
$radiobox->set_checked_by_number($s,true);

After that, depending on the content of the $s variable, you can create insert the names of the desired sex. It will look something like this:

// insert first and last name
if ($s == 1) $sex = "woman";
else $sex = "man";
$input->set_value_by_name("last_name",$submitter->generate_random_second_name("EN",$sex));
$input->set_value_by_name("first_name",$submitter->generate_random_name("EN",$sex));

Apparently, the script is almost ready. It only remains to add click on the "Register" button that will send the entered data to the server. Usual right click and the function $button->click_by_name('register'); is added to the script... And is not working. Again climb into the HOUSE model, this time the "tab button". So, you need to add event $button->send_event_by_name('register','onclick'); Now insert after this function $browser->wait_for(); and order.

Running the script several times, you may notice that benefit from it is somehow not enough. Yes, it registers the accounts (and may have already written you something like "Too many registrations from one IP"), but the result of his activity will not be saved. That is, we have no remains of logins with passwords, without which the whole process is meaningless. Correct.

The process of saving text to a file is simple and straightforward. All you need is a function $textfile->add_string_to_file($file,$str,$timeout); which will carefully record all the needed data, if it is configured correctly. Instead of $file, you must specify the path to the saved file. If the file does not exist, the function will create it. $str – the string that we store. Remember, we added in variables $user and $pass are the result of a delirium generator? They are something we need. The third argument is the time during which the function will attempt to write the file. With our volume of text is enough for a thousandth of a second, and I usually put ten in there, with room to spare. The completed function looks like this:

$textfile->add_string_to_file("C:\qip.txt",$user."||".$pass."\r\n",10);

Safely insert it at the very end of the script immediately after pressing the button "Registration". Gradually my script has acquired the following form:

// clear cache and cookies
$browser->clear_cache();
$browser->clear_cookies("",true);

// go to website
$browser->navigate("qip.ru");
$browser->wait_for();

// move the cursor to the registration form
$anchor->click_by_inner_text("Log in",true);
$anchor->click_by_inner_text("Register",true);
$browser->wait_for();

// create random data for the profile
$user = $submitter->generate_random_text(rand(8,12),1);
$pass = $submitter->generate_random_text(rand(6,10),1);

// fill inputs
$input->set_value_by_name("reg_username",$user);
$input->send_event_by_atribute("id","reg_username",true,"onkeyup");
$input->set_value_by_name("reg_pwd",$pass);
$input->set_value_by_name("reg_pwd2",$pass);
$input->set_value_by_name("reg_email",$submitter->generate_random_text(rand(6,10),1)."@mail.ru");

// create a random birthday
$listbox->select_num_value_by_name("b_day", rand(1,28));
$listbox->select_num_value_by_name("b_month", rand(1,12));
$listbox->select_name_by_inner_name("b_year", rand(1970,2001));

// gender selection
$s = rand(0,1);
$radiobox->set_checked_by_number($s,true);

// insert first and last name
if ($s == 1) $sex = "woman";
else $sex = "man";
$input->set_value_by_name("last_name",$submitter->generate_random_second_name("EN",$sex));
$input->set_value_by_name("first_name",$submitter->generate_random_name("EN",$sex));

// captcha
$image->save_to_file_by_name("img_captcha","C:\tmp.jpeg");
$cap = $app->dlg_captcha_from_url("C:\tmp.jpeg");
$input->set_value_by_name("captchan",$cap);

// proverka login on employment
while (based ($webpage->get_body(), "Username is busy") != 0)
{
// create another login
$user = $submitter->generate_random_text(rand(8,12),1);
$input->set_value_by_name("reg_username",$user);
$input->send_event_by_atribute("id","reg_username",true,"onkeyup");
sleep(5);
}

// submit the form
$button->click_by_name("register");
$button->send_event_by_name("register","onclick");
$browser->wait_for();

// store the data
$textfile->add_string_to_file("C:\qip.txt",$user."||".$pass."\r\n",10);

At the beginning of the script, you may notice two new lines – clearing cache and cookies. For them it would be nice to add the feature of setting proxy, because the kvip, as it turned out, very Moody, and does not allow you to register the cloud accounts from one IP. With the proxy in two ways: 1) on each proxy to complete a single registration and to take the following 2) to register accounts before the inscription "Too many registrations". The first is organized by a for loop or a foreach:

$proxy = file ("proxy.txt");
for($i=0;$i<count($proxy);$i++)
{
// clear cache and cookies, the connection proxy
$browser->clear_cache();
$browser->clear_cookies("",true);
$browser->enable_proxy("all connections",$proxy[$i]);

/*Rest of script*/
}

The second requires checking the page a warning message. We have worked for example with the employment of logins is slightly higher but this would be a modification:

$proxy = file ("proxy.txt");
for($i=0;$i<count($proxy);$i++)
{
// clear cache and cookies, the connection proxy
$browser->clear_cache();
$browser->clear_cookies("",true);
$browser->enable_proxy("all connections",$proxy[$i]);

/*Rest of script*/

if (based ($webpage->get_body(), "Lots of registrations") == 0)
{
$textfile->add_string_to_file("C:\qip.txt",$user."||".$pass."\r\n",10);
$i--;
}

}

This approach will allow you to register accounts before the inscription, to change proxies and continue the registration with a new IP. The modification is that now the login and password details will be recorded only upon successful registration. It would be nice to add in the first option, but it is now possible to do it yourself. Further explanations will be given for the second option.

Again, checking the script in action I incorrectly entered one captcha, but it was disallowed by the program for successful registration, because the data is recorded in a file and went to work on the new. This prompted the idea that it is necessary to check for incorrectly entered the captcha. For example, our past achievements can understand and navayal something like this:

while (based ($webpage->get_body(), "Invalid verification code") != 0)
{
echo "Ah-Ah! Mistake. Will try again to enter the captcha
"; // captcha $image->save_to_file_by_name("img_captcha","C:\tmp.jpeg"); $cap = $app->dlg_captcha_from_url("C:\tmp.jpeg"); $input->set_value_by_name("captchan",$cap); // submit the form $button->click_by_name("register"); $button->send_event_by_name("register","onclick"); sleep(3); $browser->wait_for(); }

Because after the error the website shows a new captcha, we again keep it like that. Then we enter and subitem. If the captcha is entered incorrectly again, the while loop will be triggered, while not lost the inscription "Invalid verification code". That is, until successful recognition.

This script seems to me to be ready. It's possible that there will emerge some more nuances, but now I don't know. Here is the complete version with all tests and a few cosmetic changes:


$xhe_host ="127.0.0.1:7010";
require("../Templates/xweb_human_emulator.php");

$proxy = file ("proxy.txt");

// loop runs on all proxies in the list
for($i=0;$i<count($proxy);$i++)
{

// clear cache and cookies, the connection proxy
$browser->clear_cache();
$browser->clear_cookies("",true);
$browser->enable_proxy("all connections",$proxy[$i]);

// go to website
$browser->navigate("qip.ru");
$browser->wait_for();

// move the cursor to the registration form
$anchor->click_by_inner_text("Log in",true);
$anchor->click_by_inner_text("Register",true);
$browser->wait_for();

// create random data for the profile
$user = $submitter->generate_random_text(rand(8,12),1);
$pass = $submitter->generate_random_text(rand(6,10),1);

// fill inputs
$input->set_value_by_name("reg_username",$user);
$input->send_event_by_atribute("id","reg_username",true,"onkeyup");
$input->set_value_by_name("reg_pwd",$pass);
$input->set_value_by_name("reg_pwd2",$pass);
$input->set_value_by_name("reg_email",$submitter->generate_random_text(rand(6,10),1)."@mail.ru");

// create a random birthday
$listbox->select_num_value_by_name("b_day", rand(1,28));
$listbox->select_num_value_by_name("b_month", rand(1,12));
$listbox->select_name_by_inner_name("b_year", rand(1970,2001));

// gender selection
$s = rand(0,1);
$radiobox->set_checked_by_number($s,true);

// insert first and last name
if ($s == 1) $sex = "woman";
else $sex = "man";
$input->set_value_by_name("last_name",$submitter->generate_random_second_name("EN",$sex));
$input->set_value_by_name("first_name",$submitter->generate_random_name("EN",$sex));

// captcha
$image->save_to_file_by_name("img_captcha","C:\tmp.jpeg");
$cap = $app->dlg_captcha_from_url("C:\tmp.jpeg");
$input->set_value_by_name("captchan",$cap);

// proverka login on employment
while (based ($webpage->get_body(), "Username is busy") != 0)
{
// create another login
$user = $submitter->generate_random_text(rand(8,12),1);
$input->set_value_by_name("reg_username",$user);
$input->send_event_by_atribute("id","reg_username",true,"onkeyup");
sleep(5);
}

// submit the form
$button->click_by_name("register");
$button->send_event_by_name("register","onclick");
sleep(3);
$browser->wait_for();

// check for correctly entered captchas
while (based ($webpage->get_body(), "Invalid verification code") != 0)
{
echo "Ah-Ah! Mistake. Will try again to enter the captcha
"; // captcha $image->save_to_file_by_name("img_captcha","C:\tmp.jpeg"); $cap = $app->dlg_captcha_from_url("C:\tmp.jpeg"); $input->set_value_by_name("captchan",$cap); // submit the form $button->click_by_name("register"); $button->send_event_by_name("register","onclick"); sleep(3); $browser->wait_for(); } // verify successful registration with the current IP if (based ($webpage->get_body(), "Lots of registrations") == 0) { $textfile->add_string_to_file("C:\qip.txt",$user."||".$pass."\r\n",10); $i--; } else echo "Lots of registrations, change proxy
"; } $app->quit();

Article for owners of single-threaded version of the program ends here. But users of MT can stay and see how this same script for the upcoming work in the multithreaded mode.

Let's first define some things in megapolice should work not like now.

  • 1. Sure to recognize the captcha manually when using megapolice no one will. You must replace the responsible part on antiseptiska Indians.
  • 2. Proxy should not be taken in order. If a dozen other streams suddenly through one proxy, Akka lomanetsya to register, this will work only in some of them. Others will see "a Lot of registrations from one IP" and take the next one. Which, in turn, will be used by other threads... In General, you should avoid work "idle".

Perhaps, everything.

The first is solved by simply replacing:

$image->save_to_file_by_name("img_captcha","C:\tmp.jpeg");
$cap = $app->dlg_captcha_from_url("C:\tmp.jpeg");
$input->set_value_by_name("captchan",$cap);

текущего скрипта меняется на:

$ins = rand(0,999);
$image->save_to_file_by_name("img_captcha","C:\\".$ins.".jpeg");
$cap = $image->recognize_by_anticaptcha($url,"C:\\".$ins.".jpeg","http://antigate.com");
$input->set_value_by_name("captchan",$cap);

in both cases.

A variable with a random number at the beginning is responsible for ensuring that threads do not fight for sending captchas. Without it, it is possible that will be sent is not the same picture, because the answer will come obviously wrong.

The second is also solved, but requires sobriology. From the proxy list to take and use random. After occurrence of messages about IP to remove it from the file and getting a new one. You can take the proxy account is a multiple of the number of running threads. But I usually use a standard preset: create a text file in which each thread writes the number of the used proxy plus one. In the process it turns out that each thread takes the next on the list of proxies when necessary, and not in sequence. To add this to your code, it will have little to alter.

The beginning of the script:


$xhe_host ="127.0.0.1:7010";
require("../Templates/xweb_human_emulator.php");

$proxy = file ("proxy.txt");
$i = $textfile->read_file("C:\res.txt",10);
$browser->enable_proxy("all connections",$proxy[$i]);
$textfile->write_file("C:\res.txt",$i+1,10,false);

while ($textfile->read_file("C:\res.txt",10)<count($proxy))
{

// clear cache and cookies
$browser->clear_cache();
$browser->clear_cookies("",true);

/*Rest of script*/

And the very end of the script:


/*The whole script*/

else 
{
echo "a Lot of registrations, change proxy
"; $i = $textfile->read_file("C:\res.txt",10); $browser->enable_proxy("all connections",$proxy[$i]); $textfile->write_file("C:\res.txt",$i+1,10,false); } } $app->quit();

The final touch is to prepare this site for launch. In order to avoid it, we must carefully and without jambs to perform the following actions:

  • 1. In the line $xhe_host ="127.0.0.1:7010"; script replace 7010";". $argv[1]; Get $xhe_host ="127.0.0.1:".$argv[1]; Save.
  • 2. Run XHEManager from kornevike program and add it in our script by specifying the desired number of threads and the port number from which starts the timer for the remaining copies.
  • 3. Manager will show a list of threads ready to work and defense. Ignore it and go via the menu "File", create a BAT file. In this file are recorded all the data required to run.
  • 4. Run the resulting BAT file.
  • 5. ...............
  • 6. PROFIT!!!!!

To tell you the truth, to run this script is multithreaded I don't plan to. All the explanations in the configuration examples. But if you decide on this feat and encounter any errors, feel free to swear Mat in ICQ tech support. From experience, every complaint there shifts the correction of an upset, you feature in priorities for one item up in the list.

Finally, bring the final version of the script:


$xhe_host ="127.0.0.1:".$argv[1];
require("../Templates/xweb_human_emulator.php");

$proxy = file ("proxy.txt");
$i = $textfile->read_file("C:\res.txt",10);
$browser->enable_proxy("all connections",$proxy[$i]);
$textfile->write_file("C:\res.txt",$i+1,10,false);

while ($textfile->read_file("C:\res.txt",10)<count($proxy))
{

// clear cache and cookies
$browser->clear_cache();
$browser->clear_cookies("",true);

// go to website
$browser->navigate("qip.ru");
$browser->wait_for();

// move the cursor to the registration form
$anchor->click_by_inner_text("Log in",true);
$anchor->click_by_inner_text("Register",true);
$browser->wait_for();

// create random data for the profile
$user = $submitter->generate_random_text(rand(8,12),1);
$pass = $submitter->generate_random_text(rand(6,10),1);

// fill inputs
$input->set_value_by_name("reg_username",$user);
$input->send_event_by_atribute("id","reg_username",true,"onkeyup");
$input->set_value_by_name("reg_pwd",$pass);
$input->set_value_by_name("reg_pwd2",$pass);
$input->set_value_by_name("reg_email",$submitter->generate_random_text(rand(6,10),1)."@mail.ru");

// create a random birthday
$listbox->select_num_value_by_name("b_day", rand(1,28));
$listbox->select_num_value_by_name("b_month", rand(1,12));
$listbox->select_name_by_inner_name("b_year", rand(1970,2001));

// gender selection
$s = rand(0,1);
$radiobox->set_checked_by_number($s,true);

// insert first and last name
if ($s == 1) $sex = "woman";
else $sex = "man";
$input->set_value_by_name("last_name",$submitter->generate_random_second_name("EN",$sex));
$input->set_value_by_name("first_name",$submitter->generate_random_name("EN",$sex));

// captcha
$image->save_to_file_by_name("img_captcha","C:\tmp.jpeg");
$cap = $app->dlg_captcha_from_url("C:\tmp.jpeg");
$input->set_value_by_name("captchan",$cap);

// proverka login on employment
while (based ($webpage->get_body(), "Username is busy") != 0)
{
// create another login
$user = $submitter->generate_random_text(rand(8,12),1);
$input->set_value_by_name("reg_username",$user);
$input->send_event_by_atribute("id","reg_username",true,"onkeyup");
sleep(5);
}

// submit the form
$button->click_by_name("register");
$button->send_event_by_name("register","onclick");
sleep(3);
$browser->wait_for();

// check for correctly entered captchas
while (based ($webpage->get_body(), "Invalid verification code") != 0)
{
echo "Ah-Ah! Mistake. Will try again to enter the captcha
"; // captcha $image->save_to_file_by_name("img_captcha","C:\tmp.jpeg"); $cap = $app->dlg_captcha_from_url("C:\tmp.jpeg"); $input->set_value_by_name("captchan",$cap); // submit the form $button->click_by_name("register"); $button->send_event_by_name("register","onclick"); sleep(3); $browser->wait_for(); } // verify successful registration with the current IP if (based ($webpage->get_body(), "Lots of registrations") == 0) { $textfile->add_string_to_file("C:\qip.txt",$user."||".$pass."\r\n",10); } else { echo "a Lot of registrations, change proxy
"; $i = $textfile->read_file("C:\res.txt",10); $browser->enable_proxy("all connections",$proxy[$i]); $textfile->write_file("C:\res.txt",$i+1,10,false); } } $app->quit();

Performance script very much depends on the speed and quality of the used proxies.

the Script is written in 18.01.2012 Human Emulator 4.2 Advanced. At the time of publication of the article 23.01.2012 script was working.

download the script
Number of downloads: 2852

<< Other scripts