├── libpcap ├── VERSION ├── scanner.c.top ├── missing │ └── snprintf.c ├── SUNOS4 │ ├── nit_if.o.sparc │ ├── nit_if.o.sun3 │ └── nit_if.o.sun4c.4.0.3c ├── Win32 │ ├── Src │ │ ├── inet_aton.c │ │ ├── inet_pton.c │ │ └── getnetbynm.c │ ├── Prj │ │ └── libpcap.dsw │ └── Include │ │ └── Gnuc.h ├── pcap-snf.h ├── pcap-dbus.h ├── ChmodBPF │ ├── StartupParameters.plist │ └── ChmodBPF ├── scanner.h ├── pcap-sita.h ├── org.tcpdump.chmod_bpf.plist ├── pcap-septel.h ├── Makefile-devel-adds ├── NMAP_MODIFICATIONS │ ├── HOWTO-UPGRADE │ └── 0003-Disable-TPACKET_V3-in-included-libpcap.-Still-broken.patch ├── chmod_bpf ├── dlpisubs.h ├── LICENSE ├── pcap-common.h ├── msdos │ └── bin2c.c ├── lbl │ ├── os-aix4.h │ ├── os-hpux11.h │ ├── os-solaris2.h │ ├── os-osf4.h │ └── os-osf5.h └── sf-pcap-ng.h ├── libdnet-stripped ├── include │ ├── stamp-h.in │ ├── Makefile.am │ ├── dnet │ │ ├── Makefile.am │ │ ├── tun.h │ │ ├── udp.h │ │ ├── rand.h │ │ └── route.h │ └── dnet.h ├── Makefile.am.common ├── src │ ├── Makefile.am │ ├── fw-none.c │ ├── eth-none.c │ ├── arp-none.c │ ├── tun-none.c │ └── route-none.c ├── Makefile.am ├── README ├── acconfig.h ├── dnet-config.in └── LICENSE ├── zenmap ├── share │ └── zenmap │ │ ├── config │ │ └── zenmap_version │ │ ├── pixmaps │ │ ├── irix_32.png │ │ ├── irix_75.png │ │ ├── vl_1_32.png │ │ ├── vl_1_75.png │ │ ├── vl_2_32.png │ │ ├── vl_2_75.png │ │ ├── vl_3_32.png │ │ ├── vl_3_75.png │ │ ├── vl_4_32.png │ │ ├── vl_4_75.png │ │ ├── vl_5_32.png │ │ ├── vl_5_75.png │ │ ├── win_32.png │ │ ├── win_75.png │ │ ├── zenmap.png │ │ ├── default_32.png │ │ ├── default_75.png │ │ ├── freebsd_32.png │ │ ├── freebsd_75.png │ │ ├── linux_32.png │ │ ├── linux_75.png │ │ ├── macosx_32.png │ │ ├── macosx_75.png │ │ ├── openbsd_32.png │ │ ├── openbsd_75.png │ │ ├── redhat_32.png │ │ ├── redhat_75.png │ │ ├── solaris_32.png │ │ ├── solaris_75.png │ │ ├── throbber.gif │ │ ├── throbber.png │ │ ├── ubuntu_32.png │ │ ├── ubuntu_75.png │ │ ├── unknown_32.png │ │ ├── unknown_75.png │ │ └── radialnet │ │ │ ├── logo.png │ │ │ ├── border.png │ │ │ ├── padlock.png │ │ │ ├── router.png │ │ │ ├── switch.png │ │ │ ├── firewall.png │ │ │ └── wireless.png │ │ ├── locale │ │ ├── de │ │ │ └── LC_MESSAGES │ │ │ │ └── zenmap.mo │ │ ├── es │ │ │ └── LC_MESSAGES │ │ │ │ └── zenmap.mo │ │ ├── fr │ │ │ └── LC_MESSAGES │ │ │ │ └── zenmap.mo │ │ ├── hi │ │ │ └── LC_MESSAGES │ │ │ │ └── zenmap.mo │ │ ├── hr │ │ │ └── LC_MESSAGES │ │ │ │ └── zenmap.mo │ │ ├── it │ │ │ └── LC_MESSAGES │ │ │ │ └── zenmap.mo │ │ ├── ja │ │ │ └── LC_MESSAGES │ │ │ │ └── zenmap.mo │ │ ├── pl │ │ │ └── LC_MESSAGES │ │ │ │ └── zenmap.mo │ │ ├── ru │ │ │ └── LC_MESSAGES │ │ │ │ └── zenmap.mo │ │ ├── zh │ │ │ └── LC_MESSAGES │ │ │ │ └── zenmap.mo │ │ ├── pt_BR │ │ │ └── LC_MESSAGES │ │ │ │ └── zenmap.mo │ │ └── Makefile │ │ └── docs │ │ └── help.html ├── zenmapCore │ └── Version.py ├── install_scripts │ ├── macosx │ │ ├── zenmap.icns │ │ ├── gtkrc │ │ ├── README │ │ └── Info.plist │ ├── windows │ │ ├── nmap-eye.ico │ │ └── boot_script.py │ ├── unix │ │ ├── zenmap.desktop │ │ └── zenmap-root.desktop │ └── README ├── COPYING ├── radialnet │ └── README └── test │ ├── diff_test1 │ ├── diff_test2 │ ├── run_tests.py │ ├── xml_test12.xml │ └── xml_test3.xml ├── nmap-update ├── default_channel.h └── Makefile.in ├── ncat ├── docs │ ├── examples │ │ ├── scripts │ │ │ ├── http-scan │ │ │ │ ├── get.request │ │ │ │ ├── iplist │ │ │ │ ├── scan-example │ │ │ │ └── README │ │ │ ├── http-proxy │ │ │ └── README │ │ ├── logs │ │ │ └── ascii-output │ │ ├── README │ │ └── ipaccess │ ├── ncatguidehtml.xml │ ├── ncat-ascii-art.txt │ ├── ncatmanhtml.xml │ ├── AUTHORS │ └── THANKS ├── scripts │ ├── date.lua │ ├── hello-luaexec.lua │ ├── chargen.lua │ ├── discard.lua │ ├── whatismyip.lua │ ├── log_ips.sh │ └── echo.lua ├── COPYING ├── test │ ├── toupper.lua │ ├── test-environment.lua │ └── test-environment.sh ├── INSTALL └── mkinstalldirs ├── macosx ├── nmap.png ├── pkg_bg.jpg └── nmap.pmdoc │ ├── 01nmap-contents.xml │ ├── 03ncat-contents.xml │ ├── 04ndiff-contents.xml │ ├── 05nping-contents.xml │ ├── 06nmap-update-contents.xml │ ├── 02zenmap-contents.xml │ ├── 01nmap.xml │ ├── 03ncat.xml │ ├── 04ndiff.xml │ ├── 05nping.xml │ ├── 06nmap-update.xml │ └── 02zenmap.xml ├── mswin32 ├── icon1.ico ├── lib │ ├── Packet.lib │ └── Wpcap.lib ├── license-format │ ├── licsed_2 │ ├── licformat.sh │ └── licsed_1 ├── nmap_performance.reg ├── nsis │ ├── shortcuts.ini │ └── final.ini ├── resource.h ├── winfix.h ├── python-wrap.bat ├── nmap.rc.in ├── nmap.rc └── ifaddrlist.h ├── nselib ├── data │ ├── pixel.gif │ ├── jdwp-class │ │ ├── JDWPExecCmd.class │ │ ├── JDWPSystemInfo.class │ │ ├── JDWPExecCmd.java │ │ └── README.txt │ ├── usernames.lst │ ├── psexec │ │ ├── experimental.lua │ │ ├── backdoor.lua │ │ ├── README │ │ └── drives.lua │ ├── dns-srv-names │ └── vhosts-default.lst ├── lpeg.luadoc ├── datetime.lua └── match.lua ├── nping ├── nping-dev │ ├── Diagram1.dia │ ├── packetDiagram.png │ ├── test │ │ └── caps │ │ │ ├── tcpconnect_T1.cap │ │ │ ├── tcpconnect_T2.cap │ │ │ └── tcpconnect_T3.cap │ ├── do_valgrind.sh │ ├── configFiles.txt │ ├── pythonscripts │ │ ├── addNpingOpsAttr.py │ │ ├── TemplateGettersSetters.txt │ │ ├── addGettersSetters.py │ │ ├── TemplateNpingOps.txt │ │ ├── man-section-entry-template.xml │ │ └── addManSectionEntry.py │ └── valgrind_supress.txt ├── docs │ ├── nping-usage.xml │ ├── npingmanhtml.xml │ ├── AUTHORS │ └── leet-nping-ascii-art.txt ├── global_structures.h └── winfix.h ├── docs ├── man-xlate │ ├── nmap-man-es.xml │ ├── nmap-man-fr.xml │ └── nmap-man-pt_PT.xml ├── nmap-usage.xml ├── README ├── leet-nmap-ascii-art-pc.txt ├── nse-scripts.dtd ├── style │ └── README ├── leet-nmap-ascii-art-eye.txt ├── nmap-man-enclosure.xml ├── leet-nmap-ascii-art.txt └── licenses │ ├── BSD-modified.txt │ ├── Lua-license.txt │ ├── MIT │ ├── BSD-simplified │ ├── Libdnet-license.txt │ └── LIBLINEAR-license.txt ├── nsock ├── tests │ ├── README │ ├── Makefile.in │ └── basic.c ├── examples │ ├── README │ └── Makefile └── src │ └── aclocal.m4 ├── nse_dnet.h ├── nse_fs.h ├── nse_lpeg.h ├── BSDmakefile ├── nbase ├── CHANGELOG ├── test │ └── nmakefile └── Makefile.in ├── nse_openssl.h ├── nse_pcrelib.h ├── nse_nsock.h ├── README-WIN32 ├── todo ├── paulino.calderon.txt └── dmiller.txt ├── nse_debug.h ├── liblua ├── lua.hpp ├── lapi.h ├── lundump.h ├── lprefix.h ├── lualib.h └── ldebug.h ├── FPModel.h ├── ndiff ├── COPYING └── test-scans │ ├── empty.xml │ ├── down.xml │ └── simple.xml ├── INSTALL ├── nse_nmaplib.h ├── liblinear ├── blas │ ├── Makefile │ ├── blas.h │ ├── dscal.c │ ├── daxpy.c │ ├── ddot.c │ └── dnrm2.c ├── linear.def ├── tron.h ├── Makefile.win ├── Makefile └── COPYRIGHT ├── libpcre ├── AUTHORS └── pcre-config.in ├── .travis.yml ├── nse_lpeg.cc ├── scripts ├── daytime.nse ├── smtp-strangeport.nse ├── auth-spoof.nse ├── unittest.nse ├── broadcast-versant-locate.nse ├── finger.nse ├── creds-summary.nse ├── stun-version.nse ├── citrix-enum-servers-xml.nse ├── realvnc-auth-bypass.nse ├── stun-info.nse ├── netbus-version.nse ├── rsync-list-modules.nse ├── nat-pmp-info.nse ├── docker-version.nse ├── ncp-serverinfo.nse ├── ajp-headers.nse ├── bjnp-discover.nse ├── ncp-enum-users.nse ├── pop3-capabilities.nse ├── iax2-version.nse └── cups-queue-info.nse ├── .gitignore └── libnetutil └── Makefile.in /libpcap/VERSION: -------------------------------------------------------------------------------- 1 | 1.7.3 2 | -------------------------------------------------------------------------------- /libdnet-stripped/include/stamp-h.in: -------------------------------------------------------------------------------- 1 | timestamp 2 | -------------------------------------------------------------------------------- /zenmap/share/zenmap/config/zenmap_version: -------------------------------------------------------------------------------- 1 | 7.40SVN 2 | -------------------------------------------------------------------------------- /zenmap/zenmapCore/Version.py: -------------------------------------------------------------------------------- 1 | VERSION = "7.40SVN" 2 | -------------------------------------------------------------------------------- /nmap-update/default_channel.h: -------------------------------------------------------------------------------- 1 | #define DEFAULT_CHANNEL "6.49" 2 | -------------------------------------------------------------------------------- /ncat/docs/examples/scripts/http-scan/get.request: -------------------------------------------------------------------------------- 1 | HEAD / HTTP/1.0 2 | 3 | 4 | -------------------------------------------------------------------------------- /libpcap/scanner.c.top: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | -------------------------------------------------------------------------------- /macosx/nmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/macosx/nmap.png -------------------------------------------------------------------------------- /macosx/pkg_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/macosx/pkg_bg.jpg -------------------------------------------------------------------------------- /mswin32/icon1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/mswin32/icon1.ico -------------------------------------------------------------------------------- /mswin32/lib/Packet.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/mswin32/lib/Packet.lib -------------------------------------------------------------------------------- /mswin32/lib/Wpcap.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/mswin32/lib/Wpcap.lib -------------------------------------------------------------------------------- /ncat/scripts/date.lua: -------------------------------------------------------------------------------- 1 | --Emulates the daytime service (RFC 867). 2 | 3 | print(os.date()) 4 | -------------------------------------------------------------------------------- /nselib/data/pixel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/nselib/data/pixel.gif -------------------------------------------------------------------------------- /libpcap/missing/snprintf.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/libpcap/missing/snprintf.c -------------------------------------------------------------------------------- /libpcap/SUNOS4/nit_if.o.sparc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/libpcap/SUNOS4/nit_if.o.sparc -------------------------------------------------------------------------------- /libpcap/SUNOS4/nit_if.o.sun3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/libpcap/SUNOS4/nit_if.o.sun3 -------------------------------------------------------------------------------- /libpcap/Win32/Src/inet_aton.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/libpcap/Win32/Src/inet_aton.c -------------------------------------------------------------------------------- /libpcap/Win32/Src/inet_pton.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/libpcap/Win32/Src/inet_pton.c -------------------------------------------------------------------------------- /nping/nping-dev/Diagram1.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/nping/nping-dev/Diagram1.dia -------------------------------------------------------------------------------- /docs/man-xlate/nmap-man-es.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/docs/man-xlate/nmap-man-es.xml -------------------------------------------------------------------------------- /docs/man-xlate/nmap-man-fr.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/docs/man-xlate/nmap-man-fr.xml -------------------------------------------------------------------------------- /docs/man-xlate/nmap-man-pt_PT.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/docs/man-xlate/nmap-man-pt_PT.xml -------------------------------------------------------------------------------- /nping/nping-dev/packetDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/nping/nping-dev/packetDiagram.png -------------------------------------------------------------------------------- /nsock/tests/README: -------------------------------------------------------------------------------- 1 | Minimal regression test suite for nsock. 2 | 3 | Usage: 4 | $ make 5 | $ sh ./run_tests.sh 6 | -------------------------------------------------------------------------------- /libpcap/SUNOS4/nit_if.o.sun4c.4.0.3c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/libpcap/SUNOS4/nit_if.o.sun4c.4.0.3c -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/irix_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/irix_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/irix_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/irix_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/vl_1_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/vl_1_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/vl_1_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/vl_1_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/vl_2_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/vl_2_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/vl_2_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/vl_2_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/vl_3_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/vl_3_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/vl_3_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/vl_3_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/vl_4_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/vl_4_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/vl_4_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/vl_4_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/vl_5_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/vl_5_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/vl_5_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/vl_5_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/win_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/win_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/win_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/win_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/zenmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/zenmap.png -------------------------------------------------------------------------------- /libpcap/pcap-snf.h: -------------------------------------------------------------------------------- 1 | pcap_t *snf_create(const char *, char *, int *); 2 | int snf_findalldevs(pcap_if_t **devlistp, char *errbuf); 3 | -------------------------------------------------------------------------------- /nselib/data/jdwp-class/JDWPExecCmd.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/nselib/data/jdwp-class/JDWPExecCmd.class -------------------------------------------------------------------------------- /zenmap/install_scripts/macosx/zenmap.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/install_scripts/macosx/zenmap.icns -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/default_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/default_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/default_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/default_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/freebsd_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/freebsd_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/freebsd_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/freebsd_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/linux_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/linux_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/linux_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/linux_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/macosx_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/macosx_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/macosx_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/macosx_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/openbsd_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/openbsd_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/openbsd_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/openbsd_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/redhat_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/redhat_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/redhat_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/redhat_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/solaris_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/solaris_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/solaris_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/solaris_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/throbber.gif -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/throbber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/throbber.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/ubuntu_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/ubuntu_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/ubuntu_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/ubuntu_75.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/unknown_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/unknown_32.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/unknown_75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/unknown_75.png -------------------------------------------------------------------------------- /libpcap/pcap-dbus.h: -------------------------------------------------------------------------------- 1 | pcap_t *dbus_create(const char *, char *, int *); 2 | int dbus_findalldevs(pcap_if_t **devlistp, char *errbuf); 3 | -------------------------------------------------------------------------------- /macosx/nmap.pmdoc/01nmap-contents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /macosx/nmap.pmdoc/03ncat-contents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /nping/nping-dev/test/caps/tcpconnect_T1.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/nping/nping-dev/test/caps/tcpconnect_T1.cap -------------------------------------------------------------------------------- /nping/nping-dev/test/caps/tcpconnect_T2.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/nping/nping-dev/test/caps/tcpconnect_T2.cap -------------------------------------------------------------------------------- /nping/nping-dev/test/caps/tcpconnect_T3.cap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/nping/nping-dev/test/caps/tcpconnect_T3.cap -------------------------------------------------------------------------------- /nselib/data/jdwp-class/JDWPSystemInfo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/nselib/data/jdwp-class/JDWPSystemInfo.class -------------------------------------------------------------------------------- /zenmap/install_scripts/windows/nmap-eye.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/install_scripts/windows/nmap-eye.ico -------------------------------------------------------------------------------- /libpcap/ChmodBPF/StartupParameters.plist: -------------------------------------------------------------------------------- 1 | { 2 | Description = "Change BPF permissions"; 3 | Provides = ("ChmodBPF"); 4 | } 5 | -------------------------------------------------------------------------------- /macosx/nmap.pmdoc/04ndiff-contents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /macosx/nmap.pmdoc/05nping-contents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ncat/docs/examples/scripts/http-scan/iplist: -------------------------------------------------------------------------------- 1 | www.google.com 2 | www.microsoft.com 3 | www.apache.org 4 | www.freebsd.org 5 | www.apple.com 6 | -------------------------------------------------------------------------------- /nse_dnet.h: -------------------------------------------------------------------------------- 1 | #ifndef NMAP_LUA_DNET_H 2 | #define NMAP_LUA_DNET_H 3 | 4 | LUALIB_API int luaopen_dnet (lua_State *L); 5 | 6 | #endif 7 | 8 | -------------------------------------------------------------------------------- /zenmap/install_scripts/macosx/gtkrc: -------------------------------------------------------------------------------- 1 | # Use Lucida Grande, the face used by other OS X applications. 2 | 3 | gtk-font-name="Lucida Grande" 4 | -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/radialnet/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/radialnet/logo.png -------------------------------------------------------------------------------- /nse_fs.h: -------------------------------------------------------------------------------- 1 | #ifndef NSE_FS 2 | #define NSE_FS 3 | 4 | #define LFSLIBNAME "lfs" 5 | LUALIB_API int luaopen_lfs (lua_State *L); 6 | 7 | #endif 8 | 9 | -------------------------------------------------------------------------------- /nselib/data/usernames.lst: -------------------------------------------------------------------------------- 1 | root 2 | admin 3 | administrator 4 | webadmin 5 | sysadmin 6 | netadmin 7 | guest 8 | user 9 | web 10 | test 11 | -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/radialnet/border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/radialnet/border.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/radialnet/padlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/radialnet/padlock.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/radialnet/router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/radialnet/router.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/radialnet/switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/radialnet/switch.png -------------------------------------------------------------------------------- /nse_lpeg.h: -------------------------------------------------------------------------------- 1 | #ifndef LPEG 2 | 3 | #define LPEG 4 | #define LPEGLIBNAME "lpeg" 5 | 6 | LUALIB_API int luaopen_lpeg (lua_State *L); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /zenmap/share/zenmap/locale/de/LC_MESSAGES/zenmap.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/locale/de/LC_MESSAGES/zenmap.mo -------------------------------------------------------------------------------- /zenmap/share/zenmap/locale/es/LC_MESSAGES/zenmap.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/locale/es/LC_MESSAGES/zenmap.mo -------------------------------------------------------------------------------- /zenmap/share/zenmap/locale/fr/LC_MESSAGES/zenmap.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/locale/fr/LC_MESSAGES/zenmap.mo -------------------------------------------------------------------------------- /zenmap/share/zenmap/locale/hi/LC_MESSAGES/zenmap.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/locale/hi/LC_MESSAGES/zenmap.mo -------------------------------------------------------------------------------- /zenmap/share/zenmap/locale/hr/LC_MESSAGES/zenmap.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/locale/hr/LC_MESSAGES/zenmap.mo -------------------------------------------------------------------------------- /zenmap/share/zenmap/locale/it/LC_MESSAGES/zenmap.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/locale/it/LC_MESSAGES/zenmap.mo -------------------------------------------------------------------------------- /zenmap/share/zenmap/locale/ja/LC_MESSAGES/zenmap.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/locale/ja/LC_MESSAGES/zenmap.mo -------------------------------------------------------------------------------- /zenmap/share/zenmap/locale/pl/LC_MESSAGES/zenmap.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/locale/pl/LC_MESSAGES/zenmap.mo -------------------------------------------------------------------------------- /zenmap/share/zenmap/locale/ru/LC_MESSAGES/zenmap.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/locale/ru/LC_MESSAGES/zenmap.mo -------------------------------------------------------------------------------- /zenmap/share/zenmap/locale/zh/LC_MESSAGES/zenmap.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/locale/zh/LC_MESSAGES/zenmap.mo -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/radialnet/firewall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/radialnet/firewall.png -------------------------------------------------------------------------------- /zenmap/share/zenmap/pixmaps/radialnet/wireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/pixmaps/radialnet/wireless.png -------------------------------------------------------------------------------- /macosx/nmap.pmdoc/06nmap-update-contents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /zenmap/share/zenmap/locale/pt_BR/LC_MESSAGES/zenmap.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adon90/nmap/master/zenmap/share/zenmap/locale/pt_BR/LC_MESSAGES/zenmap.mo -------------------------------------------------------------------------------- /libpcap/scanner.h: -------------------------------------------------------------------------------- 1 | /* This is generated by runlex.sh. Do not edit it. */ 2 | 3 | #ifndef YY_DECL 4 | #define YY_DECL int yylex(void) 5 | #endif 6 | YY_DECL; 7 | -------------------------------------------------------------------------------- /docs/nmap-usage.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /macosx/nmap.pmdoc/02zenmap-contents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ncat/docs/examples/logs/ascii-output: -------------------------------------------------------------------------------- 1 | HELO xxx.xxx.xxx 2 | 220 smtp.google.com ESMTP 3 | 250 smtp.google.com Hello xxx.xxx.xxx [xxx.xxx.xxx.xxx], pleased to meet you 4 | -------------------------------------------------------------------------------- /nping/docs/nping-usage.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /BSDmakefile: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # Redirect BSD make to GNU gmake for convenience 3 | 4 | USE_GNU: 5 | @gmake $(.TARGETS) 6 | 7 | $(.TARGETS): USE_GNU 8 | 9 | .PHONY: USE_GNU 10 | -------------------------------------------------------------------------------- /docs/README: -------------------------------------------------------------------------------- 1 | Here is some documentation for Nmap, but these files are much less 2 | comprehensive than what you'll find at the actual Nmap documentation 3 | site ( https://nmap.org ). 4 | -------------------------------------------------------------------------------- /nbase/CHANGELOG: -------------------------------------------------------------------------------- 1 | 2 | -- Added snprintf.c, inet_aton.c, inet_pton.c, and inet_ntop.c from 3 | tcpdump-2000.09.17 ( www.tcpdump.org) 4 | 5 | -- Nbase library initially created (9/17/00) -------------------------------------------------------------------------------- /nse_openssl.h: -------------------------------------------------------------------------------- 1 | #ifndef OPENSSLLIB 2 | #define OPENSSLLIB 3 | 4 | #define OPENSSLLIBNAME "openssl" 5 | 6 | LUALIB_API int luaopen_openssl(lua_State *L); 7 | 8 | #endif 9 | 10 | -------------------------------------------------------------------------------- /nse_pcrelib.h: -------------------------------------------------------------------------------- 1 | #ifndef NSE_PCRELIB 2 | #define NSE_PCRELIB 3 | 4 | #define NSE_PCRELIBNAME "pcre" 5 | 6 | LUALIB_API int luaopen_pcrelib (lua_State *L); 7 | 8 | #endif 9 | 10 | -------------------------------------------------------------------------------- /ncat/COPYING: -------------------------------------------------------------------------------- 1 | Ncat is distributed under the same license terms as Nmap. See the 2 | COPYING file in the Nmap tarball, the man page legal section, or 3 | https://nmap.org/man/man-legal.html . 4 | -------------------------------------------------------------------------------- /zenmap/COPYING: -------------------------------------------------------------------------------- 1 | Zenmap is distributed under the same license terms as Nmap. See the 2 | COPYING file in the Nmap tarball, the man page legal section, or 3 | https://nmap.org/man/man-legal.html . 4 | -------------------------------------------------------------------------------- /ncat/scripts/hello-luaexec.lua: -------------------------------------------------------------------------------- 1 | --This is a --lua-exec "Hello world" example. In order to send to a client, 2 | --all you need to do is output it to the standard output. 3 | 4 | print "Hello, world!" 5 | -------------------------------------------------------------------------------- /libdnet-stripped/Makefile.am.common: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am.common 623 2006-01-19 06:09:27Z dugsong $ 2 | 3 | AUTOMAKE_OPTIONS = foreign no-dependencies 4 | 5 | AM_CPPFLAGS = -I$(top_srcdir)/include 6 | 7 | -------------------------------------------------------------------------------- /nse_nsock.h: -------------------------------------------------------------------------------- 1 | #ifndef NMAP_LUA_NSOCK_H 2 | #define NMAP_LUA_NSOCK_H 3 | 4 | extern "C" { 5 | #include "lua.h" 6 | } 7 | 8 | LUALIB_API int luaopen_nsock (lua_State *); 9 | 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /ncat/docs/examples/scripts/http-proxy: -------------------------------------------------------------------------------- 1 | NCAT_PATH=../../.. 2 | PROXY_HOST=www.cnn.com:80 3 | PROXY_AUTH=user:pass 4 | 5 | $NCAT_PATH/ncat --http-proxy "$PROXY_HOST" --proxy-auth "$PROXY_AUTH" localhost 3128 6 | -------------------------------------------------------------------------------- /README-WIN32: -------------------------------------------------------------------------------- 1 | Details on installation, compilation, and limitation of the Nmap 2 | Security Scanner on the Windows platform is now available in the Nmap 3 | Installation Guide at https://nmap.org/install/ . 4 | 5 | -------------------------------------------------------------------------------- /todo/paulino.calderon.txt: -------------------------------------------------------------------------------- 1 | TODO: 2 | 3 | -Update wiki page. 4 | -Fix: http-enum does not work on windows. UNIX paths are hardcoded into the script. It also fails when running from a directory with spaces in the name. -------------------------------------------------------------------------------- /ncat/scripts/chargen.lua: -------------------------------------------------------------------------------- 1 | --chargen.lua - implements the RFC 864 CHARGEN service which basically spams 2 | --the remote user until he decides to close the connection. 3 | 4 | while true do 5 | print "chargen" 6 | end 7 | 8 | -------------------------------------------------------------------------------- /nse_debug.h: -------------------------------------------------------------------------------- 1 | #ifndef NSE_DEBUG 2 | #define NSE_DEBUG 3 | 4 | void value_dump(lua_State *L, int i, int depth_limit); 5 | void stack_dump(lua_State *L); 6 | void lua_state_dump(lua_State *L); 7 | 8 | #endif 9 | 10 | -------------------------------------------------------------------------------- /mswin32/license-format/licsed_2: -------------------------------------------------------------------------------- 1 | 2 | # collapse whitespace 3 | s@ @ @g 4 | s@ $@@g 5 | 6 | 2d 7 | 8 | # reintroduce bullets 9 | s@oSDFGHbullet@o @g 10 | 11 | # reintroduce sentence spacing 12 | s@SDFGHJdblspace@ @g 13 | -------------------------------------------------------------------------------- /ncat/scripts/discard.lua: -------------------------------------------------------------------------------- 1 | --This script reads data from the standard input and discards them. 2 | 3 | while true do 4 | 5 | data = io.stdin:read(512) 6 | 7 | if data == nil then 8 | break 9 | end 10 | 11 | end 12 | -------------------------------------------------------------------------------- /ncat/scripts/whatismyip.lua: -------------------------------------------------------------------------------- 1 | --A "what is my IP" service code. Since most web browsers put up with servers 2 | --not sending proper HTTP headers, you can simply query the service with it. 3 | 4 | print(os.getenv "NCAT_REMOTE_ADDR") 5 | -------------------------------------------------------------------------------- /ncat/scripts/log_ips.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | LOGFILE="log_ips.log" 4 | 5 | MSG="[`date`] Incoming connection from $NCAT_REMOTE_ADDR:$NCAT_REMOTE_PORT" 6 | 7 | echo $MSG >&2 8 | echo $MSG >> $LOGFILE 9 | 10 | echo "Yeah, hi." 11 | -------------------------------------------------------------------------------- /mswin32/nmap_performance.reg: -------------------------------------------------------------------------------- 1 | REGEDIT4 2 | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters] 3 | "MaxUserPort"=dword:0000fffe 4 | "TcpTimedWaitDelay"=dword:0000001e 5 | "StrictTimeWaitSeqCheck"=dword:00000001 6 | 7 | -------------------------------------------------------------------------------- /libdnet-stripped/include/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am 294 2002-02-20 19:05:08Z dugsong $ 2 | 3 | include $(top_srcdir)/Makefile.am.common 4 | 5 | include_HEADERS = dnet.h 6 | 7 | SUBDIRS = dnet 8 | 9 | EXTRA_DIST = err.h queue.h 10 | -------------------------------------------------------------------------------- /liblua/lua.hpp: -------------------------------------------------------------------------------- 1 | // lua.hpp 2 | // Lua header files for C++ 3 | // <> not supplied automatically because Lua also compiles as C++ 4 | 5 | extern "C" { 6 | #include "lua.h" 7 | #include "lualib.h" 8 | #include "lauxlib.h" 9 | } 10 | -------------------------------------------------------------------------------- /FPModel.h: -------------------------------------------------------------------------------- 1 | #ifndef _FPMODEL_H_ 2 | #define _FPMODEL_H_ 3 | 4 | extern struct model FPModel; 5 | extern double FPscale[][2]; 6 | extern double FPmean[][695]; 7 | extern double FPvariance[][695]; 8 | extern FingerMatch FPmatches[]; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /ndiff/COPYING: -------------------------------------------------------------------------------- 1 | Copyright 2008 Insecure.Com LLC 2 | Ndiff is distributed under the same license as Nmap. See the file COPYING in 3 | the Nmap source distribution or https://nmap.org/data/COPYING. See 4 | https://nmap.org/book/man-legal.html for more details. 5 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Ideally, you should be able to just type: 2 | 3 | ./configure 4 | make 5 | make install 6 | 7 | For far more in-depth compilation, installation, and removal notes, 8 | read the Nmap Install Guide at https://nmap.org/book/install.html. 9 | 10 | 11 | -------------------------------------------------------------------------------- /libpcap/pcap-sita.h: -------------------------------------------------------------------------------- 1 | /* 2 | * pcap-sita.h: Packet capture interface for SITA WAN devices 3 | * 4 | * Authors: Fulko Hew (fulko.hew@sita.aero) (+1 905 6815570); 5 | */ 6 | 7 | extern int acn_parse_hosts_file(char *errbuf); 8 | extern int acn_findalldevs(char *errbuf); 9 | -------------------------------------------------------------------------------- /nping/nping-dev/do_valgrind.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | reset && sudo valgrind --leak-check=full --show-reachable=yes --track-fds=yes --read-var-info=yes --sim-hints=lax-ioctls --track-origins=yes --malloc-fill=aa --suppressions=valgrind_supress.txt -v -v $1 $2 $3 $4 $5 $6 $7 $8 $9 3 | -------------------------------------------------------------------------------- /nping/nping-dev/configFiles.txt: -------------------------------------------------------------------------------- 1 | These are the configure-related files that need to be distributed with Nping: 2 | 3 | configFiles.txt 4 | config.guess 5 | config.sub 6 | configure 7 | configure.ac 8 | depcomp 9 | ltmain.sh 10 | Makefile.in 11 | missing 12 | shtool 13 | -------------------------------------------------------------------------------- /ncat/docs/examples/scripts/README: -------------------------------------------------------------------------------- 1 | These are various scripts that demonstrate some 2 | potential usage for Ncat. 3 | 4 | If you find a neat usage for Ncat and possibly 5 | write a few lines of code to automate something, 6 | then please email them over to Chris Gibson (chris@linuxops.net) 7 | -------------------------------------------------------------------------------- /ncat/test/toupper.lua: -------------------------------------------------------------------------------- 1 | --Emulates the RFC 862 echo service, behaving like Unix's "cat" tool. 2 | 3 | while true do 4 | 5 | data = io.stdin:read(1) 6 | 7 | if data == nil then 8 | break 9 | end 10 | 11 | io.write(data:upper()) 12 | io.flush() 13 | 14 | end 15 | -------------------------------------------------------------------------------- /ncat/docs/examples/scripts/http-scan/scan-example: -------------------------------------------------------------------------------- 1 | NCAT_PATH=../../../.. 2 | if [ -a "$NCAT_PATH/ncat" ] 3 | then 4 | for addr in `cat iplist`; do $NCAT_PATH/ncat --disable-eof-exit $addr 80 < get.request; done; 5 | else 6 | echo "Ncat is not buit. Please build Ncat before you use these scripts"; 7 | fi 8 | -------------------------------------------------------------------------------- /ncat/test/test-environment.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | function print_env(v) 4 | print(("%s=%s"):format(v, os.getenv(v))) 5 | end 6 | 7 | print_env("NCAT_REMOTE_ADDR") 8 | print_env("NCAT_REMOTE_PORT") 9 | 10 | print_env("NCAT_LOCAL_ADDR") 11 | print_env("NCAT_LOCAL_PORT") 12 | 13 | print_env("NCAT_PROTO") 14 | -------------------------------------------------------------------------------- /libdnet-stripped/include/dnet/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am 525 2004-09-10 02:35:51Z dugsong $ 2 | 3 | include $(top_srcdir)/Makefile.am.common 4 | 5 | dnetincludedir = $(includedir)/dnet 6 | 7 | dnetinclude_HEADERS = addr.h arp.h blob.h eth.h fw.h icmp.h intf.h ip.h \ 8 | ip6.h os.h rand.h route.h tcp.h tun.h udp.h sctp.h 9 | -------------------------------------------------------------------------------- /mswin32/nsis/shortcuts.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | NumFields=2 3 | 4 | [Field 1] 5 | Type=CheckBox 6 | Left=10 7 | Right=-1 8 | Top=20 9 | Bottom=28 10 | Text=Desktop Icon 11 | State=1 12 | 13 | [Field 2] 14 | Type=CheckBox 15 | Left=10 16 | Right=-1 17 | Top=10 18 | Bottom=18 19 | Text=Start Menu Folder 20 | State=1 21 | -------------------------------------------------------------------------------- /zenmap/radialnet/README: -------------------------------------------------------------------------------- 1 | To start the application you may just double-click the radialnet.py file or 2 | start it with the following command: 3 | 4 | $ python radialnet.py 5 | 6 | To view command line list of arguments type '--help': 7 | 8 | $ python radialnet.py --help 9 | 10 | Att, João Medeiros . 11 | -------------------------------------------------------------------------------- /nse_nmaplib.h: -------------------------------------------------------------------------------- 1 | #ifndef NSE_NMAPLIB 2 | #define NSE_NMAPLIB 3 | 4 | #define NSE_NMAPLIBNAME "nmap" 5 | 6 | class Target; 7 | class Port; 8 | 9 | int luaopen_nmap(lua_State* l); 10 | void set_hostinfo(lua_State* l, Target* currenths); 11 | void set_portinfo(lua_State* l, const Target *target, const Port* port); 12 | 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /ncat/test/test-environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Print the contents of all environment variables set by Ncat. 4 | 5 | echo "NCAT_REMOTE_ADDR=$NCAT_REMOTE_ADDR" 6 | echo "NCAT_REMOTE_PORT=$NCAT_REMOTE_PORT" 7 | 8 | echo "NCAT_LOCAL_ADDR=$NCAT_LOCAL_ADDR" 9 | echo "NCAT_LOCAL_PORT=$NCAT_LOCAL_PORT" 10 | 11 | echo "NCAT_PROTO=$NCAT_PROTO" 12 | -------------------------------------------------------------------------------- /libdnet-stripped/src/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am 625 2006-01-19 06:11:01Z dugsong $ 2 | 3 | include $(top_srcdir)/Makefile.am.common 4 | 5 | lib_LTLIBRARIES = libdnet.la 6 | 7 | libdnet_la_SOURCES = addr-util.c addr.c blob.c ip-util.c ip6.c rand.c 8 | 9 | libdnet_la_LIBADD = @LTLIBOBJS@ 10 | 11 | libdnet_la_LDFLAGS = -version-info 1:1:0 12 | -------------------------------------------------------------------------------- /ncat/docs/ncatguidehtml.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | ]> 6 | 7 |
8 | 9 | Ncat Users' Guide 10 | 11 | &ncat; 12 |
13 | -------------------------------------------------------------------------------- /nsock/examples/README: -------------------------------------------------------------------------------- 1 | $Id$ 2 | 3 | Here are some example programs, they weren't really written to 4 | present nice and elegant use of the nsock library. They were 5 | actually written for my testing purposes during development. So don't 6 | be surprised if you see code that looks strange, or even downright 7 | evil -- I'm testing the code reliability. 8 | 9 | -Fyodor -------------------------------------------------------------------------------- /zenmap/install_scripts/unix/zenmap.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Zenmap 3 | GenericName=GUI Port Scanner 4 | TryExec=zenmap 5 | Exec=zenmap %F 6 | Terminal=false 7 | Icon=zenmap 8 | Type=Application 9 | Categories=Application;Network;Security; 10 | Comment=A cross-platform GUI for the Nmap Security Scanner. 11 | Keywords=network;scan;scanner;IP;security; 12 | -------------------------------------------------------------------------------- /ncat/docs/ncat-ascii-art.txt: -------------------------------------------------------------------------------- 1 | . . 2 | \`-"'"-'/ 3 | } 6 6 { 4 | ==. Y ,== 5 | /^^^\ . 6 | / \ ) Ncat: A modern interpretation of classic Netcat 7 | ( )-( )/ 8 | -""---""--- / 9 | / Ncat \_/ 10 | ( ____ 11 | \_.=|____E 12 | -------------------------------------------------------------------------------- /zenmap/install_scripts/unix/zenmap-root.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Zenmap (as root) 3 | GenericName=GUI Port Scanner 4 | TryExec=su-to-zenmap.sh 5 | Exec=su-to-zenmap.sh %F 6 | Terminal=false 7 | Icon=zenmap 8 | Type=Application 9 | Categories=Application;Network;Security; 10 | Comment=A cross-platform GUI for the Nmap Security Scanner. 11 | Keywords=network;scan;scanner;IP;security; 12 | -------------------------------------------------------------------------------- /mswin32/nsis/final.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | NumFields=2 3 | BackEnabled=0 4 | NextButtonText=Finish 5 | 6 | [Field 1] 7 | Type=Label 8 | Left=10 9 | Right=-1 10 | Top=10 11 | Bottom=18 12 | Text=Nmap has been installed on your computer. 13 | State=0 14 | 15 | [Field 2] 16 | Type=Label 17 | Left=10 18 | Right=-1 19 | Top=30 20 | Bottom=38 21 | Text=Click Finish to close this wizard. 22 | State=0 23 | 24 | -------------------------------------------------------------------------------- /ncat/docs/ncatmanhtml.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | ]> 7 |
8 | 9 | Ncat Reference Guide (Man Page) 10 | 11 | &refguide; 12 |
13 | -------------------------------------------------------------------------------- /libdnet-stripped/Makefile.am: -------------------------------------------------------------------------------- 1 | ## $Id: Makefile.am 618 2006-01-15 06:42:19Z dugsong $ 2 | 3 | include $(top_srcdir)/Makefile.am.common 4 | 5 | SUBDIRS = include src 6 | 7 | bin_SCRIPTS = dnet-config 8 | 9 | EXTRA_DIST = LICENSE Makefile.am.common acconfig.h 10 | 11 | CLEANFILES = dnet-config 12 | 13 | aux_dir = config 14 | 15 | AUX_DIST = $(aux_dir)/acinclude.m4 16 | 17 | ACLOCAL_AMFLAGS = -I config 18 | -------------------------------------------------------------------------------- /nselib/lpeg.luadoc: -------------------------------------------------------------------------------- 1 | --- 2 | -- Parsing Expression Grammars for Lua 3 | -- 4 | -- LPeg is a powerful pattern matching and grammar parsing library. The full 5 | -- documentation can be found at 6 | -- http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html 7 | -- 8 | -- @author Roberto Ierusalimschy 9 | -- @license Copyright 2007, Lua.org & PUC-Rio (https://svn.nmap.org/nmap/docs/licenses/MIT) 10 | module "lpeg" 11 | -------------------------------------------------------------------------------- /liblinear/blas/Makefile: -------------------------------------------------------------------------------- 1 | AR = ar 2 | RANLIB = ranlib 3 | 4 | HEADERS = blas.h blas.h blasp.h 5 | FILES = dnrm2.o daxpy.o ddot.o dscal.o 6 | 7 | CFLAGS = $(OPTFLAGS) 8 | FFLAGS = $(OPTFLAGS) 9 | 10 | blas: $(FILES) $(HEADERS) 11 | $(AR) rcv blas.a $(FILES) 12 | $(RANLIB) blas.a 13 | 14 | clean: 15 | - rm -f *.o 16 | - rm -f *.a 17 | - rm -f *~ 18 | 19 | .c.o: 20 | $(CC) $(CFLAGS) -c $*.c 21 | 22 | 23 | -------------------------------------------------------------------------------- /ncat/scripts/echo.lua: -------------------------------------------------------------------------------- 1 | --Emulates the RFC 862 echo service, behaving like Unix's "cat" tool. 2 | 3 | while true do 4 | 5 | --We're reading in 1-byte chunks because calls like io.stdin:read(512) would 6 | --wait for full 512 bytes of data before continuing. 7 | data = io.stdin:read(1) 8 | 9 | if data == nil then 10 | break 11 | end 12 | 13 | io.stdout:write(data) 14 | io.stdout:flush() 15 | 16 | end 17 | -------------------------------------------------------------------------------- /nping/nping-dev/pythonscripts/addNpingOpsAttr.py: -------------------------------------------------------------------------------- 1 | methname = raw_input("Method name: ") 2 | attrname = raw_input("Attr name: ") 3 | attrtype = raw_input("Attr type: ") 4 | 5 | 6 | o = open("Output.txt","a") 7 | for line in open("TemplateNpingOps.txt"): 8 | line = line.replace("ATTRNAME",attrname) 9 | line = line.replace("METHNAME",methname) 10 | line = line.replace("TYPE",attrtype) 11 | o.write(line) 12 | o.close() 13 | -------------------------------------------------------------------------------- /liblinear/linear.def: -------------------------------------------------------------------------------- 1 | LIBRARY liblinear 2 | EXPORTS 3 | train @1 4 | cross_validation @2 5 | save_model @3 6 | load_model @4 7 | get_nr_feature @5 8 | get_nr_class @6 9 | get_labels @7 10 | predict_values @8 11 | predict @9 12 | predict_probability @10 13 | free_and_destroy_model @11 14 | free_model_content @12 15 | destroy_param @13 16 | check_parameter @14 17 | check_probability_model @15 18 | set_print_string_function @16 19 | -------------------------------------------------------------------------------- /nping/docs/npingmanhtml.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | ]> 8 |
9 | 10 | Nping Reference Guide (Man Page) 11 | 12 | &refguide; 13 |
14 | -------------------------------------------------------------------------------- /zenmap/test/diff_test1: -------------------------------------------------------------------------------- 1 | # nmap 3.75 scan initiated Sat Jul 16 11:29:44 2005 as: nmap -oX /tmp/tmpXBsQcL -oN /tmp/tmpepjBH8 10.0.0.138 2 | Interesting ports on SpeedTouch.canopo (10.0.0.138): 3 | (The 1659 ports scanned but not shown below are in state: closed) 4 | PORT STATE SERVICE 5 | 21/tcp open ftp 6 | 23/tcp open telnet 7 | 80/tcp open http 8 | 1723/tcp open pptp 9 | 10 | # Nmap run completed at Sat Jul 16 11:29:46 2005 -- 1 IP address (1 host up) scanned in 2.258 seconds 11 | -------------------------------------------------------------------------------- /docs/leet-nmap-ascii-art-pc.txt: -------------------------------------------------------------------------------- 1 | 2 | :================: 3 | /||# nmap -A _ || 4 | / || || 5 | | || || 6 | \ || || 7 | ================== 8 | ........... / \............. 9 | :\ ############ \ 10 | : --------------------------------- 11 | : | * |__________|| :::::::::: | 12 | \ | | || ....... | 13 | --------------------------------- 8 14 | 15 | -------------------------------------------------------------------------------- /libdnet-stripped/README: -------------------------------------------------------------------------------- 1 | 2 | libdnet 3 | ------- 4 | 5 | libdnet provides a simplified, portable interface to several low-level 6 | networking routines, including network address manipulation, kernel 7 | arp(4) cache and route(4) table lookup and manipulation, network 8 | firewalling, network interface lookup and manipulation, IP tunnelling, 9 | and raw IP packet and Ethernet frame transmission. 10 | 11 | WWW: http://libdnet.sourceforge.net/ 12 | 13 | $Id: README 578 2005-02-14 21:00:17Z dugsong $ 14 | -------------------------------------------------------------------------------- /libpcre/AUTHORS: -------------------------------------------------------------------------------- 1 | THE MAIN PCRE LIBRARY 2 | --------------------- 3 | 4 | Written by: Philip Hazel 5 | Email local part: ph10 6 | Email domain: cam.ac.uk 7 | 8 | University of Cambridge Computing Service, 9 | Cambridge, England. 10 | 11 | Copyright (c) 1997-2008 University of Cambridge 12 | All rights reserved 13 | 14 | 15 | THE C++ WRAPPER LIBRARY 16 | ----------------------- 17 | 18 | Written by: Google Inc. 19 | 20 | Copyright (c) 2007-2008 Google Inc 21 | All rights reserved 22 | 23 | #### 24 | -------------------------------------------------------------------------------- /mswin32/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by nmap.rc 4 | // 5 | #define IDI_NMAP 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1000 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /nbase/test/nmakefile: -------------------------------------------------------------------------------- 1 | # Build nbase in Visual C++ (so ..\nbase.lib exists). Then open a Visual 2 | # Studio Command Prompt (from the Start menu), and run: 3 | # nmake /F nmakefile 4 | 5 | !include 6 | 7 | all: test-escape_windows_command_arg 8 | 9 | .c.obj: 10 | $(cc) /c /D WIN32=1 /I .. $*.c 11 | 12 | test-escape_windows_command_arg: test-escape_windows_command_arg.obj 13 | $(link) /OUT:test-escape_windows_command_arg.exe test-escape_windows_command_arg.obj /NODEFAULTLIB:LIBCMT ..\nbase.lib shell32.lib 14 | -------------------------------------------------------------------------------- /docs/nse-scripts.dtd: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /libpcap/org.tcpdump.chmod_bpf.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Label 6 | org.tcpdump.chmod_bpf 7 | RunAtLoad 8 | 9 | Program 10 | /usr/local/bin/chmod_bpf 11 | ProgramArguments 12 | 13 | /usr/local/bin/chmod_bpf 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/style/README: -------------------------------------------------------------------------------- 1 | lua-format: 2 | This bash script uses lua-format.lua to indent and style Lua code 3 | (including NSE scripts and libraries). You can use this to make 4 | your script conform to the style guidelines for NSE. 5 | 6 | In order to run the script, you need Lua 5.1 or Lua 5.2 installed as well 7 | as LPeg. LPeg is a parsing expression grammar library which is basically a 8 | far more powerful pattern matching utility than regular expressions. 9 | On Debian: 10 | apt-get install lua5.2 lua-lpeg 11 | -------------------------------------------------------------------------------- /ncat/docs/examples/README: -------------------------------------------------------------------------------- 1 | /examples/scripts 2 | ~~~~~~~~~~~~~~~~~ 3 | These are a set of small scripts to further demonstrate some 4 | uses for Ncat. You *will* have to change some values yourself, 5 | such as in "http-proxy", if your proxy server requires authorization, 6 | you'll have to add your own authorization information. 7 | 8 | 9 | /examples/logs/ 10 | ~~~~~~~~~~~~~~~ 11 | These are a set of output logfiles generated by Ncat to briefly 12 | demonstrate Ncat's logging abilities. 13 | 14 | 15 | --Chris Gibson, 16 | -------------------------------------------------------------------------------- /zenmap/test/diff_test2: -------------------------------------------------------------------------------- 1 | # nmap 3.75 scan initiated Sat Jul 16 11:31:58 2005 as: nmap -oX /tmp/tmpg71nwK -oN /tmp/tmptq82bS localhost 2 | Interesting ports on localhost.localdomain (127.0.0.1): 3 | (The 1658 ports scanned but not shown below are in state: closed) 4 | PORT STATE SERVICE 5 | 80/tcp open http 6 | 111/tcp open rpcbind 7 | 631/tcp open ipp 8 | 6346/tcp open gnutella 9 | 32776/tcp open sometimes-rpc15 10 | 11 | # Nmap run completed at Sat Jul 16 11:32:01 2005 -- 1 IP address (1 host up) scanned in 2.788 seconds 12 | -------------------------------------------------------------------------------- /ncat/docs/examples/scripts/http-scan/README: -------------------------------------------------------------------------------- 1 | HTTP-SCAN with Ncat 2 | ~~~~~~~~~~~~~~~~~~~ 3 | 4 | This is a simple exercise that uses a small amount of 5 | scripted automation that will throw out the banner 6 | information of n number of hosts listed in the file "iplist". 7 | 8 | Ncat uses the "get.request" HTTP header to get the newly 9 | connected webserver to tell you about itself. 10 | 11 | Usage: ./scan-example 12 | 13 | Variables to change: None, but you may want to change "iplist" 14 | to other more informative hosts. 15 | -------------------------------------------------------------------------------- /mswin32/license-format/licformat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | script_dir=`dirname $0` 4 | 5 | sed -f $script_dir/licsed_1 $1 | tr '\n' ' '| awk 'NR==1{printf("\n%s", $0) }' | 6 | 7 | awk '{for (i=1&&j=2; i <= NF; i++&&j++) if($i=="SDFGHJdblnewline"){printf("\n\n")} 8 | else if($i=="oSDFGHbullet"){printf(" \no ")} 9 | else if($i=="Copyright" && $j=="(C)"){printf("\n%s ",$i)} 10 | else if($i=="author" && $j=="Gnomovision"){printf("author\n")} 11 | else if($i=="1989" && $j== "Ty"){printf("1989\n")} 12 | else{printf("%s ",$i)}}' | 13 | 14 | sed -f $script_dir/licsed_2 15 | -------------------------------------------------------------------------------- /todo/dmiller.txt: -------------------------------------------------------------------------------- 1 | * Make Zenmap unit tests work. Guessing lots don't, since r32569 fixed real code 2 | that matched some unit tests, too. 3 | 4 | * Make sure Ndiff, Zenmap are 2to3 compatible with python -3 5 | 6 | * Script to check for updated versions of included libs. Have shell for libpcap, 7 | but should convert to python. 8 | 9 | * NSE stuff 10 | * broadcast-srvloc-info - test 11 | * broadcast-rpcbind - write, test 12 | * deflate/gzip for HTTP, etc. 13 | * Consolidate utility functions 14 | 15 | * Grock libdnet, consider separate release? 16 | -------------------------------------------------------------------------------- /zenmap/test/run_tests.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import unittest 4 | 5 | if __name__ == "__main__": 6 | import sys 7 | import glob 8 | import os 9 | if not hasattr(unittest.defaultTestLoader, "discover"): 10 | print("Python unittest discovery missing. Requires Python 2.7 or newer.") # noqa 11 | sys.exit(0) 12 | 13 | os.chdir("..") 14 | suite = unittest.defaultTestLoader.discover( 15 | start_dir=glob.glob("build/lib.*")[0], 16 | pattern="*.py" 17 | ) 18 | unittest.TextTestRunner().run(suite) 19 | -------------------------------------------------------------------------------- /libpcap/pcap-septel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * pcap-septel.c: Packet capture interface for Intel Septel card 3 | * 4 | * The functionality of this code attempts to mimic that of pcap-linux as much 5 | * as possible. This code is only needed when compiling in the Intel/Septel 6 | * card code at the same time as another type of device. 7 | * 8 | * Authors: Gilbert HOYEK (gil_hoyek@hotmail.com), Elias M. KHOURY 9 | * (+961 3 485343); 10 | */ 11 | 12 | pcap_t *septel_create(const char *device, char *ebuf, int *is_ours); 13 | int septel_findalldevs(pcap_if_t **devlistp, char *errbuf); 14 | -------------------------------------------------------------------------------- /ncat/INSTALL: -------------------------------------------------------------------------------- 1 | Building Ncat 2 | ============= 3 | 4 | On UNIX systems, ideally, you should just be able to do: 5 | 6 | ./configure 7 | make 8 | 9 | After building is successful, to install: 10 | make install 11 | 12 | For instructions on how to build Ncat for Microsoft Windows or for far more 13 | in-depth compilation, installation, and removal notes, read the Nmap Install 14 | Guide at https://nmap.org/install/. 15 | 16 | For instructions on how to build Ncat Portable for Microsoft Windows, read 17 | the how-to available at https://secwiki.org/w/Nmap/Ncat_Portable. 18 | 19 | 20 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | compiler: 3 | - gcc 4 | - clang 5 | # Change this to your needs 6 | sudo: false 7 | script: mkdir /tmp/n && ./configure $SSL_FLAG $LUA_FLAG --prefix=/tmp/n && make && make check && make install && /tmp/n/bin/nmap -A localhost 8 | 9 | env: 10 | - SSL_FLAG="--without-openssl" LUA_FLAG="--without-liblua" 11 | - SSL_FLAG="" LUA_FLAG="--without-liblua" 12 | - SSL_FLAG="--without-openssl" LUA_FLAG="" 13 | - SSL_FLAG="" LUA_FLAG="" 14 | 15 | notifications: 16 | irc: 17 | channels: 18 | - "chat.freenode.net#nmap" 19 | on_success: change 20 | on_failure: always 21 | -------------------------------------------------------------------------------- /nping/nping-dev/pythonscripts/TemplateGettersSetters.txt: -------------------------------------------------------------------------------- 1 | 2 | /* Prototypes */ 3 | int setMETHNAME(TYPE val); 4 | TYPE getMETHNAME(); 5 | 6 | /** Sets METHNAME. 7 | * @return OP_SUCCESS on success and OP_FAILURE in case of error. */ 8 | int CLASSNAME::setMETHNAME(TYPE val){ 9 | 10 | this->ATTRNAME=val; 11 | 12 | return OP_SUCCESS; 13 | 14 | } /* End of setMETHNAME() */ 15 | 16 | 17 | /** Returns value of attribute ATTRNAME */ 18 | TYPE CLASSNAME::getMETHNAME(){ 19 | 20 | return this->ATTRNAME; 21 | 22 | } /* End of getMETHNAME() */ 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /nse_lpeg.cc: -------------------------------------------------------------------------------- 1 | extern "C" { 2 | #include "lauxlib.h" 3 | #include "lua.h" 4 | } 5 | 6 | /* Lua 5.3 support */ 7 | #define luaL_checkint luaL_checkinteger 8 | 9 | #undef lua_equal 10 | #define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ) 11 | 12 | #undef lua_getfenv 13 | #define lua_getfenv lua_getuservalue 14 | #undef lua_setfenv 15 | #define lua_setfenv lua_setuservalue 16 | 17 | #undef lua_objlen 18 | #define lua_objlen lua_rawlen 19 | 20 | #undef luaL_register 21 | #define luaL_register(L,n,f) \ 22 | { if ((n) == NULL) luaL_setfuncs(L,f,0); else luaL_newlib(L,f); } 23 | 24 | #include "lpeg.c" 25 | -------------------------------------------------------------------------------- /ncat/docs/examples/ipaccess: -------------------------------------------------------------------------------- 1 | # 2 | # This is a sample IP access list that 3 | # could potentially be used with Ncat 4 | # to allow or deny specific users from 5 | # connecting to an Ncat process, such as 6 | # a standard listen operation to being 7 | # able to access your newly spawned SOCKS4 8 | # server. 9 | # 10 | # Obviously, these IP addresses are pretty 11 | # useless to most people. It is an example 12 | # afterall. :) 13 | # 14 | # Chris Gibson, 15 | 16 | # lo interface. 17 | 127.0.0.1/8 18 | 19 | # eth0 internal network. 20 | 192.168.0.0/24 21 | 22 | # eth1 to outside world. 23 | 55.20.30.1/32 24 | -------------------------------------------------------------------------------- /nping/docs/AUTHORS: -------------------------------------------------------------------------------- 1 | Nping AUTHORS 2 | =============== 3 | 4 | Nping was originally written from the ground up by Luis MartinGarcia 5 | (luis.mgarc@gmail.com), during the Google Summer of Code program in 2009. Luis 6 | was mentored by Fyodor. 7 | 8 | Further development was done in the Google Summer of Code 2010 by Luis 9 | once again mentored by Fyodor. 10 | 11 | Many helpful comments, suggestions and other useful information were taken from 12 | the dev@nmap.org list as well as other contributors via email. 13 | 14 | Nping shares the Nmap infrastructure libraries (Nsock and Nbase) which were 15 | originally written by Fyodor. 16 | 17 | -------------------------------------------------------------------------------- /nping/global_structures.h: -------------------------------------------------------------------------------- 1 | #ifndef GLOBAL_STRUCTURES_H 2 | #define GLOBAL_STRUCTURES_H 3 | 4 | #include "nsock.h" 5 | #include "nbase.h" 6 | 7 | 8 | typedef struct service_lookup { 9 | char *name; 10 | u8 proto; 11 | u16 portno; 12 | } service_lookup; 13 | 14 | 15 | 16 | typedef struct m_data { 17 | nsock_pool nsp; 18 | nsock_iod nsi; 19 | int state; 20 | int protocol; 21 | unsigned short port; 22 | struct in_addr ip; 23 | int attempts; 24 | int max_attempts; /* how many attempts in one connection */ 25 | char *username; 26 | char *password; 27 | char *buf; 28 | int bufsize; 29 | } m_data; 30 | 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /liblua/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.9 2015/03/06 19:49:50 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "llimits.h" 12 | #include "lstate.h" 13 | 14 | #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \ 15 | "stack overflow");} 16 | 17 | #define adjustresults(L,nres) \ 18 | { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } 19 | 20 | #define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \ 21 | "not enough elements in the stack") 22 | 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /libpcap/Win32/Prj/libpcap.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "libpcap"=".\libpcap.dsp" - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /docs/leet-nmap-ascii-art-eye.txt: -------------------------------------------------------------------------------- 1 | 2 | ___.-------.___ 3 | _.-' ___.--;--.___ `-._ 4 | .-' _.-' / .+. \ `-._ `-. 5 | .' .-' |-|-o-|-| `-. `. 6 | (_ _) 7 | `--._``-..__`._|_.'__..-''_.--' 8 | ``--._________.--'' 9 | ____ _____ ____ ____ _ _______ 10 | |_ \|_ _||_ \ / _| / \ |_ __ \ 11 | | \ | | | \/ | / _ \ | |__) | 12 | | |\ \| | | |\ /| | / ___ \ | ___/ 13 | _| |_\ |_ _| |_\/_| |_ _/ / \ \_ _| |_ 14 | |_____|\____||_____||_____||____| |____||_____| 15 | 16 | -------------------------------------------------------------------------------- /docs/nmap-man-enclosure.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | ]> 9 | 10 | 11 | 12 | &refguide; 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /libdnet-stripped/include/dnet/tun.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tun.h 3 | * 4 | * Network tunnel device. 5 | * 6 | * Copyright (c) 2001 Dug Song 7 | * 8 | * $Id: tun.h 547 2005-01-25 21:30:40Z dugsong $ 9 | */ 10 | 11 | #ifndef DNET_TUN_H 12 | #define DNET_TUN_H 13 | 14 | typedef struct tun tun_t; 15 | 16 | __BEGIN_DECLS 17 | tun_t *tun_open(struct addr *src, struct addr *dst, int mtu); 18 | int tun_fileno(tun_t *tun); 19 | const char *tun_name(tun_t *tun); 20 | ssize_t tun_send(tun_t *tun, const void *buf, size_t size); 21 | ssize_t tun_recv(tun_t *tun, void *buf, size_t size); 22 | tun_t *tun_close(tun_t *tun); 23 | __END_DECLS 24 | 25 | #endif /* DNET_TUN_H */ 26 | -------------------------------------------------------------------------------- /nsock/src/aclocal.m4: -------------------------------------------------------------------------------- 1 | # generated automatically by aclocal 1.11.6 -*- Autoconf -*- 2 | 3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4 | # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 5 | # Inc. 6 | # This file is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | m4_include([acinclude.m4]) 16 | -------------------------------------------------------------------------------- /zenmap/test/xml_test12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libpcap/Makefile-devel-adds: -------------------------------------------------------------------------------- 1 | # 2 | # Auto-regenerate configure script or Makefile when things change. 3 | # From autoconf.info . Works best with GNU Make. 4 | # 5 | ${srcdir}/configure: configure.in aclocal.m4 6 | cd ${srcdir} && autoconf 7 | 8 | # autoheader might not change config.h.in, so touch a stamp file. 9 | ${srcdir}/config.h.in: ${srcdir}/stamp-h.in 10 | ${srcdir}/stamp-h.in: configure.in aclocal.m4 11 | cd ${srcdir} && autoheader 12 | echo timestamp > ${srcdir}/stamp-h.in 13 | 14 | config.h: stamp-h 15 | stamp-h: ${srcdir}/config.h.in config.status 16 | ./config.status 17 | 18 | Makefile: Makefile.in config.status 19 | ./config.status 20 | 21 | config.status: ${srcdir}/configure 22 | ./config.status --recheck 23 | -------------------------------------------------------------------------------- /nping/docs/leet-nping-ascii-art.txt: -------------------------------------------------------------------------------- 1 | o 2 | o 3 | o 4 | o o 5 | o o 6 | o o 7 | o o o 8 | o o o 9 | 888b 888 o o o 10 | 8888b 888 o o o 11 | 88888b 888 o o o 12 | 888Y88b 888 o 13 | 888 Y88b888 o 14 | 888 Y88888 15 | 888 Y8888 16 | 888 Y888 17 | 18 | --[NPING]-- 19 | -------------------------------------------------------------------------------- /libdnet-stripped/include/dnet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * dnet.h 3 | * 4 | * Copyright (c) 2001 Dug Song 5 | * 6 | * $Id: dnet.h 529 2004-09-10 03:10:01Z dugsong $ 7 | */ 8 | 9 | #ifndef DNET_H 10 | #define DNET_H 11 | 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #include 31 | #include 32 | 33 | #endif /* DNET_H */ 34 | -------------------------------------------------------------------------------- /scripts/daytime.nse: -------------------------------------------------------------------------------- 1 | local comm = require "comm" 2 | local shortport = require "shortport" 3 | 4 | description = [[ 5 | Retrieves the day and time from the Daytime service. 6 | ]] 7 | 8 | --- 9 | -- @output 10 | -- PORT STATE SERVICE 11 | -- 13/tcp open daytime 12 | -- |_daytime: Wed Mar 31 14:48:58 MDT 2010 13 | 14 | author = "Diman Todorov" 15 | 16 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 17 | 18 | categories = {"discovery", "safe"} 19 | 20 | 21 | portrule = shortport.port_or_service(13, "daytime", {"tcp", "udp"}) 22 | 23 | action = function(host, port) 24 | local status, result = comm.exchange(host, port, "dummy", {lines=1}) 25 | 26 | if status then 27 | return result 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /libdnet-stripped/acconfig.h: -------------------------------------------------------------------------------- 1 | @BOTTOM@ 2 | 3 | #include 4 | 5 | #ifdef HAVE_WINSOCK2_H 6 | # include 7 | # include 8 | #endif 9 | 10 | #ifdef __svr4__ 11 | # define BSD_COMP 1 12 | #endif 13 | 14 | #if defined(__osf__) && !defined(_SOCKADDR_LEN) 15 | # define _SOCKADDR_LEN 1 16 | #endif 17 | 18 | #ifndef HAVE_INET_PTON 19 | int inet_pton(int, const char *, void *); 20 | #endif 21 | 22 | #ifndef HAVE_STRLCAT 23 | int strlcat(char *, const char *, int); 24 | #endif 25 | 26 | #ifndef HAVE_STRLCPY 27 | int strlcpy(char *, const char *, int); 28 | #endif 29 | 30 | #ifndef HAVE_STRSEP 31 | char *strsep(char **, const char *); 32 | #endif 33 | 34 | #ifndef HAVE_SOCKLEN_T 35 | typedef int socklen_t; 36 | #endif 37 | -------------------------------------------------------------------------------- /zenmap/install_scripts/README: -------------------------------------------------------------------------------- 1 | Every script under this directory is supposed to be executed from the 2 | top of the source tree. Don't get into this directory, nor any other 3 | under this one to execute any of the scripts, or they're not going to 4 | work as expected. 5 | 6 | This is a description of the scripts in this directory and its 7 | subdirectories. 8 | 9 | macosx: 10 | Files and scripts used to build Mac OS X packages. See macosx/README for a 11 | description of the files in this directory. 12 | 13 | utils/version_update.py: 14 | Updates the Zenmap version number everywhere it needs to be. 15 | 16 | windows/copy_and_compile.bat: 17 | Builds a Windows executable using py2exe. 18 | 19 | windows/nmap-eye.ico: 20 | An icon used on Windows. 21 | -------------------------------------------------------------------------------- /ndiff/test-scans/empty.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /mswin32/license-format/licsed_1: -------------------------------------------------------------------------------- 1 | # remove horizontal asterisks 2 | s@\*\*@@g 3 | 4 | # preserve double hyphens between words in GNU GPL 5 | s@\([^\-]\)\-\-\([^\-]\)@\1SDFGHdbldash\2@g 6 | 7 | # remove horizontal hyphens 8 | s@\-\-@@g 9 | 10 | # reintroduce double hyphens 11 | s@SDFGHdbldash@--@g 12 | 13 | # remove trailing asterisk 14 | s@[ ]*\*[ ]*$@@g 15 | 16 | # remove leading asterisk 17 | s@^[ ]*\*@@ 18 | 19 | # remove lonely slash 20 | s@^/$@@g 21 | 22 | # remove leading whitespace 23 | s@^[ ]*@@g 24 | 25 | # preserve bullets 26 | s@^o @ oSDFGHbullet @g 27 | 28 | # preserve sentence spacing 29 | s@\. \([A-Za-z0-9]\)@.SDFGHJdblspace\1@g 30 | 31 | # remove first line 32 | 1d 33 | 34 | # read entire input and preserve paragraph separation 35 | s@^$@ SDFGHJdblnewline @ 36 | 37 | -------------------------------------------------------------------------------- /libpcap/NMAP_MODIFICATIONS/HOWTO-UPGRADE: -------------------------------------------------------------------------------- 1 | Download libpcap-X.Y.tar.gz from http://www.tcpdump.org/#latest-release 2 | and verify the signature. 3 | 4 | cd 5 | # Make a copy of this directory. 6 | cp -r ~/nmap/libpcap/NMAP_MODIFICATIONS . 7 | tar xzvf libpcap-X.Y.tar.gz 8 | cd nmap 9 | rsync -rv --delete ~/libpcap-X.Y/ ~/nmap/libpcap/ 10 | git add -A libpcap 11 | cd libpcap 12 | ./configure 13 | make grammar.c scanner.c scanner.h tokdefs.h 14 | git add grammar.c scanner.c scanner.h tokdefs.h 15 | cd .. 16 | # Apply patches. 17 | git apply ~/NMAP_MODIFICATIONS/000* 18 | # Make changes as necessary and update the patch files 19 | cd libpcap 20 | autoconf 21 | cd .. 22 | git add -u libpcap 23 | mv ~/NMAP_MODIFICATIONS libpcap/ 24 | git add libpcap/NMAP_MODIFICATIONS 25 | git commit -m "Upgrade libpcap to X.Y." 26 | -------------------------------------------------------------------------------- /nping/nping-dev/pythonscripts/addGettersSetters.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | o = open("OutputGettersSetters.txt","a") 5 | 6 | classname = raw_input("Class Name: ") 7 | my_range = raw_input("Number of attrs: ") 8 | methname= [] 9 | attrname = [] 10 | attrtype= [] 11 | 12 | for i in range( int(my_range) ): 13 | methname.append( raw_input("Method Name:") ) 14 | attrname.append ( raw_input("Attr Name: ") ) 15 | attrtype.append(raw_input("Attr type:") ) 16 | 17 | for line in open("TemplateGettersSetters.txt"): 18 | line = line.replace("METHNAME",methname[i]) 19 | line = line.replace("TYPE",attrtype[i]) 20 | line = line.replace("ATTRNAME",attrname[i]) 21 | line = line.replace("CLASSNAME",classname) 22 | o.write(line) 23 | 24 | 25 | o.close() 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /liblinear/blas/blas.h: -------------------------------------------------------------------------------- 1 | /* blas.h -- C header file for BLAS Ver 1.0 */ 2 | /* Jesse Bennett March 23, 2000 */ 3 | 4 | /** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed." 5 | 6 | - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */ 7 | 8 | #ifndef BLAS_INCLUDE 9 | #define BLAS_INCLUDE 10 | 11 | /* Data types specific to BLAS implementation */ 12 | typedef struct { float r, i; } fcomplex; 13 | typedef struct { double r, i; } dcomplex; 14 | typedef int blasbool; 15 | 16 | #include "blasp.h" /* Prototypes for all BLAS functions */ 17 | 18 | #define FALSE 0 19 | #define TRUE 1 20 | 21 | /* Macro functions */ 22 | #define MIN(a,b) ((a) <= (b) ? (a) : (b)) 23 | #define MAX(a,b) ((a) >= (b) ? (a) : (b)) 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /nselib/data/psexec/experimental.lua: -------------------------------------------------------------------------------- 1 | ---This is the configuration file for modules that aren't quite ready for prime 2 | -- time yet. 3 | 4 | 5 | -- Any variable in the 'config' table in smb-psexec.nse can be overriden in the 6 | -- 'overrides' table. Most of them are not really recommended, such as the host, 7 | -- key, etc. 8 | overrides = {} 9 | --overrides.timeout = 40 10 | 11 | modules = {} 12 | local mod 13 | 14 | 15 | -- I can't get fport to work for me, so I'm going to leave this one in 'experimental' for now 16 | --mod = {} 17 | --mod.upload = true 18 | --mod.name = "Fport" 19 | --mod.program = "Fport.exe" 20 | --mod.url = "http://www.foundstone.com/us/resources/proddesc/fport.htm" 21 | --mod.maxtime = 1 22 | --mod.noblank = true 23 | --table.insert(modules, mod) 24 | 25 | -------------------------------------------------------------------------------- /libdnet-stripped/src/fw-none.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fw-none.c 3 | * 4 | * Copyright (c) 2000 Dug Song 5 | * 6 | * $Id: fw-none.c 208 2002-01-20 21:23:28Z dugsong $ 7 | */ 8 | 9 | #include "config.h" 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include "dnet.h" 16 | 17 | fw_t * 18 | fw_open(void) 19 | { 20 | errno = ENOSYS; 21 | return (NULL); 22 | } 23 | 24 | int 25 | fw_add(fw_t *f, const struct fw_rule *rule) 26 | { 27 | errno = ENOSYS; 28 | return (-1); 29 | } 30 | 31 | int 32 | fw_delete(fw_t *f, const struct fw_rule *rule) 33 | { 34 | errno = ENOSYS; 35 | return (-1); 36 | } 37 | 38 | int 39 | fw_loop(fw_t *f, fw_handler callback, void *arg) 40 | { 41 | errno = ENOSYS; 42 | return (-1); 43 | } 44 | 45 | fw_t * 46 | fw_close(fw_t *f) 47 | { 48 | return (NULL); 49 | } 50 | -------------------------------------------------------------------------------- /libpcap/chmod_bpf: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # 4 | # Unfortunately, Mac OS X's devfs is based on the old FreeBSD 5 | # one, not the current one, so there's no way to configure it 6 | # to create BPF devices with particular owners or groups. 7 | # This startup item will make it owned by the admin group, 8 | # with permissions rw-rw----, so that anybody in the admin 9 | # group can use programs that capture or send raw packets. 10 | # 11 | # Change this as appropriate for your site, e.g. to make 12 | # it owned by a particular user without changing the permissions, 13 | # so only that user and the super-user can capture or send raw 14 | # packets, or give it the permissions rw-r-----, so that 15 | # only the super-user can send raw packets but anybody in the 16 | # admin group can capture packets. 17 | # 18 | chgrp admin /dev/bpf* 19 | chmod g+rw /dev/bpf* 20 | -------------------------------------------------------------------------------- /liblinear/tron.h: -------------------------------------------------------------------------------- 1 | #ifndef _TRON_H 2 | #define _TRON_H 3 | 4 | class function 5 | { 6 | public: 7 | virtual double fun(double *w) = 0 ; 8 | virtual void grad(double *w, double *g) = 0 ; 9 | virtual void Hv(double *s, double *Hs) = 0 ; 10 | 11 | virtual int get_nr_variable(void) = 0 ; 12 | virtual ~function(void){} 13 | }; 14 | 15 | class TRON 16 | { 17 | public: 18 | TRON(const function *fun_obj, double eps = 0.1, int max_iter = 1000); 19 | ~TRON(); 20 | 21 | void tron(double *w); 22 | void set_print_string(void (*i_print) (const char *buf)); 23 | 24 | private: 25 | int trcg(double delta, double *g, double *s, double *r); 26 | double norm_inf(int n, double *x); 27 | 28 | double eps; 29 | int max_iter; 30 | function *fun_obj; 31 | void info(const char *fmt,...); 32 | void (*tron_print_string)(const char *buf); 33 | }; 34 | #endif 35 | -------------------------------------------------------------------------------- /ndiff/test-scans/down.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /scripts/smtp-strangeport.nse: -------------------------------------------------------------------------------- 1 | description = [[ 2 | Checks if SMTP is running on a non-standard port. 3 | 4 | This may indicate that crackers or script kiddies have set up a backdoor on the 5 | system to send spam or control the machine. 6 | ]] 7 | 8 | --- 9 | -- @output 10 | -- 22/tcp open smtp 11 | -- |_ smtp-strangeport: Mail server on unusual port: possible malware 12 | 13 | author = "Diman Todorov" 14 | 15 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 16 | 17 | categories = {"malware", "safe"} 18 | 19 | portrule = function(host, port) 20 | return port.service == "smtp" and 21 | port.number ~= 25 and port.number ~= 465 and port.number ~= 587 22 | and port.protocol == "tcp" 23 | and port.state == "open" 24 | end 25 | 26 | action = function() 27 | return "Mail server on unusual port: possible malware" 28 | end 29 | 30 | -------------------------------------------------------------------------------- /macosx/nmap.pmdoc/01nmap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.insecure.nmap.Nmap.pkg 4 | 1 5 | 6 | 7 | 8 | Nmap 9 | / 10 | 11 | 12 | 13 | 14 | parent 15 | installFrom.isRelativeType 16 | 17 | 18 | 01nmap-contents.xml 19 | /CVS$ 20 | /\.svn$ 21 | /\.cvsignore$ 22 | /\.cvspass$ 23 | /\.DS_Store$ 24 | 25 | 26 | -------------------------------------------------------------------------------- /macosx/nmap.pmdoc/03ncat.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.insecure.nmap.Ncat.pkg 4 | 1 5 | 6 | 7 | 8 | Ncat 9 | / 10 | 11 | 12 | 13 | 14 | parent 15 | installFrom.isRelativeType 16 | 17 | 18 | 03ncat-contents.xml 19 | /CVS$ 20 | /\.svn$ 21 | /\.cvsignore$ 22 | /\.cvspass$ 23 | /\.DS_Store$ 24 | 25 | 26 | -------------------------------------------------------------------------------- /macosx/nmap.pmdoc/04ndiff.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.insecure.nmap.Ndiff.pkg 4 | 1 5 | 6 | 7 | 8 | Ndiff 9 | / 10 | 11 | 12 | 13 | 14 | parent 15 | installFrom.isRelativeType 16 | 17 | 18 | 04ndiff-contents.xml 19 | /CVS$ 20 | /\.svn$ 21 | /\.cvsignore$ 22 | /\.cvspass$ 23 | /\.DS_Store$ 24 | 25 | 26 | -------------------------------------------------------------------------------- /libdnet-stripped/src/eth-none.c: -------------------------------------------------------------------------------- 1 | /* 2 | * eth-none.c 3 | * 4 | * Copyright (c) 2000 Dug Song 5 | * 6 | * $Id: eth-none.c 547 2005-01-25 21:30:40Z dugsong $ 7 | */ 8 | 9 | #include "config.h" 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include "dnet.h" 18 | 19 | eth_t * 20 | eth_open(const char *device) 21 | { 22 | errno = ENOSYS; 23 | return (NULL); 24 | } 25 | 26 | ssize_t 27 | eth_send(eth_t *e, const void *buf, size_t len) 28 | { 29 | errno = ENOSYS; 30 | return (-1); 31 | } 32 | 33 | eth_t * 34 | eth_close(eth_t *e) 35 | { 36 | return (NULL); 37 | } 38 | 39 | int 40 | eth_get(eth_t *e, eth_addr_t *ea) 41 | { 42 | errno = ENOSYS; 43 | return (-1); 44 | } 45 | 46 | int 47 | eth_set(eth_t *e, const eth_addr_t *ea) 48 | { 49 | errno = ENOSYS; 50 | return (-1); 51 | } 52 | -------------------------------------------------------------------------------- /libpcap/dlpisubs.h: -------------------------------------------------------------------------------- 1 | #ifndef dlpisubs_h 2 | #define dlpisubs_h 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /* 9 | * Private data for capturing on DLPI devices. 10 | */ 11 | struct pcap_dlpi { 12 | #ifdef HAVE_LIBDLPI 13 | dlpi_handle_t dlpi_hd; 14 | #endif /* HAVE_LIBDLPI */ 15 | #ifdef DL_HP_RAWDLS 16 | int send_fd; 17 | #endif /* DL_HP_RAWDLS */ 18 | 19 | struct pcap_stat stat; 20 | }; 21 | 22 | /* 23 | * Functions defined by dlpisubs.c. 24 | */ 25 | int pcap_stats_dlpi(pcap_t *, struct pcap_stat *); 26 | int pcap_process_pkts(pcap_t *, pcap_handler, u_char *, int, u_char *, int); 27 | int pcap_process_mactype(pcap_t *, u_int); 28 | #ifdef HAVE_SYS_BUFMOD_H 29 | int pcap_conf_bufmod(pcap_t *, int); 30 | #endif 31 | int pcap_alloc_databuf(pcap_t *); 32 | int strioctl(int, int, int, char *); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /macosx/nmap.pmdoc/05nping.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.insecure.nping.Nping.pkg 4 | 1 5 | 6 | 7 | 8 | Nping 9 | / 10 | 11 | 12 | 13 | 14 | parent 15 | installFrom.isRelativeType 16 | 17 | 18 | 01nping-contents.xml 19 | /CVS$ 20 | /\.svn$ 21 | /\.cvsignore$ 22 | /\.cvspass$ 23 | /\.DS_Store$ 24 | 25 | 26 | -------------------------------------------------------------------------------- /libdnet-stripped/include/dnet/udp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * udp.h 3 | * 4 | * User Datagram Protocol (RFC 768). 5 | * 6 | * Copyright (c) 2000 Dug Song 7 | * 8 | * $Id: udp.h 330 2002-04-02 05:05:39Z dugsong $ 9 | */ 10 | 11 | #ifndef DNET_UDP_H 12 | #define DNET_UDP_H 13 | 14 | #define UDP_HDR_LEN 8 15 | 16 | struct udp_hdr { 17 | uint16_t uh_sport; /* source port */ 18 | uint16_t uh_dport; /* destination port */ 19 | uint16_t uh_ulen; /* udp length (including header) */ 20 | uint16_t uh_sum; /* udp checksum */ 21 | }; 22 | 23 | #define UDP_PORT_MAX 65535 24 | 25 | #define udp_pack_hdr(hdr, sport, dport, ulen) do { \ 26 | struct udp_hdr *udp_pack_p = (struct udp_hdr *)(hdr); \ 27 | udp_pack_p->uh_sport = htons(sport); \ 28 | udp_pack_p->uh_dport = htons(dport); \ 29 | udp_pack_p->uh_ulen = htons(ulen); \ 30 | } while (0) 31 | 32 | #endif /* DNET_UDP_H */ 33 | -------------------------------------------------------------------------------- /libpcap/Win32/Include/Gnuc.h: -------------------------------------------------------------------------------- 1 | /* Define __P() macro, if necessary */ 2 | 3 | #ifndef __P 4 | #if __STDC__ 5 | #define __P(protos) protos 6 | #else 7 | #define __P(protos) () 8 | #endif 9 | #endif 10 | 11 | /* inline foo */ 12 | #ifndef __cplusplus 13 | #ifdef __GNUC__ 14 | #define inline __inline 15 | #else 16 | #define inline 17 | #endif 18 | #endif 19 | 20 | /* 21 | * Handle new and old "dead" routine prototypes 22 | * 23 | * For example: 24 | * 25 | * __dead void foo(void) __attribute__((volatile)); 26 | * 27 | */ 28 | #ifdef __GNUC__ 29 | #ifndef __dead 30 | #define __dead volatile 31 | #endif 32 | #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) 33 | #ifndef __attribute__ 34 | #define __attribute__(args) 35 | #endif 36 | #endif 37 | #else 38 | #ifndef __dead 39 | #define __dead 40 | #endif 41 | #ifndef __attribute__ 42 | #define __attribute__(args) 43 | #endif 44 | #endif 45 | -------------------------------------------------------------------------------- /macosx/nmap.pmdoc/06nmap-update.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.insecure.nmap.nmap-update.pkg 4 | 1 5 | 6 | 7 | 8 | nmap-update 9 | / 10 | 11 | 12 | 13 | 14 | parent 15 | installFrom.isRelativeType 16 | 17 | 18 | 06nmap-update-contents.xml 19 | /CVS$ 20 | /\.svn$ 21 | /\.cvsignore$ 22 | /\.cvspass$ 23 | /\.DS_Store$ 24 | 25 | 26 | -------------------------------------------------------------------------------- /nsock/tests/Makefile.in: -------------------------------------------------------------------------------- 1 | # 2 | # nsock regression test suite 3 | # Same license as nmap -- see https://nmap.org/book/man-legal.html 4 | ## 5 | 6 | NBASEDIR=@NBASEDIR@ 7 | NSOCKLIB=../src/libnsock.a 8 | NBASELIB=$(NBASEDIR)/libnbase.a 9 | 10 | CC = @CC@ 11 | CPPFLAGS = @CPPFLAGS@ -I../include 12 | CFLAGS = @CFLAGS@ 13 | LDFLAGS = @LDFLAGS@ 14 | LIBS = @OPENSSL_LIBS@ @LIBPCAP_LIBS@ @LIBS@ 15 | 16 | SRC = tests_main.c \ 17 | basic.c \ 18 | timer.c \ 19 | logs.c \ 20 | connect.c \ 21 | ghlists.c \ 22 | ghheaps.c \ 23 | cancel.c 24 | 25 | OBJ = $(SRC:.c=.o) 26 | 27 | EXE = tests_main 28 | 29 | all: $(SRC) $(EXE) 30 | 31 | $(EXE): $(OBJ) 32 | $(CC) $(LDFLAGS) $(OBJ) -o $@ $(NSOCKLIB) $(NBASELIB) $(LIBS) 33 | 34 | .c.o: 35 | $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ 36 | 37 | clean: 38 | $(RM) $(OBJ) $(EXE) 39 | 40 | rebuild: clean $(EXE) 41 | 42 | .PHONY: clean rebuild 43 | -------------------------------------------------------------------------------- /ncat/mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Public domain 6 | 7 | # $Id: mkinstalldirs,v 1.1.1.1 2006/01/21 16:58:25 evii Exp $ 8 | 9 | errstatus=0 10 | 11 | for file 12 | do 13 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 14 | shift 15 | 16 | pathcomp= 17 | for d 18 | do 19 | pathcomp="$pathcomp$d" 20 | case "$pathcomp" in 21 | -* ) pathcomp=./$pathcomp ;; 22 | esac 23 | 24 | if test ! -d "$pathcomp"; then 25 | echo "mkdir $pathcomp" 26 | 27 | mkdir "$pathcomp" || lasterr=$? 28 | 29 | if test ! -d "$pathcomp"; then 30 | errstatus=$lasterr 31 | fi 32 | fi 33 | 34 | pathcomp="$pathcomp/" 35 | done 36 | done 37 | 38 | exit $errstatus 39 | 40 | # mkinstalldirs ends here 41 | -------------------------------------------------------------------------------- /nsock/examples/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | CCOPT = 3 | DEFS = 4 | NBASEDIR=../../nbase 5 | NSOCKLIB=../src/libnsock.a 6 | NBASELIB=$(NBASEDIR)/libnbase.a 7 | OPENSSLLIB=-lssl -lpcap -lcrypto 8 | INCLS = -I../include -I$(NBASEDIR) 9 | CFLAGS = -I/usr/local/include -Wall -g $(CCOPT) $(DEFS) $(INCLS) 10 | LDFLAGS = 11 | PCAPBASEDIR=../../libpcap 12 | PCAPLIB=$(PCAPBASEDIR)/libpcap.a 13 | RM = rm -f 14 | 15 | TARGETS = nsock_test_timers nsock_telnet 16 | 17 | all: $(TARGETS) 18 | 19 | nsock_telnet: nsock_telnet.o $(NSOCKLIB) 20 | $(CC) -o $@ $(CFLAGS) nsock_telnet.o $(NSOCKLIB) $(NBASELIB) $(OPENSSLLIB) 21 | 22 | nsock_test_timers: nsock_test_timers.o $(NSOCKLIB) 23 | $(CC) -o $@ $(CFLAGS) nsock_test_timers.o $(NSOCKLIB) $(NBASELIB) $(OPENSSLLIB) 24 | 25 | nsock_pcap: nsock_pcap.o $(NSOCKLIB) $(PCAPLIB) 26 | $(CC) -o $@ $(CFLAGS) nsock_pcap.o $(NSOCKLIB) $(NBASELIB) $(OPENSSLLIB) $(PCAPLIB) 27 | 28 | clean: 29 | $(RM) *.o $(TARGETS) 30 | -------------------------------------------------------------------------------- /zenmap/share/zenmap/docs/help.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Nmap/Zenmap Help 5 | 6 | 7 |

Nmap/Zenmap Help

8 | 9 |

Nmap is documented extensively online. Zenmap documentation exists and is improving. You can find it all at the Nmap documentation directory. Further information is available from the Zenmap web page itself. 10 | 11 |

On Unix, you can also run man nmap and man zenmap to learn about your installed Nmap version, though the online Nmap docs are more comprehensive and always up-to-date. 12 | 13 |

For quick reference to the most popular Nmap command-line arguments, run nmap -h. 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /libdnet-stripped/include/dnet/rand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * rand.h 3 | * 4 | * Pseudo-random number generation, based on OpenBSD arc4random(). 5 | * 6 | * Copyright (c) 2000 Dug Song 7 | * Copyright (c) 1996 David Mazieres 8 | * 9 | * $Id: rand.h 340 2002-04-07 19:01:25Z dugsong $ 10 | */ 11 | 12 | #ifndef DNET_RAND_H 13 | #define DNET_RAND_H 14 | 15 | typedef struct rand_handle rand_t; 16 | 17 | __BEGIN_DECLS 18 | rand_t *rand_open(void); 19 | 20 | int rand_get(rand_t *r, void *buf, size_t len); 21 | int rand_set(rand_t *r, const void *seed, size_t len); 22 | int rand_add(rand_t *r, const void *buf, size_t len); 23 | 24 | uint8_t rand_uint8(rand_t *r); 25 | uint16_t rand_uint16(rand_t *r); 26 | uint32_t rand_uint32(rand_t *r); 27 | 28 | int rand_shuffle(rand_t *r, void *base, size_t nmemb, size_t size); 29 | 30 | rand_t *rand_close(rand_t *r); 31 | __END_DECLS 32 | 33 | #endif /* DNET_RAND_H */ 34 | -------------------------------------------------------------------------------- /liblua/lundump.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lundump.h,v 1.45 2015/09/08 15:41:05 roberto Exp $ 3 | ** load precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lundump_h 8 | #define lundump_h 9 | 10 | #include "llimits.h" 11 | #include "lobject.h" 12 | #include "lzio.h" 13 | 14 | 15 | /* data to catch conversion errors */ 16 | #define LUAC_DATA "\x19\x93\r\n\x1a\n" 17 | 18 | #define LUAC_INT 0x5678 19 | #define LUAC_NUM cast_num(370.5) 20 | 21 | #define MYINT(s) (s[0]-'0') 22 | #define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)) 23 | #define LUAC_FORMAT 0 /* this is the official format */ 24 | 25 | /* load one chunk; from lundump.c */ 26 | LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name); 27 | 28 | /* dump one chunk; from ldump.c */ 29 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, 30 | void* data, int strip); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /libpcap/LICENSE: -------------------------------------------------------------------------------- 1 | License: BSD 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in 11 | the documentation and/or other materials provided with the 12 | distribution. 13 | 3. The names of the authors may not be used to endorse or promote 14 | products derived from this software without specific prior 15 | written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 18 | IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | -------------------------------------------------------------------------------- /docs/leet-nmap-ascii-art.txt: -------------------------------------------------------------------------------- 1 | ( ) /\ _ ( 2 | \ | ( \ ( \.( ) _____ 3 | \ \ \ ` ` ) \ ( ___ / _ \ 4 | (_` \+ . x ( .\ \/ \____-----------/ (o) \_ 5 | - .- \+ ; ( O \____ 6 | (__ +- .( -'.- <. \_____________ ` \ / 7 | (_____ ._._: <_ - <- _- _ VVVVVVV VV V\ \/ 8 | . /./.+- . .- / +-- - . (--_AAAAAAA__A_/ | 9 | (__ ' /x / x _/ ( \______________//_ \_______ 10 | , x / ( ' . / . / \___' \ / 11 | / / _/ / + | \ / 12 | ' (__/ / \/ 13 | / \ 14 | -------------------------------------------------------------------------------- /zenmap/install_scripts/windows/boot_script.py: -------------------------------------------------------------------------------- 1 | # Custom py2exe boot script 2 | 3 | # This runs after py2exe's boot_common.py. That file overrides sys.stderr and 4 | # sys.stdout to write to a logfile and a black hole, respectively. The location 5 | # for the stderr logfile is sys.executable + '.log', though, which is not 6 | # usually writable. We'll change it here to write to some other writable path. 7 | 8 | 9 | import sys 10 | import os 11 | import os.path 12 | 13 | 14 | #sys.stderr.write("Enter boot_script\n") 15 | # Only do this if py2exe installed its Stderr object 16 | if sys.stderr.__class__.__name__ == "Stderr": 17 | logdir = os.environ.get("LOCALAPPDATA", 18 | os.environ.get("APPDATA", 19 | os.environ.get("TEMP", ""))) 20 | 21 | if sys.stderr._file is not None: 22 | sys.stderr._file.close() 23 | sys.stderr._file = open(os.path.join(logdir, "zenmap.exe.log"), 'a') 24 | 25 | 26 | del os 27 | del sys 28 | -------------------------------------------------------------------------------- /docs/licenses/BSD-modified.txt: -------------------------------------------------------------------------------- 1 | License: BSD 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in 11 | the documentation and/or other materials provided with the 12 | distribution. 13 | 3. The names of the authors may not be used to endorse or promote 14 | products derived from this software without specific prior 15 | written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 18 | IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | -------------------------------------------------------------------------------- /mswin32/winfix.h: -------------------------------------------------------------------------------- 1 | #ifndef WINFIX_H 2 | #define WINFIX_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #ifndef EXTERNC 9 | # ifdef __cplusplus 10 | # define EXTERNC extern "C" 11 | # else 12 | # define EXTERNC extern 13 | # endif 14 | #endif 15 | 16 | // windows-specific options 17 | 18 | #include 19 | 20 | /* (exported) functions */ 21 | /* The code that has no preconditions to being called, so it can be 22 | executed before even Nmap options parsing (so o.debugging and the 23 | like don't need to be used. Its main function is to do 24 | WSAStartup() as some of the option parsing code does DNS 25 | resolution */ 26 | EXTERNC void win_pre_init(); 27 | 28 | /* Requires that win_pre_init() has already been called, also that 29 | options processing has been done so that o.debugging is 30 | available */ 31 | EXTERNC void win_init(); 32 | EXTERNC void win_barf(const char *msg); 33 | #endif 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /nping/winfix.h: -------------------------------------------------------------------------------- 1 | #ifndef WINFIX_H 2 | #define WINFIX_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #ifndef EXTERNC 9 | # ifdef __cplusplus 10 | # define EXTERNC extern "C" 11 | # else 12 | # define EXTERNC extern 13 | # endif 14 | #endif 15 | 16 | // windows-specific options 17 | 18 | #include 19 | 20 | /* (exported) functions */ 21 | /* The code that has no preconditions to being called, so it can be 22 | executed before even Nmap options parsing (so o.debugging and the 23 | like don't need to be used. Its main function is to do 24 | WSAStartup() as some of the option parsing code does DNS 25 | resolution */ 26 | EXTERNC void win_pre_init(); 27 | 28 | /* Requires that win_pre_init() has already been called, also that 29 | options processing has been done so that o.debugging is 30 | available */ 31 | EXTERNC void win_init(); 32 | EXTERNC void win_barf(const char *msg); 33 | #endif 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /libdnet-stripped/dnet-config.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # $Id: dnet-config.in 91 2001-10-19 01:29:00Z dugsong $ 4 | 5 | prefix=@prefix@ 6 | exec_prefix=@prefix@ 7 | 8 | usage() 9 | { 10 | cat <&2 22 | fi 23 | 24 | while test $# -gt 0; do 25 | case "$1" in 26 | -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 27 | *) optarg= ;; 28 | esac 29 | 30 | case $1 in 31 | --version) 32 | echo @VERSION@ 33 | ;; 34 | --cflags) 35 | echo_cflags=yes 36 | ;; 37 | --libs) 38 | echo_libs=yes 39 | ;; 40 | *) 41 | usage 1 1>&2 42 | ;; 43 | esac 44 | shift 45 | done 46 | 47 | if test "$echo_cflags" = "yes"; then 48 | echo -I@includedir@ 49 | fi 50 | 51 | if test "$echo_libs" = "yes"; then 52 | echo -L@libdir@ -ldnet @LIBS@ 53 | fi 54 | 55 | -------------------------------------------------------------------------------- /libdnet-stripped/src/arp-none.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arp-none.c 3 | * 4 | * Copyright (c) 2000 Dug Song 5 | * 6 | * $Id: arp-none.c 252 2002-02-02 04:15:57Z dugsong $ 7 | */ 8 | 9 | #include "config.h" 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include "dnet.h" 18 | 19 | arp_t * 20 | arp_open(void) 21 | { 22 | errno = ENOSYS; 23 | return (NULL); 24 | } 25 | 26 | int 27 | arp_add(arp_t *a, const struct arp_entry *entry) 28 | { 29 | errno = ENOSYS; 30 | return (-1); 31 | } 32 | 33 | int 34 | arp_delete(arp_t *a, const struct arp_entry *entry) 35 | { 36 | errno = ENOSYS; 37 | return (-1); 38 | } 39 | 40 | int 41 | arp_get(arp_t *a, struct arp_entry *entry) 42 | { 43 | errno = ENOSYS; 44 | return (-1); 45 | } 46 | 47 | int 48 | arp_loop(arp_t *a, arp_handler callback, void *arg) 49 | { 50 | errno = ENOSYS; 51 | return (-1); 52 | } 53 | 54 | arp_t * 55 | arp_close(arp_t *a) 56 | { 57 | return (NULL); 58 | } 59 | -------------------------------------------------------------------------------- /libdnet-stripped/src/tun-none.c: -------------------------------------------------------------------------------- 1 | /* 2 | * tun-none.c 3 | * 4 | * Copyright (c) 2001 Dug Song 5 | * 6 | * $Id: tun-none.c 548 2005-01-30 06:01:57Z dugsong $ 7 | */ 8 | 9 | #include "config.h" 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include "dnet.h" 18 | 19 | tun_t * 20 | tun_open(struct addr *src, struct addr *dst, int mtu) 21 | { 22 | errno = ENOSYS; 23 | return (NULL); 24 | } 25 | 26 | const char * 27 | tun_name(tun_t *tun) 28 | { 29 | errno = ENOSYS; 30 | return (NULL); 31 | } 32 | 33 | int 34 | tun_fileno(tun_t *tun) 35 | { 36 | errno = ENOSYS; 37 | return (-1); 38 | } 39 | 40 | ssize_t 41 | tun_send(tun_t *tun, const void *buf, size_t size) 42 | { 43 | errno = ENOSYS; 44 | return (-1); 45 | } 46 | 47 | ssize_t 48 | tun_recv(tun_t *tun, void *buf, size_t size) 49 | { 50 | errno = ENOSYS; 51 | return (-1); 52 | } 53 | 54 | tun_t * 55 | tun_close(tun_t *tun) 56 | { 57 | return (NULL); 58 | } 59 | -------------------------------------------------------------------------------- /libpcap/NMAP_MODIFICATIONS/0003-Disable-TPACKET_V3-in-included-libpcap.-Still-broken.patch: -------------------------------------------------------------------------------- 1 | From 4523e52bb5c54f4d65cd3672e8f875c137b44f77 Mon Sep 17 00:00:00 2001 2 | From: Daniel Miller 3 | Date: Tue, 15 Sep 2015 13:16:39 +0000 4 | Subject: [PATCH] Disable TPACKET_V3 in included libpcap. Still broken, see #34 5 | 6 | --- 7 | libpcap/pcap-linux.c | 4 ++++ 8 | 1 file changed, 4 insertions(+) 9 | 10 | diff --git a/libpcap/pcap-linux.c b/libpcap/pcap-linux.c 11 | index a226da1..a17c250 100644 12 | --- a/libpcap/pcap-linux.c 13 | +++ b/libpcap/pcap-linux.c 14 | @@ -188,6 +188,10 @@ 15 | # endif /* PACKET_HOST */ 16 | 17 | 18 | + /* TPACKET_V3 is broken. Temporarily disabling support here until upstream 19 | + * libpcap addresses the issue. */ 20 | +#undef TPACKET3_HDRLEN 21 | + 22 | /* check for memory mapped access avaibility. We assume every needed 23 | * struct is defined if the macro TPACKET_HDRLEN is defined, because it 24 | * uses many ring related structs and macros */ 25 | -- 26 | 1.9.1 27 | 28 | -------------------------------------------------------------------------------- /liblinear/Makefile.win: -------------------------------------------------------------------------------- 1 | #You must ensure nmake.exe, cl.exe, link.exe are in system path. 2 | #VCVARS32.bat 3 | #Under dosbox prompt 4 | #nmake -f Makefile.win 5 | 6 | ########################################## 7 | CXXC = cl.exe 8 | CFLAGS = -nologo -O2 -EHsc -I. -D __WIN32__ -D _CRT_SECURE_NO_DEPRECATE 9 | TARGET = windows 10 | 11 | all: $(TARGET)\train.exe $(TARGET)\predict.exe 12 | 13 | $(TARGET)\train.exe: tron.obj linear.obj train.c blas\*.c 14 | $(CXX) $(CFLAGS) -Fe$(TARGET)\train.exe tron.obj linear.obj train.c blas\*.c 15 | 16 | $(TARGET)\predict.exe: tron.obj linear.obj predict.c blas\*.c 17 | $(CXX) $(CFLAGS) -Fe$(TARGET)\predict.exe tron.obj linear.obj predict.c blas\*.c 18 | 19 | linear.obj: linear.cpp linear.h 20 | $(CXX) $(CFLAGS) -c linear.cpp 21 | 22 | tron.obj: tron.cpp tron.h 23 | $(CXX) $(CFLAGS) -c tron.cpp 24 | 25 | lib: linear.cpp linear.h linear.def tron.obj 26 | $(CXX) $(CFLAGS) -LD linear.cpp tron.obj blas\*.c -Fe$(TARGET)\liblinear -link -DEF:linear.def 27 | 28 | clean: 29 | -erase /Q *.obj $(TARGET)\. 30 | 31 | -------------------------------------------------------------------------------- /nselib/data/jdwp-class/JDWPExecCmd.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | 3 | /* This is the JDWPExecCmd source used for jdwp-exec script to execute 4 | * a command on the remote system. 5 | * 6 | * It just executes the shell command passed as string argument to 7 | * run() function and returns its output. 8 | * 9 | * Compile simply with: 10 | * javac JDWPExecCmd.java (should be in the nselib/data/ directory). 11 | * 12 | * author = "Aleksandar Nikolic" 13 | * license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 14 | */ 15 | 16 | public class JDWPExecCmd { 17 | public static String run(String cmd) { 18 | String result = cmd + " output:\n"; 19 | try{ 20 | Process p = Runtime.getRuntime().exec(cmd); 21 | BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream())); 22 | String line = null; 23 | while ((line = in.readLine()) != null) { 24 | result += line.trim()+"\n"; 25 | } 26 | result += "\n"; 27 | }catch(Exception ex){ 28 | } 29 | return result; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /scripts/auth-spoof.nse: -------------------------------------------------------------------------------- 1 | local comm = require "comm" 2 | local shortport = require "shortport" 3 | 4 | description = [[ 5 | Checks for an identd (auth) server which is spoofing its replies. 6 | 7 | Tests whether an identd (auth) server responds with an answer before 8 | we even send the query. This sort of identd spoofing can be a sign of 9 | malware infection, though it can also be used for legitimate privacy 10 | reasons. 11 | ]] 12 | 13 | --- 14 | -- @output 15 | -- PORT STATE SERVICE REASON 16 | -- 113/tcp open auth syn-ack 17 | -- |_auth-spoof: Spoofed reply: 0, 0 : USERID : UNIX : OGJdvM 18 | 19 | author = "Diman Todorov" 20 | 21 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 22 | 23 | categories = {"malware", "safe"} 24 | 25 | 26 | portrule = shortport.port_or_service(113, "auth") 27 | 28 | action = function(host, port) 29 | local status, owner = comm.get_banner(host, port, {lines=1}) 30 | 31 | if not status then 32 | return 33 | end 34 | 35 | return "Spoofed reply: " .. owner 36 | end 37 | 38 | -------------------------------------------------------------------------------- /libdnet-stripped/src/route-none.c: -------------------------------------------------------------------------------- 1 | /* 2 | * route-none.c 3 | * 4 | * Copyright (c) 2000 Dug Song 5 | * 6 | * $Id: route-none.c 260 2002-02-04 04:03:45Z dugsong $ 7 | */ 8 | 9 | #include "config.h" 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include "dnet.h" 18 | 19 | route_t * 20 | route_open(void) 21 | { 22 | errno = ENOSYS; 23 | return (NULL); 24 | } 25 | 26 | int 27 | route_add(route_t *r, const struct route_entry *entry) 28 | { 29 | errno = ENOSYS; 30 | return (-1); 31 | } 32 | 33 | int 34 | route_delete(route_t *r, const struct route_entry *entry) 35 | { 36 | errno = ENOSYS; 37 | return (-1); 38 | } 39 | 40 | int 41 | route_get(route_t *r, struct route_entry *entry) 42 | { 43 | errno = ENOSYS; 44 | return (-1); 45 | } 46 | 47 | int 48 | route_loop(route_t *r, route_handler callback, void *arg) 49 | { 50 | errno = ENOSYS; 51 | return (-1); 52 | } 53 | 54 | route_t * 55 | route_close(route_t *r) 56 | { 57 | return (NULL); 58 | } 59 | -------------------------------------------------------------------------------- /nselib/data/psexec/backdoor.lua: -------------------------------------------------------------------------------- 1 | ---This config file is designed for adding a backdoor to the system. It has a few 2 | -- options by default, only one enabled by default. I suggest 3 | -- 4 | -- Note that none of these modules are included with Nmap by default. 5 | 6 | -- Any variable in the 'config' table in smb-psexec.nse can be overriden in the 7 | -- 'overrides' table. Most of them are not really recommended, such as the host, 8 | -- key, etc. 9 | overrides = {} 10 | --overrides.timeout = 40 11 | 12 | modules = {} 13 | local mod 14 | 15 | -- TODO: allow the user to specify parameters 16 | --Note: password can't be longer than 14-characters, otherwise the program pauses for 17 | -- a response 18 | mod = {} 19 | mod.upload = false 20 | mod.name = "Adding a user account: $username/$password" 21 | mod.program = "net" 22 | mod.args = "user $username $password /add" 23 | mod.maxtime = 2 24 | mod.noblank = true 25 | mod.req_args = {'username','password'} 26 | table.insert(modules, mod) 27 | 28 | -------------------------------------------------------------------------------- /libpcap/ChmodBPF/ChmodBPF: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | . /etc/rc.common 4 | 5 | StartService () 6 | { 7 | # 8 | # Unfortunately, Mac OS X's devfs is based on the old FreeBSD 9 | # one, not the current one, so there's no way to configure it 10 | # to create BPF devices with particular owners or groups. 11 | # This startup item will make it owned by the admin group, 12 | # with permissions rw-rw----, so that anybody in the admin 13 | # group can use programs that capture or send raw packets. 14 | # 15 | # Change this as appropriate for your site, e.g. to make 16 | # it owned by a particular user without changing the permissions, 17 | # so only that user and the super-user can capture or send raw 18 | # packets, or give it the permissions rw-r-----, so that 19 | # only the super-user can send raw packets but anybody in the 20 | # admin group can capture packets. 21 | # 22 | chgrp admin /dev/bpf* 23 | chmod g+rw /dev/bpf* 24 | } 25 | 26 | StopService () 27 | { 28 | return 0; 29 | } 30 | 31 | RestartService () { StartService; } 32 | 33 | RunService "$1" 34 | -------------------------------------------------------------------------------- /nping/nping-dev/pythonscripts/TemplateNpingOps.txt: -------------------------------------------------------------------------------- 1 | 2 | Prototypes for NpingOps: 3 | 4 | int setMETHNAME(TYPE val); 5 | TYPE getMETHNAME(); 6 | bool issetMETHNAME(); 7 | 8 | Attributes for NpingOps: 9 | 10 | TYPE ATTRNAME; 11 | bool ATTRNAME_set; 12 | 13 | Initialization for NpingOps::NpingOps() 14 | 15 | ATTRNAME=0; 16 | ATTRNAME_set=false; 17 | 18 | 19 | /** Sets METHNAME. 20 | * @return OP_SUCCESS on success and OP_FAILURE in case of error. */ 21 | int NpingOps::setMETHNAME(TYPE val){ 22 | 23 | ATTRNAME=val; 24 | ATTRNAME_set=true; 25 | 26 | return OP_SUCCESS; 27 | 28 | } /* End of setMETHNAME() */ 29 | 30 | 31 | /** Returns value of attribute ATTRNAME */ 32 | TYPE NpingOps::getMETHNAME(){ 33 | 34 | return this->ATTRNAME; 35 | 36 | } /* End of getMETHNAME() */ 37 | 38 | 39 | /* Returns true if option has been set */ 40 | bool NpingOps::issetMETHNAME(){ 41 | 42 | return this->ATTRNAME_set; 43 | 44 | } /* End of issetMETHNAME() */ 45 | 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.[oa] 2 | *.[sl][oa] 3 | *.gc[dn][oa] 4 | gmon.out 5 | Makefile 6 | config.log 7 | config.status 8 | config.h 9 | makefile.dep 10 | *.py[co] 11 | /libdnet-stripped/dnet-config 12 | /libdnet-stripped/include/stamp-h1 13 | /libdnet-stripped/libtool 14 | /libdnet-stripped/src/.libs/ 15 | /nbase/nbase_config.h 16 | /ncat/ncat 17 | /ncat/test/addrset 18 | /ncat/test/test-cmdline-split 19 | /ncat/test/test-uri 20 | /ncat/test/test-wildcard 21 | /ndiff/build/ 22 | /nmap 23 | /nmap_config.h 24 | /nping/nping 25 | /nping/nping_config.h 26 | /nsock/include/nsock_config.h 27 | /zenmap/build/ 28 | /zenmap/INSTALLED_FILES 29 | /nmap-update/nmap-update 30 | TAGS 31 | autom4te.cache/ 32 | /libpcap/*.3pcap 33 | libpcap/version.c 34 | libpcap/version.h 35 | libpcap/bpf_filter.c 36 | libpcap/libpcap.so.1.2.1 37 | libpcap/net 38 | libpcap/pcap-config 39 | libpcap/pcap-filter.manmisc 40 | libpcap/pcap-linktype.manmisc 41 | libpcap/pcap-savefile.manfile 42 | libpcap/pcap-tstamp.manmisc 43 | libpcre/.deps/ 44 | libpcre/pcre-config 45 | libpcre/stamp-h1 46 | ndiff/INSTALLED_FILES 47 | -------------------------------------------------------------------------------- /liblinear/Makefile: -------------------------------------------------------------------------------- 1 | CXX ?= g++ 2 | CC ?= gcc 3 | CFLAGS = -Wall -Wconversion -O3 -fPIC 4 | LIBS = blas/blas.a 5 | SHVER = 1 6 | AR = ar 7 | RANLIB = ranlib 8 | #LIBS = -lblas 9 | 10 | all: train predict 11 | 12 | lib: linear.o tron.o blas/blas.a 13 | $(CXX) -shared -dynamiclib linear.o tron.o blas/blas.a -o liblinear.so.$(SHVER) 14 | 15 | liblinear.a: linear.o tron.o blas/blas.a 16 | $(AR) rcv liblinear.a linear.o tron.o blas/*.o 17 | $(RANLIB) liblinear.a 18 | 19 | train: tron.o linear.o train.c blas/blas.a 20 | $(CXX) $(CFLAGS) -o train train.c tron.o linear.o $(LIBS) 21 | 22 | predict: tron.o linear.o predict.c blas/blas.a 23 | $(CXX) $(CFLAGS) -o predict predict.c tron.o linear.o $(LIBS) 24 | 25 | tron.o: tron.cpp tron.h 26 | $(CXX) $(CFLAGS) -c -o tron.o tron.cpp 27 | 28 | linear.o: linear.cpp linear.h 29 | $(CXX) $(CFLAGS) -c -o linear.o linear.cpp 30 | 31 | blas/blas.a: 32 | cd blas; $(MAKE) OPTFLAGS='$(CFLAGS)' CC='$(CC)'; 33 | 34 | clean: 35 | cd blas; $(MAKE) clean 36 | rm -f *~ tron.o linear.o train predict liblinear.so.$(SHVER) liblinear.a 37 | -------------------------------------------------------------------------------- /libpcap/pcap-common.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * We use the "receiver-makes-right" approach to byte order, 4 | * because time is at a premium when we are writing the file. 5 | * In other words, the pcap_file_header and pcap_pkthdr, 6 | * records are written in host byte order. 7 | * Note that the bytes of packet data are written out in the order in 8 | * which they were received, so multi-byte fields in packets are not 9 | * written in host byte order, they're written in whatever order the 10 | * sending machine put them in. 11 | * 12 | * ntoh[ls] aren't sufficient because we might need to swap on a big-endian 13 | * machine (if the file was written in little-end order). 14 | */ 15 | #define SWAPLONG(y) \ 16 | ((((y)&0xff)<<24) | (((y)&0xff00)<<8) | (((y)&0xff0000)>>8) | (((y)>>24)&0xff)) 17 | #define SWAPSHORT(y) \ 18 | ( (((y)&0xff)<<8) | ((u_short)((y)&0xff00)>>8) ) 19 | 20 | extern int dlt_to_linktype(int dlt); 21 | 22 | extern int linktype_to_dlt(int linktype); 23 | 24 | extern void swap_pseudo_headers(int linktype, struct pcap_pkthdr *hdr, 25 | u_char *data); 26 | -------------------------------------------------------------------------------- /liblua/lprefix.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lprefix.h,v 1.2 2014/12/29 16:54:13 roberto Exp $ 3 | ** Definitions for Lua code that must come before any other header file 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lprefix_h 8 | #define lprefix_h 9 | 10 | 11 | /* 12 | ** Allows POSIX/XSI stuff 13 | */ 14 | #if !defined(LUA_USE_C89) /* { */ 15 | 16 | #if !defined(_XOPEN_SOURCE) 17 | #define _XOPEN_SOURCE 600 18 | #elif _XOPEN_SOURCE == 0 19 | #undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */ 20 | #endif 21 | 22 | /* 23 | ** Allows manipulation of large files in gcc and some other compilers 24 | */ 25 | #if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS) 26 | #define _LARGEFILE_SOURCE 1 27 | #define _FILE_OFFSET_BITS 64 28 | #endif 29 | 30 | #endif /* } */ 31 | 32 | 33 | /* 34 | ** Windows stuff 35 | */ 36 | #if defined(_WIN32) /* { */ 37 | 38 | #if !defined(_CRT_SECURE_NO_WARNINGS) 39 | #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */ 40 | #endif 41 | 42 | #endif /* } */ 43 | 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /docs/licenses/Lua-license.txt: -------------------------------------------------------------------------------- 1 | Copyright © 1994–2016 Lua.org, PUC-Rio. 2 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 3 | 4 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 5 | 6 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 7 | -------------------------------------------------------------------------------- /scripts/unittest.nse: -------------------------------------------------------------------------------- 1 | local stdnse = require "stdnse" 2 | local unittest = require "unittest" 3 | 4 | description = [[ 5 | Runs unit tests on all NSE libraries. 6 | ]] 7 | 8 | --- 9 | -- @args unittest.run Run tests. Causes unittest.testing() to 10 | -- return true. 11 | -- 12 | -- @args unittest.tests Run tests from only these libraries (defaults to all) 13 | -- 14 | -- @usage 15 | -- nmap --script unittest --script-args unittest.run 16 | -- 17 | -- @output 18 | -- Pre-scan script results: 19 | -- | unittest: 20 | -- |_ All tests passed 21 | 22 | author = "Daniel Miller" 23 | 24 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 25 | 26 | categories = {"safe"} 27 | 28 | 29 | prerule = unittest.testing 30 | 31 | action = function() 32 | local libs = stdnse.get_script_args("unittest.tests") 33 | local result 34 | if libs then 35 | result = unittest.run_tests(libs) 36 | else 37 | result = unittest.run_tests() 38 | end 39 | if #result == 0 then 40 | return "All tests passed" 41 | else 42 | return result 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /nselib/data/jdwp-class/README.txt: -------------------------------------------------------------------------------- 1 | This directory contains sources and compiled classes 2 | used by jdwp-* scripts. 3 | 4 | All classes must have run() method defined which is 5 | expected to return a string. 6 | Method run() can have arguments, but then the scripts 7 | would need to be modified to add those arguments when 8 | class is injected. As JDWPExecCmd has a run() method 9 | which accepts a string as its argument, see 10 | jdwp-exec script for details of passing the 11 | arguments to a method via JDWP. 12 | Arguments need to be tagged with their respective type. 13 | For other tags see http://docs.oracle.com/javase/6/docs/technotes/guides/jni/spec/types.html#wp9502 . 14 | Example from jdwp-exec: 15 | 16 | local cmdID 17 | status,cmdID = jdwp.createString(socket,0,cmd) 18 | local runArgs = bin.pack(">CL",0x4c,cmdID) -- 0x4c is object type tag 19 | -- invoke run method 20 | local result 21 | status, result = jdwp.invokeObjectMethod(socket,0,injectedClass.instance,injectedClass.thread,injectedClass.id,runMethodID,1,runArgs) 22 | 23 | To compile these sources: 24 | # javac *.java 25 | 26 | 27 | -------------------------------------------------------------------------------- /zenmap/install_scripts/macosx/README: -------------------------------------------------------------------------------- 1 | This is a description of the files in this directory, all of which have 2 | to do with packaging on Mac OS X. They are useful only for those wanting 3 | to build binary distributions of Zenmap for Mac OS X. 4 | 5 | == Info.plist 6 | A properties list file template that is filled out by make-bundle.sh 7 | 8 | == make-bundle.sh 9 | This script builds a .app bundle. It must be run from the root of the 10 | Zenmap source tree. The finished bundle is put in dist/Zenmap.app. 11 | 12 | == zenmap.icns 13 | The icon file for the bundle. It was created using the Icon Composer 14 | utility (open -a "Icon Composer"). 15 | 16 | == zenmap_auth.c 17 | This is a simple wrapper program that attempts to run launcher.sh 18 | with privileges. 19 | 20 | == launcher.sh 21 | A launcher script that configures the environment for Zenmap, Python, and GTK 22 | before launching the main Zenmap script file. 23 | 24 | == zenmap.bundle 25 | An XML config file for gtk-mac-bundler which specifies files and metadata for 26 | the application bundle. https://wiki.gnome.org/Projects/GTK%2B/OSX/Building 27 | -------------------------------------------------------------------------------- /libdnet-stripped/include/dnet/route.h: -------------------------------------------------------------------------------- 1 | /* 2 | * route.c 3 | * 4 | * Kernel route table operations. 5 | * 6 | * Copyright (c) 2000 Dug Song 7 | * 8 | * $Id: route.h 260 2002-02-04 04:03:45Z dugsong $ 9 | */ 10 | 11 | #ifndef DNET_ROUTE_H 12 | #define DNET_ROUTE_H 13 | 14 | /* 15 | * Routing table entry 16 | */ 17 | struct route_entry { 18 | char intf_name[INTF_NAME_LEN]; /* interface name */ 19 | struct addr route_dst; /* destination address */ 20 | struct addr route_gw; /* gateway address */ 21 | int metric; /* per-route metric */ 22 | }; 23 | 24 | typedef struct route_handle route_t; 25 | 26 | typedef int (*route_handler)(const struct route_entry *entry, void *arg); 27 | 28 | __BEGIN_DECLS 29 | route_t *route_open(void); 30 | int route_add(route_t *r, const struct route_entry *entry); 31 | int route_delete(route_t *r, const struct route_entry *entry); 32 | int route_get(route_t *r, struct route_entry *entry); 33 | int route_loop(route_t *r, route_handler callback, void *arg); 34 | route_t *route_close(route_t *r); 35 | __END_DECLS 36 | 37 | #endif /* DNET_ROUTE_H */ 38 | -------------------------------------------------------------------------------- /libpcap/msdos/bin2c.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | static void Abort (char *fmt,...) 7 | { 8 | va_list args; 9 | va_start (args, fmt); 10 | vfprintf (stderr, fmt, args); 11 | va_end (args); 12 | exit (1); 13 | } 14 | 15 | int main (int argc, char **argv) 16 | { 17 | FILE *inFile; 18 | FILE *outFile = stdout; 19 | time_t now = time (NULL); 20 | int ch, i; 21 | 22 | if (argc != 2) 23 | Abort ("Usage: %s bin-file [> result]", argv[0]); 24 | 25 | if ((inFile = fopen(argv[1],"rb")) == NULL) 26 | Abort ("Cannot open %s\n", argv[1]); 27 | 28 | fprintf (outFile, 29 | "/* data statements for file %s at %.24s */\n" 30 | "/* Generated by BIN2C, G.Vanem 1995 */\n", 31 | argv[1], ctime(&now)); 32 | 33 | i = 0; 34 | while ((ch = fgetc(inFile)) != EOF) 35 | { 36 | if (i++ % 12 == 0) 37 | fputs ("\n ", outFile); 38 | fprintf (outFile, "0x%02X,", ch); 39 | } 40 | fputc ('\n', outFile); 41 | fclose (inFile); 42 | return (0); 43 | } 44 | -------------------------------------------------------------------------------- /scripts/broadcast-versant-locate.nse: -------------------------------------------------------------------------------- 1 | local srvloc = require "srvloc" 2 | local table = require "table" 3 | 4 | description = [[ 5 | Discovers Versant object databases using the broadcast srvloc protocol. 6 | ]] 7 | 8 | --- 9 | -- @usage 10 | -- nmap --script broadcast-versant-locate 11 | -- 12 | -- @output 13 | -- Pre-scan script results: 14 | -- | broadcast-versant-locate: 15 | -- |_ vod://192.168.200.222:5019 16 | -- 17 | -- @xmloutput 18 | -- 19 | -- vod://192.168.200.222:5019 20 | --
21 | 22 | 23 | author = "Patrik Karlsson" 24 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 25 | categories = {"broadcast", "safe"} 26 | 27 | 28 | prerule = function() return true end 29 | 30 | action = function() 31 | local helper = srvloc.Helper:new() 32 | local status, result = helper:ServiceRequest("service:odbms.versant:vod", "default") 33 | helper:close() 34 | 35 | if ( not(status) ) then return end 36 | local output = {} 37 | for _, v in ipairs(result) do 38 | table.insert(output, v:match("^service:odbms.versant:vod://(.*)$")) 39 | end 40 | return output 41 | end 42 | -------------------------------------------------------------------------------- /docs/licenses/MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /ncat/docs/AUTHORS: -------------------------------------------------------------------------------- 1 | Ncat AUTHORS 2 | ============ 3 | 4 | Ncat is based in concept (but not code) on the original "Netcat" 5 | written by Hobbit circa 1994. Ncat combines the original Netcat 6 | feature set as well as various other ideas from other Netcat-like 7 | products, such as CryptCat, Socat, GNU Netcat, etc. 8 | 9 | Ncat was originally written from the ground up by Chris Gibson 10 | (chris@linuxops.net) and was funded by the Google Summer of Code Program 11 | 2005. 12 | 13 | Development, bug fixes, security auditing, improvements by Sean 14 | (infamous42md@hotpop.com). 15 | 16 | Starting with the Google Summer of Code 2008, Ncat development was 17 | picked back up by Mixter and Kris Katterjohn. This included many bug 18 | fixes, new features and code cleanups. 19 | 20 | The Ncat requirements, ideas and general support and help were given by 21 | Fyodor. 22 | 23 | Many helpful comments, suggestions and other useful information was 24 | taken from the nmap-dev list (@insecure.org) as well as other 25 | contributors via email. 26 | 27 | Ncat shares the Nmap infrastructure libraries (Nsock and Nbase) which 28 | were originally written by Fyodor. 29 | -------------------------------------------------------------------------------- /ncat/docs/THANKS: -------------------------------------------------------------------------------- 1 | Ncat Acknowledgements 2 | ===================== 3 | 4 | This file is a short rambling of various "thank-you"'s to all 5 | the very generous support and advice received from various 6 | parties. 7 | 8 | First and foremost: Thanks go out to Fyodor for all the support 9 | and great ideas throughout the course of development and no doubt 10 | also in the future. 11 | 12 | Thanks to Google and the Summer of Code team. The points of 13 | contact with Google being Chris DiBona, Natalie and Jude. Thanks to 14 | you all for making this possible. Without whom I wouldn't even 15 | be writing this. 16 | 17 | Also, thank you to all the folks from #c on Undernet who kicked 18 | me in the right direction when things were at their most broken. 19 | 20 | Thanks to Jan for all her support and, well, general tolerance. :) 21 | 22 | Thanks to all the people who've submitted bug reports, given me 23 | ideas, helped me test Ncat or just given me general encouragement 24 | over the previous years. It is most appreciated. 25 | 26 | Finally, thanks to Hobbit for writing the original Netcat; it still 27 | rocks. 28 | 29 | --Chris Gibson, 30 | -------------------------------------------------------------------------------- /nselib/data/psexec/README: -------------------------------------------------------------------------------- 1 | The files in this directory are the data files required for smb-psexec.nse. 2 | 3 | The .lua files are configurations. Each of these defines a profile for a 4 | psexec execution. 5 | 6 | nmap_service.exe is a program that facilitates the operation of smb-psexec.nse. 7 | It is uploaded to the remote host and runs the programs it's directed to run, 8 | redirecting their output to a file. This file is then downloaded by the 9 | script and displayed to the user. 10 | 11 | When Nmap released version 5.20, it was discovered that some over-zealous 12 | antivirus software tagged this program as spyware[1]. For that reason, when 13 | stored on the host machine, it is now encoded by xoring every byte of the 14 | file with 0xFF. When uploaded to a target machine, it is decoded in-stream. 15 | This prevents programs on the host machine from tagging it as malicious, but 16 | does not prevent the target from detecting it (which is arguably a good thing). 17 | 18 | The encoder.c program reads a program from stdin, encodes it by xoring with 19 | 0xFF, and writes it to stdout. 20 | 21 | [1] http://seclists.org/nmap-dev/2010/q1/198 22 | 23 | -------------------------------------------------------------------------------- /mswin32/python-wrap.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem This batch file searches for a Python interpreter and uses it to run a 4 | rem script. It displays an error message if not Python is found. The script 5 | rem to run must have the same filename as the batch file, with an extension of 6 | rem .py rather than .bat. 7 | 8 | setlocal 9 | 10 | rem %0 is the name of the batch file. "dpn" means drive, path, filename 11 | rem (excluding extension). 12 | set PROG=%~dpn0.py 13 | 14 | if not exist "%PROG%" ( 15 | echo Cannot run %PROG% 16 | echo because that file does not exist. 17 | exit /B 1 18 | ) 19 | 20 | set PATH=%PATH%;C:\Python27;C:\Python26;C:\Python25;C:\Python24 21 | for %%P in ( python.exe ) do set PYTHON=%%~f$PATH:P 22 | 23 | if not exist "%PYTHON%" GOTO:NOPYTHON 24 | 25 | GOTO:EXEC 26 | 27 | :NOPYTHON 28 | echo Cannot run %PROG% 29 | echo because python.exe was not found anywhere in 30 | echo %PATH%. 31 | echo. 32 | echo To run this program, download and install Python from 33 | echo http://www.python.org/download. 34 | exit /B 1 35 | 36 | :EXEC 37 | rem This command chaining allows the exit code to propagate. 38 | endlocal & "%PYTHON%" "%PROG%" %* 39 | -------------------------------------------------------------------------------- /liblinear/blas/dscal.c: -------------------------------------------------------------------------------- 1 | #include "blas.h" 2 | 3 | int dscal_(int *n, double *sa, double *sx, int *incx) 4 | { 5 | long int i, m, nincx, nn, iincx; 6 | double ssa; 7 | 8 | /* scales a vector by a constant. 9 | uses unrolled loops for increment equal to 1. 10 | jack dongarra, linpack, 3/11/78. 11 | modified 3/93 to return if incx .le. 0. 12 | modified 12/3/93, array(1) declarations changed to array(*) */ 13 | 14 | /* Dereference inputs */ 15 | nn = *n; 16 | iincx = *incx; 17 | ssa = *sa; 18 | 19 | if (nn > 0 && iincx > 0) 20 | { 21 | if (iincx == 1) /* code for increment equal to 1 */ 22 | { 23 | m = nn-4; 24 | for (i = 0; i < m; i += 5) 25 | { 26 | sx[i] = ssa * sx[i]; 27 | sx[i+1] = ssa * sx[i+1]; 28 | sx[i+2] = ssa * sx[i+2]; 29 | sx[i+3] = ssa * sx[i+3]; 30 | sx[i+4] = ssa * sx[i+4]; 31 | } 32 | for ( ; i < nn; ++i) /* clean-up loop */ 33 | sx[i] = ssa * sx[i]; 34 | } 35 | else /* code for increment not equal to 1 */ 36 | { 37 | nincx = nn * iincx; 38 | for (i = 0; i < nincx; i += iincx) 39 | sx[i] = ssa * sx[i]; 40 | } 41 | } 42 | 43 | return 0; 44 | } /* dscal_ */ 45 | -------------------------------------------------------------------------------- /zenmap/install_scripts/macosx/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | org.insecure.Zenmap 7 | CFBundleName 8 | Zenmap 9 | NSHumanReadableCopyright 10 | ${APP_COPYRIGHT} 11 | CFBundleDevelopmentRegion 12 | English 13 | CFBundleExecutable 14 | Zenmap 15 | CFBundleGetInfoString 16 | ${VERSION}, ${APP_COPYRIGHT} ${APP_WEB_SITE} 17 | CFBundleIconFile 18 | zenmap.icns 19 | CFBundleInfoDictionaryVersion 20 | 6.0 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | ${VERSION} 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | ${VERSION} 29 | LSMinimumSystemVersion 30 | 10.9 31 | 32 | 33 | -------------------------------------------------------------------------------- /scripts/finger.nse: -------------------------------------------------------------------------------- 1 | local comm = require "comm" 2 | local nmap = require "nmap" 3 | local shortport = require "shortport" 4 | 5 | description = [[ 6 | Attempts to retrieve a list of usernames using the finger service. 7 | ]] 8 | 9 | author = "Eddie Bell" 10 | 11 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 12 | 13 | categories = {"default", "discovery", "safe"} 14 | 15 | --- 16 | -- @output 17 | -- PORT STATE SERVICE 18 | -- 79/tcp open finger 19 | -- | finger: 20 | -- | Welcome to Linux version 2.6.31.12-0.2-default at linux-pb94.site ! 21 | -- | 01:14am up 18:54, 4 users, load average: 0.14, 0.08, 0.01 22 | -- | 23 | -- | Login Name Tty Idle Login Time Where 24 | -- | Gutek Ange Gutek *:0 - Wed 06:19 console 25 | -- | Gutek Ange Gutek pts/1 18:54 Wed 06:20 26 | -- | Gutek Ange Gutek *pts/0 - Thu 00:41 27 | -- |_Gutek Ange Gutek *pts/4 3 Thu 01:06 28 | 29 | 30 | portrule = shortport.port_or_service(79, "finger") 31 | 32 | action = function(host, port) 33 | local try = nmap.new_try() 34 | 35 | return try(comm.exchange(host, port, "\r\n", 36 | {lines=100, timeout=5000})) 37 | end 38 | -------------------------------------------------------------------------------- /scripts/creds-summary.nse: -------------------------------------------------------------------------------- 1 | local creds = require "creds" 2 | 3 | description = [[ 4 | Lists all discovered credentials (e.g. from brute force and default password checking scripts) at end of scan. 5 | ]] 6 | 7 | --- 8 | --@output 9 | -- | creds-summary: 10 | -- | 10.10.10.10 11 | -- | 22/ssh 12 | -- | lisbon:jane - Account is valid 13 | -- | 10.10.10.20 14 | -- | 21/ftp 15 | -- | jane:redjohn - Account is locked 16 | -- | 22/ssh 17 | -- | cho:secret11 - Account is valid 18 | -- | 23/telnet 19 | -- | rigsby:pelt - Account is valid 20 | -- | pelt:rigsby - Password needs to be changed at next logon 21 | -- | 80/http 22 | -- | lisbon:jane - Account is valid 23 | -- | jane:redjohn - Account is locked 24 | -- |_ cho:secret11 - Account is valid 25 | 26 | 27 | author = "Patrik Karlsson" 28 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 29 | categories = {"auth", "default", "safe"} 30 | 31 | 32 | postrule = function() 33 | local all = creds.Credentials:new(creds.ALL_DATA) 34 | local tab = all:getTable() 35 | if ( tab and next(tab) ) then return true end 36 | end 37 | 38 | action = function() 39 | local all = creds.Credentials:new(creds.ALL_DATA) 40 | return all:getTable() 41 | end 42 | -------------------------------------------------------------------------------- /nsock/tests/basic.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Nsock regression test suite 3 | * Same license as nmap -- see https://nmap.org/book/man-legal.html 4 | */ 5 | 6 | #include "test-common.h" 7 | 8 | 9 | struct basic_test_data { 10 | nsock_pool nsp; 11 | }; 12 | 13 | static int basic_setup(void **tdata) { 14 | struct basic_test_data *btd; 15 | 16 | btd = calloc(1, sizeof(struct basic_test_data)); 17 | if (btd == NULL) 18 | return -ENOMEM; 19 | 20 | btd->nsp = nsock_pool_new(NULL); 21 | 22 | *tdata = btd; 23 | return 0; 24 | } 25 | 26 | static int basic_teardown(void *tdata) { 27 | struct basic_test_data *btd = (struct basic_test_data *)tdata; 28 | 29 | if (tdata) { 30 | nsock_pool_delete(btd->nsp); 31 | free(tdata); 32 | } 33 | return 0; 34 | } 35 | 36 | static int basic_udata(void *tdata) { 37 | struct basic_test_data *btd = (struct basic_test_data *)tdata; 38 | 39 | AssertEqual(nsock_pool_get_udata(btd->nsp), NULL); 40 | nsock_pool_set_udata(btd->nsp, btd); 41 | AssertEqual(nsock_pool_get_udata(btd->nsp), btd); 42 | return 0; 43 | } 44 | 45 | 46 | 47 | const struct test_case TestPoolUserData = { 48 | .t_name = "nsock pool user data", 49 | .t_setup = basic_setup, 50 | .t_run = basic_udata, 51 | .t_teardown = basic_teardown 52 | }; 53 | -------------------------------------------------------------------------------- /zenmap/test/xml_test3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /nping/nping-dev/pythonscripts/man-section-entry-template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | (OPT_DESC) 4 | 5 | OPT_NAME 6 | 7 | 8 | 9 | 10 | blah blah blah blah blah blah blah blah blah blah 11 | blah blah blah blah blah blah blah blah blah blah blah blah 12 | blah blah blah blah blah blah blah blah blah blah blah blah 13 | blah blah blah blah blah blah blah blah blah blah blah blah 14 | blah blah blah blah blah blah blah blah blah blah blah blah 15 | blah blah blah blah blah blah blah blah blah blah blah blah 16 | blah blah blah blah blah blah blah blah blah blah blah blah 17 | blah blah blah blah blah blah blah blah blah blah blah blah 18 | blah blah blah blah blah blah blah blah blah blah blah blah 19 | blah blah blah blah blah blah blah blah blah blah blah blah 20 | blah blah blah blah blah blah blah blah blah blah blah blah 21 | blah blah blah blah blah blah blah blah blah blah blah blah 22 | blah blah blah blah blah blah blah blah blah blah blah blah. 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /zenmap/share/zenmap/locale/Makefile: -------------------------------------------------------------------------------- 1 | LINGUAS = $(patsubst %.po,%,$(wildcard *.po)) 2 | 3 | TOPDIR = ../../.. 4 | SOURCEFILES = zenmap 5 | SOURCEDIRS = zenmapCore zenmapGUI radialnet 6 | PROFILE_EDITOR_XML = share/zenmap/misc/profile_editor.xml 7 | 8 | XGETTEXT = xgettext 9 | MSGID_BUGS_ADDRESS = dev@nmap.org 10 | 11 | ZENMAP_POT = zenmap.pot 12 | TMP_POT = tmp.pot 13 | 14 | TMP_PO = tmp.po 15 | 16 | all: 17 | @echo 'Run "make update-pot" to update $(ZENMAP_POT).' 18 | @echo 'Run "make .po" to update .po from $(ZENMAP_POT).' 19 | @echo 'Run "make update-mo" to update all MO files from PO files.' 20 | 21 | update-pot: 22 | (echo $(SOURCEFILES); cd $(TOPDIR) && find $(SOURCEDIRS) -name '*.py') \ 23 | | $(XGETTEXT) -D $(TOPDIR) --language=python --msgid-bugs-address=$(MSGID_BUGS_ADDRESS) -f - -o $(TMP_POT) 24 | ./xgettext-profile_editor.py -D $(TOPDIR) $(PROFILE_EDITOR_XML) >> $(TMP_POT) 25 | msguniq $(TMP_POT) | msgmerge -U --backup=none $(ZENMAP_POT) - 26 | rm -f $(TMP_POT) 27 | 28 | update-mo: $(addsuffix /LC_MESSAGES/zenmap.mo,$(LINGUAS)) 29 | 30 | %.po: $(ZENMAP_POT) 31 | cp -f $@ $(TMP_PO) 32 | msgmerge -N $(TMP_PO) $< | msgattrib --no-obsolete -o $@ 33 | rm -f $(TMP_PO) 34 | 35 | %/LC_MESSAGES/zenmap.mo: %.po 36 | mkdir -p $*/LC_MESSAGES 37 | msgfmt $< -o $@ 38 | 39 | .PHONY: update-pot 40 | -------------------------------------------------------------------------------- /libpcap/lbl/os-aix4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | */ 21 | 22 | /* Prototypes missing in AIX 4.x */ 23 | int ffs(int i); 24 | -------------------------------------------------------------------------------- /nselib/datetime.lua: -------------------------------------------------------------------------------- 1 | --- Functions for dealing with dates and timestamps 2 | -- 3 | -- @copyright Same as Nmap--See https://nmap.org/book/man-legal.html 4 | -- @class module 5 | -- @name datetime 6 | -- @author Daniel Miller 7 | 8 | local stdnse = require "stdnse" 9 | local os = require "os" 10 | local math = require "math" 11 | _ENV = stdnse.module("datetime", stdnse.seeall) 12 | 13 | --- Record a time difference between the scanner and the target 14 | -- 15 | -- The skew will be recorded in the host's registry for later retrieval and 16 | -- analysis. Adjusts for network distance by subtracting half the smoothed 17 | -- round-trip time. 18 | -- 19 | --@param host The host being scanned 20 | --@param timestamp The target timestamp, in seconds. 21 | --@param received The local time the stamp was received, in seconds. 22 | function record_skew(host, timestamp, received) 23 | local skew_tab = host.registry.datetime_skew 24 | skew_tab = skew_tab or {} 25 | -- No srtt? I suppose we'll ignore it, but this could cause problems 26 | local srtt = host.times and host.times.srtt or 0 27 | local adjusted = os.difftime(math.floor(timestamp), math.floor(received)) - srtt / 2.0 28 | skew_tab[#skew_tab + 1] = adjusted 29 | stdnse.debug2("record_skew: %s", adjusted) 30 | host.registry.datetime_skew = skew_tab 31 | end 32 | 33 | return _ENV 34 | -------------------------------------------------------------------------------- /libpcap/lbl/os-hpux11.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | */ 21 | 22 | /* Prototypes missing in HP-UX 11.x */ 23 | int ffs(int i); 24 | -------------------------------------------------------------------------------- /scripts/stun-version.nse: -------------------------------------------------------------------------------- 1 | local nmap = require "nmap" 2 | local shortport = require "shortport" 3 | local stun = require "stun" 4 | local stdnse = require "stdnse" 5 | 6 | description = [[ 7 | Sends a binding request to the server and attempts to extract version 8 | information from the response, if the server attribute is present. 9 | ]] 10 | 11 | --- 12 | -- @usage 13 | -- nmap -sU -sV -p 3478 14 | -- @output 15 | -- PORT STATE SERVICE VERSION 16 | -- 3478/udp open stun Vovida.org 0.96 17 | -- 18 | 19 | author = "Patrik Karlsson" 20 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 21 | categories = {"version"} 22 | 23 | 24 | portrule = shortport.version_port_or_service(3478, "stun", "udp") 25 | 26 | local function fail(err) return stdnse.format_output(false, err) end 27 | 28 | action = function(host, port) 29 | local helper = stun.Helper:new(host, port) 30 | local status = helper:connect() 31 | if ( not(status) ) then 32 | return fail("Failed to connect to server") 33 | end 34 | 35 | local status, result = helper:getVersion() 36 | if ( not(status) ) then 37 | return fail("Failed to retrieve external IP") 38 | end 39 | 40 | port.version.name = "stun" 41 | port.version.product = result 42 | nmap.set_port_state(host, port, "open") 43 | nmap.set_port_version(host, port) 44 | end 45 | -------------------------------------------------------------------------------- /nselib/data/dns-srv-names: -------------------------------------------------------------------------------- 1 | _afpovertcp._tcp 2 | _aix._tcp 3 | _autodiscover._tcp 4 | _caldav._tcp 5 | _certificates._tcp 6 | _client._smtp 7 | _cmp._tcp 8 | _crls._tcp 9 | _crl._tcp 10 | _finger._tcp 11 | _ftp._tcp 12 | _gc._tcp 13 | _h323be._tcp 14 | _h323be._udp 15 | _h323cs._tcp 16 | _h323cs._udp 17 | _h323ls._tcp 18 | _h323ls._udp 19 | _h323rs._tcp 20 | _hkps._tcp 21 | _hkp._tcp 22 | _http._tcp 23 | _iax.udp 24 | _imaps._tcp 25 | _imap._tcp 26 | _jabber-client._tcp 27 | _jabber-client._udp 28 | _jabber._tcp 29 | _jabber._udp 30 | _kerberos-adm._tcp 31 | _kerberos._tcp 32 | _kerberos._tcp.dc._msdcs 33 | _kerberos._udp 34 | _kpasswd._tcp 35 | _kpasswd._udp 36 | _ldap._tcp 37 | _ldap._tcp.dc._msdcs 38 | _ldap._tcp.gc._msdcs 39 | _ldap._tcp.pdc._msdcs 40 | _msdcs 41 | _mysqlsrv._tcp 42 | _nntp._tcp 43 | _ntp._udp 44 | _ocsp._tcp 45 | _pgpkeys._tcp 46 | _pgprevokations._tcp 47 | _PKIXREP._tcp 48 | _pop3s._tcp 49 | _pop3._tcp 50 | _sipfederationtls._tcp 51 | _sipinternal._tcp 52 | _sipinternaltls._tcp 53 | _sips._tcp 54 | _sip._tcp 55 | _sip._tls 56 | _sip._udp 57 | _smtp._tcp 58 | _ssh._tcp 59 | _stun._tcp 60 | _stun._udp 61 | _svcp._tcp 62 | _tcp 63 | _telnet._tcp 64 | _test._tcp 65 | _tls 66 | _udp 67 | _vlmcs._tcp 68 | _vlmcs._udp 69 | _whois._tcp 70 | _wpad._tcp 71 | _xmpp-client._tcp 72 | _xmpp-client._udp 73 | _xmpp-server._tcp 74 | _xmpp-server._udp 75 | -------------------------------------------------------------------------------- /scripts/citrix-enum-servers-xml.nse: -------------------------------------------------------------------------------- 1 | local citrixxml = require "citrixxml" 2 | local shortport = require "shortport" 3 | local stdnse = require "stdnse" 4 | local table = require "table" 5 | 6 | description = [[ 7 | Extracts the name of the server farm and member servers from Citrix XML 8 | service. 9 | ]] 10 | 11 | --- 12 | -- @usage 13 | -- nmap --script=citrix-enum-servers-xml -p 80,443,8080 14 | -- 15 | -- @output 16 | -- PORT STATE SERVICE REASON 17 | -- 8080/tcp open http-proxy syn-ack 18 | -- | citrix-enum-servers-xml: 19 | -- | CITRIX-SRV01 20 | -- |_ CITRIX-SRV01 21 | 22 | -- Version 0.2 23 | 24 | -- Created 11/26/2009 - v0.1 - created by Patrik Karlsson 25 | -- Revised 12/02/2009 - v0.2 - Use stdnse.format_ouput for output 26 | 27 | author = "Patrik Karlsson" 28 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 29 | categories = {"discovery", "safe"} 30 | 31 | 32 | portrule = shortport.portnumber({8080,80,443}, "tcp") 33 | 34 | 35 | action = function(host, port) 36 | 37 | local xmldata = citrixxml.request_server_data(host, port) 38 | local servers = citrixxml.parse_server_data_response(xmldata) 39 | local response = {} 40 | 41 | for _, srv in ipairs(servers) do 42 | table.insert(response, srv) 43 | end 44 | 45 | return stdnse.format_output(true, response) 46 | 47 | end 48 | -------------------------------------------------------------------------------- /macosx/nmap.pmdoc/02zenmap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.insecure.nmap.Zenmap.pkg 4 | 1 5 | 6 | 7 | 8 | Zenmap/Applications/Zenmap.app 9 | /Applications 10 | 11 | 12 | 13 | 14 | parent 15 | installFrom.isRelativeType 16 | 17 | 18 | 02zenmap-contents.xml 19 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | /CVS$ 32 | /\.svn$ 33 | /\.cvsignore$ 34 | /\.cvspass$ 35 | /\.DS_Store$ 36 | 37 | 38 | -------------------------------------------------------------------------------- /libpcap/lbl/os-solaris2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | */ 21 | 22 | /* Prototypes missing in SunOS 5 */ 23 | char *strerror(int); 24 | int snprintf(char *, size_t, const char *, ...); 25 | -------------------------------------------------------------------------------- /scripts/realvnc-auth-bypass.nse: -------------------------------------------------------------------------------- 1 | local nmap = require "nmap" 2 | local shortport = require "shortport" 3 | 4 | description = [[ 5 | Checks if a VNC server is vulnerable to the RealVNC authentication bypass 6 | (CVE-2006-2369). 7 | ]] 8 | author = "Brandon Enright" 9 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 10 | 11 | --- 12 | -- @see vnc-brute.nse 13 | -- 14 | -- @output 15 | -- PORT STATE SERVICE VERSION 16 | -- 5900/tcp open vnc VNC (protocol 3.8) 17 | -- |_realvnc-auth-bypass: Vulnerable 18 | 19 | categories = {"auth", "default", "safe"} 20 | 21 | 22 | portrule = shortport.port_or_service(5900, "vnc") 23 | 24 | action = function(host, port) 25 | local socket = nmap.new_socket() 26 | local result 27 | local status = true 28 | 29 | socket:connect(host, port) 30 | 31 | status, result = socket:receive_lines(1) 32 | 33 | if (not status) then 34 | socket:close() 35 | return 36 | end 37 | 38 | socket:send("RFB 003.008\n") 39 | status, result = socket:receive_bytes(2) 40 | 41 | if (not status or result ~= "\001\002") then 42 | socket:close() 43 | return 44 | end 45 | 46 | socket:send("\001") 47 | status, result = socket:receive_bytes(4) 48 | 49 | if (not status or result ~= "\000\000\000\000") then 50 | socket:close() 51 | return 52 | end 53 | 54 | socket:close() 55 | 56 | return "Vulnerable" 57 | end 58 | -------------------------------------------------------------------------------- /scripts/stun-info.nse: -------------------------------------------------------------------------------- 1 | local nmap = require "nmap" 2 | local shortport = require "shortport" 3 | local stun = require "stun" 4 | local stdnse = require "stdnse" 5 | 6 | description = [[ 7 | Retrieves the external IP address of a NAT:ed host using the STUN protocol. 8 | ]] 9 | 10 | --- 11 | -- @usage 12 | -- nmap -sV -PN -sU -p 3478 --script stun-info 13 | -- 14 | -- @output 15 | -- PORT STATE SERVICE 16 | -- 3478/udp open|filtered stun 17 | -- | stun-info: 18 | -- |_ External IP: 80.216.42.106 19 | -- 20 | 21 | author = "Patrik Karlsson" 22 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 23 | categories = {"discovery", "safe"} 24 | 25 | 26 | portrule = shortport.port_or_service(3478, "stun", "udp") 27 | 28 | local function fail(err) return stdnse.format_output(false, err) end 29 | 30 | action = function(host, port) 31 | local helper = stun.Helper:new(host, port) 32 | local status = helper:connect() 33 | if ( not(status) ) then 34 | return fail("Failed to connect to server") 35 | end 36 | 37 | local status, result = helper:getExternalAddress() 38 | if ( not(status) ) then 39 | return fail("Failed to retrieve external IP") 40 | end 41 | 42 | port.version.name = "stun" 43 | nmap.set_port_state(host, port, "open") 44 | nmap.set_port_version(host, port) 45 | 46 | if ( result ) then 47 | return "\n External IP: " .. result 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /liblinear/blas/daxpy.c: -------------------------------------------------------------------------------- 1 | #include "blas.h" 2 | 3 | int daxpy_(int *n, double *sa, double *sx, int *incx, double *sy, 4 | int *incy) 5 | { 6 | long int i, m, ix, iy, nn, iincx, iincy; 7 | register double ssa; 8 | 9 | /* constant times a vector plus a vector. 10 | uses unrolled loop for increments equal to one. 11 | jack dongarra, linpack, 3/11/78. 12 | modified 12/3/93, array(1) declarations changed to array(*) */ 13 | 14 | /* Dereference inputs */ 15 | nn = *n; 16 | ssa = *sa; 17 | iincx = *incx; 18 | iincy = *incy; 19 | 20 | if( nn > 0 && ssa != 0.0 ) 21 | { 22 | if (iincx == 1 && iincy == 1) /* code for both increments equal to 1 */ 23 | { 24 | m = nn-3; 25 | for (i = 0; i < m; i += 4) 26 | { 27 | sy[i] += ssa * sx[i]; 28 | sy[i+1] += ssa * sx[i+1]; 29 | sy[i+2] += ssa * sx[i+2]; 30 | sy[i+3] += ssa * sx[i+3]; 31 | } 32 | for ( ; i < nn; ++i) /* clean-up loop */ 33 | sy[i] += ssa * sx[i]; 34 | } 35 | else /* code for unequal increments or equal increments not equal to 1 */ 36 | { 37 | ix = iincx >= 0 ? 0 : (1 - nn) * iincx; 38 | iy = iincy >= 0 ? 0 : (1 - nn) * iincy; 39 | for (i = 0; i < nn; i++) 40 | { 41 | sy[iy] += ssa * sx[ix]; 42 | ix += iincx; 43 | iy += iincy; 44 | } 45 | } 46 | } 47 | 48 | return 0; 49 | } /* daxpy_ */ 50 | -------------------------------------------------------------------------------- /nping/nping-dev/pythonscripts/addManSectionEntry.py: -------------------------------------------------------------------------------- 1 | 2 | sectionname = raw_input("Section name: ") 3 | hyphname = raw_input("Hyphened name: ") 4 | 5 | 6 | o = open("OutputMan.txt","a") 7 | for line in open("man-section-template.xml"): 8 | line = line.replace("SECTION_NAME",sectionname) 9 | line = line.replace("SECTION_HYPHENED_NAME",hyphname) 10 | o.write(line) 11 | 12 | 13 | my_range = raw_input("Number of options: ") 14 | optformat = [] 15 | optarg= [] 16 | optdesc= [] 17 | optname= [] 18 | 19 | for i in range( int(my_range) ): 20 | optformat.append( raw_input("Option format (--tcp-connect): --") ) 21 | optarg.append ( raw_input("Option arg (portnumber): ") ) 22 | optdesc.append(raw_input("Option Description (TCP Connect Mode):") ) 23 | optname.append(raw_input("Option name (tcp connect): ") ) 24 | 25 | 26 | for line in open("man-section-entry-template.xml"): 27 | line = line.replace("OPT_FORMAT",optformat[i]) 28 | if( optarg[i] == ""): 29 | line = line.replace("OPT_ARG","") 30 | else: 31 | line = line.replace("OPT_ARG",""+optarg[i]+"") 32 | line = line.replace("OPT_DESC",optdesc[i]) 33 | line = line.replace("OPT_NAME",optname[i]) 34 | o.write(line) 35 | 36 | line1=" " 37 | line2=" " 38 | o.write(line1); 39 | o.write(line2); 40 | o.close() 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /scripts/netbus-version.nse: -------------------------------------------------------------------------------- 1 | local nmap = require "nmap" 2 | local shortport = require "shortport" 3 | local stdnse = require "stdnse" 4 | 5 | description = [[ 6 | Extends version detection to detect NetBuster, a honeypot service 7 | that mimes NetBus. 8 | ]] 9 | 10 | --- 11 | -- @usage 12 | -- nmap -sV -p 12345 --script netbus-version 13 | -- 14 | -- @output 15 | -- 12345/tcp open netbus Netbuster (honeypot) 16 | 17 | author = "Toni Ruottu" 18 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 19 | categories = {"version"} 20 | 21 | 22 | portrule = shortport.version_port_or_service ({}, "netbus", {"tcp"}) 23 | 24 | action = function( host, port ) 25 | 26 | local socket = nmap.new_socket() 27 | socket:set_timeout(5000) 28 | local status, err = socket:connect(host, port) 29 | if not status then 30 | return 31 | end 32 | local buffer, _ = stdnse.make_buffer(socket, "\r") 33 | _ = buffer() 34 | if not (_ and _:match("^NetBus")) then 35 | stdnse.debug1("Not NetBus") 36 | return nil 37 | end 38 | socket:send("Password;0;\r") 39 | 40 | --NetBus answers to auth 41 | if buffer() ~= nil then 42 | return 43 | end 44 | 45 | --NetBuster does not 46 | port.version.name = "netbus" 47 | port.version.product = "NetBuster" 48 | port.version.extrainfo = "honeypot" 49 | port.version.version = nil 50 | nmap.set_port_version(host, port) 51 | return 52 | end 53 | 54 | 55 | -------------------------------------------------------------------------------- /liblinear/blas/ddot.c: -------------------------------------------------------------------------------- 1 | #include "blas.h" 2 | 3 | double ddot_(int *n, double *sx, int *incx, double *sy, int *incy) 4 | { 5 | long int i, m, nn, iincx, iincy; 6 | double stemp; 7 | long int ix, iy; 8 | 9 | /* forms the dot product of two vectors. 10 | uses unrolled loops for increments equal to one. 11 | jack dongarra, linpack, 3/11/78. 12 | modified 12/3/93, array(1) declarations changed to array(*) */ 13 | 14 | /* Dereference inputs */ 15 | nn = *n; 16 | iincx = *incx; 17 | iincy = *incy; 18 | 19 | stemp = 0.0; 20 | if (nn > 0) 21 | { 22 | if (iincx == 1 && iincy == 1) /* code for both increments equal to 1 */ 23 | { 24 | m = nn-4; 25 | for (i = 0; i < m; i += 5) 26 | stemp += sx[i] * sy[i] + sx[i+1] * sy[i+1] + sx[i+2] * sy[i+2] + 27 | sx[i+3] * sy[i+3] + sx[i+4] * sy[i+4]; 28 | 29 | for ( ; i < nn; i++) /* clean-up loop */ 30 | stemp += sx[i] * sy[i]; 31 | } 32 | else /* code for unequal increments or equal increments not equal to 1 */ 33 | { 34 | ix = 0; 35 | iy = 0; 36 | if (iincx < 0) 37 | ix = (1 - nn) * iincx; 38 | if (iincy < 0) 39 | iy = (1 - nn) * iincy; 40 | for (i = 0; i < nn; i++) 41 | { 42 | stemp += sx[ix] * sy[iy]; 43 | ix += iincx; 44 | iy += iincy; 45 | } 46 | } 47 | } 48 | 49 | return stemp; 50 | } /* ddot_ */ 51 | -------------------------------------------------------------------------------- /liblua/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h,v 1.44 2014/02/06 17:32:33 roberto Exp $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | 15 | LUAMOD_API int (luaopen_base) (lua_State *L); 16 | 17 | #define LUA_COLIBNAME "coroutine" 18 | LUAMOD_API int (luaopen_coroutine) (lua_State *L); 19 | 20 | #define LUA_TABLIBNAME "table" 21 | LUAMOD_API int (luaopen_table) (lua_State *L); 22 | 23 | #define LUA_IOLIBNAME "io" 24 | LUAMOD_API int (luaopen_io) (lua_State *L); 25 | 26 | #define LUA_OSLIBNAME "os" 27 | LUAMOD_API int (luaopen_os) (lua_State *L); 28 | 29 | #define LUA_STRLIBNAME "string" 30 | LUAMOD_API int (luaopen_string) (lua_State *L); 31 | 32 | #define LUA_UTF8LIBNAME "utf8" 33 | LUAMOD_API int (luaopen_utf8) (lua_State *L); 34 | 35 | #define LUA_BITLIBNAME "bit32" 36 | LUAMOD_API int (luaopen_bit32) (lua_State *L); 37 | 38 | #define LUA_MATHLIBNAME "math" 39 | LUAMOD_API int (luaopen_math) (lua_State *L); 40 | 41 | #define LUA_DBLIBNAME "debug" 42 | LUAMOD_API int (luaopen_debug) (lua_State *L); 43 | 44 | #define LUA_LOADLIBNAME "package" 45 | LUAMOD_API int (luaopen_package) (lua_State *L); 46 | 47 | 48 | /* open all previous libraries */ 49 | LUALIB_API void (luaL_openlibs) (lua_State *L); 50 | 51 | 52 | 53 | #if !defined(lua_assert) 54 | #define lua_assert(x) ((void)0) 55 | #endif 56 | 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /scripts/rsync-list-modules.nse: -------------------------------------------------------------------------------- 1 | local rsync = require "rsync" 2 | local shortport = require "shortport" 3 | local stdnse = require "stdnse" 4 | 5 | description = [[ 6 | Lists modules available for rsync (remote file sync) synchronization. 7 | ]] 8 | 9 | --- 10 | -- @usage 11 | -- nmap -p 873 --script rsync-list-modules 12 | -- 13 | -- @output 14 | -- PORT STATE SERVICE 15 | -- 873/tcp open rsync 16 | -- | rsync-list-modules: 17 | -- | www www directory 18 | -- | log log directory 19 | -- |_ etc etc directory 20 | -- 21 | 22 | 23 | author = "Patrik Karlsson" 24 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 25 | categories = {"discovery", "safe"} 26 | 27 | portrule = shortport.port_or_service(873, "rsync", "tcp") 28 | 29 | local function fail (err) return stdnse.format_output(false, err) end 30 | 31 | action = function(host, port) 32 | local helper = rsync.Helper:new(host, port, { module = "" }) 33 | if ( not(helper) ) then 34 | return fail("Failed to create rsync.Helper") 35 | end 36 | 37 | local status, err = helper:connect() 38 | if ( not(status) ) then 39 | return fail("Failed to connect to rsync server") 40 | end 41 | 42 | local modules = {} 43 | status, modules = helper:listModules() 44 | if ( not(status) ) then 45 | return fail("Failed to retrieve a list of modules") 46 | end 47 | return stdnse.format_output(true, modules) 48 | end 49 | -------------------------------------------------------------------------------- /ndiff/test-scans/simple.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /scripts/nat-pmp-info.nse: -------------------------------------------------------------------------------- 1 | local natpmp = require "natpmp" 2 | local nmap = require "nmap" 3 | local shortport = require "shortport" 4 | 5 | description = [[ 6 | Gets the routers WAN IP using the NAT Port Mapping Protocol (NAT-PMP). 7 | The NAT-PMP protocol is supported by a broad range of routers including: 8 | - Apple AirPort Express 9 | - Apple AirPort Extreme 10 | - Apple Time Capsule 11 | - DD-WRT 12 | - OpenWrt v8.09 or higher, with MiniUPnP daemon 13 | - pfSense v2.0 14 | - Tarifa (firmware) (Linksys WRT54G/GL/GS) 15 | - Tomato Firmware v1.24 or higher. (Linksys WRT54G/GL/GS and many more) 16 | - Peplink Balance 17 | ]] 18 | 19 | --- 20 | --@usage 21 | -- nmap -sU -p 5351 --script=nat-pmp-info 22 | -- @output 23 | -- | nat-pmp-info: 24 | -- |_ WAN IP: 192.0.2.13 25 | -- @xmloutput 26 | -- 192.0.2.13 27 | 28 | author = "Patrik Karlsson" 29 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 30 | categories = {"default", "discovery", "safe"} 31 | 32 | 33 | portrule = shortport.port_or_service(5351, "nat-pmp", {"udp"} ) 34 | 35 | action = function(host, port) 36 | local helper = natpmp.Helper:new(host, port) 37 | local status, response = helper:getWANIP() 38 | 39 | if ( status ) then 40 | nmap.set_port_state(host, port, "open") 41 | port.version.name = "nat-pmp" 42 | nmap.set_port_version(host, port) 43 | 44 | return {["WAN IP"] = response.ip} 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /nselib/data/vhosts-default.lst: -------------------------------------------------------------------------------- 1 | admin 2 | administration 3 | ads 4 | adserver 5 | alerts 6 | alpha 7 | ap 8 | apache 9 | app 10 | apps 11 | appserver 12 | aptest 13 | auth 14 | backup 15 | beta 16 | blog 17 | cdn 18 | chat 19 | citrix 20 | cms 21 | corp 22 | crs 23 | cvs 24 | database 25 | db 26 | demo 27 | dev 28 | devel 29 | development 30 | devsql 31 | devtest 32 | dhcp 33 | direct 34 | dmz 35 | dns 36 | dns0 37 | dns1 38 | dns2 39 | download 40 | en 41 | erp 42 | eshop 43 | exchange 44 | f5 45 | fileserver 46 | firewall 47 | forum 48 | ftp 49 | ftp0 50 | git 51 | gw 52 | help 53 | helpdesk 54 | home 55 | host 56 | http 57 | id 58 | images 59 | info 60 | internal 61 | internet 62 | intra 63 | intranet 64 | ipv6 65 | lab 66 | ldap 67 | linux 68 | local 69 | log 70 | mail 71 | mail2 72 | mail3 73 | mailgate 74 | main 75 | manage 76 | mgmt 77 | mirror 78 | mobile 79 | monitor 80 | mssql 81 | mta 82 | mx 83 | mx0 84 | mx1 85 | mysql 86 | news 87 | noc 88 | ns 89 | ns0 90 | ns1 91 | ns2 92 | ns3 93 | ntp 94 | ops 95 | oracle 96 | owa 97 | pbx 98 | s3 99 | secure 100 | server 101 | shop 102 | sip 103 | smtp 104 | sql 105 | squid 106 | ssh 107 | ssl 108 | stage 109 | stats 110 | svn 111 | syslog 112 | test 113 | test1 114 | test2 115 | testing 116 | upload 117 | vm 118 | vnc 119 | voip 120 | vpn 121 | web 122 | web2test 123 | whois 124 | wiki 125 | www 126 | www2 127 | xml 128 | -------------------------------------------------------------------------------- /libpcap/lbl/os-osf4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | */ 21 | 22 | /* Prototypes missing in Digital UNIX 4.x */ 23 | int snprintf(char *, size_t, const char *, ...); 24 | int vsnprintf(char *, size_t, const char *, va_list); 25 | int pfopen(char *, int); 26 | 27 | -------------------------------------------------------------------------------- /nbase/Makefile.in: -------------------------------------------------------------------------------- 1 | prefix = @prefix@ 2 | datarootdir = @datarootdir@ 3 | exec_prefix = @exec_prefix@ 4 | bindir = @bindir@ 5 | sbindir = @sbindir@ 6 | mandir = @mandir@ 7 | srcdir = @srcdir@ 8 | 9 | CC = @CC@ 10 | AR = ar 11 | RANLIB = @RANLIB@ 12 | CCOPT = 13 | DEFS = @DEFS@ 14 | # With GCC, add extra security checks to source code. 15 | DEFS += -D_FORTIFY_SOURCE=2 16 | CPPFLAGS = @CPPFLAGS@ 17 | CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS) 18 | STATIC = 19 | LDFLAGS = @LDFLAGS@ $(STATIC) 20 | LIBS = @LIBS@ 21 | SHTOOL = ./shtool 22 | INSTALL = $(SHTOOL) install 23 | MAKEDEPEND = @MAKEDEPEND@ 24 | 25 | TARGET = libnbase.a 26 | 27 | DEPS = getopt.h nbase.h nbase_winconfig.h nbase_config.h nbase_ipv6.h nbase_winunix.h nbase_crc32ct.h nbase_addrset.h 28 | OBJS = @LIBOBJS@ 29 | 30 | all: $(TARGET) 31 | 32 | $(TARGET): $(DEPS) $(OBJS) 33 | rm -f $@ 34 | $(AR) cr $@ $(OBJS) 35 | $(RANLIB) $@ 36 | 37 | clean: 38 | rm -f $(OBJS) $(TARGET) 39 | 40 | distclean: clean 41 | rm -f Makefile config.cache config.log config.status nbase_config.h 42 | 43 | depend: 44 | $(MAKEDEPEND) $(INCLS) -s "# DO NOT DELETE" -- $(DEFS) -- $(SRCS) 45 | 46 | configure: configure.ac 47 | autoconf 48 | 49 | Makefile: Makefile.in config.status 50 | ./config.status 51 | 52 | config.status: configure 53 | ./config.status --recheck 54 | 55 | .cc.o: 56 | $(CC) -c $(CFLAGS) $*.cc 57 | 58 | # DO NOT DELETE -- Needed by makedepend 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /scripts/docker-version.nse: -------------------------------------------------------------------------------- 1 | local shortport = require "shortport" 2 | local json = require "json" 3 | local http = require "http" 4 | local nmap = require "nmap" 5 | 6 | description = [[Detects the Docker service version.]] 7 | 8 | --- 9 | -- @output 10 | -- PORT STATE SERVICE VERSION 11 | -- 2375/tcp open docker Docker 1.11.2 12 | -- | Version: 1.11.2 13 | -- | BuildTime: 2016-06-01T21:47:50.269346868+00:00 14 | -- | Arch: amd64 15 | -- | KernelVersion: 3.13.0-91-generic 16 | -- | Os: linux 17 | -- | ApiVersion: 1.23 18 | -- | GitCommit: b9f10c9 19 | -- |_ GoVersion: go1.5.4 20 | 21 | 22 | author = "Claudio Criscione" 23 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 24 | categories = {"version"} 25 | 26 | portrule = shortport.version_port_or_service({2375, 2376}, {"docker", "docker-s"}, "tcp") 27 | 28 | action = function(host, port) 29 | 30 | local http_response = http.get(host, port, "/version") 31 | if not http_response or not http_response.status or 32 | http_response.status ~= 200 or not http_response.body then 33 | return 34 | end 35 | 36 | local ok_json, response = json.parse(http_response.body) 37 | if ok_json and response["Version"] and response["GitCommit"] then 38 | ---Detected 39 | port.version.name = 'docker' 40 | port.version.version = response["Version"] 41 | port.version.product = "Docker" 42 | nmap.set_port_version(host, port) 43 | return response 44 | end 45 | return 46 | end 47 | -------------------------------------------------------------------------------- /scripts/ncp-serverinfo.nse: -------------------------------------------------------------------------------- 1 | local ncp = require "ncp" 2 | local shortport = require "shortport" 3 | local stdnse = require "stdnse" 4 | 5 | description = [[ 6 | Retrieves eDirectory server information (OS version, server name, 7 | mounts, etc.) from the Novell NetWare Core Protocol (NCP) service. 8 | ]] 9 | 10 | --- 11 | -- 12 | --@output 13 | -- PORT STATE SERVICE 14 | -- 524/tcp open ncp 15 | -- | ncp-serverinfo: 16 | -- | Server name: LINUX-L84T 17 | -- | Tree Name: IIT-LABTREE 18 | -- | OS Version: 5.70 (rev 7) 19 | -- | Product version: 6.50 (rev 7) 20 | -- | OS Language ID: 4 21 | -- | Addresses 22 | -- | 10.0.200.33 524/udp 23 | -- | 10.0.200.33 524/tcp 24 | -- | Mounts 25 | -- | SYS 26 | -- | ADMIN 27 | -- |_ _ADMIN 28 | 29 | -- Version 0.1 30 | -- Created 04/26/2011 - v0.1 - created by Patrik Karlsson 31 | 32 | author = "Patrik Karlsson" 33 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 34 | categories = {"default", "discovery", "safe"} 35 | 36 | 37 | portrule = shortport.port_or_service(524, "ncp", "tcp") 38 | 39 | action = function(host, port) 40 | local helper = ncp.Helper:new(host,port) 41 | 42 | local status, resp = helper:connect() 43 | if ( not(status) ) then return stdnse.format_output(false, resp) end 44 | 45 | status, resp = helper:getServerInfo() 46 | if ( not(status) ) then return stdnse.format_output(false, resp) end 47 | 48 | helper:close() 49 | 50 | return stdnse.format_output(true, resp) 51 | end 52 | -------------------------------------------------------------------------------- /mswin32/nmap.rc.in: -------------------------------------------------------------------------------- 1 | //Microsoft Developer Studio generated resource script. 2 | // 3 | // edited 4 | // 5 | 6 | #include 7 | #include "resource.h" 8 | 9 | ///////////////////////////////////////////////////////////////////////////// 10 | // 11 | // Version 12 | // 13 | 14 | VS_VERSION_INFO VERSIONINFO 15 | FILEVERSION @@COMMAVERSION@@ 16 | FILEFLAGSMASK 0x3fL 17 | #ifdef _DEBUG 18 | FILEFLAGS 0x21L 19 | #else 20 | FILEFLAGS 0x20L 21 | #endif 22 | FILEOS 0x40004L 23 | FILETYPE 0x1L 24 | FILESUBTYPE 0x0L 25 | BEGIN 26 | BLOCK "StringFileInfo" 27 | BEGIN 28 | BLOCK "040904b0" 29 | BEGIN 30 | VALUE "CompanyName", "Insecure.Org\0" 31 | VALUE "FileDescription", "Nmap\0" 32 | VALUE "FileVersion", @@FILEVERSION@@ 33 | VALUE "InternalName", "Nmap\0" 34 | VALUE "LegalCopyright", "Copyright (c) Insecure.Com LLC (fyodor@insecure.org)\0" 35 | VALUE "LegalTrademarks", "NMAP\0" 36 | VALUE "OriginalFilename", "nmap.exe\0" 37 | VALUE "ProductName", "Nmap\0" 38 | END 39 | END 40 | BLOCK "VarFileInfo" 41 | BEGIN 42 | VALUE "Translation", 0x409, 1200 43 | END 44 | END 45 | 46 | ///////////////////////////////////////////////////////////////////////////// 47 | // 48 | // Icon 49 | // 50 | 51 | // Icon with lowest ID value placed first to ensure application icon 52 | // remains consistent on all systems. 53 | IDI_NMAP ICON DISCARDABLE "icon1.ico" 54 | -------------------------------------------------------------------------------- /libpcre/pcre-config.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | exec_prefix_set=no 6 | 7 | usage="\ 8 | Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]" 9 | 10 | if test $# -eq 0; then 11 | echo "${usage}" 1>&2 12 | exit 1 13 | fi 14 | 15 | libR= 16 | case `uname -s` in 17 | *SunOS*) 18 | libR=" -R@libdir@" 19 | ;; 20 | *BSD*) 21 | libR=" -Wl,-R@libdir@" 22 | ;; 23 | esac 24 | 25 | while test $# -gt 0; do 26 | case "$1" in 27 | -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 28 | *) optarg= ;; 29 | esac 30 | 31 | case $1 in 32 | --prefix=*) 33 | prefix=$optarg 34 | if test $exec_prefix_set = no ; then 35 | exec_prefix=$optarg 36 | fi 37 | ;; 38 | --prefix) 39 | echo $prefix 40 | ;; 41 | --exec-prefix=*) 42 | exec_prefix=$optarg 43 | exec_prefix_set=yes 44 | ;; 45 | --exec-prefix) 46 | echo $exec_prefix 47 | ;; 48 | --version) 49 | echo @PACKAGE_VERSION@ 50 | ;; 51 | --cflags | --cflags-posix) 52 | if test @includedir@ != /usr/include ; then 53 | includes=-I@includedir@ 54 | fi 55 | echo $includes 56 | ;; 57 | --libs-posix) 58 | echo -L@libdir@$libR -lpcreposix -lpcre 59 | ;; 60 | --libs) 61 | echo -L@libdir@$libR -lpcre 62 | ;; 63 | *) 64 | echo "${usage}" 1>&2 65 | exit 1 66 | ;; 67 | esac 68 | shift 69 | done 70 | -------------------------------------------------------------------------------- /scripts/ajp-headers.nse: -------------------------------------------------------------------------------- 1 | local ajp = require "ajp" 2 | local shortport = require "shortport" 3 | local stdnse = require "stdnse" 4 | 5 | description = [[ 6 | Performs a HEAD or GET request against either the root directory or any 7 | optional directory of an Apache JServ Protocol server and returns the server response headers. 8 | ]] 9 | 10 | --- 11 | -- @usage 12 | -- nmap -p 8009 --script ajp-headers 13 | -- 14 | -- @output 15 | -- PORT STATE SERVICE 16 | -- 8009/tcp open ajp13 17 | -- | ajp-headers: 18 | -- | X-Powered-By: JSP/2.2 19 | -- | Set-Cookie: JSESSIONID=goTHax+8ktEcZsBldANHBAuf.undefined; Path=/helloworld 20 | -- | Content-Type: text/html;charset=ISO-8859-1 21 | -- |_ Content-Length: 149 22 | -- 23 | -- @args ajp-headers.path The path to request, such as /index.php. Default /. 24 | 25 | 26 | portrule = shortport.port_or_service(8009, 'ajp13', 'tcp') 27 | 28 | author = "Patrik Karlsson" 29 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 30 | categories = {"discovery", "safe"} 31 | 32 | local arg_path = stdnse.get_script_args(SCRIPT_NAME .. '.path') or "/" 33 | 34 | action = function(host, port) 35 | local method 36 | local helper = ajp.Helper:new(host, port) 37 | helper:connect() 38 | 39 | local status, response = helper:get(arg_path) 40 | helper:close() 41 | 42 | if ( not(status) ) then 43 | return stdnse.format_output(false, "Failed to retrieve server headers") 44 | end 45 | return stdnse.format_output(true, response.rawheaders) 46 | end 47 | -------------------------------------------------------------------------------- /mswin32/nmap.rc: -------------------------------------------------------------------------------- 1 | // Automatically generated from nmap.rc.in. 2 | //Microsoft Developer Studio generated resource script. 3 | // 4 | // edited 5 | // 6 | 7 | #include 8 | #include "resource.h" 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // 12 | // Version 13 | // 14 | 15 | VS_VERSION_INFO VERSIONINFO 16 | FILEVERSION 7,0,40,100 17 | FILEFLAGSMASK 0x3fL 18 | #ifdef _DEBUG 19 | FILEFLAGS 0x21L 20 | #else 21 | FILEFLAGS 0x20L 22 | #endif 23 | FILEOS 0x40004L 24 | FILETYPE 0x1L 25 | FILESUBTYPE 0x0L 26 | BEGIN 27 | BLOCK "StringFileInfo" 28 | BEGIN 29 | BLOCK "040904b0" 30 | BEGIN 31 | VALUE "CompanyName", "Insecure.Org\0" 32 | VALUE "FileDescription", "Nmap\0" 33 | VALUE "FileVersion", "7.40SVN\0" 34 | VALUE "InternalName", "Nmap\0" 35 | VALUE "LegalCopyright", "Copyright (c) Insecure.Com LLC (fyodor@insecure.org)\0" 36 | VALUE "LegalTrademarks", "NMAP\0" 37 | VALUE "OriginalFilename", "nmap.exe\0" 38 | VALUE "ProductName", "Nmap\0" 39 | END 40 | END 41 | BLOCK "VarFileInfo" 42 | BEGIN 43 | VALUE "Translation", 0x409, 1200 44 | END 45 | END 46 | 47 | ///////////////////////////////////////////////////////////////////////////// 48 | // 49 | // Icon 50 | // 51 | 52 | // Icon with lowest ID value placed first to ensure application icon 53 | // remains consistent on all systems. 54 | IDI_NMAP ICON DISCARDABLE "icon1.ico" 55 | -------------------------------------------------------------------------------- /nping/nping-dev/valgrind_supress.txt: -------------------------------------------------------------------------------- 1 | 2 | { 3 | 4 | Memcheck:Addr8 5 | fun:AES_cbc_encrypt 6 | obj:* 7 | } 8 | 9 | { 10 | 11 | Memcheck:Addr8 12 | fun:AES_cbc_encrypt 13 | obj:* 14 | obj:* 15 | obj:* 16 | } 17 | 18 | { 19 | 20 | Memcheck:Addr8 21 | fun:AES_cbc_encrypt 22 | obj:* 23 | obj:* 24 | obj:* 25 | obj:* 26 | obj:* 27 | } 28 | 29 | { 30 | 31 | Memcheck:Addr8 32 | fun:AES_cbc_encrypt 33 | obj:* 34 | } 35 | 36 | { 37 | 38 | Memcheck:Addr8 39 | fun:AES_cbc_encrypt 40 | obj:* 41 | obj:* 42 | obj:* 43 | } 44 | 45 | { 46 | 47 | Memcheck:Param 48 | socketcall.setsockopt(optval) 49 | fun:setsockopt 50 | obj:/usr/lib/libpcap.so.1.0.0 51 | obj:/usr/lib/libpcap.so.1.0.0 52 | fun:nsock_pcap_set_filter 53 | fun:nsock_pcap_open 54 | fun:_ZN9ProbeMode5startEv 55 | fun:_ZN10EchoClient5startEP11NpingTargett 56 | fun:main 57 | } 58 | 59 | { 60 | 61 | Memcheck:Addr8 62 | fun:AES_cbc_encrypt 63 | } 64 | 65 | { 66 | 67 | Memcheck:Addr8 68 | fun:AES_cbc_encrypt 69 | obj:* 70 | obj:* 71 | obj:* 72 | obj:* 73 | obj:* 74 | } 75 | 76 | { 77 | 78 | Memcheck:Addr8 79 | fun:AES_cbc_encrypt 80 | obj:* 81 | obj:* 82 | obj:* 83 | obj:* 84 | obj:* 85 | } 86 | -------------------------------------------------------------------------------- /nselib/data/psexec/drives.lua: -------------------------------------------------------------------------------- 1 | ---This configuration file pulls info about a given harddrive 2 | 3 | -- Any variable in the 'config' table in smb-psexec.nse can be overriden in the 4 | -- 'overrides' table. Most of them are not really recommended, such as the host, 5 | -- key, etc. 6 | overrides = {} 7 | --overrides.timeout = 40 8 | 9 | modules = {} 10 | local mod 11 | 12 | mod = {} 13 | mod.upload = false 14 | mod.name = "Drive type" 15 | mod.program = "fsutil" 16 | mod.args = "fsinfo drivetype $drive" 17 | mod.req_args = {"drive"} 18 | mod.maxtime = 1 19 | table.insert(modules, mod) 20 | 21 | mod = {} 22 | mod.upload = false 23 | mod.name = "Drive info" 24 | mod.program = "fsutil" 25 | mod.args = "fsinfo ntfsinfo $drive" 26 | mod.req_args = {"drive"} 27 | mod.replace = {{" :",":"}} 28 | mod.maxtime = 1 29 | table.insert(modules, mod) 30 | 31 | mod = {} 32 | mod.upload = false 33 | mod.name = "Drive type" 34 | mod.program = "fsutil" 35 | mod.args = "fsinfo statistics $drive" 36 | mod.req_args = {"drive"} 37 | mod.replace = {{" :",":"}} 38 | mod.maxtime = 1 39 | table.insert(modules, mod) 40 | 41 | mod = {} 42 | mod.upload = false 43 | mod.name = "Drive quota" 44 | mod.program = "fsutil" 45 | mod.args = "quota query $drive" 46 | mod.req_args = {"drive"} 47 | mod.maxtime = 1 48 | table.insert(modules, mod) 49 | 50 | -------------------------------------------------------------------------------- /libpcap/Win32/Src/getnetbynm.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1983 Regents of the University of California. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms are permitted 6 | * provided that the above copyright notice and this paragraph are 7 | * duplicated in all such forms and that any documentation, 8 | * advertising materials, and other materials related to such 9 | * distribution and use acknowledge that the software was developed 10 | * by the University of California, Berkeley. The name of the 11 | * University may not be used to endorse or promote products derived 12 | * from this software without specific prior written permission. 13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 | */ 17 | 18 | #if defined(LIBC_SCCS) && !defined(lint) 19 | static char sccsid[] = "@(#)getnetbyname.c 5.5 (Berkeley) 6/27/88"; 20 | #endif /* LIBC_SCCS and not lint */ 21 | 22 | #include "inetprivate.h" 23 | 24 | extern int _net_stayopen; 25 | 26 | struct netent * 27 | getnetbyname(const char *name) 28 | { 29 | register struct netent *p; 30 | register char **cp; 31 | 32 | setnetent(_net_stayopen); 33 | while (p = getnetent()) { 34 | if (strcmp(p->n_name, name) == 0) 35 | break; 36 | for (cp = p->n_aliases; *cp != 0; cp++) 37 | if (strcmp(*cp, name) == 0) 38 | goto found; 39 | } 40 | found: 41 | if (!_net_stayopen) 42 | endnetent(); 43 | return (p); 44 | } 45 | -------------------------------------------------------------------------------- /scripts/bjnp-discover.nse: -------------------------------------------------------------------------------- 1 | description = [[ 2 | Retrieves printer or scanner information from a remote device supporting the 3 | BJNP protocol. The protocol is known to be supported by network based Canon 4 | devices. 5 | ]] 6 | 7 | --- 8 | -- @usage 9 | -- sudo nmap -sU -p 8611,8612 --script bjnp-discover 10 | -- 11 | -- @output 12 | -- PORT STATE SERVICE 13 | -- 8611/udp open canon-bjnp1 14 | -- | bjnp-discover: 15 | -- | Manufacturer: Canon 16 | -- | Model: MG5200 series 17 | -- | Description: Canon MG5200 series 18 | -- | Firmware version: 1.050 19 | -- |_ Command: BJL,BJRaster3,BSCCe,NCCe,IVEC,IVECPLI 20 | -- 8612/udp open canon-bjnp2 21 | -- | bjnp-discover: 22 | -- | Manufacturer: Canon 23 | -- | Model: MG5200 series 24 | -- | Description: Canon MG5200 series 25 | -- |_ Command: MultiPass 2.1,IVEC 26 | -- 27 | 28 | categories = {"safe", "discovery"} 29 | author = "Patrik Karlsson" 30 | 31 | local bjnp = require("bjnp") 32 | local shortport = require("shortport") 33 | local stdnse = require("stdnse") 34 | 35 | portrule = shortport.portnumber({8611, 8612}, "udp") 36 | 37 | action = function(host, port) 38 | local helper = bjnp.Helper:new(host, port) 39 | if ( not(helper:connect()) ) then 40 | return stdnse.format_output(false, "Failed to connect to server") 41 | end 42 | local status, attrs 43 | if ( port.number == 8611 ) then 44 | status, attrs = helper:getPrinterIdentity() 45 | else 46 | status, attrs = helper:getScannerIdentity() 47 | end 48 | helper:close() 49 | return stdnse.format_output(true, attrs) 50 | end 51 | -------------------------------------------------------------------------------- /docs/licenses/BSD-simplified: -------------------------------------------------------------------------------- 1 | Copyright. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED 14 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 15 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 16 | SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 17 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 19 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 20 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 21 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 22 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | 24 | The views and conclusions contained in the software and documentation are those 25 | of the authors and should not be interpreted as representing official policies, 26 | either expressed or implied, of the authors. 27 | -------------------------------------------------------------------------------- /libpcap/sf-pcap-ng.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | * 21 | * sf-pcap-ng.h - pcap-ng-file-format-specific routines 22 | * 23 | * Used to read pcap-ng savefiles. 24 | */ 25 | 26 | #ifndef sf_pcap_ng_h 27 | #define sf_pcap_ng_h 28 | 29 | extern pcap_t *pcap_ng_check_header(bpf_u_int32 magic, FILE *fp, 30 | u_int precision, char *errbuf, int *err); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /scripts/ncp-enum-users.nse: -------------------------------------------------------------------------------- 1 | local ncp = require "ncp" 2 | local shortport = require "shortport" 3 | local stdnse = require "stdnse" 4 | local table = require "table" 5 | 6 | description = [[ 7 | Retrieves a list of all eDirectory users from the Novell NetWare Core Protocol (NCP) service. 8 | ]] 9 | 10 | --- 11 | -- 12 | --@output 13 | -- PORT STATE SERVICE REASON 14 | -- 524/tcp open ncp syn-ack 15 | -- | ncp-enum-users: 16 | -- | CN=admin.O=cqure 17 | -- | CN=cawi.OU=finance.O=cqure 18 | -- | CN=linux-l84tadmin.O=cqure 19 | -- | CN=nist.OU=hr.O=cqure 20 | -- | CN=novlxregd.O=cqure 21 | -- | CN=novlxsrvd.O=cqure 22 | -- | CN=OESCommonProxy_linux-l84t.O=cqure 23 | -- | CN=sasi.OU=hr.O=cqure 24 | -- |_ CN=wwwrun.O=cqure 25 | -- 26 | 27 | -- Version 0.1 28 | -- Created 04/26/2011 - v0.1 - created by Patrik Karlsson 29 | 30 | author = "Patrik Karlsson" 31 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 32 | categories = {"auth", "safe"} 33 | 34 | 35 | portrule = shortport.port_or_service(524, "ncp", "tcp") 36 | 37 | action = function(host, port) 38 | local helper = ncp.Helper:new(host,port) 39 | 40 | local status, resp = helper:connect() 41 | if ( not(status) ) then return stdnse.format_output(false, resp) end 42 | 43 | status, resp = helper:search("[Root]", "User", "*") 44 | if ( not(status) ) then return stdnse.format_output(false, resp) end 45 | 46 | local output = {} 47 | 48 | for _, entry in ipairs(resp) do 49 | table.insert(output, entry.name) 50 | end 51 | 52 | return stdnse.format_output(true, output) 53 | end 54 | 55 | -------------------------------------------------------------------------------- /libdnet-stripped/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2000-2006 Dug Song 3 | All rights reserved, all wrongs reversed. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above 13 | copyright notice, this list of conditions and the following 14 | disclaimer in the documentation and/or other materials provided 15 | with the distribution. 16 | 17 | 3. The names of the authors and copyright holders may not be used 18 | to endorse or promote products derived from this software 19 | without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 22 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 25 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 29 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 31 | OF THE POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /liblinear/blas/dnrm2.c: -------------------------------------------------------------------------------- 1 | #include /* Needed for fabs() and sqrt() */ 2 | #include "blas.h" 3 | 4 | double dnrm2_(int *n, double *x, int *incx) 5 | { 6 | long int ix, nn, iincx; 7 | double norm, scale, absxi, ssq, temp; 8 | 9 | /* DNRM2 returns the euclidean norm of a vector via the function 10 | name, so that 11 | 12 | DNRM2 := sqrt( x'*x ) 13 | 14 | -- This version written on 25-October-1982. 15 | Modified on 14-October-1993 to inline the call to SLASSQ. 16 | Sven Hammarling, Nag Ltd. */ 17 | 18 | /* Dereference inputs */ 19 | nn = *n; 20 | iincx = *incx; 21 | 22 | if( nn > 0 && iincx > 0 ) 23 | { 24 | if (nn == 1) 25 | { 26 | norm = fabs(x[0]); 27 | } 28 | else 29 | { 30 | scale = 0.0; 31 | ssq = 1.0; 32 | 33 | /* The following loop is equivalent to this call to the LAPACK 34 | auxiliary routine: CALL SLASSQ( N, X, INCX, SCALE, SSQ ) */ 35 | 36 | for (ix=(nn-1)*iincx; ix>=0; ix-=iincx) 37 | { 38 | if (x[ix] != 0.0) 39 | { 40 | absxi = fabs(x[ix]); 41 | if (scale < absxi) 42 | { 43 | temp = scale / absxi; 44 | ssq = ssq * (temp * temp) + 1.0; 45 | scale = absxi; 46 | } 47 | else 48 | { 49 | temp = absxi / scale; 50 | ssq += temp * temp; 51 | } 52 | } 53 | } 54 | norm = scale * sqrt(ssq); 55 | } 56 | } 57 | else 58 | norm = 0.0; 59 | 60 | return norm; 61 | 62 | } /* dnrm2_ */ 63 | -------------------------------------------------------------------------------- /docs/licenses/Libdnet-license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2000-2006 Dug Song 2 | All rights reserved, all wrongs reversed. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above 12 | copyright notice, this list of conditions and the following 13 | disclaimer in the documentation and/or other materials provided 14 | with the distribution. 15 | 16 | 3. The names of the authors and copyright holders may not be used 17 | to endorse or promote products derived from this software 18 | without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 21 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 24 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 28 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 30 | OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /mswin32/ifaddrlist.h: -------------------------------------------------------------------------------- 1 | #if !(__solaris__) 2 | /* 3 | * Copyright (c) 1997 4 | * The Regents of the University of California. All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that: (1) source code distributions 8 | * retain the above copyright notice and this paragraph in its entirety, (2) 9 | * distributions including binary code include the above copyright notice and 10 | * this paragraph in its entirety in the documentation or other materials 11 | * provided with the distribution, and (3) all advertising materials mentioning 12 | * features or use of this software display the following acknowledgement: 13 | * ``This product includes software developed by the University of California, 14 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 15 | * the University nor the names of its contributors may be used to endorse 16 | * or promote products derived from this software without specific prior 17 | * written permission. 18 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 19 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 20 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 | * 22 | */ 23 | 24 | struct ifaddrlist 25 | { 26 | u_int32_t addr; 27 | char *device; 28 | }; 29 | 30 | 31 | int 32 | ifaddrlist( 33 | struct ifaddrlist **, 34 | char * 35 | ); 36 | 37 | 38 | int 39 | set_up_interface( 40 | struct sockaddr_in **, 41 | u_char ** 42 | ); 43 | 44 | #endif /* __solaris__ */ 45 | -------------------------------------------------------------------------------- /liblinear/COPYRIGHT: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2007-2011 The LIBLINEAR Project. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | 3. Neither name of copyright holders nor the names of its contributors 17 | may be used to endorse or promote products derived from this software 18 | without specific prior written permission. 19 | 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 28 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 29 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 30 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /liblua/ldebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldebug.h,v 2.14 2015/05/22 17:45:56 roberto Exp $ 3 | ** Auxiliary functions from Debug Interface module 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldebug_h 8 | #define ldebug_h 9 | 10 | 11 | #include "lstate.h" 12 | 13 | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15 | 16 | #define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1) 17 | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) 19 | 20 | 21 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, 22 | const char *opname); 23 | LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, 24 | const TValue *p2); 25 | LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1, 26 | const TValue *p2, 27 | const char *msg); 28 | LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1, 29 | const TValue *p2); 30 | LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1, 31 | const TValue *p2); 32 | LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...); 33 | LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg, 34 | TString *src, int line); 35 | LUAI_FUNC l_noret luaG_errormsg (lua_State *L); 36 | LUAI_FUNC void luaG_traceexec (lua_State *L); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /libpcap/lbl/os-osf5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1993, 1994, 1995, 1996, 1997 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that: (1) source code distributions 7 | * retain the above copyright notice and this paragraph in its entirety, (2) 8 | * distributions including binary code include the above copyright notice and 9 | * this paragraph in its entirety in the documentation or other materials 10 | * provided with the distribution, and (3) all advertising materials mentioning 11 | * features or use of this software display the following acknowledgement: 12 | * ``This product includes software developed by the University of California, 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 | * the University nor the names of its contributors may be used to endorse 15 | * or promote products derived from this software without specific prior 16 | * written permission. 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | */ 21 | 22 | /* 23 | * Prototypes missing in Tru64 UNIX 5.x 24 | * XXX - "snprintf()" and "vsnprintf()" aren't missing, but you have to 25 | * #define the right value to get them defined by . 26 | */ 27 | int snprintf(char *, size_t, const char *, ...); 28 | int vsnprintf(char *, size_t, const char *, va_list); 29 | int pfopen(char *, int); 30 | 31 | -------------------------------------------------------------------------------- /scripts/pop3-capabilities.nse: -------------------------------------------------------------------------------- 1 | local pop3 = require "pop3" 2 | local shortport = require "shortport" 3 | local stdnse = require "stdnse" 4 | local table = require "table" 5 | 6 | description = [[ 7 | Retrieves POP3 email server capabilities. 8 | 9 | POP3 capabilities are defined in RFC 2449. The CAPA command allows a client to 10 | ask a server what commands it supports and possibly any site-specific policy. 11 | Besides the list of supported commands, the IMPLEMENTATION string giving the 12 | server version may be available. 13 | ]] 14 | 15 | --- 16 | -- @output 17 | -- 110/tcp open pop3 18 | -- |_ pop3-capabilities: USER CAPA RESP-CODES UIDL PIPELINING STLS TOP SASL(PLAIN) 19 | 20 | author = "Philip Pickering" 21 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 22 | 23 | categories = {"default","discovery","safe"} 24 | 25 | 26 | portrule = shortport.port_or_service({110,995},{"pop3","pop3s"}) 27 | 28 | action = function(host, port) 29 | local capa, err = pop3.capabilities(host, port) 30 | if type(capa) == "table" then 31 | -- Convert the capabilities table into an array of strings. 32 | local capstrings = {} 33 | for cap, args in pairs(capa) do 34 | if ( #args > 0 ) then 35 | table.insert(capstrings, ("%s(%s)"):format(cap, stdnse.strjoin(" ", args))) 36 | else 37 | table.insert(capstrings, cap) 38 | end 39 | end 40 | return stdnse.strjoin(" ", capstrings) 41 | elseif type(err) == "string" then 42 | stdnse.debug1("'%s' for %s", err, host.ip) 43 | return 44 | else 45 | return "server doesn't support CAPA" 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /nselib/match.lua: -------------------------------------------------------------------------------- 1 | --- 2 | -- Buffered network I/O helper functions. 3 | -- 4 | -- The functions in this module can be used for delimiting data received by the 5 | -- nmap.receive_buf function in the Network I/O API (which see). 6 | -- @copyright Same as Nmap--See https://nmap.org/book/man-legal.html 7 | 8 | local stdnse = require "stdnse" 9 | _ENV = stdnse.module("match", stdnse.seeall) 10 | 11 | --various functions for use with NSE's nsock:receive_buf - function 12 | 13 | -- e.g. 14 | -- sock:receive_buf(numbytes(80), true) - is the buffered version of 15 | -- sock:receive_bytes(80) - i.e. it 16 | -- returns exactly 80 bytes and no more 17 | 18 | --- Return a function that allows delimiting at a certain number of bytes. 19 | -- 20 | -- This function can be used to get a buffered version of 21 | -- sock:receive_bytes(n) in case a script requires more than one 22 | -- fixed-size chunk, as the unbuffered version may return more bytes than 23 | -- requested and thus would require you to do the parsing on your own. 24 | -- 25 | -- The keeppattern parameter to receive_buf should be set to 26 | -- true, otherwise the string returned will be 1 less than 27 | -- num 28 | -- @param num Number of bytes. 29 | -- @usage sock:receive_buf(match.numbytes(80), true) 30 | -- @see nmap.receive_buf 31 | numbytes = function(num) 32 | local n = num 33 | return function(buf) 34 | if(#buf >=n) then 35 | return n, n 36 | end 37 | return nil 38 | end 39 | end 40 | 41 | 42 | return _ENV; 43 | -------------------------------------------------------------------------------- /docs/licenses/LIBLINEAR-license.txt: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2007-2011 The LIBLINEAR Project. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | 3. Neither name of copyright holders nor the names of its contributors 17 | may be used to endorse or promote products derived from this software 18 | without specific prior written permission. 19 | 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 28 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 29 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 30 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /libnetutil/Makefile.in: -------------------------------------------------------------------------------- 1 | top_srcdir = @top_srcdir@ 2 | srcdir = @srcdir@ 3 | 4 | CXX = @CXX@ 5 | CXXFLAGS = @CXXFLAGS@ 6 | CPPFLAGS = @CPPFLAGS@ $(DEFS) 7 | DEFS = @DEFS@ 8 | DEFS += -D_FORTIFY_SOURCE=2 9 | AR = ar 10 | RANLIB = @RANLIB@ 11 | 12 | LIBDNETDIR = @LIBDNETDIR@ 13 | LIBPCAPDIR = @libpcapdir@ 14 | 15 | TARGET = libnetutil.a 16 | 17 | SRCS = $(srcdir)/netutil.cc $(srcdir)/PacketElement.cc $(srcdir)/NetworkLayerElement.cc $(srcdir)/ARPHeader.cc $(srcdir)/PacketElement.cc $(srcdir)/NetworkLayerElement.cc $(srcdir)/TransportLayerElement.cc $(srcdir)/ARPHeader.cc $(srcdir)/EthernetHeader.cc $(srcdir)/ICMPv4Header.cc $(srcdir)/ICMPv6Header.cc $(srcdir)/IPv4Header.cc $(srcdir)/IPv6Header.cc $(srcdir)/TCPHeader.cc $(srcdir)/UDPHeader.cc $(srcdir)/RawData.cc $(srcdir)/HopByHopHeader.cc $(srcdir)/DestOptsHeader.cc $(srcdir)/FragmentHeader.cc $(srcdir)/RoutingHeader.cc $(srcdir)/PacketParser.cc 18 | OBJS = netutil.o PacketElement.o NetworkLayerElement.o TransportLayerElement.o ARPHeader.o EthernetHeader.o ICMPv4Header.o ICMPv6Header.o IPv4Header.o IPv6Header.o TCPHeader.o UDPHeader.o RawData.o HopByHopHeader.o DestOptsHeader.o FragmentHeader.o RoutingHeader.o PacketParser.o 19 | 20 | all: $(TARGET) 21 | 22 | $(TARGET): $(OBJS) 23 | rm -f $@ 24 | $(AR) cr $@ $(OBJS) 25 | $(RANLIB) $@ 26 | 27 | clean: 28 | rm -f $(OBJS) $(TARGET) 29 | 30 | distclean: clean 31 | rm -rf Makefile makefile.dep 32 | 33 | Makefile: Makefile.in 34 | cd $(top_srcdir) && ./config.status 35 | 36 | .cc.o: 37 | $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ 38 | 39 | makefile.dep: 40 | $(CXX) -MM $(CPPFLAGS) $(SRCS) > $@ 41 | -include makefile.dep 42 | -------------------------------------------------------------------------------- /scripts/iax2-version.nse: -------------------------------------------------------------------------------- 1 | local comm = require "comm" 2 | local nmap = require "nmap" 3 | local shortport = require "shortport" 4 | local string = require "string" 5 | 6 | description = [[ 7 | Detects the UDP IAX2 service. 8 | 9 | The script sends an Inter-Asterisk eXchange (IAX) Revision 2 Control Frame POKE 10 | request and checks for a proper response. This protocol is used to enable VoIP 11 | connections between servers as well as client-server communication. 12 | ]] 13 | 14 | --- 15 | -- @usage 16 | -- nmap -sU -sV -p 4569 17 | -- @output 18 | -- PORT STATE SERVICE VERSION 19 | -- 4569/udp closed iax2 20 | 21 | author = "Ferdy Riphagen" 22 | 23 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 24 | 25 | categories = {"version"} 26 | 27 | 28 | portrule = shortport.version_port_or_service(4569, nil, "udp") 29 | 30 | action = function(host, port) 31 | -- see http://www.cornfed.com/iax.pdf for all options. 32 | local poke = "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x1e" 33 | 34 | local status, recv = comm.exchange(host, port, poke, {timeout=10000}) 35 | 36 | if not status then 37 | return 38 | end 39 | 40 | if (#recv) == 12 then 41 | local byte11 = string.byte(recv, 11) 42 | local byte12 = string.byte(recv, 12) 43 | 44 | -- byte11 must be \x06 IAX Control Frame 45 | -- and byte12 must be \x03 or \x04 46 | if ((byte11 == 6) and 47 | (byte12 == 3 or byte12 == 4)) 48 | then 49 | nmap.set_port_state(host, port, "open") 50 | port.version.name = "iax2" 51 | nmap.set_port_version(host, port) 52 | end 53 | 54 | end 55 | end 56 | -------------------------------------------------------------------------------- /scripts/cups-queue-info.nse: -------------------------------------------------------------------------------- 1 | local ipp = require "ipp" 2 | local shortport = require "shortport" 3 | local stdnse = require "stdnse" 4 | 5 | description = [[ 6 | Lists currently queued print jobs of the remote CUPS service grouped by 7 | printer. 8 | ]] 9 | 10 | --- 11 | -- @usage 12 | -- nmap -p 631 --script cups-queue-info 13 | -- 14 | -- @output 15 | -- PORT STATE SERVICE 16 | -- 631/tcp open ipp 17 | -- | cups-queue-info: 18 | -- | HP Laserjet 19 | -- | id time state size (kb) owner jobname 20 | -- | 14 2012-04-26 22:01:19 Held 2071k Patrik Karlsson Print - CUPS Implementation of IPP - Documentation - CUPS 21 | -- | Generic-PostScript-Printer 22 | -- | id time state size (kb) owner jobname 23 | -- | 3 2012-04-16 23:25:47 Pending 11k Unknown Unknown 24 | -- | 4 2012-04-16 23:33:21 Pending 11k Unknown Unknown 25 | -- |_ 11 2012-04-24 08:15:14 Pending 13k Unknown Unknown 26 | -- 27 | 28 | categories = {"safe", "discovery"} 29 | 30 | author = "Patrik Karlsson" 31 | license = "Same as Nmap--See https://nmap.org/book/man-legal.html" 32 | categories = {"safe", "discovery"} 33 | 34 | 35 | portrule = shortport.port_or_service(631, "ipp", "tcp", "open") 36 | 37 | action = function(host, port) 38 | local helper = ipp.Helper:new(host, port) 39 | if ( not(helper:connect()) ) then 40 | return stdnse.format_output(false, "Failed to connect to server") 41 | end 42 | 43 | local output = helper:getQueueInfo() 44 | if ( output ) then 45 | return stdnse.format_output(true, output) 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /nmap-update/Makefile.in: -------------------------------------------------------------------------------- 1 | top_srcdir = @top_srcdir@ 2 | srcdir = @srcdir@ 3 | prefix = @prefix@ 4 | datarootdir = @datarootdir@ 5 | exec_prefix = @exec_prefix@ 6 | bindir = @bindir@ 7 | mandir = @mandir@ 8 | 9 | CC = @CC@ 10 | CFLAGS = @CFLAGS@ 11 | CPPFLAGS = @CPPFLAGS@ $(DEFS) -I$(NBASEDIR) 12 | LDFLAGS = @LDFLAGS@ 13 | LIBS = @LIBS@ $(NBASELIB) $(MAC_FLAGS) 14 | DEFS = @DEFS@ -D_FORTIFY_SOURCE=2 15 | APR_LIBS = @APR_LIBS@ 16 | SVN_LIBS = @SVN_LIBS@ 17 | 18 | INSTALL = @INSTALL@ 19 | STRIP = @STRIP@ 20 | SHTOOL = ../shtool 21 | 22 | DESTDIR = 23 | 24 | SOURCES = nmap-update svn_auth 25 | C_FILES = $(addsuffix .c,$(SOURCES)) 26 | O_FILES = $(addsuffix .o,$(SOURCES)) 27 | 28 | NBASEDIR = ../nbase 29 | NBASELIB = $(NBASEDIR)/libnbase.a 30 | 31 | all: nmap-update 32 | 33 | nmap-update: $(O_FILES) $(NBASELIB) 34 | $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(SVN_LIBS) $(APR_LIBS) $(OPENSSL_LIBS) $(LIBS) 35 | 36 | %.o: %.c 37 | $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $< 38 | 39 | $(NBASELIB): 40 | cd $(NBASEDIR) && $(MAKE) 41 | 42 | install: nmap-update 43 | $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 44 | $(INSTALL) -c -m 755 nmap-update $(DESTDIR)$(bindir) 45 | $(STRIP) -x $(DESTDIR)$(bindir)/nmap-update 46 | $(INSTALL) -c -m 644 ../docs/nmap-update.1 $(DESTDIR)$(mandir)/man1/ 47 | 48 | uninstall: 49 | $(RM) -f $(DESTDIR)$(bindir)/nmap-update 50 | 51 | clean: 52 | rm -f nmap-update *.o 53 | 54 | distclean: clean 55 | rm -f Makefile makefile.dep 56 | 57 | Makefile: Makefile.in 58 | ./config.status 59 | 60 | makefile.dep: 61 | $(CC) -MM $(CPPFLAGS) $(C_FILES) > $@ 62 | -include makefile.dep 63 | 64 | .PHONY: all clean 65 | --------------------------------------------------------------------------------