{"id":17293020,"url":"https://github.com/macmod/forever","last_synced_at":"2025-03-26T19:23:42.861Z","repository":{"id":170101578,"uuid":"646216354","full_name":"Macmod/Forever","owner":"Macmod","description":"A simple tool that generates SSH command-line arguments to forward local addresses to multiple remote targets.","archived":false,"fork":false,"pushed_at":"2023-05-27T19:29:47.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T01:06:18.687Z","etag":null,"topics":["bugbounty","pentest","port-forwarding","redteam","ssh","tools"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Macmod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-27T16:56:41.000Z","updated_at":"2023-05-27T20:47:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"be1bb76a-0b5a-4187-ae96-c244bf4f6317","html_url":"https://github.com/Macmod/Forever","commit_stats":null,"previous_names":["macmod/forever"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Macmod%2FForever","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Macmod%2FForever/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Macmod%2FForever/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Macmod%2FForever/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Macmod","download_url":"https://codeload.github.com/Macmod/Forever/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245719445,"owners_count":20661264,"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","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":["bugbounty","pentest","port-forwarding","redteam","ssh","tools"],"created_at":"2024-10-15T10:45:02.037Z","updated_at":"2025-03-26T19:23:42.825Z","avatar_url":"https://github.com/Macmod.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Forever\n\nForever (Forward Everything) is a simple tool that generates SSH command-line arguments to forward local addresses to multiple remote targets.\n\nWhen you need to access multiple remote services through an SSH-enabled proxy server, there are reasons why you might not want to use SSH's dynamic port forwarding with `-D`, like when you need to access these services through desktop applications that don't offer SOCKS support. In that case, one is left with the option of forwarding local ports to remote targets using SSH's `-L` switches, but with a large list of targets this approach becomes exhaustive.\n\nThe `forever.py` tool is a simple utility to fix that - it generates `-L` switches through a variety of methods for multiple targets to be forwarded through SSH, only depending on the amount of local addresses you have available.\n\nThis \"trick\" might be useful for cases where you want to quickly access a big but reasonable number of services, and don't want to write the `-L` switches by hand. You can bind up to 254 services to your loopback addresses, up to 65535 services to your loopback ports, or use addresses/ports from other network interfaces you might have available on your host for that task.\n\n# Usage\n\n## Asciicast\n[![asciicast](https://asciinema.org/a/qI49iOKQfbBM5JldFMEjgMFCX.svg)](https://asciinema.org/a/qI49iOKQfbBM5JldFMEjgMFCX)\n\n## Sequential Addresses\n```bash\n$ python3 forever.py \u003ctargetsfile\u003e\n```\n\n## Random Addresses\n```bash\n$ python3 forever.py --mode random_addrs \u003ctargetsfile\u003e\n```\n\n## Sequential Ports\n```bash\n$ python3 forever.py --mode seq_ports \u003ctargetsfile\u003e\n```\n\n## Random Ports\n```bash\n$ python3 forever.py --mode random_ports \u003ctargetsfile\u003e\n```\n\n## Additional Options\n* `-r CIDR` or `--range` - Custom CIDR range for address modes (default: `127.0.0.0/24`).\n* `-P PORT` or `--localport` - Custom local port for address modes (default: `445`).\n* `-A address` or `--localaddr` - Custom local address for port modes (default: `127.0.0.1`).\n* `-s PORT` or `--startport` - Custom start port for port modes (default: `1024`).\n* `-e PORT` or `--endport` - Custom end port for port modes (default: `65535`).\n* `-v` or `--verbose` - Enable verbose mode.\n\n# License\nThe MIT License (MIT)\n\nCopyright (c) 2023 Artur Henrique Marzano Gonzaga\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacmod%2Fforever","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacmod%2Fforever","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacmod%2Fforever/lists"}