Advertisement
Guest User

Untitled

a guest
Mar 19th, 2017
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. ############################ Semi auto upload bot bot by firefly dan.oak44@gmail.com #############################
  4.  
  5. # Please note! You do not need to follow steps 3,4,5 if you are using Janis's script.
  6.  
  7. # You need rutorrent installed
  8. # Create a new file called bot.pl and save it in /home/user/ and chown and chmod it
  9. #1 You will need CPAN module LWP::Simple and WWW::Mechanize
  10. #2 You also need Mktorrent apt-get install mktorent
  11. #3 You will also need to uncommand this line in your rtorrent.rc
  12. #4 schedule = watch_directory,5,5,load_start=./watch/*.torrent
  13. #5 Then create a new folder in your rutorrent home folder where rutorrent is installed and chown and chmod.
  14. #6 Then edit the paths and login details make sure you leave out or add paths where needed
  15. # This is built for TBDEV but is very easy to mod you will need to check the Login section and Upload section.
  16. # USAGE: ./bot.pl [name] [10] [PATH/TO/RELEASE/FOLDER] Remember to point to folder not file inside other wise it will not seed.
  17.  
  18. use strict;
  19. use warnings;
  20. use WWW::Mechanize;
  21.  
  22. ##
  23.  
  24. my $username = "IcecreamGroove"; #Your tracker username
  25. my $password = "aurel123"; #Your tracker password
  26. my $site_url = "http://unixshare.tk"; #Tracker URL NO ending slash
  27. my $announce = "http://unixshare.tk/announce.php"; #Announce URl NO ending slash
  28. my $watch = "/home/bot/watch/"; #Watch folder MUST add ending slash
  29.  
  30.  
  31. my $num_args = $#ARGV + 1;
  32. if ($num_args != 3) {
  33.  
  34. print "\nCommand!: {RELEASE.NAME} {CAT_ID} {/home/user/downloads/RELEASE.NAME or FOLDER.NAME}
  35. \n";
  36. print "\nUsage: ./auto.pl Ancient.Black.Ops.S01E03.HDTV.XviD-AFG 50 /home/user/downloads/Ancient.Black.Ops.S01E03.HDTV.XviD-AFG.avi
  37. \n";
  38. exit;
  39. }
  40.  
  41. my $name=$ARGV[0];
  42. my $cat=$ARGV[1];
  43. my $tor=$ARGV[2];
  44.  
  45. system ("mktorrent -p -a $announce -o $watch$name.torrent $tor");
  46.  
  47.  
  48. # LOGIN
  49.  
  50. my $mech = WWW::Mechanize->new( autocheck => 1 ); #Initializes WWW::Mechanize
  51. $mech->get("$site_url/login.php"); #Retrieves The Login Page
  52. print "Logging Into site, Please Wait.\n"; #Alerts The User
  53. $mech->submit_form( #Logs Us In
  54. form_number => 0,
  55. fields => {
  56. username => "$username",
  57. password => "$password",
  58. }
  59. );
  60.  
  61.  
  62.  
  63. # Upload
  64.  
  65.  
  66. my $content = "$watch$name.torrent";
  67.  
  68. $mech->get("$site_url/upload.php"); #Loads Upload Page Into Mech
  69.  
  70. $mech->field('file', $content);
  71. $mech->field('name', $name);
  72. $mech->field('descr', "Will be added later");
  73. $mech->field('type', $cat);
  74.  
  75.  
  76.  
  77.  
  78.  
  79. $mech->click();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement