Skip to content

Commit 4e4cbe7

Browse files
committed
push v3.0.0
1 parent 40f61c1 commit 4e4cbe7

File tree

5 files changed

+42
-33
lines changed

5 files changed

+42
-33
lines changed

CHANGELOG-en.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
### v3.0.0:
4+
Client: Client: Only verify php cookies
5+
Server: aspx/ashx/jsp/jspx Use global variables to replace `Session`, and no longer rely on Cookie (Special thanks to @c0ny1 for the solution)
6+
37
### v2.6.0
48
Client: Add the `--write-interval` parameter to adjust the FORWARD request interval
59
Client: Readjust `--read-interval` default value is 300
@@ -46,14 +50,14 @@
4650
Fix `-H` setting bug
4751

4852
### v2.0.0
49-
Realize single-session multiple TCP sessions, and solve the unavailability caused by only supporting single-session HTTP communication in some environments
50-
Support multiple URL request paths of the same server to avoid excessive single-path access frequency
51-
Support custom server HTTP response code
52-
Modified some commands to GET, which is closer to normal requests
53-
Remove blank lines and remove some features
54-
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 /
55-
Support for removing socks 4
56-
Removable javascript tunnel support
53+
Realize single-session multiple TCP sessions, and solve the unavailability caused by only supporting single-session HTTP communication in some environments
54+
Support multiple URL request paths of the same server to avoid excessive single-path access frequency
55+
Support custom server HTTP response code
56+
Modified some commands to GET, which is closer to normal requests
57+
Remove blank lines and remove some features
58+
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 /
59+
Support for removing socks 4
60+
Removable javascript tunnel support
5761

5862
### v1.5.0
5963
Fix the problem that php>= 7.1 version cannot be used normally

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
### v3.0.0:
4+
Client: 仅对 php 的 Cookie 进行验证
5+
Server: aspx/ashx/jsp/jspx 使用全局变量替代了 Session, 已不再依赖 Cookie (特别感谢 @c0ny1 的解决方案)
6+
37
### v2.6.0
48
Client: 增加 `--write-interval` 参数,可调整 FORWARD 请求间隔
59
Client: 重新调整 `--read-interval` 默认值为 300
@@ -55,7 +59,7 @@
5559
优化了错误信息输出
5660
修改了目录名称 scripts/ => templates/ 和 neoreg_server/ => neoreg_servers/
5761
移除 socks4 的支持
58-
移除 javascript tunnel 支持
62+
移除 javascript tunnel 支持
5963

6064
### v1.5.0
6165
修复 php >= 7.1 版本,无法正常使用的问题

README-en.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
## Version
1515

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

1818

1919
## Features
@@ -27,7 +27,8 @@
2727
* Server-node DNS resolution
2828
* Compatible with python2 / python3
2929
* High compatibility of the server environment
30-
* 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
30+
* (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
31+
* aspx/ashx/jsp/jspx no longer relies on Session, and can run normally in harsh environments such as cookie-free
3132
* Support HTTP forwarding, coping with load balancing environment
3233

3334

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
## Version
1616

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

1919

2020

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

3536

@@ -179,8 +180,6 @@ $ python neoreg.py -h
179180

180181
* 传输 Target 隐写
181182

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

185184
## License
186185

neoreg.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
__author__ = 'L'
5-
__version__ = '2.6.0'
5+
__version__ = '3.0.0'
66

77
import sys
88
import os
@@ -485,23 +485,24 @@ def askGeorg(conn, connectURLs, redirectURLs):
485485
need_exit = False
486486
try:
487487
response = conn.get(connectURLs[0], headers=headers, timeout=10)
488-
if 'Expires' in response.headers:
489-
expires = response.headers['Expires']
490-
try:
491-
expires_date = datetime.strptime(expires, '%a, %d %b %Y %H:%M:%S %Z')
492-
if mktime(expires_date.timetuple()) < time():
493-
log.warning('Server Session expired')
494-
if 'Set-Cookie' in response.headers:
495-
cookie = ''
496-
for k, v in response.cookies.items():
497-
cookie += '{}={};'.format(k, v)
498-
HEADERS.update({'Cookie' : cookie})
499-
log.warning("Automatically append Cookies: {}".format(cookie))
500-
else:
501-
log.error('There is no valid cookie return')
502-
need_exit = True
503-
except ValueError:
504-
log.warning('Expires wrong format: {}'.format(expires))
488+
if '.php' in connectURLs[0]:
489+
if 'Expires' in response.headers:
490+
expires = response.headers['Expires']
491+
try:
492+
expires_date = datetime.strptime(expires, '%a, %d %b %Y %H:%M:%S %Z')
493+
if mktime(expires_date.timetuple()) < time():
494+
log.warning('Server Session expired')
495+
if 'Set-Cookie' in response.headers:
496+
cookie = ''
497+
for k, v in response.cookies.items():
498+
cookie += '{}={};'.format(k, v)
499+
HEADERS.update({'Cookie' : cookie})
500+
log.warning("Automatically append Cookies: {}".format(cookie))
501+
else:
502+
log.error('There is no valid cookie return')
503+
need_exit = True
504+
except ValueError:
505+
log.warning('Expires wrong format: {}'.format(expires))
505506
except:
506507
log.error("Georg is not ready, please check URL.")
507508
exit()

0 commit comments

Comments
 (0)