Skip to content

Commit

Permalink
updated release v1.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
i2cy committed Oct 2, 2022
1 parent a1894d0 commit 73da919
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 32 deletions.
8 changes: 4 additions & 4 deletions build/lib/i2cylib/network/I2TCP/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def __init__(self, key=b"I2TCPbasicKey", port=24678,
I2TCP server class I2TCP服务端类
:param key: str(or bytes), dynamic key for authentication 对称动态密钥
:param port: int, server port that to be bond 服务端要绑定的端口号
:param port: int, server port that to be bonded 服务端要绑定的端口号
:param max_con: int, max TCP connection(s) that allowed
to be accept at the same time 最大同时接受的连接数
to be accepted at the same time 最大同时接受的连接数
:param logger: Logger, server log output object 日志器(来自于i2cylib.utils.logger.logger.Logger)
:param secured_connection: bool, enable encryption in connection 启用安全加密层
:param max_buffer_size: int, max package buffer size for every handler 包缓冲区最大大小(单位:个)
Expand Down Expand Up @@ -56,7 +56,7 @@ def __init__(self, key=b"I2TCPbasicKey", port=24678,

def _mainloop_thread(self):
"""
over write server main loop
overwrite server main loop
:return: None
"""
Expand Down Expand Up @@ -147,7 +147,7 @@ def _packager(self, data):

if self.flag_secured_connection_built: # 安全连接加密
assert isinstance(self.coder_pack, Iccode)
while self.flag_pack_busy:
while self.flag_pack_busy and self.live:
time.sleep(0.001)
self.flag_pack_busy = True
self.coder_pack.reset()
Expand Down
3 changes: 3 additions & 0 deletions build/lib/i2cylib/network/I2TCP/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ def massive_send(clt, data):
logger = Logger()
srv = Server(port=24678, key=b"test", logger=logger, secured_connection=True)
clt = Client(port=24678, hostname="127.0.0.1", key=b"test", logger=logger)
ex_clt = Client(port=24678, hostname="127.0.0.1", key=b"asds", logger=logger)

srv.start()
ex_clt.connect()
time.sleep(1)
clt.connect()

data = b""
Expand Down
5 changes: 4 additions & 1 deletion build/lib/i2cylib/network/i2tcp_basic/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,10 @@ def test():
if not clt.connect():
print("trying to connect to local test server")
clt.reset()
clt = I2TCPclient("localhost", logger=Logger(filename="client_testrun.log"))
clt = I2TCPclient("localhost", key=b"testtest123", logger=Logger(filename="client_testrun.log"))
clt.connect()
time.sleep(2)
clt = I2TCPclient("localhost", key=b"basic", logger=Logger(filename="client_testrun.log"))
clt.connect()
gtc = ""
for i in range(3):
Expand Down
3 changes: 3 additions & 0 deletions build/lib/i2cylib/network/i2tcp_basic/base_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,9 @@ def _auth(self):
else:
self.logger.WARNING("{} unauthorized connection, key received: {}".format(self.log_header,
dynamic_key))
raise Exception("{} unauthorized connection, key received: {}".format(self.log_header,
dynamic_key))

feedback = b""
while len(feedback) < 2:
feedback += self.srv.recv(2 - len(feedback))
Expand Down
Binary file removed dist/i2cylib-1.12.0-py3-none-any.whl
Binary file not shown.
Binary file removed dist/i2cylib-1.12.0.tar.gz
Binary file not shown.
50 changes: 25 additions & 25 deletions i2cylib.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
Metadata-Version: 2.1
Name: i2cylib
Version: 1.12.0
Version: 1.12.1
Summary: A Python library contains a lot of useful functions and tools
Home-page: https://github.com/i2cy/i2cylib
Author: I2cy Cloud
Author-email: [email protected]
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/i2cy/i2cylib/issues
Project-URL: Source Code, https://github.com/i2cy/i2cylib
Project-URL: Documentation, https://github.com/i2cy/I2cylib/wiki/API-Document
Description: # 主要包含
- `ICCode` i2cy常用的混淆算法
- `Dynkey` 动态验证密匙生成/验证工具
- `SQLiteDB` SQLite3数据库面向对象式API
- `ICFat64` 类FAT虚拟文件系统
- `I2TCP` 高度封装的用户层通讯协议
- `PID` 异步PID模组
- `utils` 各种常用的小工具

# 安装方法
`pip install i2cylib`

# 内嵌命令行工具
- `icen` 基于ICCode混淆算法的文件加密工具
- `i2cydbserver` 基于SQLite的数据库服务端
- `i2scan` 端口扫描、系统推断工具

# 环境需求
`Python3.6+`

# API文档
[Project Wiki](https://github.com/i2cy/I2cylib/wiki/API-Document)
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# 主要包含
- `ICCode` i2cy常用的混淆算法
- `Dynkey` 动态验证密匙生成/验证工具
- `SQLiteDB` SQLite3数据库面向对象式API
- `ICFat64` 类FAT虚拟文件系统
- `I2TCP` 高度封装的用户层通讯协议
- `PID` 异步PID模组
- `utils` 各种常用的小工具

# 安装方法
`pip install i2cylib`

# 内嵌命令行工具
- `icen` 基于ICCode混淆算法的文件加密工具
- `i2cydbserver` 基于SQLite的数据库服务端
- `i2scan` 端口扫描、系统推断工具

# 环境需求
`Python3.6+`

# API文档
[Project Wiki](https://github.com/i2cy/I2cylib/wiki/API-Document)
1 change: 1 addition & 0 deletions i2cylib.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
LICENSE
README.md
pyproject.toml
setup.py
Expand Down
1 change: 0 additions & 1 deletion i2cylib.egg-info/entry_points.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
i2cydbserver = i2cylib.database.I2DB.i2cydbserver:main
i2en = i2cylib.crypto.I2En.icen:main
i2scan = i2cylib.network.I2Scan.i2scan:main

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setuptools.setup(
name="i2cylib", # Replace with your own username
version="1.12.0",
version="1.12.1",
author="I2cy Cloud",
author_email="[email protected]",
description="A Python library contains a lot of useful functions and tools",
Expand Down

0 comments on commit 73da919

Please sign in to comment.