{"id":13496008,"url":"https://github.com/mcrapet/plowshare","last_synced_at":"2025-10-21T04:55:12.697Z","repository":{"id":29589444,"uuid":"33129354","full_name":"mcrapet/plowshare","owner":"mcrapet","description":"Command-line tool and engine for managing sharing websites","archived":false,"fork":false,"pushed_at":"2021-06-13T12:31:31.000Z","size":9434,"stargazers_count":857,"open_issues_count":6,"forks_count":90,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-09-18T19:27:03.123Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcrapet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-30T14:52:11.000Z","updated_at":"2025-09-16T07:27:27.000Z","dependencies_parsed_at":"2022-09-03T18:11:54.250Z","dependency_job_id":null,"html_url":"https://github.com/mcrapet/plowshare","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/mcrapet/plowshare","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrapet%2Fplowshare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrapet%2Fplowshare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrapet%2Fplowshare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrapet%2Fplowshare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcrapet","download_url":"https://codeload.github.com/mcrapet/plowshare/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrapet%2Fplowshare/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280207204,"owners_count":26290616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T19:01:40.652Z","updated_at":"2025-10-21T04:55:12.675Z","avatar_url":"https://github.com/mcrapet.png","language":"Shell","funding_links":[],"categories":["Shell","Download utilities","CLI Utilities"],"sub_categories":["General"],"readme":"# Plowshare\n\n## Introduction\n\nPlowshare is a set of command-line tools (written entirely in Bash shell script) designed for managing file-sharing websites (aka Hosters).\n\nPlowshare is divided into 6 scripts:\n- *plowdown*, for downloading URLs\n- *plowup*, for uploading files\n- *plowdel*, for deleting remote files\n- *plowlist*, for listing remote shared folders\n- *plowprobe*, for retrieving information of downloading URLs\n- *plowmod*, easy management (installation or update) of Plowshare modules\n\nPlowshare itself doesn't support any websites (named *module*). It's just the core engine.\nConcerning modules, few are available separately and must be installed in user directory (see [below](#install)).\n\n### Features\n\n- Small footprint (few shell scripts). No java, no python. Run fast on embedded devices.\n- Few dependencies and portable. [Bash](https://www.gnu.org/software/bash/) and [cURL](http://curl.haxx.se/) are enough for most hosters.\n- Modules (hoster plugins) are simple to write using [Plowshare API](#implement-your-own-modules).\n- Support for automatic online captcha solver services.\n- Cache mechanism: hoster session or cookie reuse (to avoid relogin).\n\n## Install\n\nSee `INSTALL` file for details.\n\n## Usage examples\n\nAll scripts share the same verbose options:\n- `-v0` (be quiet, alias: `-q`)\n- `-v1` (errors only)\n- `-v2` (infos message; default)\n- `-v3` (show all messages)\n- `-v4` (show all messages, HTML pages and cookies, use this for bug report)\n\nGetting help:\n- `--help`\n- `--longhelp` (additionally prints modules command-line options)\n\nExhaustive documentation is available in manpages.\n\nAll examples below are using fake links.\n\n### Plowdown\n\nDownload a file from Rapidshare:\n\n```sh\n$ plowdown http://www.rapidshare.com/files/86545320/Tux-Trainer.rar\n```\n\nDownload a file from Rapidgator using an account (free or premium):\n\n```sh\n$ plowdown -a 'myuser:mypassword' http://rapidgator.net/file/49b1b874\n```\n\n**Note**: `:` is the separator character for login and password.\nEnclosing string using single quotes ensure against shell expansion.\n\nDownload a list of links (one link per line):\n\n```sh\n$ cat file_with_links.txt\n# This is a comment\nhttp://depositfiles.com/files/abcdefghi\nhttp://www.rapidshare.com/files/86545320/Tux-Trainer_25-01-2008.rar\n$ plowdown file_with_links.txt\n```\n\nDownload a list of links (one link per line) commenting out (with `#`) those successfully downloaded:\n\n```sh\n$ plowdown -m file_with_links.txt\n```\n\n**Note**: Files are consecutively downloaded in the order read from input text file.\n\nDownload a file from Oron with Death by Captcha service:\n\n```sh\n$ plowdown --deathbycaptcha='user:pass' http://oron.com/dw726z0ohky5\n```\n\nDownload a file from Rapidshare with a proxy (cURL supports `http_proxy` and `https_proxy` environment variables, default port is `3128`):\n\n```sh\n$ export http_proxy=http://xxx.xxx.xxx.xxx:80\n$ plowdown http://www.rapidshare.com/files/86545320/Tux-Trainer.rar\n```\n\nDownload a file with limiting the download speed (in bytes per second):\n\n```sh\n$ plowdown --max-rate 900K http://www.rapidshare.com/files/86545320/Tux-Trainer.rar\n```\n\n**Note**: Accepted prefixes are: `k`, `K`, `Ki`, `M`, `m`, `Mi`.\n\nDownload a file from Rapidshare (like firefox: append `.part` suffix to filename while file is being downloaded):\n\n```sh\n$ plowdown --temp-rename http://www.rapidshare.com/files/86545320/Tux-Trainer.rar\n```\n\nDownload a password-protected file from Mediafire:\n\n```sh\n$ plowdown -p 'somepassword' http://www.mediafire.com/?mt0egmhietj60iy\n```\n\n**Note**: If you don't specify password and link requests it, you'll be prompted (stdin) for one.\n\nAvoid never-ending downloads: limit the number of tries (for captchas) and wait delays for each link:\n\n```sh\n$ plowdown --max-retries=4 --timeout=3600 my_big_list_file.txt\n```\n\nRetrieve final url (don't use *plowdown* for download):\n\n```sh\n$ plowdown -q --skip-final --printf %d http://oron.com/dw726z0ohky5 | xargs wget\n```\n\n**Note**: This will not work if final url (remote host) requires a cookie. For anonynous users,\ngenerated link has limited access in time and you can usually download file only once.\n\n### Plowup\n\nUpload a single file anonymously to BayFiles:\n\n```sh\n$ plowup bayfiles /tmp/foo.bar\n```\n\nUpload a bunch of files anonymously to 2Shared (doesn't recurse subdirectories):\n\n```sh\n$ plowup 2shared /path/myphotos/*\n```\n\n**Note**: `*` is a [wildcard character](http://en.wikipedia.org/wiki/Glob_%28programming%29) expanded by Bash interpreter.\n\nUpload a file to Rapidshare with an account (premium or free)\n\n```sh\n$ plowup -a 'myuser:mypassword' rapidshare /path/xxx\n```\n\nUpload a file to Mirrorcreator changing remote filename:\n\n```sh\n$ plowup mirrorcreator /path/myfile.txt:anothername.txt\n```\n\n**Note**: `:` is the separator character for local filename and remote filename.\n\nUpload a file to MegaShares (anonymously) and set description:\n\n```sh\n$ plowup -d \"Important document\" megashares /path/myfile.tex\n```\n\nUpload a file to Oron anonymously with a proxy:\n\n```sh\n$ export http_proxy=http://xxx.xxx.xxx.xxx:80\n$ export https_proxy=http://xxx.xxx.xxx.xxx:80\n$ plowup oron /path/myfile.txt\n```\n\nAbort slow upload (if rate is below limit during 30 seconds):\n\n```sh\n$ plowup --min-rate 100k mediafire /path/bigfile.zip\n```\n\nModify remote filenames (example: `foobar.rar` gives `foobar-PLOW.rar`):\n\n```sh\n$ plowup --name='%g-PLOW.%x' mirrorcreator *.rar\n```\n\n**Remark**: cURL is not capable of uploading files containing a comma `,` in their filename, but *plowup* will\ntemporarily create a symlink for you.\n\nUse cache over sessions to avoid multiple logins:\n\n```sh\n$ plowup --cache=shared -a 'user:pasword' 1fichier file1.zip\n$ plowup --cache=shared 1fichier file2.zip\n```\n\nOn first command line, login stage will be performed and session (token or cookie) will be saved in\n`~/.config/plowshare/storage/module-name.txt`.\nOn second command line, *plowup* will reuse the data stored to bypass login step. You don't have to specify credentials.\n\n**Note**: Only few hosters currently support cache mechanism. Have a look to\n[Plowshare legacy modules matrix](https://github.com/mcrapet/plowshare-modules-legacy) for more information.\n\nCustom results, print upload time, link and filename in HTML format:\n\n```sh\n$ plowup 1fichier -v0 --printf '\u003cli\u003e%T: \u003ca href=\"%u\"\u003e%f\u003c/a\u003e%n' 5MiB.bin 10MB.bin\n\u003cli\u003e11:12:42: \u003ca href=\"https://1fichier.com/?52jwehc851\"\u003e5MiB.bin\u003c/a\u003e\n\u003cli\u003e11:12:46: \u003ca href=\"https://1fichier.com/?bn1jdvtpqi\"\u003e10MB.bin\u003c/a\u003e\n```\n\n### Plowdel\n\nDelete a file from MegaShares (*delete link* required):\n\n```sh\n$ plowdel http://d01.megashares.com/?dl=6EUeDtS\n```\n\nDelete files (deletes are successive, not parallel):\n\n```sh\n$ plowdel http://d01.megashares.com/?dl=6EUeDtS http://depositfiles.com/rmv/1643181821669253\n```\n\nDelete a file from Rapidshare (account is required):\n\n```sh\n$ plowdel -a myuser:mypassword http://rapidshare.com/files/293672730/foo.rar\n```\n\n### Plowlist\n\nList links contained in a shared folder link and download them all:\n\n```sh\n$ plowlist http://www.mediafire.com/?qouncpzfe74s9 \u003e links.txt\n$ plowdown -m links.txt\n```\n\nList two shared folders (first link is processed, then the second one, this is not parallel):\n\n```sh\n$ plowlist http://www.mediafire.com/?qouncpzfe74s9 http://www.sendspace.com/folder/5njdw7\n```\n\n**Remark**: Some hosters are handling tree folders, you must specify `-R`/`--recursive` command-line switch to *plowlist* for enabing recursive lisiting.\n\nList some Sendspace web folder. Render results for vBulletin *BB* syntax:\n\n```sh\n$ plowlist --printf '[url=%u]%f[/url]%n' http://www.sendspace.com/folder/5njdw7\n```\n\nList links contained in a dummy web page. Render results as HTML list:\n\n```sh\n$ plowlist --fallback --printf '\u003cli\u003e\u003ca href=\"%u\"\u003e%u\u003c/a\u003e\u003c/li\u003e%n' \\\n      http://en.wikipedia.org/wiki/SI_prefix\n```\n\n### Plowprobe\n\nGather public information (filename, file size, file hash, ...) about a link.\nNo captcha solving is requested.\n\nFilter alive links in a text file:\n\n```sh\n$ plowprobe file_with_links.txt \u003e file_with_active_links.txt\n```\n\nCustom results as shell format, print links information (filename and size):\n\n```sh\n$ plowprobe --printf '#%f (%s)%n%u%n'  http://myhoster.com/files/5njdw7\n#foo-bar.rar (134217728)\nhttp://myhoster.com/files/5njdw7\n```\n\nCustom results as [JSON](http://json.org/) format, print links information (filename and size):\n\n```sh\n$ plowprobe --printf '{\"url\":\"%U\",\"size\":%s}%n' http://myhoster.com/files/5njdw7\n{\"url\":\"http:\\/\\/myhoster.com\\/files\\/5njdw7\",\"size\":134217728}\n```\n\nCustom results: print *primary* url (if supported by hosters and implemented by module):\n\n```sh\n$ plowprobe --printf='%v%n' http://a5ts8yt25l.1fichier.com/\nhttps://1fichier.com/?a5ts8yt25l\n```\n\nUse `-` argument to read from stdin:\n\n```sh\n$ plowlist http://pastebin.com/1d82F5sd | plowprobe - \u003e filtered_list.txt\n```\n\n## Configuration file\n\nPlowshare looks for `~/.config/plowshare/plowshare.conf` or `/etc/plowshare.conf` files.\nOptions given at command line can be stored in the file.\n\nExample:\n```ini\n###\n### Plowshare configuration file\n### Line syntax: token = value\n###\n\n[General]\ninterface = eth1\ncaptchabhood=cbhuser:cbhpass\n\nrapidshare/a = matt:4deadbeef\nmediafire/a = \"matt:4 dead beef \"\nfreakshare/b=plowshare:xxxxx\n\n[Plowdown]\ntimeout=3600\n#antigate=49b1b8740e4b51cf51838975de9e1c31\n\n[Plowup]\nmax-retries=2\nmirrorcreator/auth-free = foo:bar\nmirrorcreator/count = 5\n\n[Plowlist]\nverbose = 3\n\n#[Plowprobe]\n```\n\nNotes:\n- Blank lines are ignored, and whitespace before and after a token or value is ignored, although a value can contain whitespace within.\n- Lines which begin with a `#` are considered comments and ignored.\n- Double quoting value is optional.\n- Valid configuration token names are long-option command-line arguments of Plowshare. Tokens are always lowercase. For modules options, tokens are prepended by module name and a slash character. For example: `rapidshare/auth` is equivalent to `rapidshare/a` (short-option are also possible here). Another example: `freakshare/b` is equivalent to `freakshare/auth-free`.\n- Options in general section prevail over `PlowXXX` section. Options given on the command line prevail over configuration file options.\n\nYou can disable usage of Plowshare config file by providing `--no-plowsharerc` command-line switch. You can also specify a custom config file using `--plowsharerc` switch.\n\n## Use your own captcha solver\n\nIt is possible providing *plowdown* or *plowup* with `--captchaprogram` command-line switch followed by a path to a script or executable.\n\n### Script exit status\n\n- `0`: solving success. Captcha Word(s) must be echo'ed (on stdout).\n- `$ERR_NOMODULE`: external solver is not able to solve requested captcha. Let *plowdown* continue solving it normally (will consider `--captchamethod` if specified).\n- `$ERR_FATAL`: external solver failed.\n- `$ERR_CAPTCHA`: external solver failed. Note: this exit code is eligible with retry policy (`-r`/`--max-retries`).\n\n### Examples\n\nUnderstanding example:\n\n```sh\n#!/bin/bash\n# $1: module name\n# $2: path to image\n# $3: captcha type. For example: \"recaptcha\", \"solvemedia\", \"digit-4\".\n\ndeclare -r ERR_NOMODULE=2\ndeclare -r ERR_CAPTCHA=7\n\n# We only support uploadhero, otherwise tell Plowshare to solve on its own\nif [ \"$1\" != 'uploadhero' ]; then\n    exit $ERR_NOMODULE\nfi\n\n# You can print message to stderr\necho \"Module name: $1\" \u003e\u00262\necho \"Image: $2\" \u003e\u00262\n\n# Use stdout to send decoding result\necho \"5ed1\"\nexit 0\n```\n\nCaptcha emailing example:\n\n```sh\n#!/bin/bash\n#\n# Sends an email with image as attachment.\n# Requires heirloom-mailx and not bsd-mailx.\n#\n# Here is my ~/.mailrc:\n#\n# account gmail {\n# set from=\"My Name \u003cxyz@gmail.com\u003e\"\n# set smtp-use-starttls\n# ssl-verify=ignore\n# set smtp=smtp://smtp.gmail.com:587\n# set smtp-auth=login\n# set smtp-auth-user=xyz@gmail.com\n# set smtp-auth-password=\"xxx\"\n# }\n\ndeclare -r ERR_FATAL=1\ndeclare -r MAILTO='xyz@gmail.com'\n\n# Image file expected\nif [ ! -f \"$2\" ]; then\n    exit $ERR_FATAL\nfi\n\nBODY=\"Hi!\n\nHere is a captcha to solve; it comes from $1.\"\n\nmailx -A gmail -s 'Plowshare sends you an image!' \\\n    -a \"$2\" \"$MAILTO\" \u003e/dev/null \u003c\u003c\u003c \"$BODY\" || {\n        echo 'mailx fatal error, abort' \u003e\u00262;\n        exit $ERR_FATAL;\n}\n\necho 'Please check your email account and enter captcha solution here:' \u003e\u00262\nIFS= read -r\necho \"$REPLY\"\nexit 0\n```\n\nCaptcha FTP example:\n\n```sh\n#!/bin/bash\n#\n# Uploads the image to an FTP server in the LAN. If the server is not available\n# (i.e. my computer is not running) or no CAPTCHA solution is entered for\n# 15 minutes (i.e. I am occupied), let Plowshare try to handle the CAPTCHA.\n\ndeclare -r MODULE=$1\ndeclare -r FILE=$2\ndeclare -r HINT=$3\ndeclare -r DEST='192.168.1.3'\ndeclare -r ERR_NOMODULE=2\n\n# Prepend the used module to the image file name\ncurl --connect-timeout 30 -T \"$FILE\" --silent \"ftp://$DEST/${MODULE}__${FILE##*/}\" || \\\n    exit $ERR_NOMODULE\n\necho \"Captcha from module '$MODULE' with hint '$HINT'\" \u003e\u00262\nread -r -t 900 -p 'Enter code: ' RESPONSE || exit $ERR_NOMODULE\necho \"$RESPONSE\"\n\nexit 0\n```\n\nDatabase using image hash as key:\n\n```sh\n#!/bin/sh\n#\n# Back to February 2009, Megaupload was using 4-character rotation captchas.\n# For example:\n# $ sqlite3 captchas.db\n# sqlite\u003e CREATE TABLE mu (md5sum text unique not null, captcha text not null);\n# sqlite\u003e INSERT INTO mu VALUES('fd3b2381269d702eccc509b8849e5b0d', 'RHD8');\n# sqlite\u003e INSERT INTO mu VALUES('04761dbbe2a45ca6720755bc324dd19c', 'EFC8');\n# sqlite\u003e .exit\n\nif [ \"$1\" = megaupload ]; then\n  DB=\"$HOME/captchas.db\"\n  MD5=$(md5sum -b \"$1\" | cut -c-32)\n  if VAL=$(sqlite3 \"$DB\" \"SELECT captcha FROM mu WHERE md5sum=\\\"$MD5\\\"\"); then\n    echo \"$VAL\"\n    exit 0\n  fi\nfi\nexit 2\n```\n\n## Plowdown advanced use\n\n### Hooks\n\nIt is possible to execute your own script before and after call to module download function.\nRelated command-line switches are `--run-before` and `--run-after`.\n\nPossible usage:\n- (before) Check (with *plowprobe*) if a file has already been downloaded (same filename, same file size/hash)\n- (before) Inject your own cookie\n- (after) Unrar archives\n- (after) Add `--skip-final` command-line switch and do your custom final link download\n\n\nExample 1: Skip all links coming from HotFile hoster\n\n```sh\n$ cat drophf.sh\n#!/bin/bash\n# $1: module name\n# $2: download URL\n# $3: cookie (empty) file given to download module function\n# You can print messages to stderr. stdout will be trashed\ndeclare -r ERR_NOMODULE=2\nif [ \"$1\" = 'hotfile' ]; then\n    echo \"===[Pre-processing script skipping $2]===\" \u003e\u00262\n    exit $ERR_NOMODULE\nfi\nexit 0\n\n$ plowdown --run-before ./drophf.sh -m list_of_links.txt\n```\n\nExample 2: Use `wget` for final download (with possible required cookie file for last download)\n\n```sh\n$ cat finalwget.sh\n#!/bin/bash\n# $1: module name\n# $2: download URL\n# $3: cookie file fulfilled by download module function\n# $4: final download URL\n# $5: final filename (no path: --output-directory is ignored)\n# You can print messages to stderr. stdout will be trashed\necho \"===[Post-processing script for $1]===\" \u003e\u00262\necho \"Temporary cookie file: $3\" \u003e\u00262\nwget --no-verbose --load-cookies $3 -O $5 $4\n\n$ plowdown --skip-final --run-after ./finalwget.sh \\\n    http://www.mediafire.com/?k10t0egmhi23f\n```\n\nExample 3: Use multiple connections for final download (usually only for premium account users)\n\n```sh\n$ cat finalaria.sh\n#!/bin/bash\naria2c -x2 $4 \u003e/dev/tty\n\n$ plowdown -a user:password --skip-final --run-after ./finalaria.sh \\\n    http://depositfiles.com/files/fv2u9xqya\n```\n\n## Miscellaneous\n\n### Additional cURL settings\n\nFor all network operations, Plowshare is relying on cURL. You can tweak some advanced settings if necessary.\n\nFor example (enforce IPv6):\n```sh\n$ echo 'ipv6' \u003e\u003e~/.curlrc\n```\n\nUse Plowshare with a SOCKS proxy:\n```sh\n$ ssh -f -N -D localhost:3128 user@my.proxy.machine.org\n$ echo 'socks5=localhost:3128' \u003e\u003e~/.curlrc\n```\n\n**Note**: As Plowshare is dealing with verbose, be sure (if present) to have these cURL's options commented:\n```\n#verbose\n#silent\n#show-error\n```\n\n### Known limitations\n\nFor historical reasons or design choices, there are several known limitations to Plowshare.\n\n1. You cannot enter through command-line several credentials for different hosts.\n   It's because the modules option `-a`, `--auth`, `-b` or `--auth-free` have the same switch name.\n   But you can do it with the configuration file.\n2. Same restriction for passwords (also a module option). Only one password can be defined with `-p`, `--link-password` switch name.\n\n### Implement your own modules\n\nPlowshare exports a set of API to help text and HTML processing.\nIt is designed to be as simple as possible to develop new modules.\nA module must be written in shell with portability in mind; one module matches one website.\n\n- [New module documentation](https://github.com/mcrapet/plowshare/wiki/Modules)\n- [API list](https://github.com/mcrapet/plowshare/wiki/API)\n\nA common approach is to read existing modules source code.\n\n## License\n\nPlowshare is made available publicly under the GNU GPLv3 License.\nFull license text is available in COPYING file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcrapet%2Fplowshare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcrapet%2Fplowshare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcrapet%2Fplowshare/lists"}