()
| 134 | |
| 135 | |
| 136 | def show_module(): |
| 137 | modules_path = os.getcwd() + "/modules/" |
| 138 | print ("\n") |
| 139 | print((bcolors.BOLD + "The PenTesters Framework Modules" + bcolors.ENDC)) |
| 140 | print(("""================================= |
| 141 | |
| 142 | """) + (bcolors.BOLD) + ("""Name Description """) + (bcolors.ENDC) + (""" |
| 143 | ---- --------------- |
| 144 | """)) |
| 145 | |
| 146 | print ( |
| 147 | " modules/install_update_all This will install or update all tools with modules within PTF") |
| 148 | print ( |
| 149 | " modules/update_installed This will update all installed tools within PTF") |
| 150 | for path, subdirs, files in os.walk(modules_path): |
| 151 | for name in sorted(files): |
| 152 | # join the structure |
| 153 | filename = os.path.join(path, name) |
| 154 | # strip un-needed files |
| 155 | if not name in ('__init__.py', 'install_update_all.py', 'update_installed.py'): |
| 156 | # shorten it up a little bit |
| 157 | filename_short = filename.replace(os.getcwd() + "/", "") |
| 158 | filename_short = filename_short.replace(".py", "") |
| 159 | filename_short = filename_short.replace(".txt", "") |
| 160 | filename_short = str(filename_short) |
| 161 | description = module_parser(filename, "DESCRIPTION") |
| 162 | # print the module name |
| 163 | if description != None: |
| 164 | temp_number = 53 - len(filename_short) |
| 165 | print(" " + filename_short + " " * temp_number + description) |
| 166 | print("\n") |
| 167 | |
| 168 | def show_new_modules(): |
| 169 | modules_path = os.getcwd() + "/modules/" |
no test coverage detected