Advertisement
Arniceous

Untitled

Feb 24th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. $username = "admin"; #Your tracker username
  2. my $password = "******"; #Your tracker password
  3. my $site_url = "http://ninjacentral.co.za"; #Tracker URL NO ending slash
  4. my $announce = "http://ninjacentral.co.za/announce.php?passkey=595c9cffd32c31142064f775f0eee520"; #Announce URl NO ending slash
  5. my $watch = "/home/bot/watch/"; #Watch folder MUST add ending slash
  6.  
  7.  
  8. my $num_args = $#ARGV + 1;
  9. if ($num_args != 3) {
  10.  
  11. print "\nCommand!: {RELEASE.NAME} {CAT_ID} {/home/user/downloads/RELEASE.NAME or FOLDER.NAME}
  12. \n";
  13. print "\nUsage: ./auto.pl Ancient.Black.Ops.S01E03.HDTV.XviD-AFG 50 /home/user/downloads/Ancient.Black.Ops.S01E03.HDTV.XviD-AFG.avi
  14. \n";
  15. exit;
  16. }
  17.  
  18. my $name=$ARGV[0];
  19. my $cat=$ARGV[1];
  20. my $tor=$ARGV[2];
  21.  
  22. system ("mktorrent -p -a $announce -o $watch$name.torrent $tor");
  23.  
  24.  
  25. # LOGIN
  26.  
  27. my $mech = WWW::Mechanize->new( autocheck => 1 ); #Initializes WWW::Mechanize
  28. $mech->get("$site_url/login.php"); #Retrieves The Login Page
  29. print "Logging Into site, Please Wait.\n"; #Alerts The User
  30. $mech->submit_form( #Logs Us In
  31. form_number => 0,
  32. fields => {
  33. username => "$username",
  34. password => "$password",
  35. }
  36. );
  37.  
  38.  
  39.  
  40. # Upload
  41.  
  42.  
  43. my $content = "$watch$name.torrent";
  44.  
  45. $mech->get("$site_url/upload.php"); #Loads Upload Page Into Mech
  46.  
  47. $mech->field('file', $content);
  48. $mech->field('name', $name);
  49. $mech->field('descr', "Will be added later");
  50. $mech->field('type', $cat);
  51.  
  52.  
  53.  
  54.  
  55.  
  56. $mech->click();
  57.  
  58.  
  59. 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