Skip to content

sudo command is not executed #100

Description

@Luciogi
    @user_is_root
    def nmap_os_detection(self, target, arg="-O", args=None):  # requires root
        """
        nmap -oX - nmmapper.com -O
        NOTE: Requires root
        """
        xml_root = self.scan_command(target=target, arg=arg, args=args)
        results = self.parser.os_identifier_parser(xml_root)
        return results

@user_is_root exits control before scan_command(...) is executed (which run sudo nmap ...)

And

return self.default_args.format(nmap=self.nmaptool, outarg="-oX")

should be as

return self.default_args.format(nmap="sudo "+self.nmaptool, outarg="-oX")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions