Esempio n. 1
0
def reinit(args):
    if (args.force):
        s = scanner.thread()
        s.invokeReinit()
    else:
        conf = input("Reinitialize database? (ALL DATA WILL BE LOST) [Y/n]: ")
        if conf == 'Y' or conf == 'y':
            s = scanner.thread()
            s.invokeReinit()
Esempio n. 2
0
def imgdel(args):
    if args.force or (
            input("Delete image? (THIS CANNOT BE UNDONE!) [Y/n]: ").lower()
            == 'y'):
        s = scanner.thread()
        id = s.db.getImageIdFromName(args.name)
        s.db.deleteImage(id)
Esempio n. 3
0
def scan(args):

    # Check to get all information
    if not args.force:
        if args.name == None:
            args.name = input("Image Name: ")
        if args.manufacturer == None:
            args.manufacturer = input("Manufacturer: ")
        if args.date == None:
            args.date = datetime.strptime(input("Date (YYYY-MM-DD): "),
                                          '%Y-%m-%d')

    s = scanner.thread()
    s.scanImage(args.path, args.manufacturer, args.date, args.name,
                args.no_progress, args.keep_dir)
Esempio n. 4
0
def imglist(args):
    s = scanner.thread()
    s.db.imageList()
Esempio n. 5
0
def imgresult(args):
    s = scanner.thread()
    id = s.db.getImageIdFromName(args.name)
    s.db.imageSummary(id)
    s.db.detectionSummary(id)
Esempio n. 6
0
def listfunctions(args):
    s = scanner.thread()
    s.db.functionList()
Esempio n. 7
0
def addfunction(args):
    s = scanner.thread()
    s.db.addVulnFunction(args.name, args.description)