Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- ############################ Semi auto upload bot bot by firefly dan.oak44@gmail.com #############################
- # Please note! You do not need to follow steps 3,4,5 if you are using Janis's script.
- # You need rutorrent installed
- # Create a new file called bot.pl and save it in /home/user/ and chown and chmod it
- #1 You will need CPAN module LWP::Simple and WWW::Mechanize
- #2 You also need Mktorrent apt-get install mktorent
- #3 You will also need to uncommand this line in your rtorrent.rc
- #4 schedule = watch_directory,5,5,load_start=./watch/*.torrent
- #5 Then create a new folder in your rutorrent home folder where rutorrent is installed and chown and chmod.
- #6 Then edit the paths and login details make sure you leave out or add paths where needed
- # This is built for TBDEV but is very easy to mod you will need to check the Login section and Upload section.
- # USAGE: ./bot.pl [name] [10] [PATH/TO/RELEASE/FOLDER] Remember to point to folder not file inside other wise it will not seed.
- use strict;
- use warnings;
- use WWW::Mechanize;
- ##
- my $username = "IcecreamGroove"; #Your tracker username
- my $password = "aurel123"; #Your tracker password
- my $site_url = "http://unixshare.tk"; #Tracker URL NO ending slash
- my $announce = "http://unixshare.tk/announce.php"; #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();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement