Skip to content

Instantly share code, notes, and snippets.

@navicore
Last active May 5, 2024 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save navicore/c12eddbc59bd9d58409889f3d11143c4 to your computer and use it in GitHub Desktop.
Save navicore/c12eddbc59bd9d58409889f3d11143c4 to your computer and use it in GitHub Desktop.
install masscan on ubuntu
# Ubuntu
sudo apt-get -y install git gcc make libpcap-dev
git clone https://github.com/robertdavidgraham/masscan
cd masscan/
make
sudo make install
@mathoyus
Copy link

root@ubuntu:~/masscan# make
gcc -g -ggdb -Wall -O2 -c src/massip-addr.c -o tmp/massip-addr.o
src/massip-addr.c: In function ‘ipv6address_selftest’:
src/massip-addr.c:244:5: error: invalid use of non-lvalue array
if (strcmp(ipaddress_fmt(ip).string, "1.255.0.163") != 0)
^
In file included from /usr/include/string.h:635:0,
from src/massip-addr.c:2:
src/massip-addr.c:244:9: error: invalid operands to binary + (have ‘char[48]’ and ‘int’)
if (strcmp(ipaddress_fmt(ip).string, "1.255.0.163") != 0)
^
src/massip-addr.c:244:5: error: cannot convert to a pointer type
if (strcmp(ipaddress_fmt(ip).string, "1.255.0.163") != 0)
^
src/massip-addr.c:244:5: error: invalid use of non-lvalue array
In file included from /usr/include/string.h:635:0,
from src/massip-addr.c:2:
src/massip-addr.c:244:9: error: invalid operands to binary + (have ‘char[48]’ and ‘int’)
if (strcmp(ipaddress_fmt(ip).string, "1.255.0.163") != 0)
^
src/massip-addr.c:244:5: error: cannot convert to a pointer type
if (strcmp(ipaddress_fmt(ip).string, "1.255.0.163") != 0)
^
src/massip-addr.c:244:5: error: invalid use of non-lvalue array
src/massip-addr.c:244:5: error: invalid use of non-lvalue array
src/massip-addr.c:244:5: error: cannot convert to a pointer type
src/massip-addr.c:244:5: error: cannot convert to a pointer type
src/massip-addr.c:244:5: error: cannot convert to a pointer type
src/massip-addr.c:244:5: error: cannot convert to a pointer type
In file included from /usr/include/string.h:635:0,
from src/massip-addr.c:2:
src/massip-addr.c:244:9: error: invalid operands to binary + (have ‘char[48]’ and ‘int’)
if (strcmp(ipaddress_fmt(ip).string, "1.255.0.163") != 0)
^
src/massip-addr.c:244:5: error: cannot convert to a pointer type
if (strcmp(ipaddress_fmt(ip).string, "1.255.0.163") != 0)
^
src/massip-addr.c:244:5: error: invalid use of non-lvalue array
src/massip-addr.c:244:5: error: cannot convert to a pointer type
src/massip-addr.c:244:5: error: invalid use of non-lvalue array
make: *** [tmp/massip-addr.o] Error 1

@mathoyus
Copy link

gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@navicore
Copy link
Author

Interesting. I just ran through it and it still works for me. My gcc is a lot newer;

☁  masscan [master] gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

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