不息屏
This commit is contained in:
@@ -4,6 +4,7 @@ import sys
|
||||
import configparser
|
||||
import os
|
||||
|
||||
|
||||
def load_config(config_path='config.ini'):
|
||||
"""加载配置文件"""
|
||||
config = configparser.ConfigParser()
|
||||
@@ -43,6 +44,7 @@ def load_config(config_path='config.ini'):
|
||||
|
||||
def handle_request(sock, target_host, target_port):
|
||||
"""处理从A设备收到的请求,转发到目标网站"""
|
||||
|
||||
try:
|
||||
# 接收来自A设备的请求
|
||||
request = b""
|
||||
@@ -102,8 +104,10 @@ def connect_to_a_device(a_host, a_port, target_host, target_port):
|
||||
time.sleep(3)
|
||||
|
||||
def main():
|
||||
|
||||
# 加载配置
|
||||
config = load_config()
|
||||
|
||||
|
||||
# 解析命令行参数
|
||||
if len(sys.argv) < 3:
|
||||
|
||||
Reference in New Issue
Block a user