Skip to content

Commit

Permalink
push v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
L-codes committed Apr 18, 2021
1 parent 40f61c1 commit 4e4cbe7
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 33 deletions.
20 changes: 12 additions & 8 deletions CHANGELOG-en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

### v3.0.0:
Client: Client: Only verify php cookies
Server: aspx/ashx/jsp/jspx Use global variables to replace `Session`, and no longer rely on Cookie (Special thanks to @c0ny1 for the solution)

### v2.6.0
Client: Add the `--write-interval` parameter to adjust the FORWARD request interval
Client: Readjust `--read-interval` default value is 300
Expand Down Expand Up @@ -46,14 +50,14 @@
Fix `-H` setting bug

### v2.0.0
Realize single-session multiple TCP sessions, and solve the unavailability caused by only supporting single-session HTTP communication in some environments
Support multiple URL request paths of the same server to avoid excessive single-path access frequency
Support custom server HTTP response code
Modified some commands to GET, which is closer to normal requests
Remove blank lines and remove some features
Support DNS resolution on the server, and use (local DNS resolution with `--local-dns`) to optimize the output of error messages. Modify the directory name scripts / => templates / and neoreg_server / => neoreg_servers /
Support for removing socks 4
Removable javascript tunnel support
Realize single-session multiple TCP sessions, and solve the unavailability caused by only supporting single-session HTTP communication in some environments
Support multiple URL request paths of the same server to avoid excessive single-path access frequency
Support custom server HTTP response code
Modified some commands to GET, which is closer to normal requests
Remove blank lines and remove some features
Support DNS resolution on the server, and use (local DNS resolution with `--local-dns`) to optimize the output of error messages. Modify the directory name scripts / => templates / and neoreg_server / => neoreg_servers /
Support for removing socks 4
Removable javascript tunnel support

### v1.5.0
Fix the problem that php>= 7.1 version cannot be used normally
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

### v3.0.0:
Client: 仅对 php 的 Cookie 进行验证
Server: aspx/ashx/jsp/jspx 使用全局变量替代了 Session, 已不再依赖 Cookie (特别感谢 @c0ny1 的解决方案)

### v2.6.0
Client: 增加 `--write-interval` 参数,可调整 FORWARD 请求间隔
Client: 重新调整 `--read-interval` 默认值为 300
Expand Down Expand Up @@ -55,7 +59,7 @@
优化了错误信息输出
修改了目录名称 scripts/ => templates/ 和 neoreg_server/ => neoreg_servers/
移除 socks4 的支持
移除 javascript tunnel 支持
移除 javascript tunnel 支持

### v1.5.0
修复 php >= 7.1 版本,无法正常使用的问题
Expand Down
5 changes: 3 additions & 2 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## Version

2.6.0 - [Change Log](CHANGELOG-en.md)
3.0.0 - [Change Log](CHANGELOG-en.md)


## Features
Expand All @@ -27,7 +27,8 @@
* Server-node DNS resolution
* Compatible with python2 / python3
* High compatibility of the server environment
* Refer to [pivotnacci](https://github.com/blackarrowsec/pivotnacci) to implement a single `SESSION` to create multiple TCP connections to deal with some load balancing scenarios
* (only php) Refer to [pivotnacci](https://github.com/blackarrowsec/pivotnacci) to implement a single `SESSION` to create multiple TCP connections to deal with some load balancing scenarios
* aspx/ashx/jsp/jspx no longer relies on Session, and can run normally in harsh environments such as cookie-free
* Support HTTP forwarding, coping with load balancing environment


Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

## Version

2.6.0 - [版本修改日志](CHANGELOG.md)
3.0.0 - [版本修改日志](CHANGELOG.md)



Expand All @@ -29,7 +29,8 @@
* 服务端 DNS 解析
* 兼容 python2 / python3
* 服务端环境的高兼容性
* 参考 [pivotnacci](https://github.com/blackarrowsec/pivotnacci) 实现单 Session 创建多 TCP 连接,应对部分负载均衡场景
* (仅 php) 参考 [pivotnacci](https://github.com/blackarrowsec/pivotnacci) 实现单 Session 创建多 TCP 连接,应对部分负载均衡场景
* aspx/ashx/jsp/jspx 已不再依赖 Session,可在无 Cookie 等恶劣环境正常运行
* 支持内网转发,应对负载均衡环境


Expand Down Expand Up @@ -179,8 +180,6 @@ $ python neoreg.py -h

* 传输 Target 隐写

* 解决无 cookie 支持环境下,reg 无法使用的情况


## License

Expand Down
37 changes: 19 additions & 18 deletions neoreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

__author__ = 'L'
__version__ = '2.6.0'
__version__ = '3.0.0'

import sys
import os
Expand Down Expand Up @@ -485,23 +485,24 @@ def askGeorg(conn, connectURLs, redirectURLs):
need_exit = False
try:
response = conn.get(connectURLs[0], headers=headers, timeout=10)
if 'Expires' in response.headers:
expires = response.headers['Expires']
try:
expires_date = datetime.strptime(expires, '%a, %d %b %Y %H:%M:%S %Z')
if mktime(expires_date.timetuple()) < time():
log.warning('Server Session expired')
if 'Set-Cookie' in response.headers:
cookie = ''
for k, v in response.cookies.items():
cookie += '{}={};'.format(k, v)
HEADERS.update({'Cookie' : cookie})
log.warning("Automatically append Cookies: {}".format(cookie))
else:
log.error('There is no valid cookie return')
need_exit = True
except ValueError:
log.warning('Expires wrong format: {}'.format(expires))
if '.php' in connectURLs[0]:
if 'Expires' in response.headers:
expires = response.headers['Expires']
try:
expires_date = datetime.strptime(expires, '%a, %d %b %Y %H:%M:%S %Z')
if mktime(expires_date.timetuple()) < time():
log.warning('Server Session expired')
if 'Set-Cookie' in response.headers:
cookie = ''
for k, v in response.cookies.items():
cookie += '{}={};'.format(k, v)
HEADERS.update({'Cookie' : cookie})
log.warning("Automatically append Cookies: {}".format(cookie))
else:
log.error('There is no valid cookie return')
need_exit = True
except ValueError:
log.warning('Expires wrong format: {}'.format(expires))
except:
log.error("Georg is not ready, please check URL.")
exit()
Expand Down

0 comments on commit 4e4cbe7

Please sign in to comment.