sped up show_banner() function and not call to github each time its called

This commit is contained in:
TrustedSec 2016-07-20 21:14:11 -04:00
parent e741ca5a67
commit f9d3f75872
2 changed files with 17 additions and 8 deletions

View file

@ -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

View file

@ -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 +