Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $username = "admin"; #Your tracker username
- my $password = "******"; #Your tracker password
- my $site_url = "http://ninjacentral.co.za"; #Tracker URL NO ending slash
- my $announce = "http://ninjacentral.co.za/announce.php?passkey=595c9cffd32c31142064f775f0eee520"; #Announce URl NO ending slash
- my $watch = "/home/bot/watch/"; #Watch folder MUST add ending slash
- my $num_args = $#ARGV + 1;
- if ($num_args != 3) {
- print "\nCommand!: {RELEASE.NAME} {CAT_ID} {/home/user/downloads/RELEASE.NAME or FOLDER.NAME}
- \n";
- print "\nUsage: ./auto.pl Ancient.Black.Ops.S01E03.HDTV.XviD-AFG 50 /home/user/downloads/Ancient.Black.Ops.S01E03.HDTV.XviD-AFG.avi
- \n";
- exit;
- }
- my $name=$ARGV[0];
- my $cat=$ARGV[1];
- my $tor=$ARGV[2];
- system ("mktorrent -p -a $announce -o $watch$name.torrent $tor");
- # LOGIN
- my $mech = WWW::Mechanize->new( autocheck => 1 ); #Initializes WWW::Mechanize
- $mech->get("$site_url/login.php"); #Retrieves The Login Page
- print "Logging Into site, Please Wait.\n"; #Alerts The User
- $mech->submit_form( #Logs Us In
- form_number => 0,
- fields => {
- username => "$username",
- password => "$password",
- }
- );
- # Upload
- my $content = "$watch$name.torrent";
- $mech->get("$site_url/upload.php"); #Loads Upload Page Into Mech
- $mech->field('file', $content);
- $mech->field('name', $name);
- $mech->field('descr', "Will be added later");
- $mech->field('type', $cat);
- $mech->click();
- Bump: So I needed to make some modifications for order to get around "This torrent isn't registered
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement