add automatic check for new version of SET and display warning is using out of date SET version

This commit is contained in:
TrustedSec 2016-06-26 20:56:20 -04:00
parent 2b79bb136e
commit b0247b254f
2 changed files with 20 additions and 0 deletions
readme
src/core

View file

@ -11,6 +11,7 @@ version 7.2
* added ability to add your own attachments via mass mailer attack vector
* added new config option called wget_deep and incremented config to 7.2 - this will allow 1 deep download wgets
* added ability to select on deeper wgets through web cloner in the web attack vectors - this will allow you to clone the site and not just the index.html which might be better.. to enable this edit /etc/setoolkit/set.config and turn WGET_DEEP to on.
* added a new check upon startup (which may delay the start of set for a couple seconds, but it will check to see if there is a new version of SET available for you automatically - this is displayed on the main launcher UI when you first start SET
~~~~~~~~~~~~~~~~
version 7.1.2

View file

@ -17,6 +17,7 @@ import base64
from src.core import dictionaries
import io
import trace
import urllib2
if sys.version_info >= (3, 0):
# python 3 removes reduce from builtin and into functools
@ -906,6 +907,24 @@ def show_banner(define_version, graphic):
bcolors.GREEN + """https://www.trustedsec.com\n""" + bcolors.ENDC)
# here we check if there is a new version of SET - if there is, then display a banner
cv = get_version()
# pull version
try:
response = urllib2.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(" ", "")
if cv != version:
print(bcolors.RED + " There is a new version of SET available.\n " + bcolors.GREEN + " Your version: " + bcolors.RED + cv + bcolors.GREEN + "\n Current version: " + bcolors.ENDC + bcolors.BOLD + version + bcolors.YELLOW + "\n\nPlease update SET to the latest before submitting any git issues.\n\n" + bcolors.ENDC)
except Exception as err:
print err
def show_graphic():
menu = random.randrange(2, 14)
if menu == 2: