mirror of
https://github.com/trustedsec/social-engineer-toolkit
synced 2025-02-17 05:48:46 +00:00
sped up show_banner() function and not call to github each time its called
This commit is contained in:
parent
e741ca5a67
commit
f9d3f75872
2 changed files with 17 additions and 8 deletions
|
@ -3,6 +3,7 @@ version 7.3
|
|||
~~~~~~~~~~~~~~~~
|
||||
|
||||
* completely rewrote the SMS spoofing module from scratch to use spoofmytextmessage.com which the folks over there are super helpful and provided an undocumented API to be used within SET. This now works great and has been extensively tested.
|
||||
* sped up the load process when using the main menu system the loading would pull from github each time the show_banner() function was called - this only loads once per SET load now
|
||||
|
||||
~~~~~~~~~~~~~~~~
|
||||
version 7.2.3
|
||||
|
|
|
@ -19,6 +19,10 @@ import io
|
|||
import trace
|
||||
from urllib import *
|
||||
|
||||
# needed for checking SET versions speedup
|
||||
global global_version
|
||||
global_version = 0
|
||||
|
||||
if sys.version_info >= (3, 0):
|
||||
# python 3 removes reduce from builtin and into functools
|
||||
from functools import *
|
||||
|
@ -928,14 +932,18 @@ def show_banner(define_version, graphic):
|
|||
|
||||
# pull version
|
||||
try:
|
||||
response = urlopen('https://raw.githubusercontent.com/trustedsec/social-engineer-toolkit/master/src/core/setcore.py')
|
||||
setcheck = response.readlines()
|
||||
for line in setcheck:
|
||||
line = line.rstrip()
|
||||
if "define_version =" in line:
|
||||
# define_version = '7.1.2'
|
||||
version = line.replace("define_version = ", "").replace("'", "", 2).replace(" ", "")
|
||||
break
|
||||
if global_version == 0:
|
||||
response = urlopen('https://raw.githubusercontent.com/trustedsec/social-engineer-toolkit/master/src/core/setcore.py')
|
||||
setcheck = response.readlines()
|
||||
for line in setcheck:
|
||||
line = line.rstrip()
|
||||
if "define_version =" in line:
|
||||
# define_version = '7.1.2'
|
||||
global version
|
||||
version = line.replace("define_version = ", "").replace("'", "", 2).replace(" ", "")
|
||||
global global_version
|
||||
global_version = 1
|
||||
break
|
||||
|
||||
if cv != version:
|
||||
print(bcolors.RED + " There is a new version of SET available.\n " + bcolors.GREEN + " Your version: " + bcolors.RED + cv + bcolors.GREEN +
|
||||
|
|
Loading…
Add table
Reference in a new issue