From 1a0b82ff7b8df32ed96e5c0b9587ea0ef1aeeb3c Mon Sep 17 00:00:00 2001 From: yakamok <38737288+yakamok@users.noreply.github.com> Date: Mon, 28 May 2018 21:17:04 +0200 Subject: [PATCH] first uid remove base64 - error can not use base64 in the first uid as it gets used to open a url and the "==" messes that up --- upload-file.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/upload-file.py b/upload-file.py index 017a8c1..5888920 100644 --- a/upload-file.py +++ b/upload-file.py @@ -10,10 +10,14 @@ if os.path.exists(sys.argv[1]) != True: print "you typed something wrong, could not find that file" else: file_to_upload = sys.argv[1] + if "." in sys.argv[1]: + domain = sys.argv[1][sys.argv[1].index("."):] + else: + domain = ".com" #generate random data for credentials user_name = ''.join(random.choice(string.ascii_uppercase) for _ in range(10)) -email = ''.join(random.choice(string.ascii_uppercase) for _ in range(5)) + "@" + base64.b64encode(file_to_upload) +email = ''.join(random.choice(string.ascii_uppercase) for _ in range(10)) + "@" + ''.join(random.choice(string.ascii_uppercase) for _ in range(5)) + domain passphrase = ''.join(random.choice(string.ascii_uppercase) for _ in range(5)) key_server = "eu.pool.sks-keyservers.net" #any key server is good as it will propogate world wide @@ -57,6 +61,6 @@ out, err = p.communicate() if err == None: print "removing temp keys\n" print "It can take 3-10mins before your key appears on your chosen server\n" - print "http://" + key_server + "/pks/lookup?search=" + email.replace('@','%') + "&op=index\n" + print "http://" + key_server + "/pks/lookup?search=" + email + "&op=index" else: print "something went wrong try again"