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

Merged
merged 14 commits into from
Dec 5, 2024
Merged

New Module: Nmap XML Output #1971

merged 14 commits into from
Dec 5, 2024

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.40816% with 9 lines in your changes missing coverage. Please review.

Project coverage is 93%. Comparing base (963acd4) to head (4d08937).
Report is 20 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        374     376     +2     
  Lines      28493   28674   +181     
======================================
+ Hits       26294   26464   +170     
- Misses      2199    2210    +11     

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

@TheTechromancer TheTechromancer merged commit 4d18c8c into dev Dec 5, 2024
13 of 14 checks passed
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.

2 participants