L-codes / Neo-reGeorg

Neo-reGeorg is a project that seeks to aggressively refactor reGeorg
GNU General Public License v3.0
2.89k stars 446 forks source link
http-redirect http-tunnel neoreg reduh regeorg socks-proxy web-tunnel

Neo-reGeorg

简体中文 | English

Neo-reGeorg 是一个旨在积极重构 reGeorg 的项目,目的是:

此工具仅限于安全研究和教学,用户承担因使用此工具而导致的所有法律和相关责任! 作者不承担任何法律和相关责任!

Version

5.2.0 - 版本修改日志

Features

python 依赖

python -m pip install requests requests[socks]

Basic Usage

Advanced Usage

  1. 支持生成的服务端,默认直接请求响应指定的页面内容 (如伪装的 404 页面)

    $ python neoreg.py generate -k <you_password> --file 404.html --httpcode 404
    $ python neoreg.py -k <you_password> -u <server_url> --skip
  2. 如服务端 WEB,需要设置代理才能访问

    $ python neoreg.py -k <you_password> -u <server_url> --proxy socks5://10.1.1.1:8080
  3. 如需 Authorization 认证和定制的 Header 或 Cookie

    $ python neoreg.py -k <you_password> -u <server_url> -H 'Authorization: cm9vdDppcyB0d2VsdmU=' --cookie "key=value;key2=value2"
  4. 需要分散请求,可上传到多个路径上,如内存马

    $ python neoreg.py -k <you_password> -u <url_1> -u <url_2> -u <url_3> ...
  5. 开启内网转发,应对负载均衡

    $ python neoreg.py -k <you_password> -u <url> -r <redirect_url>
  6. 使用端口转发功能,非启动 socks5 服务 ( 127.0.0.1:1080 -> ip:port )

    $ python neoreg.py -k <you_password> -u <url> -t <ip:port>
  7. 设置请求内容模板 ( generate 的时候需要指定上)

    
    # 请求内容会替换到 NEOREGBODY 中
    $ python3 neoreg.py -k password -T 'img=data:image/png;base64,NEOREGBODY&save=ok'
    $ python3 neoreg.py -k password -T 'img=data:image/png;base64,NEOREGBODY&save=ok' -u http://127.0.0.1:8000/anysting

NOTE 允许将模板内容写入文件中 -T file 即可


8. 支持创建进程另起 Neoreg 服务端,可应对恶劣的特殊环境 (自行脑补) :)
```ruby
$ go run neoreg_servers/tunnel.go 8000
$ python3 neoreg.py -k password -u http://127.0.0.1:8000/anysting

连接服务端

$ python neoreg.py -h usage: neoreg.py [-h] -u URI [-r URL] [-R] [-t IP:PORT] -k KEY [-l IP] [-p PORT] [-s] [-H LINE] [-c LINE] [-x LINE] [--php] [--php-connect-timeout S] [--local-dns] [--read-buff KB] [--read-interval MS] [--write-interval MS] [--max-threads N] [--max-retry N] [--cut-left N] [--cut-right N] [--extract EXPR] [-v]

Socks server for Neoreg HTTP(s) tunneller (DEBUG MODE: -k debug)

optional arguments:
  -h, --help            show this help message and exit
  -u URI, --url URI     The url containing the tunnel script
  -r URL, --redirect-url URL
                        Intranet forwarding the designated server (only
                        java/.net)
  -R, --force-redirect  Forced forwarding (only -r)
  -t IP:PORT, --target IP:PORT
                        Network forwarding Target, After setting this
                        parameter, port forwarding will be enabled
  -k KEY, --key KEY     Specify connection key
  -l IP, --listen-on IP
                        The default listening address (default: 127.0.0.1)
  -p PORT, --listen-port PORT
                        The default listening port (default: 1080)
  -s, --skip            Skip usability testing
  -H LINE, --header LINE
                        Pass custom header LINE to server
  -c LINE, --cookie LINE
                        Custom init cookies
  -x LINE, --proxy LINE
                        Proto://host[:port] Use proxy on given port
  -T STR/FILE, --request-template STR/FILE
                        HTTP request template (eg:
                        'img=data:image/png;base64,NEOREGBODY&save=ok')
  --php                 Use php connection method
  --php-connect-timeout S
                        PHP connect timeout (default: 0.5)
  --local-dns           Use local resolution DNS
  --read-buff KB        Local read buffer, max data to be sent per POST
                        (default: 7, max: 50)
  --read-interval MS    Read data interval in milliseconds (default: 300)
  --write-interval MS   Write data interval in milliseconds (default: 200)
  --max-threads N       Proxy max threads (default: 400)
  --max-retry N         Proxy max threads (default: 10)
  --cut-left N          Truncate the left side of the response body
  --cut-right N         Truncate the right side of the response body
  --extract EXPR        Manually extract BODY content (eg:
                        <html><p>NEOREGBODY</p></html> )
  -v                    Increase verbosity level (use -vv or more for greater
                        effect)


## Remind

* Mac OSX 上运行 `neoreg.py` 时,高并发请求会出现网络丢包情况,可通过 `ulimit -n 2560` 修改当前 shell 的 "最大文件打开数"

## License

GPL 3.0

## Star History Chart

[![Star History Chart](https://api.star-history.com/svg?repos=L-codes/Neo-reGeorg&type=Date)](https://star-history.com/#L-codes/Neo-reGeorg&Date)

<img align='right' src="https://profile-counter.glitch.me/neo-regeorg/count.svg" width="200">