mirror of
https://github.com/trustedsec/social-engineer-toolkit
synced 2024-11-23 04:53:05 +00:00
added keyboard interrupt exception for urllib
This commit is contained in:
parent
8e321385e7
commit
3cda1d3117
2 changed files with 8 additions and 5 deletions
|
@ -20,6 +20,7 @@ version 7.3
|
|||
* added timeout delay for pulling new version biggest challenge here is that urllib base is socket and socket timeout is tied to gethostbyname() which does not support a timeout, needed to add multiprocessing poll for 8 seconds to add timeout delay when checking for updates
|
||||
* added check for urllib for python2 and python3 compatibility
|
||||
* changed delldrac to python 2 to 3 compatibility and rewrote requests to use solid urlopen instead of requests
|
||||
* added keyboard exception handling for urllib pull for version
|
||||
|
||||
~~~~~~~~~~~~~~~~
|
||||
version 7.2.3
|
||||
|
|
|
@ -837,11 +837,13 @@ def show_banner(define_version, graphic):
|
|||
version = ""
|
||||
def pull_version():
|
||||
if not os.path.isfile(setdir + "/version.lock"):
|
||||
url = ('https://raw.githubusercontent.com/trustedsec/social-engineer-toolkit/master/src/core/set.version')
|
||||
version = urlopen(url).read().rstrip().decode('utf-8')
|
||||
filewrite = open(setdir + "/version.lock", "w")
|
||||
filewrite.write(version)
|
||||
filewrite.close()
|
||||
try:
|
||||
url = ('https://raw.githubusercontent.com/trustedsec/social-engineer-toolkit/master/src/core/set.version')
|
||||
version = urlopen(url).read().rstrip().decode('utf-8')
|
||||
filewrite = open(setdir + "/version.lock", "w")
|
||||
filewrite.write(version)
|
||||
filewrite.close()
|
||||
except KeyboardInterrupt: version = "keyboard interrupt"
|
||||
|
||||
else: version = open(setdir + "/version.lock", "r").read()
|
||||
|
||||
|
|
Loading…
Reference in a new issue