mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-11-30 11:23:31 +00:00
Update server.py
This commit is contained in:
parent
dc0653de09
commit
92b1957449
|
|
@ -102,8 +102,9 @@ def jsonrpc2_encode(method, params):
|
||||||
"method": method,
|
"method": method,
|
||||||
"params": params
|
"params": params
|
||||||
}
|
}
|
||||||
data['id'] = jsonrpc2_create_id(data)
|
id = jsonrpc2_create_id(data)
|
||||||
return json.dumps(data)
|
data['id'] = id
|
||||||
|
return (id, json.dumps(data))
|
||||||
|
|
||||||
def parse_first_data(data):
|
def parse_first_data(data):
|
||||||
parsed_data = (b'', b'', b'', b'', b'')
|
parsed_data = (b'', b'', b'', b'', b'')
|
||||||
|
|
@ -467,7 +468,7 @@ def proxy_server(webserver, port, scheme, method, url, conn, addr, data):
|
||||||
"datetime": datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")
|
"datetime": datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
raw_data = jsonrpc2_encode(proxy_data['request_data'])
|
_, raw_data = jsonrpc2_encode(proxy_data['request_data'])
|
||||||
|
|
||||||
print("[*] Sending %s bytes..." % (str(len(raw_data))))
|
print("[*] Sending %s bytes..." % (str(len(raw_data))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user