boramalper / magnetico Goto Github PK
View Code? Open in Web Editor NEWAutonomous (self-hosted) BitTorrent DHT search engine suite.
Home Page: http://labs.boramalper.org/magnetico/
License: GNU Affero General Public License v3.0
Autonomous (self-hosted) BitTorrent DHT search engine suite.
Home Page: http://labs.boramalper.org/magnetico/
License: GNU Affero General Public License v3.0
What's the bandwidth usage like?
Hello,
I think we should register when info_hash
was seen even if no redownload them. We need info when info_hash has been available to track old info_hash
without any node. Without monitoring such information we will find a database full of junk that no one is able to download ever again. Magnets sometimes expire, especially those less popular.
Greetings,
uptime 09:40:28 up 10 days, 16:31, 1 user, load average: 1.03, 1.04, 0.97
So system is up for 10 days.
nload traffic cmd says:
in: 912.90 GByte
out: 476.86 GByte
So if we do some math i only do about 90Gbyte per day so its not a lot.
Can it be better, or need more cpu & ram?
when you say things like:
(only for systemd users, skip the rest of the steps and proceed to the Using section if you are not a systemd user or want to use a different solution)
Download the magneticod systemd service file (at magneticod/systemd/magneticod.service) and change the tilde symbol with the path of your home directory. For example, if my username is bora, this line
ExecStart=~/.local/bin/magneticod
this will confuse most Mac users. they will generally have no idea this does not apply if they do not know what systemd is, and they will not know whether they are systemd users.
Peer should be destroyed after socket timeout or after several seconds without receiving data.
Now you are only destroying the peer if metadata is received
https://github.com/boramalper/magnetico/blob/master/magneticod/magneticod/__main__.py#L121
in other cases, number of peers (and sockets) increases forever until you reach OS limit and process crash.
Do the two clients communicate or just gather information from the net?
Do my client also upload sth.? Is my IP safe from being sending to stb.?
Is anonymity also guaranteed, as autonomous?
How safe is it so use is at this stage of dev.?
Python 3.6.1 in Windows 10 x64
https://github.com/boramalper/magnetico/blob/master/magneticod/magneticod/bittorrent.py#L181
self.__outgoing_buffer += b"%s\x14\x00%s" % (
(2 + len(msg_dict_dump)).to_bytes(4, "big"),
msg_dict_dump
)
That code gives me an exception. I fixed it with this code but it's ugly:
self.__outgoing_buffer += b"%s\x14\x00" % (2 + len(msg_dict_dump)).to_bytes(4, "big")
self.__outgoing_buffer += msg_dict_dump
I am trying to run magneticow on a windows machine running python 3.6. It looks like it connects to magneticod's database, but when I load localhost:8080 in my browser I get the following error from inside of flask.
2017-04-26 19:00:52,405 INFO Connecting to magneticod's database...`
2017-04-26 19:00:52,419 INFO magneticow is ready to serve!
[2017-04-26 19:00:52,766] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\flask\app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\flask\app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\flask\app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\flask\_compat.py", line 33, in reraise
raise value
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\flask\app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\flask\app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\magneticow\magneticow.py", line 67, in decorated
return f(*args, **kwargs)
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\magneticow\magneticow.py", line 79, in home_page
return flask.render_template("homepage.html", n_torrents=n_torrents)
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\flask\templating.py", line 134, in render_template
context, ctx.app)
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\flask\templating.py", line 116, in _render
rv = template.render(context)
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\jinja2\asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\jinja2\environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\jinja2\environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\jinja2\_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "C:\Users\Brian\AppData\Roaming\Python\Python36\site-packages\magneticow\templates\homepage.html", line 20, in top-level template code
Now with {{ "{:,}".format(n_torrents) }} torrents available !
TypeError: unsupported format string passed to NoneType.__format__
Php + apache2 + python as backend (discovery index only - magneticod) :)
I dont really like confortable to have python based web frontend (magneticow), i am good with it as backend (magneticod).
So i did some quick coding and made a php version, basically just connecting to the db and choosing what to do.
For me php seems faster than python as web platform.
Demo
Base-page:
https://dht.bittor.ch/
Base-page search:
https://dht.bittor.ch/?search=ubuntu
Base-RSS:
https://dht.bittor.ch/rss
Base-RSS search:
https://dht.bittor.ch/rss?search=ubuntu
Base-RSS search with limits number of output:
https://dht.bittor.ch/rss?search=ubuntu&limit=5
Basic magnet view:
https://dht.bittor.ch/?id=145916
Basic magnet files view:
https://dht.bittor.ch/?files=145916
This will change in future :)
Hello,
I would like debug https://github.com/boramalper/magnetico/blob/master/magneticod/magneticod/persistence.py#L70 and seen a lot of metadata losts due unable decode metadata name. The string is hex string.
Can we improve encoding parsing?
2017-05-01 08:23:22,259 DEBUG Unable decode metadata name '5548534d2d30303443' of ca4f01ba1ef5e4dc13b756d7c6fb14b3fc9c55a4.
2017-05-01 08:23:38,666 DEBUG Unable decode metadata name '5641202d204e6172636f732c20566f6c2e203120616e642032205b323031365d204d50332c20333230' of 315d5d3f165fd8d12b67e2ad5685df35b28a24c5.
2017-05-01 08:29:35,748 DEBUG Unable decode metadata name '54696e7920546f75726973742077697468204855474520546974732067657473204772616262656420696e746f20612056616e20616e642044657374726f7965642062792042696720426c61636b20436f636b73' of c57ed7e087e27a0c9180d7b65668c59c8126adb6.
2017-05-01 08:29:38,653 DEBUG Unable decode metadata name '4c656f6e6172646f202d20546865204162736f6c757465204d616e20283230303129' of 5fed97244fd3fc2f5ff61388e5ba7cf0f6a55a53.
2017-05-01 08:30:37,237 DEBUG Unable decode metadata name '2888ea94ca8fac90e029205b8384837d834f8360836d837b838b5d20835b838d82cc8e6782a296822091e630312d3136' of 4d47f156676537d72f8ad722a9396dd8446d996b.
2017-05-01 08:31:09,349 DEBUG Unable decode metadata name '436f646520476561737320426f756b6f6b75204e6f20416b69746f' of be8b17ff42c27a2076f326a8824fc909dadbe534.
2017-05-01 08:32:09,929 DEBUG Unable decode metadata name 'd1ebe0e4eae0ff20e6e8e7edfc202853617452697029' of f2ff4438ba9f93d17efc568f8906736ad396638d.
2017-05-01 08:36:15,424 DEBUG Unable decode metadata name '5b416e696d65202d204954415d202d204e656f6e2047656e65736973204576616e67656c696f6e' of da5f79cf2e15ad7338ee60f2a953bcc295c0cafc.
2017-05-01 08:37:33,667 DEBUG Unable decode metadata name '3036323531365f313132' of 7433586db78983b69806f202fd1d6541f8ca8c06.
2017-05-01 08:38:23,306 DEBUG Unable decode metadata name '82ab82e182f182ab82e182f1836f836a815b82552069a56d61696c' of 2613943ca92c0358d0baf693cc3b72ab7d3c5cc9.
2017-05-01 08:39:02,494 DEBUG Unable decode metadata name 'cac2cd20323031332e20caf3e1eeea20ecfdf0e020cceef1eae2fb2028323031332c20deeceef02c205341545269702920284d5944494d4b41292e617669' of 358a3affcae7b070f50d8eaff7ab13950a5e59f2.
2017-05-01 08:40:07,964 DEBUG Unable decode metadata name '2831388bd68351815b8380295b3039303432345d5b414c636f742083568367838983585d8e80905f82cc90da95ab82cd95ca97a382cc96a120286d64662b6d64732b7272292e726172' of ea211d7126a86bc70d76a3478f4b84bb5a81e9ae.
2017-05-01 08:41:05,967 DEBUG Unable decode metadata name 'd0e0e7e2e8e2e0fef9e0ff20e0f3e4e8eefdedf6e8eaebeeefe5e4e8ff' of 0be6966ac062d15bd89d6dbef0aa3a3fe4e44ee1.
2017-05-01 08:41:11,108 DEBUG Unable decode metadata name '75736f66614039396262732e636f6d40c8a4cff282989853b2bfa1eda3b1c5aed7d3e5bca4cea5c8a5a4a5ecb1cbc5aea2da' of 546409e11be246fd9d286492c07ec8b97e5d1a48.
2017-05-01 08:41:40,338 DEBUG Unable decode metadata name 'c0ede4f0e5e920c7e2eeedeaeee2202d20cfeeeae020e5e4e5f220abd1eaeef0e0ffbb2028c2e0ebe5f0e8e920d1ece5eae0ebeee229' of b442a588685219bd42abd7a0334dce6105acd6ed.
2017-05-01 08:42:29,153 DEBUG Unable decode metadata name 'caf3f5edff2035202d20f1e5f0e8ff2030322e617669' of e6dbb60f194d1742de709065bc0432e5fed79515.
2017-05-01 08:42:42,358 DEBUG Unable decode metadata name '58562d373839' of 15ac80639339974462dd5e0e32b34e7633b94b77.
2017-05-01 08:42:49,757 DEBUG Unable decode metadata name '4665646f736565765f47725f2d5f5a6c6f795f6475685f59616d627579615f2844756e6165765f477229' of 72257a5e29be15318210169ba6bcc7e4ff89b2ee.
2017-05-01 08:43:27,047 DEBUG Unable decode metadata name '3036323331365f353936' of 951cb4d9eb7001cbb97e4b44205f5eb7fd1c30dc.
2017-05-01 08:43:43,255 DEBUG Unable decode metadata name '416c706861204672616e6365' of f9a6bf527a0e12d1ad80fc8ff5cb1a0375e5f2d4.
2017-05-01 08:44:04,684 DEBUG Unable decode metadata name 'c3eef0ede8f7ede0ff20285745422d444c52697029' of 803e6e9265492ceb9d1bbaf6202533fef9dd04ed.
2017-05-01 08:44:37,183 DEBUG Unable decode metadata name 'd1eee1e0f7fce820cce0f1eae8' of e80bb3b1ec65b8a1ae84deebbdc482fd512f0d86.
2017-05-01 08:44:39,196 DEBUG Unable decode metadata name 'd1e5f0e3e5e920cbfbf1e0ea202d20cef220c3f3e4e7eeede020e4ee20cbe02dcfebe0f2fb2028cce0eaf1e8ec20c4eef0eeede8ed29' of 70ba67f0146d3da274d503d06f45d023c785ffb4.
2017-05-01 08:44:42,599 DEBUG Unable decode metadata name '546f74616c2e5761722e524f4d452e49492e48616e6e6962616c2e61742e5468652e47617465732e696e636c2e444c432e4d756c7469322e762e312e31312e302e537465616d2d526970202d204f726967696e73' of dcfbcba77e08fa56d3f89aeb25185d33798f93b3.
2017-05-01 08:46:43,501 DEBUG Unable decode metadata name 'd1e5f0e3e5e920d2e0f0ece0f8e5e2202d20c0f0e5e0eb2e20cee1f0e5f7e5ededfbe52028c8e2e0ed20cbe8f2e2e8edeee229' of 717b81cd59962f87434c3fc5860cba8d12cb6d37.
2017-05-01 08:47:00,859 DEBUG Unable decode metadata name 'a650a8c6a454a4c0bfcb' of 1c1e78bfb3c80d9e8a26c579b6c05676af711d9b.
2017-05-01 08:47:18,511 DEBUG Unable decode metadata name '506561726c20486172626f72202853636f726529' of 1e35dcf3b86fd5905aae05cec90d4db60eaedc0b.
2017-05-01 08:47:48,173 DEBUG Unable decode metadata name 'ced7cac820c1c0cacac820c1d3c3c2c8cdc0' of edca61accf8d2aaefac013665c44ca31cb7bfc8f.
2017-05-01 08:47:55,860 DEBUG Unable decode metadata name 'd1e0ed2dd0e5ecee2032303133202853616e72656d6f2032303133292028323031332c20506f702c20484454562920284d5944494d4b4129' of cfcc595e9e26369a5d2070710f46c61d68f7e3b5.
2017-05-01 08:48:10,401 DEBUG Unable decode metadata name 'caebe0f1f1ede0ff2ef8eaeeebe02e323031332e587669442e5341545269702e5468756e646572' of 0b6171b7da40cc53b2f2745db6ad81f1204d53de.
2017-05-01 08:48:24,940 DEBUG Unable decode metadata name '3133cbead0a1c3c0c5aebbb9c3bbd3d0b7a2d3fdcdeac8abb5c4d3d7c5aebdd3cadcbca6b0cdb5c4b4ddb2d0' of 733d6c5e25f198a096477d3f3e135d7d1f1de3e8.
2017-05-01 08:48:40,590 DEBUG Unable decode metadata name '444554454354495659' of b9e4c641198cac0ed29a9b521cbedef7d54d56b3.
2017-05-01 08:49:46,893 DEBUG Unable decode metadata name '313131313131313131' of 01f911de5c71257ed3021b0604fb42b11c45915a.
2017-05-01 08:50:16,003 DEBUG Unable decode metadata name '3032313731372d333735' of d92863ffca7431ba0eaedd12c52beed28e10434f.
2017-05-01 08:50:22,811 DEBUG Unable decode metadata name 'd8e5f0ebeeea5fd5eeebecf15f5361745269705f62795fc4f0e5ea5f522e4720d1e5f0e8e0ebfb' of 9e5a4b46e395261dba08029d64cda32eee2d139c.
2017-05-01 08:50:58,859 DEBUG Unable decode metadata name '31362e4d79204669727374205365782054656163686572203533' of 0252a5de79f3dafc34688c352a0ecffb91580b14.
2017-05-01 08:51:25,660 DEBUG Unable decode metadata name '6d7572616d7572612e74762d3032313031315f3337362d48442d414c4c' of 4dca25b6639278b3c167a867149bfdf24c6a3ebe.
2017-05-01 08:51:39,258 DEBUG Unable decode metadata name '5652544d2d30303152' of 2e8a93e2ab17983ac3efc7a6092ff5165ab3a706.
2017-05-01 08:51:46,293 DEBUG Unable decode metadata name '3132313230392d323431c9dfc9e0c5aebdcc8e9f20c7b0be8e20d0c7839ec4cb' of 3ed84ccd268c7b898206956ad5ea4ce77d648ea2.
2017-05-01 08:52:47,991 DEBUG Unable decode metadata name '6a756b756a6f2d636c75622d36353538' of c8940efbc4715eb8511a2293d205d995a36a1480.
2017-05-01 08:52:55,610 DEBUG Unable decode metadata name 'cbfee1eee2fc20f120eff0e8e2e8ebe5e3e8ffece85f4456425f62795f434c49504d414e2e6d7067' of e4738d61e9fe9a0804e9ff9f3ebac104ba3ba946.
2017-05-01 08:53:08,332 DEBUG Unable decode metadata name '367468204e6f2e38342041594140686b706c617a6120627920617273656e616c2d66616e' of 546bace76297ae290543e643f59e82a5b2122a4b.
2017-05-01 08:54:25,570 DEBUG Unable decode metadata name 'c0edf2eeebeee3e8ff205761726372616674' of ab09f7ba43fb31ff867c71021007dd0203763eb1.
2017-05-01 08:54:34,197 DEBUG Unable decode metadata name 'cce5f2eee420d4f0e5e9e4e02032202853617452697029' of a873348cbf13b2252f797e64803ab78d88480c6c.
2017-05-01 08:54:41,278 DEBUG Unable decode metadata name '41472d303839' of 3ca89864da5e64eed8564be3bcf6abc71d3bcbc2.
2017-05-01 08:55:11,561 DEBUG Unable decode metadata name 'c0ede4f0e5e920cbe5e2e8f6eae8e92c20c0ebe5eaf1e5e920c1eee1eb202d20c2e0f0e2e0f0fb20caf0fbece02028cae8f0e8ebeb20d0e0e4f6e8e329' of cc7b5c4b1440320bb93236b95267f08abdf84145.
2017-05-01 08:55:30,974 DEBUG Unable decode metadata name '4856592d30313543' of f78329db99808fbbed2ae7fc1fbfa41bdfee28d9.
2017-05-01 08:56:52,717 DEBUG Unable decode metadata name '46502d30303420445644' of 9155d167d49eddb287e15895557b766b52259477.
2017-05-01 08:56:53,352 DEBUG Unable decode metadata name 'cce0f2e020d5e0f0e820284844545652697029' of 1e20118440b88206673f5dc9162835f92b30dc96.
2017-05-01 08:56:58,216 DEBUG Unable decode metadata name '42656c2043616e746f202d20372e20416c62756d732028313938372d3230303329' of 3731ee073987fe555fea55c3d798eab2d1c88cd0.
2017-05-01 08:57:04,668 DEBUG Unable decode metadata name '416c636f686f6c203132302520322e302e322e353632392b52655061636b206279204421616b6f762b2052655061636b206279204b706f4a49754b' of 858d0f73bf0e8bf50a4338e0f8630b968a83a609.
2017-05-01 08:57:15,649 DEBUG Unable decode metadata name 'c8f1f2eef0e8ff20f0f3f1f1eaeee920ebe8f2e5f0e0f2f3f0fb20323020e22e202832302d393020e3e3292e20caeef0ece8ebeee22e646f63' of 2ce963bf8e3a26a228d22448b71ed6637bdea2f1.
2017-05-01 08:57:59,807 DEBUG Unable decode metadata name '44617669642042697362616c205b446973636f6772616669615d5b506f705d5b323030312d323030375d5b7777772e7063747265636f7264732e636f6d5d' of 6b063e6b363b4e7d5a4f0725633979d557f969d2.
2017-05-01 08:58:00,973 DEBUG Unable decode metadata name '4f78666f7264204865726f65732031' of bf90aa17e24b491e2b881ab190ddc93e6ad3a20e.
2017-05-01 08:58:06,744 DEBUG Unable decode metadata name 'd1eff0eef1e8f2e520efeee2e0f0e0202d2032303130' of 162aebb51e5ad0f4711e3a4a92e239d39fde87f5.
2017-05-01 08:58:14,324 DEBUG Unable decode metadata name 'd1e2e5f2ebe0ede020caeeeffbebeee2e0206d7033' of 397650f79fd56ef7ca56cca5a6d683dabb3c0155.
2017-05-01 08:58:34,776 DEBUG Unable decode metadata name '48303933302d6f726931343430' of ac08ade13512e7e9864704eb59594c475afd1a2c.
2017-05-01 08:58:48,688 DEBUG Unable decode metadata name 'c9f1ccbdb5d2c8cabddc4949c8ab3430bcaf2e323030382eb9fad3efd6d0d7d6a1eacaa5b3c7b4bacaf7' of 08110b73374d27c4b7a9b83bab34aec5ed98039e.
2017-05-01 08:58:54,675 DEBUG Unable decode metadata name '6865797a6f2d3037323020627920617273656e616c2d66616e' of 1011fac8a1e7f043396de52cc3392d0ed8af92ce.
2017-05-01 08:59:51,257 DEBUG Unable decode metadata name '6c6a7a74793535354031387032704050656570696e6720486f6c65732dcdd1d2c2cbf9cfb5c1d0' of b78bb4a0b69468f1cac9d0819795b71b8d108dd6.
2017-05-01 08:59:58,261 DEBUG Unable decode metadata name '64696c69383239407777772e736578696e7365782e6e65744049204861766520612057696665202d20416c69736f6e2054796c6572' of 5558256a9a7e0ac75f5e6a517e070437370dbb80.
2017-05-01 09:00:23,408 DEBUG Unable decode metadata name '53444d552d35343652' of ac4dac918357a529e81d96d5cea11db2c5c519d0.
2017-05-01 09:01:05,583 DEBUG Unable decode metadata name '47532d30323652' of 939080fa14c5c51796cee30f79f9ceead928c8b9.
2017-05-01 09:01:56,819 DEBUG Unable decode metadata name 'c0ebe5eaf1e0ede4f020cff3f8eae8ed202d20cae0efe8f2e0edf1eae0ff20e4eef7eae02028cce0eaf1e8ec20cfe8edf1eae5f029' of e732b956a55388a03005bcfc8b5c50bdd5a5eabd.
2017-05-01 09:02:18,471 DEBUG Unable decode metadata name '4465795f4b696e' of aee4f0f5aeeb09f3d3a67868b573fc11120379cb.
2017-05-01 09:03:15,485 DEBUG Unable decode metadata name 'd0eee0ebfce420c4e0ebfc202d20d1eef7e8ede5ede8ff20e4ebff20e4e5f2e5e9' of f04392b74f88f98ed1c6a7d8c0d28a8790417579.
2017-05-01 09:03:20,227 DEBUG Unable decode metadata name '42303032a5f5b1e6c646a4732d2db944c3d2aa6bae76b67da5dc2e69736f' of 439359e3f09c5960e38424eb1ec94e3793c19dbc.
2017-05-01 09:03:34,241 DEBUG Unable decode metadata name '2831388bd68351815b8380295b3035303431355d5b82bd82c182bf815b5d2869643d31353236363129968290a29286836e8f49838f838983698343' of 618c72daa4181ff252aeec2d2fe76083c4fd54d5.
2017-05-01 09:03:35,686 DEBUG Unable decode metadata name 'ddede5f0e3e5f2e8eae020e820f6e5ebe8f2e5ebfcf1f2e2ee' of 7e67ef954f5b5e8af19a3d75d6a76e92897c46a3.
2017-05-01 09:03:43,804 DEBUG Unable decode metadata name '6b696e3874656e676f6b752d31343638' of 17e43c5945e8555471ec4616f8a108afc1d59861.
2017-05-01 09:03:59,281 DEBUG Unable decode metadata name 'c2e5ebe8eae0ff20e820e7e0e1fbf2e0ff' of bc00c496d31bd9140c0dfc3b0730999fc47469ce.
2017-05-01 09:04:06,607 DEBUG Unable decode metadata name 'cfe5f1203220285745422d444c52697029' of c303e8f0396509906bd1f1c0bb72a79bfb7dda50.
2017-05-01 09:04:48,901 DEBUG Unable decode metadata name 'd8e0edf1eeed20e3eee4e020323031362e20d7e0f1f2fc2030312028323031362c205368616e736f6e2c20506f702c20484454562031303830692920284d5944494d4b41292e7473' of 4eef7c71b531710d6c8a8ec87d11329a61bbf2ba.
2017-05-01 09:05:25,184 DEBUG Unable decode metadata name 'cae0f2ff20cce0f2fef8eae8ede02c20cae0f2ff20ceeaeee2e8f2e0ff202d20cbe0effb20e2e2e5f0f52028c5ebe5ede020d5f0f3f1f2e0ebe5e2e02c20d1e5ece5ed20cce5ede4e5ebfcf1eeed29' of 1aacccabd8c10d75916d3862dedcca517fea5c25.
2017-05-01 09:06:55,245 DEBUG Unable decode metadata name '53656c656e61' of cfc4218521d4dab3023f9fb784062d58b992dd93.
2017-05-01 09:07:23,431 DEBUG Unable decode metadata name '32382e416e616c204265617574792035205b484431303830505d' of 22200bfbf52f95dd70793302d11aed487ca76e73.
2017-05-01 09:08:22,399 DEBUG Unable decode metadata name 'c8f1f2eef0e8ff20d0eef1f1e8e8203230e2e5ea' of 7f59dd329c1ae4dd62581f7c9a14dc4fdc6c00c3.
2017-05-01 09:08:26,593 DEBUG Unable decode metadata name '5bb9fab2fa5d5bcaaeb6fec9fad0a4b4abc6e65d5bb9fad3ef3334bcaf5d5b4456442d524d56425d' of 5df1619e4cbba69b28ff9c0d6d773959b6337e30.
2017-05-01 09:08:28,360 DEBUG Unable decode metadata name '676b2d3030353220627920617273656e616c2d66616e' of 3923517322945a0b49b42493a6fe6af6c97ff714.
2017-05-01 09:08:40,517 DEBUG Unable decode metadata name '974496d882dc82a882dd202d208f838c89834c836c837d' of 58548e66cbdb4200b4c12c289b3aab3a5473ff74.
2017-05-01 09:08:58,455 DEBUG Unable decode metadata name '5bbaabc3d4d7d6c4bbd7e97777772e313137686d2e636f6d5d5bced2c3c7bcd7cbb35d5bb5da3530bcaf5d5bbaabd3efd6d0d7d65d5b373230705d2e726d7662' of 5b8654cb1fab9402ca419836d2ab1ae6484be3d3.
2017-05-01 09:09:17,441 DEBUG Unable decode metadata name 'b344ab48bb50a6dec0f420536e616b657320616e642045617272696e677320b344c752c7d0c77cc7b5' of 03f4c7e5fbfb6b685ffced0d6f2fb1244aeca91c.
2017-05-01 09:09:20,151 DEBUG Unable decode metadata name 'd0e5ede0f020cbe0f0e8f1e0202d20caf0f3e320e6e5edf1eaeee920f1e8ebfb2e617669' of 608dbd6d52acf0372a7f1c38f0bf5aa535dc99c4.
2017-05-01 09:09:43,507 DEBUG Unable decode metadata name '4254ced2b0aec4e34073656c616e672e6e657440a5e2a5c7a5eba5aaa960a5c7a5a3a5b7a5e7a5f32033a5aba5e1bacdcabda5c8a5a4a5ec20766f6c2e3131' of 9856ca36f045d42e0509e9e348c4d3f1a4cea7e2.
2017-05-01 09:10:51,739 DEBUG Unable decode metadata name 'c6e6c4b1c3eebcc6cee5b8a3d0c72e42442e373230702eb9fad4c1cbabd3efd6d0d7d6' of 5d0c3a6b113d5a5d2759ee1a5b12fc3def79e12d.
2017-05-01 09:10:58,224 DEBUG Unable decode metadata name '727573616d61746575722d782e636f6d20686f6d6520766964656f' of 2dc011e86e18ebc1429e4ed425249eb524002f6a.
2017-05-01 09:12:47,733 DEBUG Unable decode metadata name '67616368697070762d31303731' of 1bce86099315497e5b9deb1bb0cc4433ce5b1f9b.
2017-05-01 09:13:52,569 DEBUG Unable decode metadata name '3230313030343234' of 794d5bfcfb8cd64ea8a0ac512e7348c1930a5913.
2017-05-01 09:14:09,772 DEBUG Unable decode metadata name 'cbe0e9ece5ed20d42e20c1e0f3ec202d20cee7ece020e8e720d1f2f0e0edfb20cee72028e0f3e4e8eef1efe5eaf2e0eaebfc29' of 2c2375381e8c904660a3c040ac8c47d264f49b47.
2017-05-01 09:14:11,446 DEBUG Unable decode metadata name 'cbe8e4e8ff20d7e0f0f1eae0ff202d20c7e0efe8f1eae820ece0ebe5edfceaeee920e3e8ecede0e7e8f1f2eae82028deebe8ff20d5e0ece8f2eee2e029' of 608d5c1be6b2e87fc8f5ee4d428eab0143b804d5.
2017-05-01 09:14:13,850 DEBUG Unable decode metadata name '456c207365637265746f206465206d6920e97869746f2e617669' of e271153636ec627896ee5c92a9cfc85dd5945b87.
2017-05-01 09:14:18,490 DEBUG Unable decode metadata name '6a756b756a6f2d636c75622d36373331' of f3a0a1b8686b7f4d40919bcd57195add871fa8db.
2017-05-01 09:14:37,767 DEBUG Unable decode metadata name 'd1e5edf7f3eaeee220de2ede2e2dcff0ffeceee920f3e4e0f02e2d323031362e706466' of 1cb1c013d3f9462b324c18dc739428285d2fca7d.
2017-05-01 09:15:05,255 DEBUG Unable decode metadata name 'c0ede4f0e5e920c2e0f1e8ebfce5e2202d20cff3f2e820c2eef1f2eeeae02028c0f0eae0e4e8e920c1f3f5ece8ed29' of 545cf412ad541f24741dbb28f72d2b9cf81951f9.
2017-05-01 09:15:10,180 DEBUG Unable decode metadata name '446976582b6e696b652853444d5331313129' of dc68b9dd3c95c5f229da5b502d399736b926bee1.
2017-05-01 09:15:10,827 DEBUG Unable decode metadata name '31372e486f744c656773416e6446656574202d20417468696e612c20496e6e6120536972696e61202d20416674657220576f726b6f75742052656c61786174696f6e2041205374756427732053757270726973696e6720466f6f74204675636b' of 9fcb754229c8481e6c265393f59786d01adca991.
2017-05-01 09:15:15,457 DEBUG Unable decode metadata name 'c0eaf3ede8ed20c1eef0e8f1202d20cfebe0ede5f2e020c2eee4e02028c7e0e9f6e5e220c2ebe0e4e8ece8f029' of 8c531c0dc6c6d7aa5035aa6f7a3b7750c2d29c04.
2017-05-01 09:15:20,745 DEBUG Unable decode metadata name '4175737472616c69617320546f70203430204d7573696320566964656f2043686172742030382d30382d32303135' of 0cecef27105087a90db9478253914f2ea675cb60.
2017-05-01 09:15:38,006 DEBUG Unable decode metadata name '287264323831292b5370656564506c757373' of 4d6c152a9f196938b367ab42b9b9273eb07b557c.
2017-05-01 09:15:42,541 DEBUG Unable decode metadata name 'c3eeebeef12e20cfe5f0e2fbe920f1e5e7eeed2e20c2f1e520f7f2ee20eef1f2e0ebeef1fc20e7e020eae0e4f0eeec2e2028323031332c20c4eeeaf3ece5edf2e0ebfcedfbe92c20484454562031303830692920284d5944494d4b41292e7473' of f999f806465e2b98d52129c6349ce0a39e54d9d8.
2017-05-01 09:15:53,209 DEBUG Unable decode metadata name '7769666520322e3238' of fcd986da7ba004ff7a7f3ac569fb579d0034c1d6.
2017-05-01 09:16:20,041 DEBUG Unable decode metadata name '3031313431375f3031' of 4c5b91454c43ffccb0e6721dbb511cfc1c770547.
2017-05-01 09:16:46,219 DEBUG Unable decode metadata name '414220526f6164202d20436f6d706c65746520507572706c6520436869636b205365742076312e3120776974682070617463686573' of 90fa6e527629821922cd9255c178b637d4fcde55.
2017-05-01 09:16:55,265 DEBUG Unable decode metadata name '44494f4e2026205448452042454c4d4f4e54532028caeeebebe5eaf6e8ff20333020e4e8f1eaeee229' of 9b563610c512cd31c59c8fa8f0f84b84d3f03bc6.
2017-05-01 09:17:19,821 DEBUG Unable decode metadata name '5665726469202d204f74656c6c6f202d204361726c6f73204b6c6569626572' of 2132e74fea1e82196b2a7d03d24afc80c855ed80.
2017-05-01 09:17:58,870 DEBUG Unable decode metadata name 'cfeeebe8f6e5e9f1eae0ff20e0eae0e4e5ece8ff203420c3f0e0e6e4e0ede520e220e4eee7eef0e5' of 062b7bfc6e3563d7244660404e97f20b90ea1069.
2017-05-01 09:18:17,967 DEBUG Unable decode metadata name '5b4541435d20a3a8c3c8a4a8a3a920ccd2beaea4cfa4eba4b3a3af53756e646179206561726c79206d6f726e696e67205bb3f5bbd8b1505d286170652b6375652b424d5029727233252e726172' of badb24322f199a53c125c8d72d6a3ff331c9da73.
2017-05-01 09:18:38,737 DEBUG Unable decode metadata name '446976582b6e696b652853444d5333393129' of f853f8c40f139036b1b103c7c59bbf25373e5d7c.
2017-05-01 09:19:16,061 DEBUG Unable decode metadata name 'cce0f2e020d5e0f0e8202853617452697029' of 9f6bfec58f0739cb45bb9ef65c47d6d86f1dcc83.
2017-05-01 09:19:18,274 DEBUG Unable decode metadata name '7a65706879722e7a68616f40736578696e7365782e6e6574404641442d31353937' of 53e0152c69381605345e551557c614d46b1b6a10.
2017-05-01 09:19:27,149 DEBUG Unable decode metadata name 'cef0ebeee220cc2e202d20d1e2e5f0e4ebeee2f1eae8e920f0eeea20efe0ecfff2ede8ea20ece8f4f3202028d3f0e0eb20d5d520e2e5ea29202d20323030302e706466' of 121e0c0c47cbe99bdcb9b020dc14ac69735d0d2f.
2017-05-01 09:20:03,638 DEBUG Unable decode metadata name 'd4e0edf2e0f1f2e8f7e5f1eae8e520f2e2e0f0e820e820e3e4e520eeede820eee1e8f2e0fef22e323031362e42445269702e31303830702e6d6b76' of dbb4f6d337ac78e510b45507307c4102f1dfa2f9.
2017-05-01 09:20:46,518 DEBUG Unable decode metadata name 'cff3e7e8eaeee220c22ec32e202d20d2e5f5edeeebeee3e8ff20e2e5e4e5ede8ff20f2f0e5ede8ede3e02028cff1e8f5eeebeee3e8f7e5f1eae8e920f2f0e5ede8ede329202d20323030372e646f63' of 040d65629cc2e8f729d820ffe53373dafe382195.
2017-05-01 09:22:02,445 DEBUG Unable decode metadata name 'cde520f5eef7f320e6e5ede8f2fcf1ff5f4456425f62795f434c49504d414e2e6d7067' of 0a6a3bfcfa055e02b81a6531c8f55d2f6962be16.
2017-05-01 09:22:06,116 DEBUG Unable decode metadata name '546f6b796f20486f74206b30303630' of bdcc22ebb63bd2c7c911bc579d89e168c6f88a98.
2017-05-01 09:22:08,297 DEBUG Unable decode metadata name '4d5847532d39353252' of 6281e74e206c3d1c124c2e915877303b86d01f8e.
2017-05-01 09:22:22,851 DEBUG Unable decode metadata name '4e6176616a65726f732e4456445269702e5b7777772e44697678546f74616c2e636f6d5d736973696275746f' of 29a5cb2e0954095e48ed15afe421533fba122bf4.
2017-05-01 09:22:37,538 DEBUG Unable decode metadata name 'd0d0d4cbb3acc8cb312d3530bcafcdead4c1d3ef4259d3e6c8cbd6aebcd240d6c1b0aed4c1d3ef' of 4e45c60be58c9eb272e76ed7ab09cd054b7f2cba.
2017-05-01 09:22:47,894 DEBUG Unable decode metadata name '284d49474431383429' of 376ff1488587de528dd5cd6da22d47ddfb22716f.
2017-05-01 09:22:58,234 DEBUG Unable decode metadata name 'c8e3f0eeece0ede8ff20b920303520283233362920323031372e69736f' of 290d1b23076f46e7296f2d92739bccce372bdd46.
2017-05-01 09:23:22,504 DEBUG Unable decode metadata name 'cde5efeef1e5e4e020c7f32e323031332e587669442e534154526970' of e8bc6a219c42a85e017118facb1d46226fecfd77.
2017-05-01 09:23:50,338 DEBUG Unable decode metadata name '4c6962657274e172696f73' of f06167cfb102c4accfabea706f2b9ab4356fa39e.
2017-05-01 09:23:51,036 DEBUG Unable decode metadata name '4450482d303832' of c42fd5e8cd18e5c94a482f0b139c0e1b2f663470.
2017-05-01 09:23:59,513 DEBUG Unable decode metadata name '5072657474792e576f6d616e2e4456445269702e5b7777772e44697678546f74616c2e636f6d5d736973696275746f' of 67c64c080fc32a4d7c7cf1ef20d7d0875870216b.
2017-05-01 09:24:20,161 DEBUG Unable decode metadata name 'd02e20c7ebeef2ede8eaeee22c20d12e20ccf3f1e0ede8f4202d20c2f1e5ebe5edede0ff20ede5f3e4e0f7ede8eaeee22028def0e8e920cbe0e7e0f0e5e229' of 76d425c722ce4e7b573342010a396384daf6390b.
What would be the difficultly level of adding peers and seeds, this goes a long way to checking dead and popular torrents.
Python 3.6.1 on Windows 10 x64
I think this code is not working in Windows
https://github.com/boramalper/magnetico/blob/master/magneticod/magneticod/dht.py#L105
except PermissionError:
# This exception (EPERM errno: 1) is kernel's way of saying that "you are far too fast, chill".
# It is also likely that we have received a ICMP source quench packet (meaning, that we really need to
# slow down.
#
# Read more here: http://www.archivum.info/comp.protocols.tcp-ip/2009-05/00088/UDP-socket-amp-amp-sendto
# -amp-amp-EPERM.html
congestion = True
break
because __n_max_neighbours
increases forever and causes a crash. I fixed it removing:
if congestion:
self.__outgoing_queue.clear()
# In case of congestion, decrease the maximum number of nodes to the 90% of the current value.
if self.__n_max_neighbours < 200:
logging.warning("Maximum number of neighbours are now less than 200 due to congestion!")
else:
self.__n_max_neighbours = self.__n_max_neighbours * 9 // 10
else:
# In case of the lack of congestion, increase the maximum number of nodes by 1%.
self.__n_max_neighbours = self.__n_max_neighbours * 101 // 100
It's not discovered much, but nothing is listed in the web interface anyway. Output of magneticod (censored by me to avoid copyright issues):
2017-04-10 07:49:27,314 INFO magneticod v0.1.0 started
2017-04-10 07:49:27,329 DEBUG SybilNode 6033565F3F718D6EDA45D6AA9356A1AA624AE4FF initialized!
2017-04-10 07:50:34,240 WARNING Belated TICK! (ฮ = 3)
2017-04-10 08:10:30,532 INFO Added: `**********[ettv]`
2017-04-10 08:10:43,009 INFO Added: `************ะธั`
2017-04-10 08:10:50,722 INFO Added: `******** Star ****************`
2017-04-10 08:20:19,872 INFO Added: `*********************.avi`
magneticow debug:
::1 - - [2017-04-10 08:22:09] "GET /torrents/?search= HTTP/1.1" 200 1539 0.004133
::1 - - [2017-04-10 08:22:11] "GET /torrents/?search= HTTP/1.1" 200 1539 0.003614
::1 - - [2017-04-10 08:22:19] "GET /torrents?search=star HTTP/1.1" 301 480 0.001086
::1 - - [2017-04-10 08:22:19] "GET /torrents/?search=star HTTP/1.1" 200 1537 0.004578
::1 - - [2017-04-10 08:22:41] "GET /torrents/?search=star HTTP/1.1" 200 1537 0.004020
::1 - - [2017-04-10 08:22:44] "GET /torrents/ HTTP/1.1" 200 1539 0.003077
::1 - - [2017-04-10 08:22:46] "GET /torrents/ HTTP/1.1" 200 1539 0.002926
::1 - - [2017-04-10 08:22:51] "GET /torrents/?search= HTTP/1.1" 200 1539 0.003159
::1 - - [2017-04-10 08:24:21] "GET /torrents/?search= HTTP/1.1" 200 1539 0.002909
::1 - - [2017-04-10 08:24:27] "GET /torrents/?search=star HTTP/1.1" 200 1537 0.003034
Yet no search results are returned, either searching blank for all results, or "star" to try to confirm it's found one of the specific torrents listed.
starting with where the installation is... I don't know.
There are constants in all files and should be together in one place
https://github.com/boramalper/magnetico/blob/master/magneticod/magneticod/persistence.py#L25
https://github.com/boramalper/magnetico/blob/master/magneticod/magneticod/dht.py#L31
https://github.com/boramalper/magnetico/blob/master/magneticod/magneticod/dht.py#L54
https://github.com/boramalper/magnetico/blob/master/magneticod/magneticod/__main__.py#L37
Version: v0.2.0
Python 3.5.3
Lubuntu 17.04
Ran fine for about 20min then crashed with the following stacktrace.
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/xxxx/magniticod/lib/python3.5/site-packages/magneticod/__main__.py", line 225, in <module>
sys.exit(main())
File "/home/xxxx/magniticod/lib/python3.5/site-packages/magneticod/__main__.py", line 81, in main
loop()
File "/home/xxxx/magniticod/lib/python3.5/site-packages/magneticod/__main__.py", line 154, in loop
key.fileobj.on_receivable()
File "/home/xxxx/magniticod/lib/python3.5/site-packages/magneticod/dht.py", line 90, in on_receivable
self.__on_ANNOUNCE_PEER_query(message, addr)
File "/home/xxxx/magniticod/lib/python3.5/site-packages/magneticod/dht.py", line 207, in __on_ANNOUNCE_PEER_query
self.when_peer_found(info_hash, peer_addr)
File "/home/xxxx/magniticod/lib/python3.5/site-packages/magneticod/__main__.py", line 102, in on_peer_found
peer = bittorrent.DisposablePeer(info_hash, peer_address)
File "/home/xxxx/magniticod/lib/python3.5/site-packages/magneticod/bittorrent.py", line 32, in __init__
self.__socket = socket.socket()
File "/usr/lib/python3.5/socket.py", line 134, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 24] Too many open files
MacBook-Pro-3:~ joe$ pip3 install magneticow --user
Collecting magneticow
Downloading magneticow-0.2.0-py3-none-any.whl (789kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 798kB 16kB/s
Collecting flask>=0.12.1 (from magneticow)
Downloading Flask-0.12.1-py2.py3-none-any.whl (82kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 92kB 23kB/s
Requirement already satisfied: appdirs>=1.4.3 in ./Library/Python/3.5/lib/python/site-packages (from magneticow)
Collecting gevent>=1.2.1 (from magneticow)
Downloading gevent-1.2.1-cp35-cp35m-macosx_10_6_intel.whl (1.1MB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 1.1MB 47kB/s
Collecting Werkzeug>=0.7 (from flask>=0.12.1->magneticow)
Downloading Werkzeug-0.12.1-py2.py3-none-any.whl (312kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 317kB 4.1kB/s
Collecting click>=2.0 (from flask>=0.12.1->magneticow)
Downloading click-6.7-py2.py3-none-any.whl (71kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 71kB 12kB/s
Collecting Jinja2>=2.4 (from flask>=0.12.1->magneticow)
Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 348kB 12kB/s
Collecting itsdangerous>=0.21 (from flask>=0.12.1->magneticow)
Downloading itsdangerous-0.24.tar.gz (46kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 51kB 23kB/s
Collecting greenlet>=0.4.10 (from gevent>=1.2.1->magneticow)
Downloading greenlet-0.4.12.tar.gz (57kB)
100% |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 61kB 31kB/s
Collecting MarkupSafe>=0.23 (from Jinja2>=2.4->flask>=0.12.1->magneticow)
Downloading MarkupSafe-1.0.tar.gz
Installing collected packages: Werkzeug, click, MarkupSafe, Jinja2, itsdangerous, flask, greenlet, gevent, magneticow
Running setup.py install for MarkupSafe ... done
Running setup.py install for itsdangerous ... done
Running setup.py install for greenlet ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/3p/t2015hrs5gjd27jdlkcbw4wh0000gp/T/pip-build-tzo0baot/greenlet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/3p/t2015hrs5gjd27jdlkcbw4wh0000gp/T/pip-2xulkivp-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_ext
building 'greenlet' extension
creating build
creating build/temp.macosx-10.6-intel-3.5
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c greenlet.c -o build/temp.macosx-10.6-intel-3.5/greenlet.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/3p/t2015hrs5gjd27jdlkcbw4wh0000gp/T/pip-build-tzo0baot/greenlet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/3p/t2015hrs5gjd27jdlkcbw4wh0000gp/T/pip-2xulkivp-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /private/var/folders/3p/t2015hrs5gjd27jdlkcbw4wh0000gp/T/pip-build-tzo0baot/greenlet/
Hey!
Awesome project, huge fan. Worked on similar things at various points in time, but haven't attacked DHT yet.
I'm trying to run magneticod on a slow machine. Seeing a significant number of WARNING Belated TICK!
and with default settings, was unable to scrape any torrents after 6-8hrs of looking for nodes and peers.
Adjusting the tick interval upwards seems to have made a difference (found 6 torrents in an hour or two) but I'm hard-pressed to see any more significant results.
I spent some time investigating your source code - the state machine implementation proved to be a little hard to follow. Have you considered an asyncio / async reimplementation? It looks an awful lot like you've built your own event loop in pure Python, and I'm not sure that'll be ultimately productive.
Anyways, wondering what causes of scraping only very few torrents via DHT might be, given a working NAT config (port forwarding) etc. Keen to get this working
Thanks!
I don't think file names are matched during a search. It would be even better to allow glob pattern like "*.pdf"
YaCy (site, wiki, github) is a free distributed search engine, built on principles of peer-to-peer (P2P) networks.
Advantages: Customizable good search interface exists;
Global indexed, not just a local database to speed up and increase the search area (syncing and crawling schedulers are included);
Mutual increase in the popularity of projects (yacy users can search in magnetico, magnetico users - in www without additional settings).
Disadvantages: Not so much information about internal architecture, fast googling shows nothing. E.g.: Unknown (for me) yacy crawler plugin interface, I'm not sure it exists.
Currently it binds to 0.0.0.0
magnetico/magneticod/magneticod/dht.py
Line 45 in 257912a
This should be configurable ( defaulting to 0.0.0.0 ) so users with multiple interfaces can specify which to use.
This is useful if you have multiple interfaces with valid routes, which may happen if you have for instance a dedicated VPN interface and a normal interface. In this case it would be nice to be able to choose either the secure or the fast interface.
Since the program does not throttle it self this would also allow throttling it via traffic shaping
Left overnight magnetico managed to add around 100 items, so not going to imminently replace centralised sites. It's not even using much bandwidth.
But I have multiple cores, and several other raspberry Pi's sitting doing very low utilisation jobs that could be put to further work.
Would multiple magneticod processes help or would they just interfere with each other? Would they just repeat the same work?
If not could they be made to work well together?
Im attempting to run your two programs on Lubuntu running through VirtualBox because my machine is Windows 10.
When i initialize the command in ternimal to run Magneticow, I dont get any sort of web interface. The Terminal is just blank like it would be if a normal application GUI was initialized through terminal. I have to press Control C to return to a normal Terminal.
It appears to be working normally when i run the command to asses magniticow's status
magneticow.service - magneticow: lightweight web interface for magnetico Loaded: loaded (/home/****************/.config/systemd/user/magneticow.service; disabled; vendor preset: enabled) Active: active (running) since Thu 2017-04-13 00:11:38 EDT; 2min 40s ago Main PID: 1696 (magneticow)
"**********" is my correct home directory, I just didn't want to put the name on here...
When i run Magneticod, I get:
WARNING Belated TICK! (ฮ = 5)
Im more concerned with not having the web interface. I cant assess if even with the "Belated TICK" error if its even finding any files for the Web search interface.
Shouldn't that be "file names that refer to content..." ?
its reasonably common to use clients like transdroid
erickok/transdroid
erickok/transdroid-search
it would be nice if there was an API (usually some sort of XML API) in magneticow that enables us to search from a remote client application.
I've raised a similar issue in transdroid-search
erickok/transdroid-search#57 @erickok
Hello,
When application started and indexing bootstraped there is 100% CPU usage, so the indexing speed is CPU-limited mostly, so if we want more effective software we need start optimizing of CPU usage again.
I reported earlier this kind of issue (#41), some changes was prepared (#43), next to memory limitation was fixed (#58). There is CPU-bounding again. If we want improve throughput which I believe is our goal (see #60) we need improve CPU computation again.
Remove bottle-neck to improve throughput is continuous and iterative process. I would like starts public discussion about possible optimization again.
I am using single-core machine, so believe there is no mention of multiple processes disused in some issue. Alternatively, distributed processing would be applicable. Probably using the mechanisms similar to multiprocessing.
Here is graph of network & cpu & memory usage:
Current indexing speed on my machine is 2-4 magnet / s. (120-240/ min.).
Greetings,
After 4 minutes of continous working magneticod I received following exception:
Traceback (most recent call last):
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/bittorrent.py", line 87, in on_receivable
received = self.__socket.recv(8192)
OSError: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./magneticod", line 9, in <module>
load_entry_point('magneticod==0.3.0', 'console_scripts', 'magneticod')()
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/__main__.py", line 81, in main
loop()
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/__main__.py", line 163, in loop
key.fileobj.on_receivable()
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/bittorrent.py", line 97, in on_receivable
self.when_error()
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/__main__.py", line 135, in on_peer_error
selector.unregister(peer)
File "/usr/lib/python3.5/selectors.py", line 415, in unregister
key = super().unregister(fileobj)
File "/usr/lib/python3.5/selectors.py", line 248, in unregister
key = self._fd_to_key.pop(self._fileobj_lookup(fileobj))
File "/usr/lib/python3.5/selectors.py", line 224, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/usr/lib/python3.5/selectors.py", line 41, in _fileobj_to_fd
raise ValueError("Invalid file descriptor: {}".format(fd))
ValueError: Invalid file descriptor: -1
Here is report of memory usage:
I don't see any similiar report. Please inform me if I omit something.
I noticed following error after running it for few days, I reached around 100k torrents.
ERROR Could NOT commit metadata to the database! (10 metadata are pending)
Traceback (most recent call last):
File "/root/.local/lib/python3.5/site-packages/magneticod/persistence.py", line 114, in __commit_metadata
self.__pending_metadata
sqlite3.IntegrityError: UNIQUE constraint failed: torrents.info_hash
after restarting magneticod it runs ok again for a while.
Does anyone have, or would be willing to share a db dump? After 2 weeks, my db is only at 120k. Running it on a spare server too, so its not resources. Cheers
Hello,
When application started there is 100% CPU usage, so the indexing speed is CPU-limited mostly, so if we want more effective software we need start optimising of CPU usage.
I know the software author knows that limitation, but I would like starts public discussion about possible optimisation.
Here is some logs of cProfile:
Mon Apr 17 20:34:07 2017 logi.txt
49626068 function calls (49625636 primitive calls) in 331.942 seconds
Random listing order was used
ncalls tottime percall cumtime percall filename:lineno(function)
27 0.000 0.000 0.000 0.000 {method '__contains__' of 'frozenset' objects}
74 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:423(_get_type_vars)
3 0.000 0.000 0.001 0.000 /usr/lib/python3.5/argparse.py:1227(__init__)
5 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:292(_check_tzinfo_arg)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1074(PlaceHolder)
5 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:264(_check_date_fields)
11 0.001 0.000 0.001 0.000 {built-in method _hashlib.openssl_sha1}
94 0.002 0.000 0.002 0.000 /usr/lib/python3.5/typing.py:996(<genexpr>)
306 0.001 0.000 0.055 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:143(__on_message)
1 0.000 0.000 0.037 0.037 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:15(<module>)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1481(_pop_action_class)
3 0.000 0.000 0.001 0.000 /usr/lib/python3.5/gettext.py:490(dgettext)
226 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/persistence.py:78(<genexpr>)
8779 0.099 0.000 1.251 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:153(__on_GET_PEERS_query)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:539(_BaseAddress)
14 0.001 0.000 0.003 0.000 /usr/lib/python3.5/logging/__init__.py:243(__init__)
498 0.001 0.000 0.001 0.000 /usr/lib/python3.5/typing.py:867(_gorg)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1239(__init__)
14 0.000 0.000 0.002 0.000 /usr/lib/python3.5/logging/__init__.py:968(emit)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/selectors.py:205(_BaseSelectorImpl)
39/1 0.001 0.000 0.132 0.132 <frozen importlib._bootstrap>:966(_find_and_load)
79 0.001 0.000 0.002 0.000 /usr/lib/python3.5/typing.py:890(_next_in_mro)
10 0.000 0.000 0.009 0.001 /usr/lib/python3.5/sre_compile.py:531(compile)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/weakref.py:261(update)
44 0.000 0.000 0.000 0.000 /usr/lib/python3.5/posixpath.py:39(_get_sep)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:82(EnumMeta)
436511 2.591 0.000 2.591 0.000 {method 'recvfrom_into' of '_socket.socket' objects}
14 0.002 0.000 0.002 0.000 /usr/lib/python3.5/logging/__init__.py:1347(findCaller)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1463(Sequence)
30 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:1210(_get_spec)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:40(_EnumDict)
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:94(acquire)
3 0.000 0.000 0.001 0.000 /usr/lib/python3.5/gettext.py:369(find)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:988(FileHandler)
28 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:799(acquire)
27 0.001 0.000 0.002 0.000 <frozen importlib._bootstrap_external>:816(get_data)
2580369 53.745 0.000 53.745 0.000 {method 'sendto' of '_socket.socket' objects}
19 0.000 0.000 0.001 0.000 /usr/lib/python3.5/ipaddress.py:1459(__init__)
1 0.000 0.000 0.000 0.000 <string>:1(<module>)
4 0.000 0.000 0.000 0.000 {method 'match' of '_sre.SRE_Pattern' objects}
2 0.000 0.000 0.000 0.000 {built-in method math.log}
1 0.000 0.000 0.003 0.003 /usr/lib/python3.5/selectors.py:5(<module>)
39 0.000 0.000 0.000 0.000 {method 'register' of 'select.epoll' objects}
30 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:789(find_spec)
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:427(has_location)
3 0.000 0.000 0.000 0.000 {method 'sub' of '_sre.SRE_Pattern' objects}
386273 6.385 0.000 60.691 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:92(on_sendable)
11 0.001 0.000 0.010 0.001 /usr/lib/python3.5/logging/__init__.py:1830(info)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1468(MutableSequence)
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1515(isEnabledFor)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:99(<dictcomp>)
9 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:436(spec_from_loader)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/string.py:174(Formatter)
9 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:235(_requires_builtin_wrapper)
23 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bencode.py:55(loads2)
6 0.000 0.000 0.000 0.000 {method 'reverse' of 'list' objects}
1 0.000 0.000 0.000 0.000 {built-in method _hashlib.openssl_sha256}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/re.py:160(match)
14 0.000 0.000 0.001 0.000 /usr/lib/python3.5/logging/__init__.py:487(formatTime)
1 0.000 0.000 0.000 0.000 {method 'hex' of 'bytes' objects}
1 0.000 0.000 0.000 0.000 {built-in method math.exp}
2 0.000 0.000 0.000 0.000 {method 'acquire' of '_thread.lock' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:762(CallableMeta)
1 0.000 0.000 0.000 0.000 {method 'fetchall' of 'sqlite3.Cursor' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:718(BrokenBarrierError)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1055(_SubParsersAction)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/random.py:68(Random)
2 0.000 0.000 0.000 0.000 {method 'cursor' of 'sqlite3.Connection' objects}
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_compile.py:386(_simple)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/tokenize.py:112(any)
1 0.000 0.000 0.001 0.001 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:15(<module>)
43 0.002 0.000 0.020 0.000 /usr/lib/python3.5/typing.py:989(__getitem__)
883249 0.395 0.000 0.395 0.000 {method 'get' of 'dict' objects}
24 0.000 0.000 0.000 0.000 {method 'extend' of 'list' objects}
2 0.005 0.002 0.005 0.002 {method 'executemany' of 'sqlite3.Cursor' objects}
11 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:416(<genexpr>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:661(TupleMeta)
1 0.000 0.000 0.000 0.000 {method 'union' of 'set' objects}
107/67 0.000 0.000 0.001 0.000 /usr/lib/python3.5/typing.py:276(_get_type_vars)
20 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_compile.py:513(isstring)
107 0.000 0.000 0.000 0.000 {built-in method _thread.get_ident}
2 0.000 0.000 0.001 0.000 /usr/lib/python3.5/argparse.py:2353(_get_formatter)
17 0.000 0.000 0.000 0.000 /usr/lib/python3.5/os.py:796(encode)
14 0.000 0.000 0.002 0.000 /usr/lib/python3.5/logging/__init__.py:842(handle)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1445(MutableSet)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1714(_add_action)
23 0.002 0.000 0.051 0.002 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:221(__on_ext_message)
608991 0.554 0.000 1.449 0.000 /usr/lib/python3.5/selectors.py:68(__getitem__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:891(_set_tstate_lock)
3 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1485(_get_handler)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:752(Handler)
4 0.000 0.000 0.000 0.000 {built-in method builtins.callable}
1 0.000 0.000 0.001 0.001 /usr/lib/python3.5/ipaddress.py:2264(_IPv6Constants)
30 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:342(_get_cached)
3 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1047(_path_hooks)
6 0.001 0.000 0.001 0.000 {method 'execute' of 'sqlite3.Connection' objects}
24 0.000 0.000 0.001 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:256(__request_metadata_piece)
1 0.000 0.000 0.006 0.006 /usr/lib/python3.5/traceback.py:1(<module>)
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:159(__init__)
34 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1279(register)
10 0.000 0.000 0.000 0.000 {built-in method builtins.globals}
27 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:710(<genexpr>)
32 0.000 0.000 0.000 0.000 /usr/lib/python3.5/abc.py:9(abstractmethod)
1 0.000 0.000 0.010 0.010 /usr/lib/python3.5/sqlite3/dbapi2.py:23(<module>)
8 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:312(_class_escape)
58 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:16(_is_dunder)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sqlite3/dbapi2.py:50(<listcomp>)
1 0.000 0.000 0.005 0.005 /usr/lib/python3.5/string.py:15(<module>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1251(setLevel)
14 0.000 0.000 0.001 0.000 /usr/lib/python3.5/logging/__init__.py:819(format)
187 0.000 0.000 0.000 0.000 {method 'add' of 'set' objects}
8779 0.053 0.000 0.081 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:257(__calculate_token)
1 0.005 0.005 0.005 0.005 /usr/lib/python3.5/datetime.py:641(date)
4 0.000 0.000 0.001 0.000 /usr/lib/python3.5/typing.py:543(__getitem__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1322(_Protocol)
15 0.000 0.000 0.000 0.000 /usr/lib/python3.5/_weakrefset.py:52(_commit_removals)
5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:92(_path_isdir)
14 0.000 0.000 0.009 0.001 /usr/lib/python3.5/logging/__init__.py:1392(_log)
3 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:162(_eval_type)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:644(__new__)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/abc.py:151(register)
26 0.000 0.000 0.000 0.000 /usr/lib/python3.5/posixpath.py:71(join)
1 0.000 0.000 0.003 0.003 /usr/lib/python3.5/argparse.py:1605(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:598(_BaseNetwork)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1586(ArgumentParser)
366725 5.364 0.000 9.885 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:253(<listcomp>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1366(Iterator)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/token.py:1(<module>)
156 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:324(<genexpr>)
450 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:366(_verbose_message)
3 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:675(__init__)
179551 0.027 0.000 0.027 0.000 {method 'fileno' of '_socket.socket' objects}
136 0.000 0.000 0.000 0.000 {method 'issuperset' of 'frozenset' objects}
3 0.000 0.000 0.000 0.000 /usr/lib/python3.5/locale.py:341(_replace_encoding)
10 0.002 0.000 0.045 0.004 /home/adas/.local/lib/python3.5/site-packages/magneticod/persistence.py:65(add_metadata)
55 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:24(_is_sunder)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:715(__eq__)
1 0.000 0.000 0.000 0.000 {built-in method sys.exit}
1629 0.002 0.000 0.002 0.000 {built-in method builtins.getattr}
1 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:134(shutdown)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1378(SupportsFloat)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:88(TypingMeta)
22 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:999(<genexpr>)
15 0.000 0.000 0.000 0.000 {method '__subclasses__' of 'type' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/socket.py:123(socket)
37 0.000 0.000 0.000 0.000 {method 'items' of 'collections.OrderedDict' objects}
226 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/persistence.py:79(<genexpr>)
37 0.000 0.000 0.000 0.000 {method 'shutdown' of '_socket.socket' objects}
63 0.000 0.000 0.000 0.000 {method 'get' of 'mappingproxy' objects}
28 0.000 0.000 0.000 0.000 /usr/lib/python3.5/_weakrefset.py:58(__iter__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:141(__new__)
27 0.000 0.000 0.000 0.000 /usr/lib/python3.5/collections/__init__.py:419(<genexpr>)
1 3.035 3.035 331.744 331.744 /home/adas/.local/lib/python3.5/site-packages/magneticod/__main__.py:135(loop)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:834(_StoreAction)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:264(SplitResultBytes)
476 0.001 0.000 0.003 0.000 <frozen importlib._bootstrap_external>:50(_path_join)
1 0.000 0.000 0.017 0.017 /usr/lib/python3.5/hashlib.py:53(<module>)
27 0.002 0.000 0.003 0.000 /usr/lib/python3.5/selectors.py:414(unregister)
8779 0.012 0.000 0.012 0.000 {built-in method zlib.adler32}
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:419(parent)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/functools.py:192(total_ordering)
25/11 0.001 0.000 0.003 0.000 /usr/lib/python3.5/sre_parse.py:491(_parse)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:211(_acquireLock)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1283(_registry_get)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:714(ArgumentError)
10 0.000 0.000 0.000 0.000 {built-in method _sre.compile}
108 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:109(__init__)
1 0.000 0.000 0.000 0.000 {built-in method from_iterable}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:250(ParseResult)
8779 0.015 0.000 0.015 0.000 {built-in method _socket.inet_aton}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1362(IPv4Interface)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1012(__init__)
419539 4.004 0.000 4.004 0.000 {method 'tobytes' of 'array.array' objects}
4 0.001 0.000 0.002 0.001 /usr/lib/python3.5/enum.py:88(__new__)
3 0.000 0.000 0.000 0.000 {built-in method builtins.eval}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:743(Action)
3 0.000 0.000 0.017 0.006 <frozen importlib._bootstrap_external>:903(create_module)
15 0.000 0.000 0.000 0.000 /usr/lib/python3.5/_weakrefset.py:26(__exit__)
57 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:78(_path_is_mode_type)
51 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/persistence.py:103(<genexpr>)
2 0.000 0.000 0.001 0.001 /usr/lib/python3.5/re.py:175(sub)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:117(_ResultMixinStr)
67 0.000 0.000 0.001 0.000 /usr/lib/python3.5/typing.py:282(_type_vars)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:85(_RLock)
7 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:78(opengroup)
33 0.000 0.000 0.000 0.000 {method 'find' of 'str' objects}
15/4 0.001 0.000 0.001 0.000 /usr/lib/python3.5/abc.py:194(__subclasscheck__)
14 0.000 0.000 0.003 0.000 /usr/lib/python3.5/logging/__init__.py:1471(callHandlers)
13 0.000 0.000 0.000 0.000 {method 'lower' of 'str' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:664(ArgumentDefaultsHelpFormatter)
1 0.000 0.000 0.000 0.000 {function Random.seed at 0x7fbe9774a840}
16 0.000 0.000 0.000 0.000 {method 'remove' of 'list' objects}
37 0.001 0.000 0.002 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:270(shutdown)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/string.py:55(_TemplateMetaclass)
38 0.000 0.000 0.000 0.000 {method 'setblocking' of '_socket.socket' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1116(Manager)
1 0.000 0.000 0.001 0.001 /usr/lib/python3.5/enum.py:1(<module>)
39 0.000 0.000 0.000 0.000 {method 'pop' of 'dict' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:245(SplitResult)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:653(RawTextHelpFormatter)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1043(__subclasscheck__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:591(BufferingFormatter)
207 0.000 0.000 0.000 0.000 {method 'items' of 'dict' objects}
86 0.004 0.000 0.018 0.000 /usr/lib/python3.5/abc.py:132(__new__)
1 0.000 0.000 0.001 0.001 /usr/lib/python3.5/argparse.py:153(HelpFormatter)
1 0.000 0.000 0.004 0.004 /usr/lib/python3.5/ipaddress.py:9(<module>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:485(Event)
1 0.000 0.000 0.000 0.000 <string>:5(ParseResult)
10 0.000 0.000 0.001 0.000 /usr/lib/python3.5/abc.py:178(__instancecheck__)
168 0.000 0.000 0.000 0.000 {built-in method _sre.getlower}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:681(MetavarTypeHelpFormatter)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_compile.py:391(_generate_overlap_table)
27 0.001 0.000 0.001 0.000 {method 'read' of '_io.FileIO' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1342(Awaitable)
1 0.000 0.000 0.000 0.000 {method 'findall' of '_sre.SRE_Pattern' objects}
3 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:1838(_create)
54 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:56(_path_split)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1402(SupportsAbs)
6 0.000 0.000 0.000 0.000 /usr/lib/python3.5/hashlib.py:98(__get_openssl_constructor)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1353(AsyncIterator)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:935(tzinfo)
43259 0.021 0.000 0.022 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:131(on_sendable)
55 0.000 0.000 0.000 0.000 {method 'find' of 'bytearray' objects}
386286 0.155 0.000 0.155 0.000 {built-in method math.ceil}
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1494(_check_conflict)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:2056(IPv6Interface)
526 0.001 0.000 0.001 0.000 {built-in method builtins.hasattr}
25 0.000 0.000 0.000 0.000 /usr/lib/python3.5/genericpath.py:16(exists)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1741(parse_known_args)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:1030(__new__)
39/1 0.000 0.000 0.131 0.131 <frozen importlib._bootstrap>:939(_find_and_load_unlocked)
1 0.000 0.000 0.005 0.005 /usr/lib/python3.5/tokenize.py:21(<module>)
5 0.000 0.000 0.001 0.000 /usr/lib/python3.5/typing.py:470(__new__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/selectors.py:62(__init__)
5 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:45(_days_in_month)
27 0.000 0.000 0.001 0.000 /usr/lib/python3.5/selectors.py:246(unregister)
25 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:433(_ip_int_from_prefix)
44 0.001 0.000 0.001 0.000 {method 'send' of '_socket.socket' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1548(Dict)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:532(_get_type_vars)
99 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:852(__enter__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1121(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1921(consume_positionals)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:565(_metavar_formatter)
35 0.000 0.000 0.000 0.000 /usr/lib/python3.5/_weakrefset.py:70(__contains__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/posixpath.py:221(expanduser)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1029(_VersionAction)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:755(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:670(Filterer)
27 0.000 0.000 0.011 0.000 <frozen importlib._bootstrap_external>:474(_compile_bytecode)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:1815(timezone)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:467(UnionMeta)
1 0.000 0.000 0.012 0.012 /home/adas/.local/lib/python3.5/site-packages/magneticod/persistence.py:15(<module>)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:205(__init__)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/types.py:120(__init__)
1 0.000 0.000 0.000 0.000 {method 'upper' of 'str' objects}
43 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:105(__init__)
37 0.001 0.000 0.005 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:31(__init__)
27 0.001 0.000 0.016 0.001 <frozen importlib._bootstrap_external>:729(get_code)
6/5 0.000 0.000 0.056 0.011 {built-in method builtins.__import__}
27 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:786(__init__)
27 0.000 0.000 0.000 0.000 {method 'unregister' of 'select.epoll' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1556(LoggerAdapter)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:633(Filter)
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:190(cb)
15 0.000 0.000 0.004 0.000 /usr/lib/python3.5/sre_compile.py:221(_compile_charset)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/re.py:240(escape)
9 0.000 0.000 0.001 0.000 /usr/lib/python3.5/typing.py:404(__new__)
2 0.000 0.000 0.001 0.000 /usr/lib/python3.5/argparse.py:1308(add_argument)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:453(Enum)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/selectors.py:343(PollSelector)
79 0.002 0.000 0.022 0.000 /usr/lib/python3.5/typing.py:907(__new__)
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:716(find_spec)
40 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:8(_is_descriptor)
32 0.000 0.000 0.000 0.000 {method 'release' of '_thread.RLock' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/_collections_abc.py:599(__contains__)
9 0.002 0.000 0.002 0.000 {built-in method _imp.create_builtin}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:510(set)
10 0.000 0.000 0.005 0.001 /usr/lib/python3.5/sre_compile.py:516(_code)
25 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:476(_prefix_from_prefix_string)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:596(<listcomp>)
99 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1882(__init__)
154 0.000 0.000 0.000 0.000 {method 'decode' of 'bytes' objects}
54 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:45(_r_long)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1902(NullHandler)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1526(KeysView)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/traceback.py:403(TracebackException)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1212(__init__)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:574(format)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1245(IPv4Address)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1876(IPv6Address)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/os.py:44(<listcomp>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1010(_HelpAction)
661 0.000 0.000 0.000 0.000 {method 'isupper' of 'str' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1410(SupportsRound)
39 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap>:163(__enter__)
39/38 0.000 0.000 0.022 0.001 <frozen importlib._bootstrap>:570(module_from_spec)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:963(_AppendConstAction)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/random.py:639(SystemRandom)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:122(_get_type_vars)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:199(_TypeAlias)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:332(notify)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1049(_BaseV4)
55 0.000 0.000 0.001 0.000 /usr/lib/python3.5/enum.py:51(__setitem__)
39 0.002 0.000 0.005 0.000 /usr/lib/python3.5/selectors.py:233(register)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:370(PercentStyle)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1365(_add_action)
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:321(getMessage)
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:382(format)
1 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/appdirs.py:9(<module>)
12 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:362(_escape)
4 0.000 0.000 0.000 0.000 {method 'mro' of 'type' objects}
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/genericpath.py:111(_splitext)
14 0.000 0.000 0.000 0.000 {built-in method posix.getpid}
15 0.000 0.000 0.009 0.001 /usr/lib/python3.5/re.py:278(_compile)
173 0.000 0.000 0.002 0.000 <frozen importlib._bootstrap_external>:68(_path_stat)
2 0.000 0.000 0.008 0.004 /usr/lib/python3.5/enum.py:532(_convert)
188 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:550(__int__)
108 0.001 0.000 222.150 2.057 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:62(on_tick)
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/posixpath.py:115(splitext)
105 0.000 0.000 0.000 0.000 {built-in method builtins.min}
5193290 4.506 0.000 9.005 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:261(__random_bytes)
65537 0.022 0.000 0.022 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:45(<genexpr>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:1205(_DummyThread)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/selectors.py:394(EpollSelector)
108 0.194 0.002 0.194 0.002 {method 'clear' of 'dict' objects}
47 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:158(_split_optional_netmask)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:182(_checkLevel)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/random.py:84(__init__)
1 0.000 0.000 0.000 0.000 {built-in method _hashlib.openssl_sha512}
54 0.000 0.000 0.002 0.000 <frozen importlib._bootstrap_external>:246(cache_from_source)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/token.py:74(<dictcomp>)
38 0.001 0.000 0.001 0.000 /usr/lib/python3.5/socket.py:399(_real_close)
10 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:797(fix_flags)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/posixpath.py:99(split)
2 0.000 0.000 0.001 0.000 /usr/lib/python3.5/logging/__init__.py:1257(debug)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:385(_IPAddressBase)
1720201/1720182 0.374 0.000 0.374 0.000 {built-in method builtins.len}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:869(_StoreConstAction)
2 0.000 0.000 0.000 0.000 {built-in method builtins.vars}
386275 1.782 0.000 1.782 0.000 {method 'poll' of 'select.epoll' objects}
52 0.000 0.000 0.000 0.000 {built-in method builtins.all}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:201(Condition)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/__init__.py:1(<module>)
1 0.000 0.000 0.029 0.029 /usr/lib/python3.5/typing.py:1(<module>)
788542 0.463 0.000 1.443 0.000 /usr/lib/python3.5/selectors.py:214(_fileobj_lookup)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1556(DefaultDict)
5193327 2.175 0.000 2.175 0.000 {method 'getrandbits' of '_random.Random' objects}
1 0.000 0.000 0.001 0.001 /usr/lib/python3.5/random.py:37(<module>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/tokenize.py:98(TokenInfo)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1734(parse_args)
3 0.000 0.000 0.001 0.000 /usr/lib/python3.5/gettext.py:424(translation)
14 0.000 0.000 0.000 0.000 {built-in method time.strftime}
1 0.000 0.000 0.000 0.000 <string>:5(DefragResult)
40 0.000 0.000 0.000 0.000 {method 'setdefault' of 'dict' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:853(Callable)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/selectors.py:59(_SelectorMapping)
1 0.000 0.000 0.000 0.000 <string>:5(SelectorKey)
9 0.000 0.000 0.000 0.000 {built-in method builtins.round}
330 0.000 0.000 0.001 0.000 /usr/lib/python3.5/socket.py:76(<lambda>)
72 0.000 0.000 0.000 0.000 {built-in method builtins.abs}
84 0.000 0.000 0.001 0.000 /usr/lib/python3.5/typing.py:295(_type_check)
2 0.000 0.000 0.000 0.000 {built-in method _sqlite3.register_converter}
2 0.002 0.001 0.004 0.002 /usr/lib/python3.5/enum.py:215(__call__)
2 0.000 0.000 0.000 0.000 {method 'close' of 'sqlite3.Cursor' objects}
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:372(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/weakref.py:101(__init__)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/functools.py:43(update_wrapper)
1009 0.000 0.000 0.000 0.000 {method 'rstrip' of 'str' objects}
9 0.000 0.000 0.002 0.000 <frozen importlib._bootstrap>:737(create_module)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/socket.py:532(SocketIO)
25 0.000 0.000 0.000 0.000 {built-in method time.time}
429535 0.161 0.000 0.161 0.000 /usr/lib/python3.5/selectors.py:275(_key_from_fd)
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:532(usesTime)
27 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:382(_check_name_wrapper)
7 0.000 0.000 0.000 0.000 {method 'translate' of 'bytearray' objects}
64/31 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:167(getwidth)
2 0.000 0.000 0.001 0.000 /usr/lib/python3.5/argparse.py:160(__init__)
1 0.000 0.000 0.000 0.000 {built-in method _hashlib.openssl_md5}
108 0.000 0.000 0.019 0.000 /usr/lib/python3.5/typing.py:103(__new__)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:285(__members__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:367(Semaphore)
39/2 0.001 0.000 0.130 0.065 <frozen importlib._bootstrap>:659(_load_unlocked)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:252(_is_owned)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1450(Mapping)
28 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:695(filter)
80 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1125(_parse_octet)
74 0.000 0.000 0.000 0.000 {built-in method builtins.setattr}
166 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:417(_check_int_address)
15 0.000 0.000 0.000 0.000 /usr/lib/python3.5/_weakrefset.py:20(__enter__)
17 0.000 0.000 0.000 0.000 {method 'encode' of 'str' objects}
1 0.000 0.000 0.000 0.000 {built-in method _hashlib.openssl_sha224}
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:406(_find_new_)
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:119(release)
9 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:140(<genexpr>)
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:74(__init__)
16 0.000 0.000 0.003 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/__main__.py:128(on_peer_error)
86 0.001 0.000 0.002 0.000 /usr/lib/python3.5/abc.py:135(<setcomp>)
37 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:288(__random_bytes)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:742(_addHandlerRef)
1 0.000 0.000 0.002 0.002 /usr/lib/python3.5/argparse.py:62(<module>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/selectors.py:456(close)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:361(_get_mixins_)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1445(_get_optional_kwargs)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:581(_format_args)
199 0.002 0.000 0.002 0.000 {built-in method posix.stat}
3 0.000 0.000 0.000 0.000 {built-in method posix.listdir}
164 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_compile.py:101(fixup)
1 0.000 0.000 0.000 0.000 {built-in method builtins.compile}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1787(TextIO)
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:1074(name)
2 0.000 0.000 0.004 0.002 /usr/lib/python3.5/enum.py:547(<dictcomp>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1225(_ActionsContainer)
47 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:607(__init__)
13 0.000 0.000 0.001 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:168(__on_bt_handshake)
14 0.000 0.000 0.001 0.000 /usr/lib/python3.5/logging/__init__.py:554(format)
386289 0.186 0.000 0.186 0.000 {built-in method builtins.max}
1 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bencode.py:69(BencodeEncodingError)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1538(ValuesView)
1 0.000 0.000 0.019 0.019 /usr/lib/python3.5/logging/__init__.py:24(<module>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:2072(_match_arguments_partial)
29 0.000 0.000 0.000 0.000 /usr/lib/python3.5/posixpath.py:50(normcase)
9 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:338(__new__)
68 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1251(__init__)
7 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:90(closegroup)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/string.py:77(Template)
57/2 0.000 0.000 0.131 0.065 <frozen importlib._bootstrap>:214(_call_with_frames_removed)
1 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/persistence.py:99(get_complete_info_hashes)
1 0.000 0.000 0.003 0.003 /home/adas/.local/lib/python3.5/site-packages/magneticod/bencode.py:31(<module>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:727(__subclasscheck__)
2 0.000 0.000 0.000 0.000 {built-in method _sqlite3.register_adapter}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1542(RootLogger)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/os.py:814(getenv)
216 0.013 0.000 0.013 0.000 {built-in method __new__ of type object at 0xa3ddc0}
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:538(formatMessage)
10 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:664(__new__)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:761(__init__)
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:957(flush)
33/1 0.006 0.000 331.942 331.942 {built-in method builtins.exec}
99 0.000 0.000 0.000 0.000 {built-in method _imp.acquire_lock}
27 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:656(create_module)
15 0.000 0.000 0.000 0.000 {method 'remove' of 'set' objects}
788542 0.666 0.000 0.980 0.000 /usr/lib/python3.5/selectors.py:20(_fileobj_to_fd)
2925434 3.143 0.000 3.143 0.000 {built-in method _socket.inet_ntoa}
37 0.003 0.000 0.014 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/__main__.py:95(on_peer_found)
386275 1.970 0.000 4.449 0.000 /usr/lib/python3.5/selectors.py:424(select)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:641(OptionalMeta)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:333(AnyMeta)
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
4 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:209(fileno)
1 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/__init__.py:15(<module>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:926(_AppendAction)
2605460 0.418 0.000 0.418 0.000 {method 'append' of 'collections.deque' objects}
9 0.000 0.000 0.001 0.000 /usr/lib/python3.5/typing.py:698(__getitem__)
20 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1099(_ip_int_from_string)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_compile.py:379(_bytes_to_codes)
1 0.000 0.000 0.000 0.000 {method 'bind' of '_socket.socket' objects}
27 0.000 0.000 0.000 0.000 {built-in method _imp._fix_co_filename}
10 0.000 0.000 0.000 0.000 {built-in method builtins.sum}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:734(ArgumentTypeError)
55 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:276(tell)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:556(IntEnum)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1050(_StderrHandler)
6 0.000 0.000 0.000 0.000 /usr/lib/python3.5/gettext.py:113(_expand_lang)
45 0.000 0.000 0.000 0.000 {method 'rfind' of 'str' objects}
1 0.000 0.000 0.000 0.000 {built-in method _stat.S_ISDIR}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1532(_ArgumentGroup)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1592(_BaseV6)
5 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:721(__hash__)
2605497 202.096 0.000 202.096 0.000 {bencoder.bencode}
3 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:911(exec_module)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1727(<listcomp>)
69 0.006 0.000 0.066 0.001 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:74(on_receivable)
15 0.000 0.000 0.000 0.000 {method 'isalnum' of 'str' objects}
31 0.000 0.000 0.000 0.000 {method 'isidentifier' of 'str' objects}
1 0.000 0.000 0.000 0.000 {method '__enter__' of '_thread.lock' objects}
15 0.000 0.000 0.000 0.000 /usr/lib/python3.5/_collections_abc.py:308(__subclasshook__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1511(FrozenSet)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1386(SupportsComplex)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:418(Formatter)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/tokenize.py:219(TokenError)
157 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:157(__getitem__)
16972 3.875 0.000 37.960 0.002 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:67(on_receivable)
3 0.000 0.000 0.000 0.000 /usr/lib/python3.5/encodings/__init__.py:42(normalize_encoding)
108 0.002 0.000 0.025 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:212(__bootstrap)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:336(__new__)
27/2 0.000 0.000 0.130 0.065 <frozen importlib._bootstrap_external>:659(exec_module)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1531(ItemsView)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:564(Barrier)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/selectors.py:290(SelectSelector)
27 0.000 0.000 0.000 0.000 /usr/lib/python3.5/collections/__init__.py:421(<genexpr>)
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:1224(current_thread)
4/3 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:671(_get_type_vars)
10 0.000 0.000 0.000 0.000 {method 'digest' of '_hashlib.HASH' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:237(__enter__)
24 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1184(<genexpr>)
435 0.001 0.000 0.001 0.000 /usr/lib/python3.5/sre_parse.py:226(__next)
10 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:70(__init__)
30 0.001 0.000 0.010 0.000 <frozen importlib._bootstrap_external>:1101(_get_spec)
1 0.000 0.000 0.000 0.000 <string>:5(SplitResult)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/traceback.py:223(FrameSummary)
107 0.000 0.000 0.000 0.000 {method 'endswith' of 'str' objects}
1 0.000 0.000 0.005 0.005 /usr/lib/python3.5/linecache.py:6(<module>)
361 0.000 0.000 0.001 0.000 /usr/lib/python3.5/sre_parse.py:247(get)
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1501(getEffectiveLevel)
386383 0.181 0.000 0.181 0.000 {built-in method time.monotonic}
38 0.001 0.000 0.001 0.000 /usr/lib/python3.5/socket.py:129(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:1311(datetime)
138 0.000 0.000 0.000 0.000 {built-in method _imp.release_lock}
4 0.000 0.000 0.000 0.000 {method 'tolist' of 'memoryview' objects}
11 0.001 0.000 0.009 0.001 /usr/lib/python3.5/logging/__init__.py:1269(info)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:118(_AttributeHolder)
17 0.000 0.000 0.000 0.000 /usr/lib/python3.5/os.py:720(__getitem__)
112 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:1064(_path_importer_cache)
3 0.000 0.000 0.000 0.000 {method 'index' of 'str' objects}
1 0.000 0.000 0.013 0.013 /usr/lib/python3.5/socket.py:47(<module>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/tokenize.py:224(Untokenizer)
89 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:914(<genexpr>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:355(notify_all)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1394(SupportsBytes)
1 0.000 0.000 0.000 0.000 {built-in method builtins.dir}
179547 0.113 0.000 0.141 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:285(fileno)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:19(AddressValueError)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:860(setFormatter)
39 0.002 0.000 0.002 0.000 <string>:12(__new__)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:47(__init__)
419561 0.638 0.000 10.046 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bencode.py:48(loads)
1 0.000 0.000 0.000 0.000 {built-in method _thread._set_sentinel}
39 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap>:176(_get_module_lock)
386274 0.221 0.000 0.221 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:130(would_send)
57 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap>:406(cached)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:269(ParseResultBytes)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:165(_NetlocResultMixinStr)
12 0.001 0.000 0.003 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:186(__on_ext_handshake_message)
15 0.003 0.000 0.003 0.000 /usr/lib/python3.5/sre_compile.py:248(_optimize_charset)
9 0.000 0.000 0.000 0.000 {built-in method _imp.exec_builtin}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/selectors.py:268(close)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1444(IPv4Network)
2966642 0.561 0.000 0.561 0.000 {method 'pop' of 'collections.deque' objects}
1 0.000 0.000 0.000 0.000 {built-in method _hashlib.openssl_sha384}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1151(FileType)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1556(_add_action)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:447(BoundedSemaphore)
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:170(__exit__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/selectors.py:397(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1350(AsyncIterable)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:671(__new__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sqlite3/dbapi2.py:51(<listcomp>)
27 0.002 0.000 0.002 0.000 <frozen importlib._bootstrap_external>:419(_validate_bytecode_header)
45 0.000 0.000 0.000 0.000 {built-in method builtins.divmod}
15 0.000 0.000 0.000 0.000 /usr/lib/python3.5/posixpath.py:136(basename)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:892(_StoreTrueAction)
9 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:745(exec_module)
30 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:513(spec_from_file_location)
27 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:811(get_filename)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1427(addHandler)
17 0.000 0.000 0.000 0.000 {method 'replace' of 'str' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:129(Final)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1422(Reversible)
39 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap>:321(__exit__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1205(Namespace)
14 0.000 0.000 0.000 0.000 {method 'flush' of '_io.TextIOWrapper' objects}
1 0.000 0.000 0.011 0.011 /usr/lib/python3.5/sqlite3/__init__.py:23(<module>)
386275 0.108 0.000 0.108 0.000 {built-in method builtins.iter}
1 0.000 0.000 0.001 0.001 /home/adas/.local/lib/python3.5/site-packages/magneticod/persistence.py:29(__init__)
3 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:260(__getattr__)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:225(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:765(__new__)
139 0.000 0.000 0.001 0.000 {built-in method builtins.any}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:1156(Timer)
74 0.000 0.000 0.000 0.000 {method 'setsockopt' of '_socket.socket' objects}
10 0.000 0.000 0.004 0.000 /usr/lib/python3.5/sre_parse.py:819(parse)
2 0.000 0.000 0.000 0.000 {method 'setter' of 'property' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/random.py:93(seed)
1 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bencode.py:73(BencodeDecodingError)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:278(seek)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1370(SupportsInt)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:195(_NetlocResultMixinBytes)
145 0.001 0.000 0.001 0.000 {method 'recv' of '_socket.socket' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1472(ByteString)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/os.py:40(_get_exports_list)
222717 0.179 0.000 0.221 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:282(would_send)
19/10 0.000 0.000 0.003 0.000 /usr/lib/python3.5/sre_parse.py:429(_parse_sub)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:319(timedelta)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:376(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:1186(_MainThread)
52 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:87(_path_isfile)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:648(Quoter)
14 0.000 0.000 0.000 0.000 {built-in method time.localtime}
31 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1734(_parse_hextet)
1 0.001 0.001 0.001 0.001 {method 'close' of 'sqlite3.Connection' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/selectors.py:208(__init__)
2605497 1.516 0.000 203.612 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bencode.py:41(dumps)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:647(__getitem__)
39 0.001 0.000 0.012 0.000 <frozen importlib._bootstrap>:879(_find_spec)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:275(_fix_result_transcoding)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:1005(time)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:212(__new__)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:84(__prepare__)
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:225(_verbose_message)
1 0.000 0.000 0.001 0.001 /home/adas/.local/lib/python3.5/site-packages/magneticod/persistence.py:38(__connect)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1433(Container)
7 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_compile.py:376(<listcomp>)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/functools.py:422(decorating_function)
30 0.000 0.000 0.000 0.000 {built-in method _imp.is_frozen}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:394(StringTemplateStyle)
419584 9.409 0.000 9.409 0.000 {bencoder.decode_dict}
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:379(usesTime)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:260(getuntil)
1 0.000 0.000 0.006 0.006 /usr/lib/python3.5/urllib/parse.py:28(<module>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/tokenize.py:221(StopTokenizing)
1 0.000 0.000 0.000 0.000 {built-in method posix.urandom}
2 0.000 0.000 0.002 0.001 /usr/lib/python3.5/enum.py:314(_create_)
3 0.017 0.006 0.017 0.006 {built-in method _imp.create_dynamic}
1 0.000 0.000 331.942 331.942 magneticod:4(<module>)
3 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1301(path_hook_for_FileFinder)
1 0.000 0.000 0.001 0.001 /usr/lib/python3.5/threading.py:1(<module>)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:794(__init__)
1 0.000 0.000 0.000 0.000 {built-in method posix.mkdir}
32 0.000 0.000 0.000 0.000 {method 'acquire' of '_thread.RLock' objects}
1210838 0.355 0.000 0.356 0.000 {built-in method builtins.isinstance}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:642(RawDescriptionHelpFormatter)
15 0.000 0.000 0.000 0.000 /usr/lib/python3.5/_weakrefset.py:16(__init__)
89 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:34(_relax_case)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:652(Optional)
7 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_compile.py:374(_mk_bitmap)
89 0.002 0.000 0.008 0.000 <frozen importlib._bootstrap_external>:1215(find_spec)
2925847 1.378 0.000 1.378 0.000 {built-in method from_bytes}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:749(Tuple)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:904(GenericMeta)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1088(Generic)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:736(Thread)
1 0.000 0.000 0.007 0.007 /home/adas/.local/lib/python3.5/site-packages/magneticod/persistence.py:107(__commit_metadata)
278 0.000 0.000 0.000 0.000 {method 'rpartition' of 'str' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1224(Logger)
5193388 2.324 0.000 2.324 0.000 {method 'to_bytes' of 'int' objects}
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:462(__init__)
5 0.000 0.000 0.000 0.000 {built-in method builtins.hash}
43/10 0.001 0.000 0.005 0.000 /usr/lib/python3.5/sre_compile.py:64(_compile)
10 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_compile.py:412(_compile_info)
459 0.001 0.000 0.001 0.000 {method 'format' of 'str' objects}
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:118(getLevelName)
12 0.000 0.000 0.008 0.001 /usr/lib/python3.5/re.py:222(compile)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1726(_get_positional_actions)
10 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:217(__init__)
1 0.000 0.000 0.001 0.001 /home/adas/.local/lib/python3.5/site-packages/magneticod/persistence.py:133(close)
273 0.001 0.000 0.001 0.000 /usr/lib/python3.5/_weakrefset.py:36(__init__)
18 0.000 0.000 0.000 0.000 {method 'values' of 'dict' objects}
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:149(<lambda>)
80 0.000 0.000 0.000 0.000 {built-in method _thread.allocate_lock}
1 0.000 0.000 0.000 0.000 {method '__exit__' of '_thread.lock' objects}
1 0.000 0.000 0.004 0.004 /home/adas/.local/lib/python3.5/site-packages/magneticod/__main__.py:166(parse_cmdline_arguments)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1497(_FrozenSetMeta)
47 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:553(__eq__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:138(_ForwardRef)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:231(LogRecord)
3 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:892(__init__)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/tokenize.py:113(maybe)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1676(basicConfig)
2 0.000 0.000 0.001 0.000 /usr/lib/python3.5/logging/__init__.py:1840(debug)
476 0.001 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:52(<listcomp>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1479(List)
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:161(__setitem__)
181/179 0.008 0.000 0.034 0.000 {built-in method builtins.__build_class__}
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:314(__enter__)
34 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:75(groups)
1 0.000 0.000 0.007 0.007 /usr/lib/python3.5/datetime.py:5(<module>)
179485 0.221 0.000 0.768 0.000 /usr/lib/python3.5/selectors.py:253(modify)
28 0.000 0.000 0.001 0.000 /usr/lib/python3.5/ipaddress.py:2158(__init__)
37 0.002 0.000 0.002 0.000 {method 'connect_ex' of '_socket.socket' objects}
1 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/appdirs.py:407(AppDirs)
67 0.000 0.000 0.000 0.000 {built-in method builtins.ord}
10 0.001 0.000 0.048 0.005 /home/adas/.local/lib/python3.5/site-packages/magneticod/__main__.py:112(on_metadata_found)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1440(AbstractSet)
1 0.000 0.000 0.000 0.000 {function TupleMeta.__subclasscheck__ at 0x7fbe977c5bf8}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:909(_StoreFalseAction)
107 0.000 0.000 0.000 0.000 {method 'split' of 'str' objects}
1 0.034 0.034 0.057 0.057 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:38(__init__)
63 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:301(__setattr__)
14 0.001 0.000 0.003 0.000 /usr/lib/python3.5/logging/__init__.py:1417(handle)
35 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:247(_check_int_field)
1 0.000 0.000 331.810 331.810 /home/adas/.local/lib/python3.5/site-packages/magneticod/__main__.py:55(main)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:385(StrFormatStyle)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1776(_parse_known_args)
3 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:185(__subclasscheck__)
1 0.000 0.000 0.000 0.000 {built-in method atexit.register}
28 0.000 0.000 0.000 0.000 {method 'write' of '_io.TextIOWrapper' objects}
1 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:37(SybilNode)
366731 2.307 0.000 2.307 0.000 {method 'update' of 'dict' objects}
13 0.000 0.000 0.000 0.000 /usr/lib/python3.5/_collections_abc.py:592(get)
9 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:762(is_package)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:23(NetmaskValueError)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:240(__exit__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1574(Generator)
46 0.000 0.000 0.000 0.000 {built-in method posix.getcwd}
19 0.000 0.000 0.000 0.000 /usr/lib/python3.5/tokenize.py:111(group)
18 0.000 0.000 0.000 0.000 /usr/lib/python3.5/_weakrefset.py:81(add)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/socket.py:120(_GiveupOnSendfile)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/selectors.py:79(BaseSelector)
39 0.002 0.000 0.007 0.000 /usr/lib/python3.5/selectors.py:404(register)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:989(_CountAction)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:237(DefragResult)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1455(MutableMapping)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:2142(IPv6Network)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1261(_ProtocolMeta)
5 0.000 0.000 0.000 0.000 {built-in method builtins.repr}
366725 1.377 0.000 11.320 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:236(__decode_nodes)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1488(Set)
60 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:153(__len__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1362(Iterable)
737 0.000 0.000 0.000 0.000 {method 'startswith' of 'str' objects}
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:220(_releaseLock)
1 0.000 0.000 0.001 0.001 /usr/lib/python3.5/textwrap.py:415(dedent)
4 0.000 0.000 0.000 0.000 {method 'cast' of 'memoryview' objects}
1 0.000 0.000 0.130 0.130 /home/adas/.local/lib/python3.5/site-packages/magneticod/__main__.py:15(<module>)
1 0.000 0.000 0.000 0.000 {built-in method _sqlite3.connect}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:125(_ResultMixinBytes)
386274 0.307 0.000 0.415 0.000 /usr/lib/python3.5/selectors.py:75(__iter__)
28 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:511(<genexpr>)
2 0.000 0.000 0.000 0.000 {method 'clear' of 'list' objects}
27 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:35(_new_module)
5 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:277(_check_time_fields)
27 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:826(path_stats)
27 0.011 0.000 0.011 0.000 {built-in method marshal.loads}
6 0.000 0.000 0.000 0.000 /usr/lib/python3.5/locale.py:375(normalize)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1056(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1566(_MutuallyExclusiveGroup)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sqlite3/dbapi2.py:56(register_adapters_and_converters)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:790(createLock)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1534(__init__)
1 0.000 0.000 0.003 0.003 /usr/lib/python3.5/typing.py:1677(IO)
1 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/persistence.py:28(Database)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1817(io)
3 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:72(RLock)
5 0.000 0.000 0.000 0.000 /usr/lib/python3.5/os.py:800(decode)
64 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:976(__eq__)
14 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:519(<genexpr>)
101 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/persistence.py:88(<genexpr>)
28 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1630(_ip_int_from_string)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:513(__neg__)
366725 1.773 0.000 15.602 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:137(__on_FIND_NODE_response)
1 0.000 0.000 0.005 0.005 /usr/lib/python3.5/string.py:65(__init__)
28 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:806(release)
65/42 0.000 0.000 0.001 0.000 {built-in method builtins.issubclass}
1 0.000 0.000 0.000 0.000 {method 'close' of 'select.epoll' objects}
28 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1612(_make_netmask)
14 0.000 0.000 0.003 0.000 /usr/lib/python3.5/logging/__init__.py:1377(makeRecord)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/functools.py:195(<listcomp>)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:946(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1548(__init__)
5 0.001 0.000 0.007 0.001 /usr/lib/python3.5/collections/__init__.py:356(namedtuple)
84 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:165(append)
4 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bencode.py:74(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:360(TypeVar)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:203(_Section)
3 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:1319(__new__)
44 0.001 0.000 0.018 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:173(__on_ANNOUNCE_PEER_query)
19 0.000 0.000 0.000 0.000 /usr/lib/python3.5/ipaddress.py:1075(_make_netmask)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:213(__init__)
1 0.000 0.000 0.001 0.001 /usr/lib/python3.5/ipaddress.py:1558(_IPv4Constants)
2 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1355(add_argument_group)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/enum.py:121(<setcomp>)
1 0.000 0.000 0.000 0.000 {built-in method math.sqrt}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:937(StreamHandler)
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:155(__delitem__)
653 0.024 0.000 0.025 0.000 {method 'join' of 'str' objects}
4 0.000 0.000 0.000 0.000 /usr/lib/python3.5/functools.py:391(lru_cache)
2 0.000 0.000 0.000 0.000 {method 'lstrip' of 'str' objects}
39 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:310(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:1057(_ChoicesPseudoAction)
99 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:856(__exit__)
42 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:959(_get_type_vars)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:1188(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:349(Any)
38 0.000 0.000 0.001 0.000 /usr/lib/python3.5/socket.py:403(close)
39 0.000 0.000 0.002 0.000 <frozen importlib._bootstrap>:510(_init_module_attrs)
3 0.002 0.001 0.002 0.001 {method 'execute' of 'sqlite3.Cursor' objects}
30 0.000 0.000 0.011 0.000 <frozen importlib._bootstrap_external>:1133(find_spec)
1 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/magneticod/bittorrent.py:30(DisposablePeer)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/argparse.py:836(__init__)
3 0.000 0.000 0.000 0.000 /usr/lib/python3.5/datetime.py:40(_days_before_year)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:496(__init__)
3 0.000 0.000 0.000 0.000 {built-in method _imp.exec_dynamic}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/threading.py:888(_set_ident)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/logging/__init__.py:1316(critical)
1 0.000 0.000 0.000 0.000 /home/adas/.local/lib/python3.5/site-packages/appdirs.py:45(user_data_dir)
3 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1178(__init__)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1590(Type)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1522(MappingView)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/genericpath.py:39(isdir)
1 0.000 0.000 0.000 0.000 <string>:5(TokenInfo)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1835(re)
430449 0.126 0.000 0.126 0.000 {method 'append' of 'list' objects}
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/os.py:216(makedirs)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:256(DefragResultBytes)
3 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1260(_fill_cache)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/urllib/parse.py:133(_NetlocResultMixinBase)
108 9.992 0.093 221.931 2.055 /home/adas/.local/lib/python3.5/site-packages/magneticod/dht.py:224(__make_neighbours)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:584(Union)
3 0.000 0.000 0.001 0.000 /usr/lib/python3.5/gettext.py:528(gettext)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/traceback.py:310(StackSummary)
1 0.000 0.000 0.000 0.000 /usr/lib/python3.5/typing.py:1773(BinaryIO)
102 0.000 0.000 0.000 0.000 /usr/lib/python3.5/sre_parse.py:242(match)
32 0.000 0.000 0.000 0.000 {built-in method _imp.is_builtin}
1 0.000 0.000 0.001 0.001 /usr/lib/python3.5/logging/__init__.py:1785(critical)
59/39 0.000 0.000 0.054 0.001 <frozen importlib._bootstrap>:996(_handle_fromlist)
20 0.000 0.000 0.000 0.000 {built-in method sys._getframe}
386274 0.114 0.000 0.114 0.000 /usr/lib/python3.5/selectors.py:272(get_map)
331 0.003 0.000 0.003 0.000 /usr/lib/python3.5/socket.py:81(<lambda>)
Based on them I draw some graph:
60% of script was spend in bencoder.bencode. It was executed 2605497 times.
Greetings,
I saw that the bandwidth is about 30GB per day, which got me wondering how big the database is? I realize it's constantly growing but is that 30GB of transfer also 30GB of growth every day?
My awareness take how much randomness need to be in DisposablePeer.__random_bytes
(https://github.com/boramalper/magnetico/blob/master/magneticod/magneticod/bittorrent.py#L289 ). It take 6% of total script time.
It really need to be random? Maybe it might be sequential?
I haven't looked into it, but this seems to be the most common cause of crashes
Traceback (most recent call last):
File "/home/user/.local/lib/python3.5/site-packages/magneticod/bittorrent.py", line 75, in on_receivable
received = self.__socket.recv(8192)
OSError: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/.local/bin/magneticod", line 11, in <module>
sys.exit(main())
File "/home/user/.local/lib/python3.5/site-packages/magneticod/__main__.py", line 73, in main
loop()
File "/home/user/.local/lib/python3.5/site-packages/magneticod/__main__.py", line 146, in loop
key.fileobj.on_receivable()
File "/home/user/.local/lib/python3.5/site-packages/magneticod/bittorrent.py", line 85, in on_receivable
self.when_error()
File "/home/user/.local/lib/python3.5/site-packages/magneticod/__main__.py", line 123, in on_peer_error
peers[info_hash].remove(peer)
ValueError: list.remove(x): x not in list
What its mean, does not connecting to node(s) or ?
2017-04-09 18:59:32,439 WARNING Belated TICK! (ฮ = 5) 2017-04-09 18:59:38,607 WARNING Belated TICK! (ฮ = 5) 2017-04-09 18:59:44,847 WARNING Belated TICK! (ฮ = 5) 2017-04-09 18:59:51,047 WARNING Belated TICK! (ฮ = 5) 2017-04-09 18:59:57,250 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:00:03,445 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:00:09,645 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:00:15,815 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:00:21,995 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:00:28,188 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:00:34,386 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:00:40,563 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:00:46,716 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:00:52,906 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:00:59,061 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:01:05,221 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:01:11,423 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:01:17,621 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:01:23,819 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:01:29,969 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:01:36,138 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:01:42,332 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:01:48,518 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:01:54,707 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:02:00,870 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:02:07,068 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:02:13,252 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:02:19,390 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:02:25,552 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:02:31,751 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:02:37,941 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:02:44,100 WARNING Belated TICK! (ฮ = 5) 2017-04-09 19:02:50,277 WARNING Belated TICK! (ฮ = 5)
I'm not sure what I'm doing wrong but magneticod is finding results but when I search in the webUI, nothing is showing. Running Ubuntu Server 16.04. Let me know if I can provide more details.
Title.
Also, if you're looking for contributors. I have a CS degree and experience with distributed systems. I'll need to brush up on my python skills, but I can help if you want it.
I noticed other dht indexers have this, is this available here? When there are 20 torrents of the same thing, I need to know which one is most seeded.
Wouldnt be better to sort it by Discovered on ?
THX!
//For me its just basic edit, but think not for others :D
I realized that search is running way too slow to be tolerable: on my 5$ Linode instance, search takes around 22-30 seconds with (~500,000 torrents) even when magneticod is stopped (it may also vary depending on the search query).
Nevertheless, this must be resolved.
Remarks:
We should create an index for the info_hash
column in torrents
table, to make torrent retrieval make torrent retrieval (which is based on the torrent's info hash) as fast as it could possibly be (actually, I should have created it at the very beginning...).
I honestly don't know how to improve full-text search (in titles) performance. Currently, magneticow is using Okapi BM25 to rank the results, and the function is defined in Python itself which probably causes lots of overhead in SELECT queries. Removing the functionality might make it faster, but then we cannot rank the torrents by relevance and it will also make searching files of torrents almost impossible, as the results will be cluttered with least relevant torrents without a ranking mechanism.
I am wide open to any suggestions and contributions in this regard. =)
Hello,
I tested magneticod stability again. I believe this is necessary to ensure application development. For some time now, I've noticed that the application is being killed for memory abuse. It was difficult to capture because of CPU exhastiun (#41) and exceptions problems (#38 , #55), but it is fixed (I merged #56 handsome) .
Now I have stable applications which shows memory usage problems. I run magneticod through memory_profiler and registered peak.
I believe that such behavior is unacceptable. It can destabilize whole servers, so it is not acceptable in any production environment.
Raw data: mprofile_20170430093002.dat.txt
Application was killed by OOM killer after peak. In dmesg
logs presents:
[1666665.621043] Out of memory in UB 10745: OOM killed process 4084 (magneticod) score 0 vm:1716572kB, rss:994752kB, swap:317204kB
Raw data: mprofile_20170430122754.dat.txt
Killed by OOM killer too:
[1677468.848218] Out of memory in UB 10745: OOM killed process 6823 (magneticod) score 0 vm:2115592kB, rss:989304kB, swap:337888kB
For me it does not make much sense that everyone tries to get all the torrents of the web on their own. Therefore I propose a centralized server where a group of people can collaborate.
running magneticod results in:
File "/home/user/.local/bin/magneticod", line 11, in <module>
sys.exit(main())
File "/home/user/.local/lib/python3.6/site-packages/magneticod/__main__.py", line 81, in main
loop()
File "/home/user/.local/lib/python3.6/site-packages/magneticod/__main__.py", line 154, in loop
key.fileobj.on_receivable()
File "/home/user/.local/lib/python3.6/site-packages/magneticod/bittorrent.py", line 112, in on_receivable
self.__on_bt_handshake(self.__incoming_buffer[:68])
File "/home/user/.local/lib/python3.6/site-packages/magneticod/bittorrent.py", line 183, in __on_bt_handshake
msg_dict_dump
TypeError: not all arguments converted during bytes formatting
regardless of starting arguments after a few minutes
Here is some random crash as well :/
Running it on clean standard debian jessie, python 3.5
INFO magneticod v0.2.0 started
Traceback (most recent call last):
File "/root/.local/bin/magneticod", line 11, in
sys.exit(main())
File "/root/.local/lib/python3.4/site-packages/magneticod/main.py", line 61, in main
arguments = parse_cmdline_arguments()
File "/root/.local/lib/python3.4/site-packages/magneticod/main.py", line 187, in parse_cmdline_arguments
formatter_class=argparse.RawDescriptionHelpFormatter
TypeError: init() got an unexpected keyword argument 'allow_abbrev'
After a few metadata commits I received following exception
2017-04-30 21:02:44,616 INFO Added: `Deep Purple 1970 Concerto For Group And Orchestra`
2017-04-30 21:02:46,928 INFO Added: `Oz.the.Great.and.Powerful.2013.BRRip.XviD.BGAUDiO-SiSO`
2017-04-30 21:02:46,928 INFO Added: `747_workout_and_jerk-out!_720p.wmv`
Traceback (most recent call last):
File "./magneticod", line 9, in <module>
load_entry_point('magneticod==0.3.0', 'console_scripts', 'magneticod')()
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/__main__.py", line 79, in main
loop()
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/__main__.py", line 158, in loop
key.fileobj.on_receivable()
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/bittorrent.py", line 140, in on_receivable
self.__on_message(self.__incoming_buffer[4:4+length])
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/bittorrent.py", line 178, in __on_message
self.__on_ext_message(message[2:])
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/bittorrent.py", line 264, in __on_ext_message
self.when_metadata_found(self.__info_hash, bytes(self.__metadata))
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/__main__.py", line 113, in on_metadata_found
succeeded = database.add_metadata(info_hash, metadata)
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/persistence.py", line 76, in add_metadata
assert not any(b"/" in item for item in file[b"path"])
File "/home/artur/.local/lib/python3.5/site-packages/magneticod/persistence.py", line 76, in <genexpr>
assert not any(b"/" in item for item in file[b"path"])
TypeError: argument of type 'int' is not iterable
Magneticod uses a random UDP port to listen for incoming connections. This is not practical if one uses a firewall. One would like to configure a static port to be able to configure the same port on the firewall.
Cheers,
Jan
2017-04-10 09:03:45,890 INFO magneticod v0.2.0 started
2017-04-10 09:03:45,907 DEBUG SybilNode 85F83B5C0FA7DBC0976599537B191DC1E983A46F on ('0.0.0.0', 0) initialized!
2017-04-10 09:04:09,797 WARNING Belated TICK! (ฮ = 7)
Traceback (most recent call last):
File "/Users/xxxxxxxx/Library/Python/3.6/bin/magneticod", line 11, in
sys.exit(main())
File "/Users/xxxxxxxx/Library/Python/3.6/lib/python/site-packages/magneticod/main.py", line 81, in main
loop()
File "/Users/xxxxxxxx/Library/Python/3.6/lib/python/site-packages/magneticod/main.py", line 154, in loop
key.fileobj.on_receivable()
File "/Users/xxxxxxxx/Library/Python/3.6/lib/python/site-packages/magneticod/bittorrent.py", line 112, in on_receivable
self.__on_bt_handshake(self.__incoming_buffer[:68])
File "/Users/xxxxxxxx/Library/Python/3.6/lib/python/site-packages/magneticod/bittorrent.py", line 183, in __on_bt_handshake
msg_dict_dump
TypeError: not all arguments converted during bytes formatting
Now you are processing only some kinds of responses:
https://github.com/ngosang/magnetico/blob/89a226973bed86237c00648bcaee03cfebadd2ec/magneticod/magneticod/dht.py#L85
if you add:
else:
print("other => ", message.get(b"q"))
you will see a ton of "find_node" and "ping" responses.
I'm not sure but I think we should respond (at least to ping) to avoid that the peer think we are offline and stop sending us "get_peers" and "announce_peer" messages.
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.