{"id":24890703,"url":"https://github.com/skulltech/netmog","last_synced_at":"2025-10-05T12:55:12.632Z","repository":{"id":51611667,"uuid":"113261800","full_name":"skulltech/netmog","owner":"skulltech","description":"A netcat alternative with remote code execution.","archived":false,"fork":false,"pushed_at":"2020-04-14T17:58:15.000Z","size":9,"stargazers_count":38,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T22:23:49.904Z","etag":null,"topics":["netcat","networking","python","python3","remote-shell","sockets"],"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/skulltech.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}},"created_at":"2017-12-06T03:07:58.000Z","updated_at":"2025-02-27T07:38:57.000Z","dependencies_parsed_at":"2022-08-21T23:40:11.110Z","dependency_job_id":null,"html_url":"https://github.com/skulltech/netmog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skulltech/netmog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skulltech%2Fnetmog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skulltech%2Fnetmog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skulltech%2Fnetmog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skulltech%2Fnetmog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skulltech","download_url":"https://codeload.github.com/skulltech/netmog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skulltech%2Fnetmog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278457469,"owners_count":25989956,"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-05T02:00:06.059Z","response_time":54,"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":["netcat","networking","python","python3","remote-shell","sockets"],"created_at":"2025-02-01T17:17:31.119Z","updated_at":"2025-10-05T12:55:12.601Z","avatar_url":"https://github.com/skulltech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netmog\nA `netcat` alternative with remote code execution.\n\n# Usage\n\n```console\nsumit@HAL9000:~/Coding/netmog$ python3 netmog.py -h\nusage: netmog.py [-h] {client,server} ...\n\noptional arguments:\n  -h, --help       show this help message and exit\n\nmode:\n\n  {client,server}\n    client         client mode: for sending commands to a remote server\n    server         server mode: for executing commands from remote client\n\n```\n\nAs you can see above, `netmog` has two modes — _client_ and _server_. \n\n## Client mode\n\n```console\nsumit@HAL9000:~/Coding/netmog$ python3 netmog.py client -h\nusage: netmog.py client [-h] -t HOST -p PORT [-s]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -t HOST, --host HOST  target host\n  -p PORT, --port PORT  the port on which the target host is listening on\n  -s, --shell           shell mode, to use with a remote netmog server\n```\n\nIf you're using `netmog` to send commands to a remote `netmog` server, use the `--shell` flag to use it in shell mode. For example, the following connects to the remote `netmog` server at `localhost:5050` ::\n\n### Shell mode\n```console\nsumit@HAL9000:~/Coding/netmog$ python3 netmog.py client -t localhost -p 5050 --shell\n[*] Connected to localhost:5050\n[ netmog ] $ ls\nLICENSE\nnetmog.py\nREADME.md\n\n[ netmog ] $ \n```\nOf course, for this to work, you'll have to run a `netmog` server at `localhost:5050`. Get the instructions for that [here](#server-mode).\n\n### Netcat mode\n\nYou can also use `netmog` as a standard `netcat`-like utility, which is the actually default mode for the `netmog` client. Only thing you have to keep in mind is \n\n__Note__ — In this mode, pressing `Enter`// newline doesn't send the request; `Ctrl+D`// `EOF` does. This is done so that the request body can contain newlines.\n\nIn the following example, `netmog` is used to send an HTTP `GET` request to `google.com`.\n```console\nsumit@HAL9000:~/Coding/netmog$ python3 netmog.py client -t google.com -p 80\nGET / HTTP/1.1\nHost: google.com\n\nHTTP/1.1 301 Moved Permanently\nLocation: http://www.google.com/\nContent-Type: text/html; charset=UTF-8\nDate: Tue, 14 Apr 2020 17:47:57 GMT\nExpires: Thu, 14 May 2020 17:47:57 GMT\nCache-Control: public, max-age=2592000\nServer: gws\nContent-Length: 219\nX-XSS-Protection: 0\nX-Frame-Options: SAMEORIGIN\n\n\u003cHTML\u003e\u003cHEAD\u003e\u003cmeta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\"\u003e\n\u003cTITLE\u003e301 Moved\u003c/TITLE\u003e\u003c/HEAD\u003e\u003cBODY\u003e\n\u003cH1\u003e301 Moved\u003c/H1\u003e\nThe document has moved\n\u003cA HREF=\"http://www.google.com/\"\u003ehere\u003c/A\u003e.\n\u003c/BODY\u003e\u003c/HTML\u003e\n```\n\n## Server mode\n```console\nsumit@HAL9000:~/Coding/netmog$ python3 netmog.py server -h\nusage: netmog.py server [-h] [-t HOST] -p PORT\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -t HOST, --host HOST  hostname to bind to\n  -p PORT, --port PORT  the port to listen on\n```\n\nThe `netmog` server binds to a mentioned `host:port` and keeps listening for incoming connections. Once it receives a message, it executes that as a `shell` command and returns the resulting output, i.e. `stdout` and `stderr` combined.\n\nOne thing to note is that here the `--host` argument is optional, by default it takes the value of `0.0.0.0`. See the following example to see it in action ::\n\n```console\nsumit@HAL9000:~/Coding/netmog$ python3 netmog.py server -p 5050\n[*] Listening on 0.0.0.0:5050\n[*] Accepted connection from: 127.0.0.1:41784\n[*] Executing command: ls\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskulltech%2Fnetmog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskulltech%2Fnetmog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskulltech%2Fnetmog/lists"}