social-engineer-toolkit/seupdate

36 lines
1,013 B
Text
Raw Normal View History

2015-07-29 02:24:53 +00:00
#!/usr/bin/env python
# coding=utf-8
2012-12-31 22:11:37 +00:00
#
2016-06-25 21:17:20 +00:00
# simple git update for set pulling from core modules
2012-12-31 22:11:37 +00:00
#
2013-04-15 14:26:00 +00:00
import os
2012-12-31 22:11:37 +00:00
import sys
2013-04-15 14:26:00 +00:00
2016-07-22 16:52:36 +00:00
2013-04-15 14:26:00 +00:00
# check where we are and load default directory
2023-01-08 23:49:41 +00:00
if os.path.isdir("/usr/local/share/setoolkit"):
2013-04-15 14:26:00 +00:00
if not os.path.isfile("se-toolkit"):
2023-01-08 23:49:41 +00:00
os.chdir("/usr/local/share/setoolkit")
sys.path.append("/usr/local/share/setoolkit")
2013-04-15 14:26:00 +00:00
import src.core.setcore as core
2013-04-15 14:26:00 +00:00
# if we can't see our config then something didn't go good..
2015-07-13 21:29:42 +00:00
if not os.path.isfile("/etc/setoolkit/set.config"):
2016-07-22 16:52:36 +00:00
core.print_error("Cannot locate SET executable. Try running from the local directory.")
core.print_error("If this does not work, please run the setup.py install file.")
2013-04-15 14:26:00 +00:00
sys.exit()
2012-12-31 22:11:37 +00:00
try:
# pull update set from the core libraries
core.update_set()
2012-12-31 22:11:37 +00:00
# except keyboard interrupts
except KeyboardInterrupt:
2016-01-14 20:52:38 +00:00
print("\n[!] Control-C detected. Exiting updating SET.")
2012-12-31 22:11:37 +00:00
# handle all other errors
2016-01-14 20:52:38 +00:00
except Exception as e:
2016-07-28 23:16:24 +00:00
print("\n[!] Something went wrong.. Printing the error: {0}".format(e))