Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Module: Nmap XML Output #1971

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open

New Module: Nmap XML Output #1971

wants to merge 7 commits into from

Conversation

TheTechromancer
Copy link
Collaborator

@TheTechromancer TheTechromancer commented Nov 17, 2024

Adds a new Nmap XML output module.

Aggregates:

  • IP_ADDRESS
  • DNS_NAME
  • OPEN_TCP_PORT
  • PROTOCOL

Example output:

<!DOCTYPE nmaprun>
<nmaprun scanner="bbot" args="/home/bls/.cache/pypoetry/virtualenvs/bbot-yxGMlPK5-py3.12/bin/pytest -s -vv -k test_module_nmap_xml" start="1731819433" startstr="Sat Nov 16 23:57:13 2024" version="v0.0.0" xmloutputversion="1.05">
  <scaninfo type="syn" protocol="tcp" numservices="2" services="80,443"/>
  <host>
    <status state="up" reason="user-set" reason_ttl="0"/>
    <address addr="127.0.0.1" addrtype="ipv4"/>
    <hostnames>
      <hostname name="blacklanternsecurity.com" type="user"/>
      <hostname name="www.blacklanternsecurity.com" type="user"/>
    </hostnames>
    <ports>
      <port protocol="tcp" portid="80">
        <state state="open" reason="syn-ack" reason_ttl="0"/>
        <service name="http" method="probed" conf="10" product="Apache" extrainfo="Apache"/>
      </port>
      <port protocol="tcp" portid="443">
        <state state="open" reason="syn-ack" reason_ttl="0"/>
        <service name="https" method="probed" conf="10"/>
      </port>
    </ports>
  </host>
  <runstats>
    <finished time="1731819434.402986" timestr="Sat Nov 16 23:57:14 2024" summary="BBOT done at Sat Nov 16 23:57:14 2024; 3 scanned in 0:00:00.938966 seconds" elapsed="0.938966" exit="success"/>
    <hosts up="1" down="0" total="1"/>
  </runstats>
</nmaprun>

Addresses #1958.

Also adds a CLI flag to list output modules.

Copy link

codecov bot commented Nov 17, 2024

Codecov Report

Attention: Patch coverage is 95.43147% with 9 lines in your changes missing coverage. Please review.

Project coverage is 93%. Comparing base (3fed97e) to head (cb1b967).
Report is 2 commits behind head on dev.

Files with missing lines Patch % Lines
bbot/modules/output/nmap_xml.py 92% 9 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             dev   #1971    +/-   ##
======================================
+ Coverage     93%     93%    +1%     
======================================
  Files        370     372     +2     
  Lines      28312   28489   +177     
======================================
+ Hits       26133   26301   +168     
- Misses      2179    2188     +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant