effigies / bittornado Goto Github PK
View Code? Open in Web Editor NEWUNMAINTAINED - John Hoffman's fork of the original bittorrent
License: Other
UNMAINTAINED - John Hoffman's fork of the original bittorrent
License: Other
I am using the branch on Python2.7 .
error: bad filename: win7高中模板.base
run with no args for parameter explanations
How can the makebt file can support filename include Chinese?
i am using the master branch on python 3.5
my torrent file is:
root@ubuntu-server:/tmp# btshowmetainfo.py debian-8.4.0-openstack-amd64.qcow2.torrent
btshowmetainfo 20130326 - decode BitTorrent metainfo files
metainfo file.: debian-8.4.0-openstack-amd64.qcow2.torrent
info hash.....: 2ad139893ce44cbe94e93522d4563df5f6e0aabe
file name.....: debian-8.4.0-openstack-amd64.qcow2
file size.....: 481034240 (1835 * 262144 + 0)
announce url..: http://172.20.4.22:6969/announce
start a tracker server on http://172.20.4.22:6969/announce
start a bt client on the tracker server as seeder server.
~# btdownloadheadless.py debian-8.4.0-openstack-amd64.qcow2.torrent
saving: debian-8.4.0-openstack-amd64.qcow2 (458.8 MB)
percent done: 0.0
time left: Download Succeeded!
download to: /home/zlh/ISO/debian-8.4.0-openstack-amd64.qcow2
download rate:
upload rate: 0.0 kB/s
share rating: 0.000 (0.0 MB up / 0.0 MB down)
seed status: 0 seen recently, plus 0.000 distributed copies
peer status: 0 seen now, 0.0% done at 0.0 kB/s
start a another bt client on another computer, but they can not share data with each other.
~$ btdownloadheadless.py debian-8.4.0-openstack-amd64.qcow2.torrent
saving: debian-8.4.0-openstack-amd64.qcow2 (458.8 MB)
percent done: 0.0
time left:
download to: /tmp/debian-8.4.0-openstack-amd64.qcow2
download rate: 0.0 kB/s
upload rate: 0.0 kB/s
share rating: 0.000 (0.0 MB up / 0.0 MB down)
seed status: 0 seen now, plus 0.000 distributed copies
peer status: 0 seen now, 0.0% done at 0.0 kB/s
but:
if i use another btclient as the seeder server or client, they can share data with btdownloadheadless.py. i have tested the original python-bittorrent and deluge.
thanks,effigies, do you have the same problem on you computer?
Traceback (most recent call last):
File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever
self.sockethandler.handle_events(events)
File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 293, in handle_events
s.handler.data_came_in(s, data)
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 148, in data_came_in
if not c.data_came_in(data) and not c.closed:
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 35, in data_came_in
self.next_func = self.next_func(val.decode())
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 67, in read_header
r = self.handler.getfunc(self, self.path, self.headers)
File "/home/BitTornado/BitTornado/Tracker/track.py", line 1005, in get
rsize = self.add_data(infohash, event, ip, paramslist)
File "/home/BitTornado/BitTornado/Tracker/track.py", line 795, in add_data
del x[y][myid]
KeyError: b'-UT3000->c-N\xce\x10o>z\xad\xb2\xae'
Traceback (most recent call last):
File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 293, in handle_events
s.handler.data_came_in(s, data)
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 148, in data_came_in
if not c.data_came_in(data) and not c.closed:
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 35, in data_came_in
self.next_func = self.next_func(val.decode())
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 69, in read_header
self.answer(r)
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 122, in answer
self.connection.shutdown(1)
File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 64, in shutdown
self.socket.shutdown(val)
OSError: [Errno 107] Transport endpoint is not connected
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever
self.sockethandler.handle_events(events)
File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 295, in handle_events
if e[0] != EWOULDBLOCK:
TypeError: 'OSError' object is not subscriptable
This is a big one, I'm not sure how it occured because I was asleep, but might have something to do with scraping...?
I don't have the Traceback from the 'str' TypeError, it disappeared in my screen window
TypeError: 'str' does not support the buffer interface
Traceback (most recent call last):
File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever
self.sockethandler.handle_events(events)
File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 296, in handle_events
s.handler.data_came_in(s, data)
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 148, in data_came_in
if not c.data_came_in(data) and not c.closed:
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 35, in data_came_in
self.next_func = self.next_func(val.decode())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 13: invalid start byte
Traceback (most recent call last):
File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever
self.sockethandler.handle_events(events)
File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 296, in handle_events
s.handler.data_came_in(s, data)
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 148, in data_came_in
if not c.data_came_in(data) and not c.closed:
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 35, in data_came_in
self.next_func = self.next_func(val.decode())
Hi again ^^ I have a new error for you, I'm assuming it's caused by a '!' in the filename, I'm currently trying to test this. (basically moving the file out of the parse directory and check if the error still appears)
EDIT:
I removed the ' ! ' from the filename and the error seems to have disappeared, I'll edit or reply again when I see the same error again.
EDIT2:
Nope that was not the issue, I don't know what else it could be.
Traceback (most recent call last):
File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever
self.sockethandler.handle_events(events)
File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 296, in handle_events
s.handler.data_came_in(s, data)
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 148, in data_came_in
if not c.data_came_in(data) and not c.closed:
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 35, in data_came_in
self.next_func = self.next_func(val.decode())
File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 67, in read_header
r = self.handler.getfunc(self, self.path, self.headers)
File "/home/BitTornado/BitTornado/Tracker/track.py", line 1009, in get
rsize = self.add_data(infohash, event, ip, paramslist)
File "/home/BitTornado/BitTornado/Tracker/track.py", line 799, in add_data
del x[y][myid]
KeyError: b'-UT2210-\xd6b\xd8\xbf\xe0\xcf\xc1\xe9E\x94\x1d\xc6'
I think this is related to Issue #30, is this the encrypted peers thing again? And isn't UT2210 uTorrent 2.2.1.0?
Sorry I keep poking you with Issues 😄
In case you don't want to have what you share associated with your IP, you should have the option to anonymize. Yes, this comes at the cost of lower speeds, but the user would decide if it is worth enabling it. Nowadays, libtorrent and vuze already have that option.
Currently BTTree
can be built to hold either a single file, or a full directory with all files and subdirectories. I would like to create torrent files from a specific list of files I have built through other means, and I am wondering which of the following options you may find the more acceptable:
BTTree.__init__()
so that loc
can be a list of paths, and use something like if isinstance(loc, list):…
to call specific codeBTTree
and create a new function alongside make_meta_file
that builds the specific BTTree
hierarchy manuallyBTTree
and reimplement make_meta_file
to suit their needs, and prefer that this feature remains outside of BitTornadoNote that I will be adding this feature and using it in production for several years whatever happens, so it’s up to you to decide whether you want it available for others :)
Got an error again, unrelated to the previous issue:
Traceback (most recent call last):
File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever
self.sockethandler.handle_events(events)
File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 293, in handle_events
s.handler.data_came_in(s, data)
File "/home/BitTornado/BitTornado/Network/NatCheck.py", line 161, in data_came_in
self.read(s)
File "/home/BitTornado/BitTornado/Network/NatCheck.py", line 197, in _read
if self.bufferlen is not None:
AttributeError: 'NatCheck' object has no attribute 'bufferlen'
As of now, the Tracker hasn't crashed yet, so I don't see a problem with it... Just thought I'd mention it.
Edit: Okay the tracker crashes now by spamming the error into console. (to reproduce this error (for me at least); Put a torrent in the torrents directory and 'Update Trackers' on ruTorrent (not sure if it is also the case with other clients))
There is an ongoing problem with some official torrent providers, where they inlcude paths (slash) in the filename. For years. Despite the huge amounts of negative feedback from users.
Right now the only way to download those is to patch bt regex in Meta/Info.py to allow paths, but it's really ugly.
There is --security 0 but it seems not to be checked for this particular check. Too bad.
I briefly checked the code but I don't see the options available in Info.py, so instead of a pull request I request this: please implement a switch to be able to download filenames with slashes or possibly other junk, under the risk of the user. It is not much worse than having security=0. :-)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/BitTornado/BitTornado/Network/RawServer.py", line 109, in listen_forever
func()
File "/home/BitTornado/BitTornado/Tracker/track.py", line 1123, in parse_allowed
[".torrent"])
File "/home/BitTornado/BitTornado/Application/parsedir.py", line 81, in parsedir
torrentinfo, infohash = parse_torrent(path, return_metainfo)
File "/home/BitTornado/BitTornado/Application/parsedir.py", line 163, in parse_torrent
data = MetaInfo.read(path)
File "/home/BitTornado/BitTornado/Meta/bencode.py", line 203, in read
**kwargs)
File "/home/BitTornado/BitTornado/Meta/Info.py", line 408, in __init__
super(MetaInfo, self).__init__(*args, **kwargs)
File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 88, in __init__
self[k] = v
File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 114, in __setitem__
val = self.typemap[key](val)
File "/home/BitTornado/BitTornado/Meta/Info.py", line 227, in __init__
self['files'] = params['files']
File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 114, in __setitem__
val = self.typemap[key](val)
File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 10, in __init__
self.extend(iterable)
File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 56, in extend
self.append(val)
File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 25, in append
val = self.valtype(val)
File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 88, in __init__
self[k] = v
File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 119, in __setitem__
raise KeyError('Invalid key: ' + key)
KeyError: 'Invalid key: path.utf-8'
I'm not sure what causes this... it happens when I try to start the tracker.
I have a repo that creates some virtual machines for testing this project.
# within the 'seeder' machine
vagrant@vagrant:~/murder$ python3 downloadtorrent.py ../200MB.zip.torrent
saving: 200MB.zip (200.0 MB)
percent done: 0.0
time left:
download to: /home/vagrant/murder/200MB.zip
download rate:
upload rate:
share rating:
seed status:
peer status:
Traceback (most recent call last):
File "downloadtorrent.py", line 221, in <module>
run(sys.argv[1:])
File "downloadtorrent.py", line 189, in run
dow.startRerequester()
File "/home/vagrant/murder/BitTornado/Client/download_bt1.py", line 578, in startRerequester
announcers = urls_to_announcers(tracker_urls, **kwargs)
File "/home/vagrant/murder/BitTornado/Client/Announce.py", line 436, in urls_to_announcers
for tier in trackerlist]
File "/home/vagrant/murder/BitTornado/Client/Announce.py", line 436, in <listcomp>
for tier in trackerlist]
File "/home/vagrant/murder/BitTornado/Client/Announce.py", line 435, in <listcomp>
return [[Announcer(url, *args, **kwargs) for url in tier]
File "/home/vagrant/murder/BitTornado/Client/Announce.py", line 98, in __new__
return cls.subclasses[scheme](tracker_url, port, *args, **kwargs)
KeyError: ''
vagrant@vagrant:~/murder$
clone the repo, cd to test/test_cluster
, and run make
.
$ git clone https://gitlab.com/davidawad/tbd-murder/
$ cd tbd-murder/test/test_cluster
$ make
This will create some VM's, (the makefile is really simple) and inside of the seeder vm, I can't run the downloader.
Any ideas? Thanks
I've tried a myriad of combinations of Python 2.6, Python 2.7, Python 3.4 (With the python3 branch of course), various wxPython versions, py2exe and none of them can build a working BitTornado on Windows.
The basic problem:
Either I get missing _sysconfigdata, missing psyco (Which is dead and isn't available for anything but Python 2.6 and older), missing win32com.gen.py ...
Can you provide a list of components required to actually build BitTornado, incl. their respective versions?
Or maybe you could even provide a binary somewhere :)
ERROR:
Problem connecting to tracker - timeout exceeded
ERROR:
Problem connecting to tracker - timeout exceeded
ERROR:
Problem connecting to tracker - timeout exceeded
saving: cent7.base (5930.0 MB)
percent done: 100
time left: Download Succeeded!
download to: /opt/yang/cent7.base
download rate:
upload rate: 0.0 kB/s
share rating: 0.535 (3157.7 MB up / 5905.0 MB down)
seed status: 1 seen recently, plus 0.000 distributed copies
peer status: 0 seen now, 0.0% done at 1310.3 kB/s
I am using the branch on Python2.7
when I download the file from seeder , the network of leecher was unexpect lost .But I didin't now , and the btdownloadheaderless.py was running .
So I wander if it is possible to give hint (off the net ) or exit the .py
Now I using the master branch on Python3.5.2 , and updated my local Stream.py file.
I can run the tracker successfull.My torrent file is:
metainfo file.: VMGL_3D_win7.img.torrent info hash.....: 263b90dc18c5a0c53d07d9c3e7335b4d0d84062c file name.....: VMGL_3D_win7.img file size.....: 720764928 (1374 * 524288 + 393216) announce url..: http://172.21.36.99:6969/announce
But when I want to download the torrent file ,it shows as follows:
ERROR: http seed url not http: saving: VMGL_3D_win7.img (687.4 MB) percent done: 0.0 time left: download to: /root/BitTornado/VMGL_3D_win7.img download rate: upload rate: share rating: seed status: peer status: Traceback (most recent call last): File "btdownloadheadless.py", line 224, in <module> run(sys.argv[1:]) File "btdownloadheadless.py", line 192, in run dow.startRerequester() File "/root/BitTornado/BitTornado/Client/download_bt1.py", line 578, in startRerequester announcers = urls_to_announcers(tracker_urls, **kwargs) File "/root/BitTornado/BitTornado/Client/Announce.py", line 436, in urls_to_announcers for tier in trackerlist] File "/root/BitTornado/BitTornado/Client/Announce.py", line 436, in <listcomp> for tier in trackerlist] File "/root/BitTornado/BitTornado/Client/Announce.py", line 435, in <listcomp> return [[Announcer(url, *args, **kwargs) for url in tier] File "/root/BitTornado/BitTornado/Client/Announce.py", line 98, in __new__ return cls.subclasses[scheme](tracker_url, port, *args, **kwargs) KeyError: ''
I am using the master branch on Python3.5 and Python3.3,both show the Error infos.
when i run tracker , it shows as follows:
[root@bogon BitTornado]# python bttrack.py --port 6969 --dfile dstate
Traceback (most recent call last):
File "bttrack.py", line 7, in
from BitTornado.Tracker.track import track
File "/root/BitTornado/BitTornado/Tracker/track.py", line 16, in
from .T2T import T2TList
File "/root/BitTornado/BitTornado/Tracker/T2T.py", line 4, in
from BitTornado.Client.Announce import Announcer
File "/root/BitTornado/BitTornado/Client/Announce.py", line 14, in
from BitTornado.Network.Stream import SharedStream
File "/root/BitTornado/BitTornado/Network/Stream.py", line 17, in
from http.client import HTTPConnection, HTTPSConnection, HTTPException
ImportError: cannot import name HTTPSConnection
Ever since the python 3 port of Bittornado, btmakemetafile now fills the screen rather than simply advancing the progress counter on the same line.
Hi,
after i had installed (setup.py --install -f) under CentOS7 and python3.4.9, comes this when i will start the tacker:
/usr/bin/bttrack.py
Traceback (most recent call last):
File "/usr/bin/bttrack.py", line 7, in
from BitTornado.Tracker.track import track
ImportError: No module named 'BitTornado.Tracker'
Can anybody help me? Is there anywhere a ready RPM package? I am not a developer...
Greetings from Marko
| file: 1.zip
| size: 39.08MiB
| dest: /data/data/omcs/web/upfiles/omsa/1.zip
| progress: _______________________________________________________________________________________________________________
| status: download succeeded!
| dl speed: ---
| ul speed: 0.0 KB/s
| sharing: 0.000 (0.0 MB up / 0.0 MB down)
| seeds: 0 seen recently, plus 0.000 distributed copies
| peers: 0 seen now, 0.0% done at 0.0 kB/s
#################################################################
| file: 1.zip
| size: 39.08MiB
| dest: /tmp/1.zip
| progress: _______________________________________________________________________________________________________________
| status: connecting to peers (0.0%)
| dl speed: 0.0 KB/s
| ul speed: 0.0 KB/s
| sharing: 0.000 (0.0 MB up / 0.0 MB down)
| seeds: 0 seen now, plus 0.000 distributed copies
| peers: 0 seen now, 0.0% done at 0.0 kB/s
|
TypeError: Unknown type for bencode: <class 'float'>
Traceback (most recent call last):
File "/home/BitTornado/BitTornado/Network/RawServer.py", line 109, in listen_forever
func()
File "/home/BitTornado/BitTornado/Tracker/track.py", line 1104, in save_state
self.state.write(self.dfile)
File "/home/BitTornado/BitTornado/Meta/bencode.py", line 194, in write
handle.write(bencode(self))
File "/home/BitTornado/BitTornado/Meta/bencode.py", line 36, in __call__
self.encode(data, ctext)
File "/home/BitTornado/BitTornado/Meta/bencode.py", line 60, in encode
self.encode(data, ctext)
File "/home/BitTornado/BitTornado/Meta/bencode.py", line 60, in encode
self.encode(data, ctext)
File "/home/BitTornado/BitTornado/Meta/bencode.py", line 46, in encode
self.encode(element, ctext)
File "/home/BitTornado/BitTornado/Meta/bencode.py", line 46, in encode
self.encode(element, ctext)
File "/home/BitTornado/BitTornado/Meta/bencode.py", line 73, in encode
raise TypeError('Unknown type for bencode: ' + str(type(data)))
I keep getting this, I don't know why, I have 2 torrents in my folder but neither are seeding or being leeched, this just occurs randomly and crashes the tracker, any idea?
I'm using the following cmd btw: ./bttrack.py --port 65000 --dfile dstate --allow_get 1 --allowed_dir ./torrents/ --infopage_redirect "MY_SITE_HERE" --logfile ./logs/log.txt
Before it crashed:
Traceback (most recent call last):
File "/home/BitTornado/BitTornado/Network/RawServer.py", line 109, in listen_forever
func()
File "/home/BitTornado/BitTornado/Tracker/track.py", line 1117, in parse_allowed
[".torrent"])
File "/home/BitTornado/BitTornado/Application/parsedir.py", line 75, in parsedir
for _, infohash in unchanged_files.values()}
File "/home/BitTornado/BitTornado/Application/parsedir.py", line 75, in <dictcomp>
for _, infohash in unchanged_files.values()}
KeyError: 0
and when starting:
Traceback (most recent call last):
File "./bttrack.py", line 24, in <module>
track(sys.argv[1:])
File "/home/BitTornado/BitTornado/Tracker/track.py", line 1208, in track
t = Tracker(config, r)
File "/home/BitTornado/BitTornado/Tracker/track.py", line 415, in __init__
self.parse_allowed()
File "/home/BitTornado/BitTornado/Tracker/track.py", line 1117, in parse_allowed
[".torrent"])
File "/home/BitTornado/BitTornado/Application/parsedir.py", line 55, in parsedir
for _, filehash in removed_files.values()}
File "/home/BitTornado/BitTornado/Application/parsedir.py", line 55, in <dictcomp>
for _, filehash in removed_files.values()}
KeyError: 0
Tracker isn't starting anymore.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.