19.12.2022 - development on kraken_fetch.py

This commit is contained in:
kalzu
2022-12-20 11:54:56 +02:00
parent 56cd2a3f3f
commit b9558bc826
3 changed files with 195 additions and 3 deletions

View File

@ -38,20 +38,21 @@ def send():
sig_hex = binascii.hexlify(private_key.sign(message)).decode('utf-8')
#print('sig:', sig_hex)
reply = requests.get('http://localhost:5000/get', headers={"auth": sig_hex})
reply = requests.get('http://localhost:5000/get/123', headers={"auth": sig_hex})
output_status = str(reply.status_code)
output_content = str(reply.content)
return output_content, output_status
@app.route('/get')
def get():
@app.route('/get/<c_id>')
def get(c_id):
#vk = sk.get_verifying_key()
# Get the public key from the signing key object
public_key = keys['public_key']
print("public_key:", public_key)
print(line)
print("got id: ", c_id)
# Get the sig from auth header
sig = request.headers.get('auth')