Example #1
0
                'PluginType': PluginType,
                'OnlyPlugins': OnlyPlugins,
                'ExceptPlugins': ExceptPlugins,
                'InboundProxy': InboundProxy,
                'OutboundProxy': OutboundProxy,
                'Profiles': Profiles,
                'Algorithm': Algorithm,
                'PluginGroup': PluginGroup,
                'Args': Args
        }):  # Only if Start is for real (i.e. not just listing plugins, etc)
            Core.Finish("Complete")  # Not Interrupted or Crashed
    except KeyboardInterrupt:  # NOTE: The user chose to interact, so no need to check if interactivity was chosen or not here:
        cprint(
            "\nowtf was aborted by the user: Please check the report and plugin output files for partial results"
        )
        Core.Finish(
            "Aborted by user"
        )  # Interrupted. Must save the DB to disk, finish report, etc
    except SystemExit:
        pass  # Report already saved, framework tries to exit
    except:
        Core.Error.Add("Unknown owtf error")
        Core.Finish(
            "Crashed"
        )  # Interrupted. Must save the DB to disk, finish report, etc

Banner()
Core = core.Init(RootDir)  # Initialise Framework
print "OWTF Version: " + Core.Config.Get('VERSION') + "\n"
ProcessOptions(sys.argv[1:], Core)
Example #2
0
        # Interrupted. Must save the DB to disk, finish report, etc
        Core.Finish("Aborted by user")
    except SystemExit:
        pass  # Report already saved, framework tries to exit
    except:
        Core.Error.Add("Unknown owtf error")
        # Interrupted. Must save the DB to disk, finish report, etc
        Core.Finish("Crashed")
    finally:  # Needed to rename the temp storage dirs to avoid confusion
        Core.CleanTempStorageDirs(Core.Config.OwtfPid)


if __name__ == "__main__":
    Banner()
    if not "--update" in sys.argv[1:]:
        Core = core.Init(RootDir, OwtfPid)  # Initialise Framework
        print("OWTF Version: %s, Release: %s " %
              (Core.Config.Get('VERSION'), Core.Config.Get('RELEASE')),
              end='\n' * 2)
        args = ProcessOptions(Core, sys.argv[1:])
        run_owtf(Core, args)
    else:
        # First confirming that --update flag is present in args and then
        # creating a different parser for parsing the args.
        try:
            Arg = GetArgsForUpdate(sys.argv[1:])
        except Exception as e:
            Usage("Invalid OWTF option(s) " + e)
        # Updater class is imported
        UpdaterObj = update.Updater(RootDir)
        # If outbound proxy is set, those values are added to Updater Object
Example #3
0
        cprint("Please check report/plugin output files for partial results")
        # Interrupted. Must save the DB to disk, finish report, etc.
        core.Finish("Aborted by user")
    except SystemExit:
        pass  # Report already saved, framework tries to exit.
    finally:  # Needed to rename the temp storage dirs to avoid confusion.
        core.clean_temp_storage_dirs()

if __name__ == "__main__":
    banner()

    # Get tool path from script path:
    root_dir = os.path.dirname(os.path.abspath(sys.argv[0])) or '.'
    owtf_pid = os.getpid()
    if not "--update" in sys.argv[1:]:
        core = core.Init(root_dir, owtf_pid)  # Initialise Framework.
        logging.warn(
            "OWTF Version: %s, Release: %s " % (
                core.Config.FrameworkConfigGet('VERSION'),
                core.Config.FrameworkConfigGet('RELEASE'))
            )
        args = process_options(core, sys.argv[1:])
        run_owtf(core, args)
    else:
        # First confirming that --update flag is present in args and then
        # creating a different parser for parsing the args.
        try:
            arg = get_args_for_update(sys.argv[1:])
        except Exception as e:
            usage("Invalid OWTF option(s) " + e)
        # Updater class is imported