def add_url(self, url, timeout=0, package="", options="", priority=1, custom="", owner="", machine="", platform="", tags=None, memory=False, enforce_timeout=False, clock=None): """Add a task to database from url. @param url: url. @param timeout: selected timeout. @param options: analysis options. @param priority: analysis priority. @param custom: custom options. @param owner: task owner. @param machine: selected machine. @param platform: platform. @param tags: tags for machine selection @param memory: toggle full memory dump. @param enforce_timeout: toggle full timeout execution. @param clock: virtual machine clock time @return: cursor or None. """ # Convert empty strings and None values to a valid int if not timeout: timeout = 0 if not priority: priority = 1 return self.add(URL(url), timeout, package, options, priority, custom, owner, machine, platform, tags, memory, enforce_timeout, clock)
def add_url(self, url, timeout=0, package="", options="", priority=1, custom="", machine="", platform="", memory=False, enforce_timeout=False): """Add a task to database from url. @param url: url. @param timeout: selected timeout. @param options: analysis options. @param priority: analysis priority. @param custom: custom options. @param machine: selected machine. @param platform: platform. @param memory: toggle full memory dump. @param enforce_timeout: toggle full timeout execution. @return: cursor or None. """ return self.add(URL(url), timeout, package, options, priority, custom, machine, platform, memory, enforce_timeout)