Bravo List
Register
Go Back   > Bravo List > P2P > Forum > Community Cafe
Reply
  #1  
Old 18th June 2021, 11:26
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 716
Default Torrent Auto upload bot by firefly
1st thing is getting the dependencies.

Run these commands from the terminal.

wget http://peak.telecommunity.com/dist/ez_setup.py
sudo python ez_setup.py
sudo easy_install requests


place below script in your home directory and make it executable .

Edit your details in.

Open deluge go to plugins enable execute and place the full path to the script
as seen here
http://dev.deluge-torrent.org/wiki/Plugins/Execute

But for completed torrent not added torrent

Then make sure the watch directory is also set in deluge.

(Python2)

bot.py



Code:
#!/usr/bin/python
#Edit theses
username = ""
password = ""
TrackerURL = "http://tracker.com/ninja.php?passkey="
log = "/home/firefly/uploadlog.text"
watchdir = "/home/firefly/watch/"
blocksize = 18 # 2^blocksize | 18^2 = 256kb per block
homedir = "/home/firefly/"
#-------------------------------------------------------------------------------------------------------

import
 sys
from sys import argv

logfile = open(log, 'a')
logfile.write("-----------------------------------------------\n")
try:
    torrentid= argv[1]
    torrentname= argv[2]
    torrentpath= argv[3]
except:
    logfile.write("No args given :(\n")
    logfile.close()
    sys.exit("Not run with Deluge")

logfile.write("New Upload\n")
logfile.write("-----------------------------------------------\n")
logfile.write("Torrent Name: " + torrentname + "\n")
logfile.write("Torrent Path: " + torrentpath + "\n")
mktorrentcmd = "mktorrent -p -a '" + TrackerURL + "' '" + torrentpath + "/" + torrentname + "' "
mktorrentcmd += "-o '" + homedir  + torrentname + ".torrent'"
logfile.write("Making torrent with " + mktorrentcmd + "\n")
import os
os.system(mktorrentcmd)

try:
    import requests
    print "requests loaded" 
except:
    logfile.write("Please install requests\n")
    sys.exit("Missing requests")

url = "http://www.tracker/takelogin.php"
user = {'username' : username, 'password' : password}
UploadURL = "http://tracker/takeupload.php"

try:
    r = requests.post(url, data=user)
    cookies = r.cookies
    logfile.write("Logged in" + mktorrentcmd + "\n")
except:
    print "Ninja not up"
    sys.exit("Missing requests")

torrent_location = homedir  + torrentname + ".torrent"

torrent = {'file': open(torrent_location, 'rb')}
#Upload Crap
data = {"MAX_FILE_SIZE" : 262144, "name" : "",
        "filetype" : 2, "nfo" : "", "artist" : "",
        "ulbum" : "", "year" : "", "format": "",
        "bitrate" : "", "nfo2" : "", "link" : "",
        "descr" : "Description to follow soon <3", "type" : 36}

r = requests.post(UploadURL, cookies=cookies, data=data, files=torrent)

logfile.write("Moving to watch directory: " + "mv '~/" + torrentname + ".torrent' '" + watchdir + torrentname + ".torrent'" + "\n")
os.system("mv '" + homedir + torrentname + ".torrent' '" + watchdir + torrentname + ".torrent'")

logfile.close()
You automate it by setting up auto download + watch folder
__________________
Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.

I'm able to install any tracker and mods including themes.

Please PM me


Last edited by firefly007; 30th October 2021 at 18:41. Reason: Fix some text.
Reply With Quote
  #2  
Old 29th October 2021, 21:10
onebit's Avatar
onebit onebit is offline
Member
 
Join Date: Oct 2021
Posts: 10
Default
not working
Quote:
Originally Posted by firefly007 View Post
1st thing is getting the dependencies.

Run these commands from the terminal.

wget http://peak.telecommunity.com/dist/ez_setup.py
sudo python ez_setup.py
sudo easy_install requests


place below script in your home directory and make it executable .

Edit your details in.

Open deluge go to plugins enable execute and place the full path to the script
as seen here
http://dev.deluge-torrent.org/wiki/Plugins/Execute

But for completed torrent not added torrent

Then make sure the watch directory is also set in deluge.

(Python2)

bot.py



Code:
#!/usr/bin/python
#Edit theses
username = ""
password = ""
TrackerURL = "http://tracker.com/ninja.php?passkey="
log = "/home/firefly/uploadlog.text"
watchdir = "/home/firefly/watch/"
blocksize = 18 # 2^blocksize | 18^2 = 256kb per block
homedir = "/home/firefly/"
#-------------------------------------------------------------------------------------------------------

import
 sys
from sys import argv

logfile = open(log, 'a')
logfile.write("-----------------------------------------------\n")
try:
    torrentid= argv[1]
    torrentname= argv[2]
    torrentpath= argv[3]
except:
    logfile.write("No args given :(\n")
    logfile.close()
    sys.exit("Not run with Deluge")

logfile.write("New Upload\n")
logfile.write("-----------------------------------------------\n")
logfile.write("Torrent Name: " + torrentname + "\n")
logfile.write("Torrent Path: " + torrentpath + "\n")
mktorrentcmd = "mktorrent -p -a '" + TrackerURL + "' '" + torrentpath + "/" + torrentname + "' "
mktorrentcmd += "-o '" + homedir  + torrentname + ".torrent'"
logfile.write("Making torrent with " + mktorrentcmd + "\n")
import os
os.system(mktorrentcmd)

try:
    import requests
    print "requests loaded" 
except:
    logfile.write("Please install requests\n")
    sys.exit("Missing requests")

url = "http://www.tracker/takelogin.php"
user = {'username' : username, 'password' : password}
UploadURL = "http://tracker/takeupload.php"

try:
    r = requests.post(url, data=user)
    cookies = r.cookies
    logfile.write("Logged in" + mktorrentcmd + "\n")
except:
    print "Ninja not up"
    sys.exit("Missing requests")

torrent_location = homedir  + torrentname + ".torrent"

torrent = {'file': open(torrent_location, 'rb')}
#Upload Crap
data = {"MAX_FILE_SIZE" : 262144, "name" : "",
        "filetype" : 2, "nfo" : "", "artist" : "",
        "ulbum" : "", "year" : "", "format": "",
        "bitrate" : "", "nfo2" : "", "link" : "",
        "descr" : "Description to follow soon <3", "type" : 36}

r = requests.post(UploadURL, cookies=cookies, data=data, files=torrent)

logfile.write("Moving to watch directory: " + "mv '~/" + torrentname + ".torrent' '" + watchdir + torrentname + ".torrent'" + "\n")
os.system("mv '" + homedir + torrentname + ".torrent' '" + watchdir + torrentname + ".torrent'")

logfile.close()
You automate it by setting up auto download + watch folder
Reply With Quote
  #3  
Old 1st November 2021, 15:11
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 716
Default
What error are u getting?
__________________
Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.

I'm able to install any tracker and mods including themes.

Please PM me

Reply With Quote
  #4  
Old 23rd July 2022, 15:33
BamBam0077's Avatar
BamBam0077 BamBam0077 is offline
Senior Member
 
Join Date: Jul 2013
P2P
Posts: 412
Wink
QUESTION: STILL AVAILABLE TO GET WORK FOR UBUNTU SERVER FOR TBDEV09 DEFAULT VALUE SETUP?

Don't have a demo server available to look into further studies at this current time as traveling to university tomorrow
__________________
https://mobile.twitter.com/YourAnonTV
Welcome to Plutonium Support. Kick Ya Feet Up!, rElax
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 00:59. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2022, vBulletin Solutions Inc.