From b263d18938cce454f1228d6fe4b19076bf2ab255 Mon Sep 17 00:00:00 2001 From: ap-pauloafonso Date: Mon, 27 Apr 2020 00:11:44 -0300 Subject: [PATCH] argparse name changes and initial documentation --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++- ratio-spoof.py | 13 ++++++++---- 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 210b3e5..3b34e17 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,55 @@ # ratio-spoof -A bittorrent ratio spoof tool + +ratio-spof is a cross-platform, free and open source tool to spoof private bittorrent trackers the amount downloaded or uploaded by the peer. + + +## How does it works? +The way that bittorrent protocol works is that there is no way that a tracker knows how much certain peer downloaded or uploaded, so it depends on the peer itself telling them how much they downloaded or uploaded. + +With this protocol deisgn, ratio-spoof acts like a normal bittorrent client but without downloading or uploading anything, in fact it just tricks the tracker pretending that. + + +## Usage +With a recent python3 version installed, you will be able to run it on linux/macos/windows. +``` +usage: ratio-spoof.py [-h] -t -d -u + +ratio-spoof is a open source tool to trick private trackers + +optional arguments: + -h, --help show this help message and exit + +required arguments: + -t path .torrent file + -d + required download arg values + -u + required upload arg values + + and must be in %, b, kb, mb, gb, tb + and must be in kbps +``` + +``` +./ratio-spoof -d 90% 100kbps -u 0% 1024kbps -t (torrentfile_path) +``` +Will start "downloading" with the initial value of 90% of the torrent total size at 100 kbps speed until it reaches 100% mark. +Will start "uploading" with the initial value of 0% of the torrent total size at 1024kbps (aka 1mb/s) indefinitely + +``` +./ratio-spoof -d 2gb 500kbps -u 1gb 1024kbps -t (torrentfile_path) +``` +Will start "downloading" with the initial value of 2gb downloaded if possible at 500kbps speed until it reaches 100% mark. +Will start "uploading" with the initial value of 1gb uplodead at 1024kbps (aka 1mb/s) indefinitely + +## Will i get cought using it ? +Depends wether you use it carefuly, Its a hard task to catch cheaters, but if you start to uploading crazy amounts out of nowhere or seeding something with no active leecher you may be in risk. + +A good strategy is to chose torrents with a lot of people on the swarn downloading and uploading. + +## Bittorrent client supported +The currently emulation is hard coded to be a popular and accepted client qbittorrent v4.0.3. + +## Motivation +Here in brazil, not everybody has a great upload speed, and most of the private trackers requires a ratio to be equal or higher than 1 (e.g. if you downloaded 1gb you must upload 1gb as well) in order to survive. Plus, i always been facinated by the bittorrent protocol, [i even made a bittorrent webclient to learn a bit about it.](https://github.com/ap-pauloafonso/rwTorrent) and with the current global covid-19 lockdown i got some free time and decide to code my own simple cli tool to spoof bittorrent trackers. + diff --git a/ratio-spoof.py b/ratio-spoof.py index e018a82..401efed 100755 --- a/ratio-spoof.py +++ b/ratio-spoof.py @@ -304,10 +304,15 @@ def read_file(f, args_download, args_upload): state.start_announcing() -parser = argparse.ArgumentParser() -parser.add_argument('-t', required=True, metavar=('(TORRENT_PATH)'), help='path .torrent file' , type=argparse.FileType('rb')) -parser.add_argument('-d', required=True,help='parms for download', nargs=2 ,metavar=('(%_B_KB_MB_GB_TB_COMPLETE)', '(KBPS_SPEED)')) -parser.add_argument('-u',required=True,help='parms for upload', nargs=2 ,metavar=('(%_B_KB_MB_GB_TB_COMPLETE)', '(KBPS_SPEED)')) +tip = """ + and must be in %, b, kb, mb, gb, tb + and must be in kbps +""" +parser = argparse.ArgumentParser(epilog=tip, description='ratio-spoof is a open source tool to trick private trackers',formatter_class=argparse.RawDescriptionHelpFormatter) +group = parser.add_argument_group('required arguments') +group.add_argument('-t', required=True, metavar=(''), help='path .torrent file' , type=argparse.FileType('rb')) +group.add_argument('-d', required=True,help='required download arg values', nargs=2 ,metavar=('', '')) +group.add_argument('-u',required=True,help='required upload arg values ', nargs=2 ,metavar=('', '')) args = parser.parse_args() read_file(args.t, args.d, args.u)