MCPcopy
hub / github.com/NullArray/AutoSploit / download_modules

Function download_modules

lib/settings.py:457–477  ·  view source on GitHub ↗

download new module links

(link)

Source from the content-addressed store, hash-verified

455
456
457def download_modules(link):
458 """
459 download new module links
460 """
461 import re
462 import requests
463 import tempfile
464
465 lib.output.info('downloading: {}'.format(link))
466 retval = ""
467 req = requests.get(link)
468 content = req.content
469 split_data = content.split(" ")
470 searcher = re.compile("exploit/\w+/\w+")
471 storage_file = tempfile.NamedTemporaryFile(delete=False)
472 for item in split_data:
473 if searcher.search(item) is not None:
474 retval += item + "\n"
475 with open(storage_file.name, 'a+') as tmp:
476 tmp.write(retval)
477 return storage_file.name
478
479
480def find_similar(command, internal, external):

Callers

nothing calls this directly

Calls 1

searchMethod · 0.45

Tested by

no test coverage detected