from common.subregion_descriptor import SubRegionDescriptor from common.subregion_image import generate_sub_region_image from common.ifwi import IFWI_IMAGE from common.firmware_volume import FirmwareDevice from common.siip_constants import IP_OPTIONS from common.tools_path import FMMT, GENFV, GENFFS, GENSEC, LZCOMPRESS, TOOLS_DIR from common.tools_path import RSA_HELPER, FMMT_CFG from common.siip_constants import VERSION as __version__ from common.banner import banner import common.logging as logging __prog__ = "siip_stitch" TOOLNAME = "SIIP Stitching Tool" banner(TOOLNAME, __version__) logger = logging.getLogger("siip_stitch") if sys.version_info < (3, 6): raise Exception("Python 3.6 is the minimal version required") GUID_FVADVANCED = uuid.UUID("B23E7388-9953-45C7-9201-0473DDE5487A") GUID_FVSECURITY = uuid.UUID("5A9A8B4E-149A-4CB2-BDC7-C8D62DE2C8CF") GUID_FVOSBOOT = uuid.UUID("13BF8810-75FD-4B1A-91E6-E16C4201F80A") def search_for_fv(inputfile, ipname): """Search for the firmware volume.""" # use to find the name of the firmware to locate the firmware volume
HEADERS = { 'User-Agent': random_UserAgent(), 'Content-type' : '*/*', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': 'en-US,en;q=0.5', 'Connection': 'keep-alive', } warnings.filterwarnings( action="ignore", message=".*was already imported", category=UserWarning) warnings.filterwarnings(action="ignore", category=DeprecationWarning) # cleaning screen banner() def parser_error(errmsg): print("Usage: python " + sys.argv[0] + " [Options] use -h for help") print(R + "Error: " + errmsg + W) sys.exit() def parse_args(): parser = argparse.ArgumentParser( epilog='\tExample: \r\npython ' + sys.argv[0] + " -u google.com") parser.error = parser_error parser._optionals.title = "\nOPTIONS" parser.add_argument('-u', '--url', help="url target to scan") parser.add_argument( '-D', '--dorks', help='search webs with dorks', dest='dorks', type=str)
def parser_error(errmsg): banner() print("Usage: python " + sys.argv[0] + " [Options] use -h for help") print(R + "Error: " + errmsg + W) sys.exit()