diff --git a/CHANGELOG-en.md b/CHANGELOG-en.md index bc0c1f2..9151e19 100644 --- a/CHANGELOG-en.md +++ b/CHANGELOG-en.md @@ -1,5 +1,11 @@ # Change Log +### v5.1.0: +##### New Features + 1. Add `--request-template` parameter to set request template to avoid traffic detection +##### Fix + 1. Updated documentation for `-r` parameter + ### v5.0.2: ##### Enhancement 1. Support for php < 5.4 (special thanks to @me1ons for issue #82) diff --git a/CHANGELOG.md b/CHANGELOG.md index d84cf9c..37bdf63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +### v5.1.0: +##### 新特征 + 1. 新增 `--request-template` 参数,用于设置请求模板,规避流量检测 +##### 修复 + 1. 更新 `-r` 参数的文档说明 + ### v5.0.2: ##### 增强 1. 支持 php < 5.4 版本的 (特别感谢 @me1ons 的issue #82) diff --git a/README-en.md b/README-en.md index a93ad53..3c2c10a 100644 --- a/README-en.md +++ b/README-en.md @@ -13,7 +13,7 @@ ## Version -5.0.2 - [Change Log](CHANGELOG-en.md) +5.1.0 - [Change Log](CHANGELOG-en.md) ## Features @@ -22,6 +22,7 @@ * Use BLV (Byte-LengthOffset-Value) data format to transmit data * Direct request response can be customized (such as a disguised 404 page) * HTTP Headers can be customized +* Support request template * Custom HTTP response code * Multiple URL random requests * Server-side DNS resolution @@ -95,7 +96,16 @@ $ python neoreg.py -k -u -r $ python neoreg.py -k -u -t ``` -7. Support the creation process to start a new Neoreg server-side, which can deal with harsh special environments +7. Set the request content template (you need to specify it when generating) +```ruby +# The request content will be replaced with 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 Allows template content to be written to a file -T file +``` + +8. Support the creation process to start a new Neoreg server-side, which can deal with harsh special environments ```ruby $ go run neoreg_servers/tunnel.go 8000 $ python3 neoreg.py -k password -u http://127.0.0.1:8000/anysting @@ -118,6 +128,9 @@ $ python neoreg.py generate -h -c CODE, --httpcode CODE Specify HTTP response code. When using -r, it is recommended to <400 (default: 200) + -T STR/FILE, --request-template STR/FILE + HTTP request template (eg: + 'img=data:image/png;base64,NEOREGBODY&save=ok') --read-buff Bytes Remote read buffer (default: 513) --max-read-size KB Remote max read size (default: 512) @@ -136,8 +149,8 @@ $ python neoreg.py generate -h -u URI, --url URI The url containing the tunnel script -r URL, --redirect-url URL Intranet forwarding the designated server (only - jsp(x)) - -R, --force-redirect Forced forwarding (only jsp -r) + 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 @@ -153,6 +166,9 @@ $ python neoreg.py generate -h 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-connect-timeout S PHP connect timeout (default: 0.5) --local-dns Use local resolution DNS diff --git a/README.md b/README.md index c7d7b9a..f70464f 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ ## Version -5.0.2 - [版本修改日志](CHANGELOG.md) +5.1.0 - [版本修改日志](CHANGELOG.md) ## Features @@ -22,6 +22,7 @@ * 传输内容经过变形 base64 加密,伪装成 base64 编码 * 采用 BLV (Byte-LengthOffset-Value) 数据格式传输数据 * 直接请求响应可定制化 (如伪装的404页面) +* 支持 Request 模板 * HTTP Headers 可定制化 * 自定义 HTTP 响应码 * 多 URL 随机请求 @@ -96,7 +97,16 @@ $ python neoreg.py -k -u -r $ python neoreg.py -k -u -t ``` -7. 支持创建进程另起 Neoreg 服务端,可应对恶劣的特殊环境 (自行脑补) :) +7. 设置请求内容模板 ( generate 的时候需要指定上) +```ruby +# 请求内容会替换到 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 @@ -119,6 +129,9 @@ $ python neoreg.py generate -h -c CODE, --httpcode CODE Specify HTTP response code. When using -r, it is recommended to <400 (default: 200) + -T STR/FILE, --request-template STR/FILE + HTTP request template (eg: + 'img=data:image/png;base64,NEOREGBODY&save=ok') --read-buff Bytes Remote read buffer (default: 513) --max-read-size KB Remote max read size (default: 512) @@ -138,8 +151,8 @@ $ python neoreg.py -h -u URI, --url URI The url containing the tunnel script -r URL, --redirect-url URL Intranet forwarding the designated server (only - jsp(x)) - -R, --force-redirect Forced forwarding (only jsp -r) + 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 @@ -155,6 +168,9 @@ $ python neoreg.py -h 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-connect-timeout S PHP connect timeout (default: 0.5) --local-dns Use local resolution DNS diff --git a/neoreg.py b/neoreg.py index df107f3..34b68b5 100755 --- a/neoreg.py +++ b/neoreg.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- __author__ = 'L' -__version__ = '5.0.2' +__version__ = '5.1.0' import sys import os @@ -757,7 +757,7 @@ def choice_useragent(): parser.add_argument("-o", "--outdir", metavar="DIR", help="Output directory.", default='neoreg_servers') parser.add_argument("-f", "--file", metavar="FILE", help="Camouflage html page file") parser.add_argument("-c", "--httpcode", metavar="CODE", help="Specify HTTP response code. When using -r, it is recommended to <400 (default: 200)", type=int, default=200) - parser.add_argument("-T", "--request-template", metavar="STR/FILE", help="HTTP request template (eg: 'img=data:image/png;base64,NEOREGBODY&time=1188271471')", type=str) + parser.add_argument("-T", "--request-template", metavar="STR/FILE", help="HTTP request template (eg: 'img=data:image/png;base64,NEOREGBODY&save=ok')", type=str) parser.add_argument("--read-buff", metavar="Bytes", help="Remote read buffer (default: 513)", type=int, default=513) parser.add_argument("--max-read-size", metavar="KB", help="Remote max read size (default: 512)", type=int, default=512) args = parser.parse_args() @@ -774,7 +774,7 @@ def choice_useragent(): parser.add_argument("-H", "--header", metavar="LINE", help="Pass custom header LINE to server", action='append', default=[]) parser.add_argument("-c", "--cookie", metavar="LINE", help="Custom init cookies") parser.add_argument("-x", "--proxy", metavar="LINE", help="Proto://host[:port] Use proxy on given port", default=None) - parser.add_argument("-T", "--request-template", metavar="STR/FILE", help="HTTP request template (eg: 'img=data:image/png;base64,NEOREGBODY&time=1188271471')", type=str) + parser.add_argument("-T", "--request-template", metavar="STR/FILE", help="HTTP request template (eg: 'img=data:image/png;base64,NEOREGBODY&save=ok')", type=str) parser.add_argument("--php-connect-timeout", metavar="S", help="PHP connect timeout (default: {})".format(PHPTIMEOUT), type=float, default=PHPTIMEOUT) parser.add_argument("--local-dns", help="Use local resolution DNS", action='store_true') parser.add_argument("--read-buff", metavar="KB", help="Local read buffer, max data to be sent per POST (default: {}, max: 50)".format(READBUFSIZE), type=int, default=READBUFSIZE)