Skip to content

Commit c8979aa

Browse files
author
Ekultek
committed
fix for issue #1150
1 parent 0c2319d commit c8979aa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/term/terminal.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ def do_token_reset(self, api, token, username):
187187
Censys -> reset/tokens censys <token> <userID>
188188
Shodan -> reset.tokens shodan <token>
189189
"""
190+
import sys
191+
192+
if sys.version_info > (3,):
193+
token = token.encode("utf-8")
194+
username = username.encode("utf-8")
195+
190196
if api.lower() == "censys":
191197
lib.output.info("resetting censys API credentials")
192198
with open(lib.settings.API_KEYS["censys"][0], 'w') as token_:

0 commit comments

Comments
 (0)