From dc2bc6db979f6178f0a18655b1af581dd889d2d2 Mon Sep 17 00:00:00 2001 From: Mlinzo <46653182+Mlinzo@users.noreply.github.com> Date: Fri, 11 Mar 2022 19:59:02 +0200 Subject: [PATCH 1/2] python3 update --- shodankeys.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/shodankeys.py b/shodankeys.py index ec3612f..0f0a40d 100644 --- a/shodankeys.py +++ b/shodankeys.py @@ -16,17 +16,17 @@ def test(key): api = shodan.Shodan(key) - print "{+} Testing Key: %s" %(key) + print("{+} Testing Key: %s" %(key)) try: info = api.info() except Exception: - print "{-} Key %s is invalid!" %(key) + print("{-} Key %s is invalid!" %(key)) return False,False if info['plan'] == 'dev' or info['plan'] == 'edu': #this seems to be how they are categorized - print "{+} Key %s appears to be valid, and bonus, paid!" %(key) + print("{+} Key %s appears to be valid, and bonus, paid!" %(key)) return True,True elif info['plan'] == 'oss': # however I might be wrong. oh well. - print "{*} Key %s appears to be valid! Not paid for though!" %(key) + print("{*} Key %s appears to be valid! Not paid for though!" %(key)) return True,False @@ -49,15 +49,15 @@ def main(args): comm_keys.append(key) else: pass - print "\n\n{+} Acquired %d valid keys" %(len(valid_keys)) - print "{+} Acquired %d paid-keys" %(len(paid_keys)) - print "{+} Acquired %d community-keys" %(len(comm_keys)) - print "\n{+} Paid Keys..." + print("\n\n{+} Acquired %d valid keys" %(len(valid_keys))) + print("{+} Acquired %d paid-keys" %(len(paid_keys))) + print("{+} Acquired %d community-keys" %(len(comm_keys))) + print("\n{+} Paid Keys...") for key in paid_keys: - print key + print(key) print "\n{+}Community Keys..." for key in comm_keys: - print key + print(key) if __name__ == "__main__": From 5032c77157ccd897c98283979779a74742b05136 Mon Sep 17 00:00:00 2001 From: Mlinzo <46653182+Mlinzo@users.noreply.github.com> Date: Fri, 11 Mar 2022 20:03:28 +0200 Subject: [PATCH 2/2] python3 update --- shodankeys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shodankeys.py b/shodankeys.py index 0f0a40d..d2972ba 100644 --- a/shodankeys.py +++ b/shodankeys.py @@ -55,7 +55,7 @@ def main(args): print("\n{+} Paid Keys...") for key in paid_keys: print(key) - print "\n{+}Community Keys..." + print("\n{+}Community Keys...") for key in comm_keys: print(key)