Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
02932c3
Fixed a markdown link.
postmodern Aug 26, 2021
22b295e
Improve the readability of usage and help.
postmodern Aug 26, 2021
3311b46
Add a usage string describing the format of the command.
postmodern Aug 26, 2021
3fcf2af
Fixed grammar error.
postmodern Aug 26, 2021
e626941
Correct the formatting of the usage string in the man page.
postmodern Aug 26, 2021
d044229
Fixed a pre-existing typo.
postmodern Aug 26, 2021
ac1ceb5
Markdown fix.
postmodern Aug 26, 2021
bc7277a
Use UPPERCASE names for option values.
postmodern Aug 26, 2021
e568b6d
Also include the usage: string in the --help output.
postmodern Aug 26, 2021
9a523ed
Add missing argument NAMEs to certain options.
postmodern Aug 28, 2021
bf7770f
Removed a duplicate list entry for ssh2.
postmodern Aug 28, 2021
e166f23
Fix build on FreeBSD/powerpc64*
pkubaj Sep 9, 2021
666d817
Split VNC output (vnc/vnc-info) to mimic Nmap behavior
p-l- Sep 5, 2016
dd04d9c
Support UDP banner
p-l- Oct 28, 2016
aba7ff7
Add ports for WSUS
p-l- Jan 20, 2017
8ec0f52
Add AT&T box ssl service
p-l- Sep 5, 2017
be134c8
Change default User-Agent
p-l- Feb 17, 2018
616c902
transmit_thread wait to make sure receive_thread is ready
p-l- Apr 17, 2018
45ec257
Support for protocol ISAKMP (UDP/500)
p-l- Apr 20, 2018
e6ee36b
smb: log boottime
p-l- Apr 23, 2019
36c2931
Raise max collected banner length to 8192
p-l- Apr 25, 2019
1160d9e
ssh: get cipher suites & keys
Aug 21, 2018
7b3b59c
X509: use separate entries for server cert and trust chain certs
p-l- Mar 3, 2020
d0945f2
telnet: output raw chars so that IVRE can use Nmap fingerprints
p-l- Mar 11, 2020
82f81be
Add probes for X11 and Java RMI
p-l- Mar 20, 2020
83f0fdc
Add probes for MongoDB & Kerberos
p-l- Mar 25, 2020
fc88c05
Add a DICOM probe from Nmap script dicom-ping
p-l- Mar 27, 2020
b3eb7bf
Add an LDAP probe
p-l- Mar 28, 2020
79504a9
Add a SIP probe
p-l- Mar 28, 2020
ec4b952
Add an RTSP probe
p-l- Mar 31, 2020
764cf10
Add an RPC probe
p-l- Mar 31, 2020
1a3b4f2
Add a DNS probe
p-l- Apr 22, 2020
80c2162
Add a Docker probe
p-l- Oct 6, 2020
fda7620
Add a Redis probe
p-l- Oct 6, 2020
faf52f0
Add a NotesRPC probe
p-l- Oct 14, 2020
b5ad10b
Add a Microsoft SQL Server probe
p-l- Dec 14, 2020
e50fe98
Add an AFP probe
p-l- Feb 22, 2021
56c30d4
Update masscan.8.markdown
navarroaxel Oct 13, 2021
a27fbc9
Update masscan.8
navarroaxel Oct 13, 2021
84b63b1
Fix typos in doc/faq
myersg86 Jan 15, 2022
39c17da
fix udp payload data messy probelem
adfnekc Apr 14, 2022
aabbb26
fix payloads_datagram_add add err when p->port == payloads->list[j]->…
adfnekc Apr 15, 2022
8bc9aa4
Update TLS client-hello packet for wider acceptance
mikehardenize May 27, 2022
abd6d44
fix FreeBSD aarch64 build issue
taguchi-ch Aug 11, 2022
e136dd6
Add multiple possible values for syn-cookies
Frky Aug 18, 2022
c47842d
Add SSL 1.2 banner
Frky Aug 18, 2022
acf310b
PROTO-MC: Add support for Minecraft's protocol.
Mr-Bossman Jul 19, 2022
39bf354
Fix bug in --echo for IPv6 ranges
Frky Oct 26, 2022
94c9c79
Handle IPv6 CIDR with --echo between /0 and /63
Frky Oct 26, 2022
e644ad8
Add support for redis auth
Nightsuki Dec 5, 2022
b94ce8f
Fix printing SNMP Integer varbind into banner
WojciechMigda Feb 3, 2023
79b4c81
agpl-3.0-only
TechnologyClassroom Feb 16, 2023
b2721a1
Add an iteration over next protocols in case one fails
Frky Aug 18, 2022
94c0107
Support for --tcpmss to explicitly set MSS in TCP packet template; fo…
mzpqnxow Jan 17, 2022
d15f613
Fix bug in --echo for IPv6 ranges
Frky Oct 26, 2022
b87427c
Handle IPv6 CIDR with --echo between /0 and /63
Frky Oct 26, 2022
f08c0c8
Add an option in masscan to output the ordered list of CIDR ranges (#2)
Frky Dec 6, 2022
b512182
Fix increment and start initialization in TX thread
WojciechMigda Mar 21, 2023
4d69acf
Run unit tests on Github Actions
gpotter2 Apr 5, 2023
4a2c88d
Fixed documentation for `--retries`
postmodern Apr 20, 2023
3b9d262
Update exclude.conf
0elek Jun 3, 2023
10fb6b8
Add an option in masscan to output the ordered list of CIDR ranges to…
Aug 9, 2023
43c84d6
Fix when range does not start with the biggest CIDR (e.g. 0.0.0.1 - 0…
Aug 9, 2023
f1f8478
Add comments for count_cidr_bits to help the reader
Aug 9, 2023
0ba7561
Add the support of IPv6 ranges
Aug 9, 2023
c5d11a5
Add a fork-specific part to the README
p-l- Aug 12, 2023
2e02e76
Merge pull request #5 from robertdavidgraham/master
p-l- Aug 12, 2023
5b644c9
Run unit tests on Github Actions
gpotter2 Apr 5, 2023
bf08ea4
Tests: fix Telnet selftest
p-l- May 12, 2023
b5e049f
Tests: fix count_cidr_bits() selftest (I have no idea what I'm doing)
p-l- May 12, 2023
022e830
Merge pull request #6 from p-l-/github-actions
p-l- Aug 12, 2023
b75028a
README: add badges
p-l- Aug 12, 2023
3af1601
Merge pull request #7 from p-l-/readme-add-badges
p-l- Aug 12, 2023
f1c6c31
Update stub-pcap.c to support centos 7
CaledoniaProject Oct 17, 2023
5d1136b
Merge pull request #4 from robertdavidgraham/master
mzpqnxow Oct 19, 2023
a44521f
Fix for #737
mzpqnxow Oct 19, 2023
561cd1d
Save or echo --adapter-port/--source-port value or range
mzpqnxow Oct 19, 2023
29877c0
Merge pull request #738 from mzpqnxow/echo-adapter-port
robertdavidgraham Nov 1, 2023
56b66ac
Merge pull request #736 from CaledoniaProject/patch-1
robertdavidgraham Nov 1, 2023
aaab273
Merge pull request #720 from 0elek/patch-1
robertdavidgraham Nov 1, 2023
d2b4abb
Merge pull request #716 from postmodern/patch-1
robertdavidgraham Nov 1, 2023
521e2c6
Merge pull request #713 from gpotter2/ut
robertdavidgraham Nov 1, 2023
606563e
Merge pull request #711 from WojciechMigda/FIX-scan-start-increment
robertdavidgraham Nov 1, 2023
01fbafc
Merge pull request #708 from TechnologyClassroom/agpl-3.0-only
robertdavidgraham Nov 1, 2023
731a485
Merge pull request #705 from WojciechMigda/FIX-snmp-integer-varbind
robertdavidgraham Nov 1, 2023
66ca4df
Merge pull request #699 from Nightsuki/master
robertdavidgraham Nov 1, 2023
6bd2af0
Merge pull request #691 from Frky/fix-echo-ip6
robertdavidgraham Nov 1, 2023
c206346
Merge pull request #679 from taguchi-ch/proto
robertdavidgraham Nov 1, 2023
5ad190d
Merge pull request #668 from hardenize/tls-client-hello-update
robertdavidgraham Nov 1, 2023
7397d80
Merge pull request #663 from adfnekc/master
robertdavidgraham Nov 1, 2023
dbf2517
Merge pull request #645 from myersg86/master
robertdavidgraham Nov 1, 2023
3bae7bd
Merge pull request #629 from navarroaxel/patch-1
robertdavidgraham Nov 1, 2023
6b898e5
Merge pull request #676 from Mr-Bossman/merge-V1
robertdavidgraham Nov 1, 2023
98ee0a6
Merge branch 'master' into patch-1
robertdavidgraham Nov 1, 2023
16604e3
Merge pull request #618 from postmodern/remove_duplicate_list_entry
robertdavidgraham Nov 1, 2023
b1abb7a
Merge pull request #615 from postmodern/include_usage_string_in_help
robertdavidgraham Nov 1, 2023
edbc47b
Merge branch 'master' into manpage_improvements
robertdavidgraham Nov 1, 2023
f3d0bd9
temp fix for count_cidr4_bits()
robertdavidgraham Nov 1, 2023
baf0515
changed extracting CIDR ranges from larger range
robertdavidgraham Nov 2, 2023
51d8887
Merge pull request #619 from pkubaj/patch-1
robertdavidgraham Nov 2, 2023
b382741
Merge pull request #613 from postmodern/manpage_improvements
robertdavidgraham Nov 2, 2023
5bae1f1
Merge pull request #609 from postmodern/improved_usage_and_help_reada…
robertdavidgraham Nov 2, 2023
f7a1cbe
Merge branch 'master' into improved_usage_string
robertdavidgraham Nov 2, 2023
f2b7d1e
timing selftest change
robertdavidgraham Nov 2, 2023
f3c2790
Merge pull request #608 from postmodern/improved_usage_string
robertdavidgraham Nov 2, 2023
99d6a75
Merge pull request #607 from postmodern/markdown_fix
robertdavidgraham Nov 2, 2023
8196cdd
cleaned up warnings
robertdavidgraham Nov 2, 2023
f2227b4
Merge branch 'master' of https://github.com/robertdavidgraham/masscan
robertdavidgraham Nov 2, 2023
729f75f
comments
robertdavidgraham Nov 2, 2023
882391e
Merge pull request #11 from p-l-/upstream
p-l- Nov 2, 2023
5deb003
fixes #739 making UDP --top-ports work, but only around 20 ports real…
robertdavidgraham Nov 5, 2023
66c5159
fixes #730
robertdavidgraham Nov 5, 2023
4f89257
Can set TCP header options on command line, --tcpmss, --tcpsackon, --…
robertdavidgraham Nov 8, 2023
b95a0d7
temporary removal of selftest
robertdavidgraham Nov 8, 2023
cc88226
renamed crypto files to make clear they are in the same class
robertdavidgraham Nov 8, 2023
ec509fb
fixed VS10 build
robertdavidgraham Nov 8, 2023
dd2a1f2
fixed bug from last fix
robertdavidgraham Nov 8, 2023
0638002
Update README.md
robertdavidgraham Nov 8, 2023
92be0e0
removed malloc.h
robertdavidgraham Nov 8, 2023
3f70f7c
Update README.md
robertdavidgraham Nov 8, 2023
a9dc8e4
bounds-checking versions of memmmove() and memset() for how they are …
robertdavidgraham Nov 8, 2023
687d1ef
Merge branch 'master' of https://github.com/robertdavidgraham/masscan
robertdavidgraham Nov 8, 2023
e35e817
avoid merge conflicts
robertdavidgraham Nov 9, 2023
0d0c88f
more temp reversions
robertdavidgraham Nov 9, 2023
7aa740d
Merge pull request #740 from ivre/master
robertdavidgraham Nov 9, 2023
19cc149
RECONNECT feature for TCP, so that multiple banners can be collected …
robertdavidgraham Nov 10, 2023
ab952a7
redid sending TCP data
robertdavidgraham Nov 10, 2023
69c80c6
stack renaming
robertdavidgraham Nov 11, 2023
681ae43
FIN-WAIT-1
robertdavidgraham Nov 11, 2023
48bbcd7
CLOSE-WAIT and LAST-ACK states
robertdavidgraham Nov 12, 2023
0e0fc1d
split stack-tcp-app.c
robertdavidgraham Nov 13, 2023
f732ded
split stack-tcp-app.c
robertdavidgraham Nov 13, 2023
c7801f1
tcp-app fixes, and errmsg
robertdavidgraham Nov 13, 2023
9adf62a
Update README.md
robertdavidgraham Nov 13, 2023
963af1b
tcp.state bugs fixed
robertdavidgraham Nov 14, 2023
25da986
cosmetic fixes
robertdavidgraham Nov 16, 2023
9cd6a29
Merge pull request #741 from robertdavidgraham/master
robertdavidgraham Nov 16, 2023
b246710
Merge pull request #742 from robertdavidgraham/integration
robertdavidgraham Nov 16, 2023
64b7d6b
VNC protocol ID quick fix
robertdavidgraham Nov 16, 2023
53e50d5
Merge branch 'integration' of https://github.com/robertdavidgraham/ma…
robertdavidgraham Nov 16, 2023
87a363d
Merge pull request #743 from robertdavidgraham/integration
robertdavidgraham Nov 16, 2023
122c0ee
added --rawudp, prints raw UDP regardless of other banners printed fo…
robertdavidgraham Nov 16, 2023
2a547f7
Merge pull request #744 from robertdavidgraham/integration
robertdavidgraham Nov 16, 2023
cc40823
Windows cleanup
robertdavidgraham Nov 16, 2023
0e9f811
cleaned up portability for MingGW compiles
robertdavidgraham Nov 16, 2023
e5c501e
cleanup for mingw portability
robertdavidgraham Nov 16, 2023
09ff4df
Possible fix for issue #734, fixing MinGW problems on Windows
robertdavidgraham Nov 17, 2023
017e8a0
Merge pull request #745 from robertdavidgraham/integration
robertdavidgraham Nov 17, 2023
309d021
ISAKMP parser
robertdavidgraham Dec 3, 2023
082c8ed
Merge pull request #747 from robertdavidgraham/integration
robertdavidgraham Dec 3, 2023
3ac323a
extract
robertdavidgraham Dec 3, 2023
dfd2001
Merge pull request #748 from robertdavidgraham/integration
robertdavidgraham Dec 3, 2023
e35c930
Fixed 'expeced' typo
acidvegas Feb 22, 2024
be1620d
Update main-initadapter.c
vomw Aug 7, 2024
764a9fb
add suite of ipv6 formatting tests, related to #796
mzpqnxow Sep 19, 2024
331b562
add suite of ipv6 formatting tests, related to #796
mzpqnxow Sep 19, 2024
a31feaf
Merge pull request #801 from mzpqnxow/ipv6-tests
p-l- Dec 13, 2024
cc23d6d
Distinguish ipv4 and ipv6 in XML output
Cr4ckC4t Dec 15, 2024
605f9ab
Update out-text.c
rafa-br34 Jan 25, 2025
b47d608
Improved fflush placement
rafa-br34 Jan 25, 2025
30b4044
"bad cookie" warning are inconsistent
gpotter2 Mar 7, 2025
c4e1c0a
Fix segmentation fault in banout_vprintf
gpotter2 Mar 7, 2025
4d3bec0
fix: IPv4 source range selection
prepaser May 14, 2025
b99d433
Merge pull request #820 from gpotter2/patch-2
p-l- Jun 5, 2025
d631623
main-initadapter: fix typo
pranjalkole Jul 8, 2025
feabaf8
fix: broken link
ajmeese7 Jul 12, 2025
11131a9
Clarify banner grabbing behavior in documentation
matejsmycka Nov 18, 2025
c34baeb
Merge pull request #834 from matejsmycka/add-info-to-docs
p-l- Mar 31, 2026
7d12826
Merge pull request #826 from ajmeese7/docs/pf-ring-install-fix
p-l- Mar 31, 2026
2be4093
Merge pull request #825 from pranjalkole/master
p-l- Mar 31, 2026
8c518c7
Merge pull request #822 from prepaser/fix-ipv4-source-range-selection
Frky Apr 17, 2026
b228476
Merge pull request #819 from gpotter2/patch-1
Frky Apr 17, 2026
8b77201
Merge pull request #794 from vomw/vomw-patch-1
Frky Apr 17, 2026
e743288
Merge pull request #765 from acidvegas/masscan-dev
Frky Apr 17, 2026
5953e5d
Add a function to get addrtype name in several locations
Apr 18, 2026
3ffde40
fix(proto/icmp): tiny errors with length handling
p-l- Apr 19, 2026
b26b4e7
Merge pull request #808 from Cr4ckC4t/master
Frky Apr 20, 2026
cbde2d2
Added --flush-stdout
rafa-br34 Apr 20, 2026
0bc8534
Merge pull request #843 from p-l-/fix-icmp-parsing
Frky Apr 20, 2026
eebf08c
Renamed --flush-stdout to --output-flush
rafa-br34 Apr 20, 2026
c4c2b91
Move is_output_flush from Masscan to OutputStuff
rafa-br34 Apr 21, 2026
c03e8e7
Moved is_output_flush
rafa-br34 Apr 21, 2026
c2d6bf4
fix(smb): prevent OoB read leading to segfault
p-l- Apr 23, 2026
85fae8d
Merge pull request #811 from rafa-br34/master
Frky Apr 23, 2026
94e118c
Merge pull request #844 from p-l-/fix-smb-segfault
Frky Apr 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: masscan unit tests

on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]

permissions:
contents: read

jobs:
regress:
name: Run regression tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout masscan
uses: actions/checkout@v3
- name: Install libpcap-dev
if: ${{ vars.RUNNER_OS == 'Linux' }}
run: sudo apt-get install -y libpcap-dev
- name: Run regression tests
run: make test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
paused.conf
.Makefile.swp
.vscode
vs10/.vs/
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

668 changes: 658 additions & 10 deletions LICENSE

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# If Windows, then assume the compiler is `gcc` for the
# MinGW environment. I can't figure out how to tell if it's
# actually MingGW. FIXME TODO
ifeq ($(OS),Windows_NT)
CC = gcc
endif

# Try to figure out the default compiler. I dont know the best
# way to do this with `gmake`. If you have better ideas, please
# submit a pull request on github.
Expand Down Expand Up @@ -55,7 +62,7 @@ endif
ifneq (, $(findstring mingw, $(SYS)))
INCLUDES = -Ivs10/include
LIBS = -L vs10/lib -lIPHLPAPI -lWs2_32
FLAGS2 = -march=i686
#FLAGS2 = -march=i686
endif

# Cygwin
Expand Down
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/robertdavidgraham/masscan.svg?branch=master)](https://travis-ci.org/robertdavidgraham/masscan.svg)
[![unittests](https://github.com/robertdavidgraham/masscan/actions/workflows/unittests.yml/badge.svg?branch=master)](https://github.com/robertdavidgraham/masscan/actions/workflows/unittests.yml/?branch=master)

# MASSCAN: Mass IP port scanner

Expand Down Expand Up @@ -152,11 +152,11 @@ On FreeBSD and older MacOS, use an `ipfw` command:
On newer MacOS and OpenBSD, use the `pf` packet-filter utility.
Edit the file `/etc/pf.conf` to add a line like the following:

block in proto tcp from any to any port 40000
block in proto tcp from any to any port 40000:40015

Then to enable the firewall, run the command:

# pfctrl -E
# pfctl -E

If the firewall is already running, then either reboot or reload the rules
with the following command:
Expand Down Expand Up @@ -504,7 +504,7 @@ probably faster than you want anyway.
A bounty is offered for vulnerabilities, see the VULNINFO.md file for more
information.

This project uses safe functions like `strcpy_s()` instead of unsafe functions
This project uses safe functions like `safe_strcpy()` instead of unsafe functions
like `strcpy()`.

This project has automated unit regression tests (`make regress`).
Expand Down Expand Up @@ -545,7 +545,7 @@ network needs to be able to route IPv6 packets.
## PF_RING

To get beyond 2 million packets/second, you need an Intel 10-gbps Ethernet
adapter and a special driver known as ["PF_RING ZC" from ntop](http://www.ntop.org/products/packet-capture/pf_ring/pf_ring-zc-zero-copy/). Masscan doesn't need to be rebuilt in order to use PF_RING. To use PF_RING,
adapter and a special driver known as ["PF_RING ZC" from ntop](https://www.ntop.org/installation-guide-for-pf_ring/). Masscan doesn't need to be rebuilt in order to use PF_RING. To use PF_RING,
you need to build the following components:

* `libpfring.so` (installed in /usr/lib/libpfring.so)
Expand Down Expand Up @@ -599,3 +599,19 @@ at which they perform this calculation, making `masscan` much faster.
This tool created by Robert Graham:
email: robert_david_graham@yahoo.com
twitter: @ErrataRob

# License

Copyright (c) 2013 Robert David Graham

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
2 changes: 1 addition & 1 deletion data/exclude.conf
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
#organization scan our network at all.
#
#If you fail to do that we will block whole traffic from ASN 10439, and we
#will fail a police report after that.
#will file a police report after that.
#
#Let me know when you stop, since we still receive the attack from you, and
#by the way your scan are not going anywhere, it's was dropped from our edge
Expand Down
4 changes: 2 additions & 2 deletions doc/faq/FAQ0001-slow.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ The speed is determined by the operating system. The amount of CPU used by `mass
itself is insignificant.

My theory is various configuration options within the operating system that can make
packet tranmission very slow. Simple features that would not otherwise impact network
packet transmission very slow. Simple features that would not otherwise impact network
stacks that run at lower rates become really important at high rates.

One way around this is to install `PF_RING` and decidate a network adapter to packet
One way around this is to install `PF_RING` and dedicate a network adapter to packet
transmission completely bypassing the operating system. In that case, packet transmission
rates can reach 15 million packets-per-second.
2 changes: 1 addition & 1 deletion doc/faq/FAQ0002-drops.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ rates rather than overloading network equipment.

# Issues

- (#546 fast scan get result)[https://github.com/robertdavidgraham/masscan/issues/546]
- [#546 fast scan get result](https://github.com/robertdavidgraham/masscan/issues/546)

2 changes: 1 addition & 1 deletion doc/faq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ questions

- 1 - [Why is it not as fast as I expect?](FAQ0001-slow.md)
- 2 - [Why are many results missing that I expect?](FAQ0002-drops.md)
- 3 - [How can I add my IPs to an official exlude list, to get people to stop scanning me?](FAQ0003-excludelist.md)
- 3 - [How can I add my IPs to an official exclude list, to get people to stop scanning me?](FAQ0003-excludelist.md)
- 4 - [Why is this in my server logs?](FAQ0004-serverlogs.md)
Loading