Skip to content

Commit

Permalink
add new config option and ignore for update all
Browse files Browse the repository at this point in the history
  • Loading branch information
David Kennedy committed Jan 29, 2018
1 parent 80c7e7f commit 8c3ef46
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 37 deletions.
3 changes: 3 additions & 0 deletions config/ptf.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ IGNORE_THESE_MODULES=""

### This will only install specific modules that are specified here - example: modules/exploitation/metasploit,modules/exploitation/set. You can also do entire directories by doing /modules/code-audit/*
INCLUDE_ONLY_THESE_MODULES=""

### Ignore these modules when installing install_update_all by default. These are usually applications that are either large in nature, open ports, or install things (like TOR). This will only be an issue when you run install_update_all, you can still install these manually.
IGNORE_UPDATE_ALL_MODULES="modules/pivoting/iodine,modules/exploitation/kingphisher,modules/av-bypass/veil-framework,modules/av-bypass/shellter,modules/exploitation/fuzzbunch"
35 changes: 0 additions & 35 deletions modules/exploitation/eternalblue-doublepulsar-metasploit.py

This file was deleted.

7 changes: 7 additions & 0 deletions readme/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
~~~~~~~~~~~~~~~~~
version 1.18
~~~~~~~~~~~~~~~~~

* added a new config option IGNORE_UPDATE_ALL_MODULES in the ptf.config. This is used for applications that may require user interaction, require substantial amounts of load time, or install items that may open services or ports on the system (such as TOR).
* removed modules/exploitation/eternalblue-doublepulsar-metasploit as exploit is in Metasploit

~~~~~~~~~~~~~~~~~
version 1.17
~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion src/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def count_modules():
return counter

# version information
grab_version = "1.17"
grab_version = "1.18"

# banner
banner = bcolors.RED + r"""
Expand Down
21 changes: 20 additions & 1 deletion src/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@
For a list of available commands type ? or help
""")

"""
This will ignore specific modules upon install_update_all - noisy installation ones. Can still be installed manually and updated that way.
"""

ignore_update_these = []
if check_config("IGNORE_UPDATE_ALL_MODULES") is not None:
ignore_update_these = check_config("IGNORE_UPDATE_ALL_MODULES").split(",")

def ignore_update_all_module(module):
result = False
for check in ignore_update_these:
if "/*" in check:
if check[:-1] in module:
result = True
else:
if (os.getcwd() + "/" + check + ".py") == module:
result = True
return result

ignore_these = []
if check_config("IGNORE_THESE_MODULES") is not None:
ignore_these = check_config("IGNORE_THESE_MODULES").split(",")
Expand Down Expand Up @@ -598,7 +617,7 @@ def handle_prompt(prompt, force=False):
# join the structure
filename = os.path.join(path, name)
# strip un-needed files
if not "__init__.py" in filename and not ignore_module(filename) and include_module(filename) and ".py" in filename and not ".pyc" in filename:
if not "__init__.py" in filename and not ignore_module(filename) and include_module(filename) and ".py" in filename and not ".pyc" in filename and not ignore_update_all_module(filename):
print("!!!***!!!installing deps for module: " + filename)
# shorten it up a little bit
filename_short = filename.replace(
Expand Down

0 comments on commit 8c3ef46

Please sign in to comment.