PTC-Sites User Creator

From SHellium Wiki
Jump to: navigation, search
Geographylogo.png In other languages: English | Afrikaans | Albanian | Arabic | Brazilian | Bulgarian | Catalan | Chinese | Croatian | Czech | Danish | Dutch | Esperanto | Estonian | Filipino | Finnish | Flemish | French | German | Greek | Hebrew | Hindi | Hungarian | Indonesian | Italian | Japanese | Latvian | Lithuanian | Macedonian | Malay | Malayalam | Norwegian (Bokmål) | Norwegian (Nynorsk) | Persian | Polish | Portuguese | Romanian | Russian | Serbian | Slovak | Slovenian | Spanish | Swedish | Turkish | Ukrainian | Urdu

Warning.gif

This Feature Is Prohibited

If you attempt to use this on SHellium you will be banned.

Contents

PTC-Sites Usercreator

Introduction

This is an almost-pure perl script which makes users on Pay click sites automatically. Why use a script? First of all, it uses a random ip. Second of all, you save time because you don't waste time creating users under your reffer. Third, it's a great way to learn perl.
This script is licensed under the GPL license v3, so you can edit it if you want.
The author of this entry neither this site are responsible for the use or abuse of this script.
The main aim of the program is to learn perl by using a practical example. This is why the program contains comments; so you know what each line or block does.

There are 2 versions:
The linux and the windows version. You can run the linux version on windows if you have the libgraphics-magick-perl library installed. Also, you will need the gocr binary. Below is the download link for the dependencies.
USE AT YOUR OWN RISK!

To Do list

Status:
Code Quality: Poor

Errors or warnings to fix:

Code before strictures are enabled at line 5, column 1.  See page 429 of PBP.  Severity: 5
Expression form of "eval" at line 5, column 6. See page 161 of PBP. Severity: 5
Bareword file handle opened at line 146, column 1. See pages 202,204 of PBP. Severity: 5
Two-argument "open" used at line 146, column 1. See page 207 of PBP. Severity: 5
Subroutine prototypes used at line 193, column 1. See page 194 of PBP. Severity: 5
Bareword file handle opened at line 196, column 1. See pages 202,204 of PBP. Severity: 5
Two-argument "open" used at line 196, column 1. See page 207 of PBP. Severity: 5
Subroutine prototypes used at line 201, column 1. See page 194 of PBP. Severity: 5

To check the code warnings or errors use the Perl Critic website. For now, try it at the gentle mode.

Changelog

Version 0.1

Primitive execution.

Version 0.3

Added dependencies check. If they are not present, the captcha reading capability is disabled. Added png and gif support for captcha images. Added custom path for gocr. Added custom source imagefile name. Fixed typos.

Versions

There are 2 versions: The linux and the windows version. You can run the linux version on windows if you have the libgraphics-magick-perl library installed.
Also, you will need the gocr binary. Further below is the download link for the dependencies.

Linux Version

Dependencies:

Notes: The use of imagemagick and gocr is experimental. However, expect them to work perfectly.

#Check if we have the dependencies
# &&: both conditions must be present --> if($a==1 && $b==1)
# ||: one of the conditions must be present. --> if($a==1 || $b==1)
#Mix things: ( ($a==1 || $b==2) && $c==3) 
if (!eval "use Image::Magick;") {
$magickav="1";
use Image::Magick;
}else {
$magickav="0";
print "\n\n You dont have the Image::Magick lib. Install it if you want captcha-reading support \n\n";
}

if ($ocrpath2 == ""){
$ocrpath="usr/bin/gocr";
}else {
$ocrpath=$ocrpath2;
}
if (-x "/usr/bin/gocr") {
$gocrav="1";
} else {
$gocrav="0";	
print "\n\n You dont have the Gocr program. Install it if you want captcha-reading support \n\n";
}

if ($magickav=="1" &&  $gocrav=="1" ){
$canocr="1";
}
else {
$canocr="0";
}
use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Request;
 
#Concept and first version by Ozx
#Linux version and further development by Hexbase
 
$serv = $ARGV[0];
$nombre = $ARGV[1];
$referer = $ARGV[2];
$useocr = $ARGV[3];
$imagefile = $ARGV[4];
$ocrpath2 = $ARGV[5];
$imagetype  = $ARGV[6];

if ($imagefile == ""){
$imgfile="image.php";
} else {
$imgfile= $imagefile;
}

unless ($ARGV[1]) {
	print "Usermaker for ptc sites 0.1 by Ozx\n";
        print "Usermaker(linux) for ptc sites 0.3 by Hexbase\n\n";
	print "Usage : script.pl <server> <username> <referer> <useocr> <imagefile> <ocrpath> <imagetype>\n\n";
	print "Just the first 2 arguments are enough to run the script\n\n";
	print "Defaults: imagetype=jpg, useocr=1(yes)\n";
	print "Defaults must be enough to run the script on most of the sites.\n\n";
	print "Value types: <useocr>=1/0 <imagefile>=text(file where the captcha image is) \n <ocrpath>= full path to gocr <imagetype>= jpg/png/gif  \n\n";
        print "Remember: The server must be written with the http:// prefix. Example http://myptc.com\n\n";
	print "example : script.pl http://theptcsite.tld Nulles \n\n";
	print "example : script.pl http://theptcsite.tld Nulles2 Nulles\n\n";
	print "example with no ocr : script.pl http://theptcsite.tld Nulles2 Nulles 0\n";
 
   exit 0;
}
 
######### Generate a new ip number ################
$ip1= int(rand(30))+190;
$ip2= int(rand(240));
$ip3= int(rand(240));
$ip4= int(rand(240));
$ip = $ip1.".".$ip2.".".$ip3.".".$ip4;
######## Email randomizer (because we dont need to verify the account ###############
@mails = qw (gmail.com hotmail.com live.com yahoo.es yahoo.com );
$rand = int(rand( @mails));
$mailr = $mails[$rand];
#we put the @ between the name and the provider
$email=$nombre."%40".$mailr;
####### Random password ##############
$password= $nombre.$ip1.$ip4;
#######Random city ################
$ciudad= int(rand(190));
 
###### Now we make the request ###########
$ua = LWP::UserAgent->new;
###### we initialize the cookie, User-agent, and we send the generated ip via the x-forwarder-for header
$ua->cookie_jar(HTTP::Cookies->new(file => "cookie_07bux_catpcha.txt", autosave => 1));
#note: change the useragent string for more customization and to change the default language(es-ES by default)
#Useragent: Windows --> LOL
$ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.15");
$ua->default_header("X-Forwarded-For" => $ip);
 
##########CATPCHA###################
if ($useocr == ""){
$useocr="1";
} elsif ($useocr == "1"){
$useocr="1";
} elsif ($useocr == "0"){
$useocr == "0"
}
else {
$useocr="0";
}
if ($useocr == "1" && $canocr == "1"){
####### Download the captcha image and Convert the jpg file to ppm ##########
#note that the default captcha image source is the image.php script. If it's different, change it with the imagefile argument
###ImageMagick
#we set jpg as the default imagetype
if ($imagetype =="jpg" || $imagetype =="jpeg" || $imagetype =="" ){
$default =="1";
} else {
$default =="0";
}
#if captcha image is jpg, we save it as jpg and do magick from jpg to ppm
if ($default =="1" ) {
$ua->mirror( $serv."/$imgfile", "captcha.jpg" );
$image = new Image::Magick;
$image->Read('captcha.jpg');
$image->Set(magick=>'ppm');
$image->Write("captcha.ppm");
}
#else if captcha image is png, we save it as png and we do magick from png to ppm
elsif ($imagetype =="png"){
$ua->mirror( $serv."/$imgfile", "captcha.png" );
$image = new Image::Magick;
$image->Read('captcha.png');
$image->Set(magick=>'ppm');
$image->Write("captcha.ppm");
}
#else if captcha image is gif, we save it as gif and we do magick from gif to ppm
elsif ($imagetype =="gif"){
$ua->mirror( $serv."/$imgfile", "captcha.gif" );
$image = new Image::Magick;
$image->Read('captcha.gif');
$image->Set(magick=>'ppm');
$image->Write("captcha.ppm");
}
else {
print "Captcha image filetype not supported";
}
####### OCR #########################
#gocr
system ("gocr -i captcha.ppm -o captcha.txt");
#######Get the captcha value ############
open (C,"captcha.txt");  $codigo = <C>;close (C);
### If the code we got has an o, it must be replaced with a zero. You can use regexp here.
while (convert($codigo) == 1){
	$codigo=~s/o/0/i;
	}
 
chop($codigo); 
} else {
print "\n\n You dont have the Gocr program or the Image::Magick lib. Install both of them if you want captcha-reading support \n\n";
}
###########################################
 
#####Make the post petition
#Note: Depending on the ppc site you are targeting, it may have more fields or fields with different names.
#Change the .>content string if needed
$req = HTTP::Request->new(POST => $serv."/register.php");
$req->content_type("application/x-www-form-urlencoded");
$req->content("username=$nombre&password=$password&cpassword=$password&email=$email&cemail=$email&pemail=$email&country=$ciudad&referer=$referer&tos=1&code=$codigo");
#we send the request
$response = $ua->request($req);
if ($response == ""){
print "Post couldnt be done";
exit 0;
}
#we get the content
$content = $response->content(); 
guardar("results.html",$content);
#hexadecimal encoding
$email=~s/%40/@/;
#hook to determine if we had success
#first, we look for the success string on the output string
if ($content=~m/(You have been registered correctly)/){
	print "User created successfully\n\t\n\n
	Username:> $nombre
	PASSWORD:> $password
	IP:> $ip
	EMAIL:> $email
	REFERER:> $referer
	This results were saved on result.txt\n";
	$resultado = "$nombre\t$password\t$referer\t$ip\t$email\n#########################################################################\n";
	guardar("result.txt",$resultado);
}else{
	print "ERROR Check results.html";
}
 
####file save subroutine
#it uses prototypes. U must improve this.
sub guardar($archivo,$contenido){
$archivo=shift;
$contenido=shift;
open (C,">>".$archivo); 
print C $contenido;
close (C);
}
#### Check if it has an "o". Replace this sub with regexp, if you like clean code.
sub convert($){
$codigo=shift;
if ($codigo =~m/o/i){
	return 1;
	}else{
	return 2
	}
}
 
#END



Windows

NOTE: Needs a converter. Read dependencies.
This version is not well developed, but works.
Dependencies:
Binary version of Gocr<--- Rename it to ocr.exe
A command-line program that converts from jpg/png to ppm. A link will be provided later.

use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Request;
 
#Usermaker by Ozx
 
$serv = $ARGV[0];
$nombre = $ARGV[1];
$referer = $ARGV[2];
 
unless ($ARGV[1]) {
	print "Usermaker 0.1 by Ozx\n\n";
	print "Use : script.pl <server> <username> <referer>\n";
	print "example : script.pl [07bux.net] Nulles \n";
	print "example : script.pl [07bux.net] Nulles2 Nulles\n";
 
   exit 0;
}
 
######### Generate a new ip number ################
$ip1= int(rand(30))+190;
$ip2= int(rand(240));
$ip3= int(rand(240));
$ip4= int(rand(240));
$ip = $ip1.".".$ip2.".".$ip3.".".$ip4;
######## Email randomizer (because we dont need to verify the account ###############
@mails = qw (gmail.com hotmail.com live.com yahoo.es yahoo.com );
$rand = int(rand( @mails));
$mailr = $mails[$rand];
#we put the @ between the name and the provider
$email=$nombre."%40".$mailr;
####### Random password ##############
$password= $nombre.$ip1.$ip4;
#######Random city ################
$ciudad= int(rand(190));
 
###### Now we make the request ###########
$ua = LWP::UserAgent->new;
###### we initialize the cookie, User-agent, and we send the generated ip via the x-forwarder-for header
$ua->cookie_jar(HTTP::Cookies->new(file => "cookie_07bux_catpcha.txt", autosave => 1));
$ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13");
$ua->default_header("X-Forwarded-For" => $ip);
 
##########CATPCHA###################
####### Download the captcha image ##########
#note that the default image source is the image.php script. If it's different, change it
$ua->mirror( $serv."/image.php", "captcha.jpg" );
####### Convert the jpg file to ppm ##############
system ("convert.exe captcha.jpg -k");
####### OCR #########################
system ("ocr.exe -o  captcha.txt captcha.ppm");
#######Get the captcha value ############
open (C,"captcha.txt");  $codigo = <C>;close (C);
 
system ("cls");
### If the code we got has an o, it must be replaced with a zero. You can use regexp here.
while (convert($codigo) == 1){
	$codigo=~s/o/0/i;
	}
 
chop($codigo); 
###########################################
 
#####Make the post petition
#Note: Depending on the ppc site you are targeting, it may have more fields or fields with different names.
#Change the .>content string if needed
$req = HTTP::Request->new(POST => $serv."/register.php");
$req->content_type("application/x-www-form-urlencoded");
$req->content("username=$nombre&password=$password&cpassword=$password&email=$email&cemail=$email&pemail=$email&country=$ciudad&referer=$referer&tos=1&code=$codigo");
#we send the request
$response = $ua->request($req);
#we get the content
$content = $response->content(); 
guardar("results.html",$content);
#hexadecimal encoding
$email=~s/%40/@/;
#hook to determine if we had success
#first, we look for the success string on the output string
if ($content=~m/(You have been registered correctly)/){
	print "User created successfully\n\t\n\n
	Username:> $nombre
	PASSWORD:> $password
	IP:> $ip
	EMAIL:> $email
	REFERER:> $referer
	This results were saved on result.txt\n";
	$resultado = "$nombre\t$password\t$referer\t$ip\t$email\n#########################################################################\n";
	guardar("result.txt",$resultado);
}else{
	print "ERROR Check results.html";
}
 
####file save subroutine
#it uses prototypes. U must improve this.
sub guardar($archivo,$contenido){
$archivo=shift;
$contenido=shift;
open (C,">>".$archivo); 
print C $contenido;
close (C);
}
#### Check if it has an "o". Replace this sub with regexp, if you like clean code.
sub convert($){
$codigo=shift;
if ($codigo =~m/o/i){
	return 1;
	}else{
	return 2
	}
}
 
#END

Personal tools
Namespaces

Variants
Actions
Navigation
Indexes
SHellium Sites
Toolbox