debian/0000755000000000000000000000000011415450714007170 5ustar debian/README.Debian0000644000000000000000000000027511413124340011224 0ustar pnscan for Debian ----------------- This tool require no configuration. For how to use it, see the other README file. -- Ola Lundqvist , Fri, 22 Mar 2002 10:53:01 +0100 debian/copyright0000644000000000000000000000136111413124340011113 0ustar This package was debianized by Ola Lundqvist on Fri, 22 Mar 2002 10:53:01 +0100. It was downloaded from: ftp://ftp.lysator.liu.se/pub/unix/pnscan/ http://www.lysator.liu.se/~pen/pnscan/ Upstream Author: Peter Eriksson , program Ola Lundqvist , manual Copyright: Copyright (c) 2002 Peter Eriksson Copyright (c) 2002 Ola Lundqvist This program is free software; you can redistribute it and/or modify it as you wish - as long as you don't claim that you wrote it. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. debian/changelog0000644000000000000000000000346211415450714011047 0ustar pnscan (1.11-6) unstable; urgency=low * Removed option '-s' in debian/rules for nostrip (Closes: #437778). -- William Vera Thu, 08 Jul 2010 17:30:23 -0500 pnscan (1.11-5) unstable; urgency=low * New maintainer (Closes: #586411). * Bump Standards-Version to 3.9.0. * Bump debhelper version to 7.0.50 at the control file. * Updated clean rule in the debian/rules. * Added ${misc:Depends} as depend in control file. * Switch to dpkg-source 3.0 (quilt) format. * Added Homepage field at control file. * Updated watch file (Closes: #529133). * Added DM Upload Allowed at the control file. -- William Vera Thu, 01 Jul 2010 09:50:54 -0500 pnscan (1.11-4) unstable; urgency=low * Applied patch from Jose Luis Gonzalez to correct a segfault when no arguments are used, closes: #447408. * Changed from debhelper compatibility 3 to 4. * Updated standards version from 3.5.8 to 3.7.2. -- Ola Lundqvist Sun, 21 Oct 2007 12:59:15 +0200 pnscan (1.11-3) unstable; urgency=low * Fixed errno clobber using patch from Florian Weimer. * Fixed socket problem using patch from Florian Weimer. * Updated standards version from 3.5.2 to 3.5.8. * Fixed first line of description. -- Ola Lundqvist Fri, 18 Jul 2003 12:10:00 +0200 pnscan (1.11-2) unstable; urgency=low * Fixed build dependency, closes: #145156. -- Ola Lundqvist Tue, 30 Apr 2002 09:56:29 +0200 pnscan (1.11-1) unstable; urgency=low * New upstream release, closes: #139451. * Updated description, closes: #144908. -- Ola Lundqvist Mon, 29 Apr 2002 08:54:10 +0200 pnscan (1.6-1) unstable; urgency=low * Initial Release. -- Ola Lundqvist Fri, 22 Mar 2002 10:53:01 +0100 debian/patches/0000755000000000000000000000000011415450744010622 5ustar debian/patches/164122.author0000644000000000000000000000005611413124340012572 0ustar Florian Weimer debian/patches/163337.patch0000644000000000000000000000220311413124340012372 0ustar --- pnscan-1.11.orig/pnscan.c +++ pnscan-1.11/pnscan.c @@ -590,10 +590,11 @@ { if (verbose) { + int old_errno = errno; pthread_mutex_lock(&print_lock); print_host(stderr, sin.sin_addr, port); - fprintf(stderr, " : ERR : connect() failed: %s\n", strerror(errno)); + fprintf(stderr, " : ERR : connect() failed: %s\n", strerror(old_errno)); pthread_mutex_unlock(&print_lock); } @@ -609,10 +610,11 @@ { if (verbose) { + int old_errno = errno; pthread_mutex_lock(&print_lock); print_host(stderr, sin.sin_addr, port); - fprintf(stderr, " : ERR : write() failed: %s\n", strerror(errno)); + fprintf(stderr, " : ERR : write() failed: %s\n", strerror(old_errno)); pthread_mutex_unlock(&print_lock); } @@ -632,10 +634,11 @@ { if (verbose) { + int old_errno = errno; pthread_mutex_lock(&print_lock); print_host(stderr, sin.sin_addr, port); - fprintf(stderr, " : ERR : read() failed: %s\n", strerror(errno)); + fprintf(stderr, " : ERR : read() failed: %s\n", strerror(old_errno)); pthread_mutex_unlock(&print_lock); } debian/patches/164122.patch0000644000000000000000000000212411413124340012365 0ustar --- pnscan-1.11.orig/pnscan.c +++ pnscan-1.11/pnscan.c @@ -583,6 +583,19 @@ { code = -1; errno = ETIMEDOUT; + } else { + /* Check for pending error. */ + int error = 0; + socklen_t len = sizeof (error); + + errno = 0; + if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) >= 0) { + /* non-Solaris case: error is overwritten with errno. */ + errno = error; + } + if (errno) { + code = -1; + } } } @@ -630,5 +645,21 @@ if (len < 0) { + if (errno == ETIMEDOUT) { + /* If we timeout during a read, the socket was open, but we + received no banner. This situation is still worthwile + to report as an "empty" read result. */ + + pthread_mutex_lock(&print_lock); + + print_host(stdout, sin.sin_addr, port); + printf(" : TXT : \n"); + + pthread_mutex_unlock(&print_lock); + + close(fd); + return 1; + } + if (verbose) { debian/patches/argv-segv.patch0000644000000000000000000000171011413124340013527 0ustar Package: pnscan Version: 1.11-3 Severity: normal Tags: upstream patch pnscan segfaults when running without parameters and an empty line as input: $ echo | pnscan Segmentation fault (core dumped) $ gdb /usr/bin/pnscan core [...] Program terminated with signal 11, Segmentation fault. #0 0xb7e17b26 in strtok_r () from /lib/tls/libc.so.6 This is a bug in the original program: ==================================================================== --- pnscan-wrong.c 2007-10-20 23:08:00.000000000 +0200 +++ pnscan.c 2007-10-20 23:08:06.000000000 +0200 @@ -816,7 +816,6 @@ } host = strtok_r(buf, " \t\n\r", &tokp); - serv = strtok_r(NULL, " \t\n\r", &tokp); if (host == NULL || host[0] == '#') continue; @@ -828,6 +827,8 @@ continue; } + serv = strtok_r(NULL, " \t\n\r", &tokp); + if (serv == NULL) { if (first_port == 0) ======================================================================= Please forward to upstream. debian/patches/163337.author0000644000000000000000000000005611413124340012601 0ustar Florian Weimer debian/pnscan.docs0000644000000000000000000000001411413124340011306 0ustar README TODO debian/watch0000644000000000000000000000012411413142555010215 0ustar version=3 opts=pasv ftp://ftp.lysator.liu.se/pub/unix/pnscan/pnscan-(.*)\.tar\.gz debian/rules0000755000000000000000000000406411415450572010256 0ustar #!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This is the debhelper compatibility version to use. #export DH_COMPAT=4 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g endif configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. $(MAKE) linux #/usr/bin/docbook-to-man debian/pnscan.sgml > pnscan.1 touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. [ ! -f Makefile ] || $(MAKE) distclean dh_clean install: build dh_testdir dh_testroot dh_clean dh_installdirs # Add here commands to install the package into debian/pnscan. $(MAKE) install-distribution DESTDIR=$(CURDIR)/debian/pnscan/usr MANDIR=$(CURDIR)/debian/pnscan/usr/share/man gzip -9 $(CURDIR)/debian/pnscan/usr/share/man/man1/* # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot # dh_installdebconf dh_installdocs dh_installexamples dh_installmenu # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_installinit dh_installcron dh_installman dh_installinfo # dh_undocumented dh_installchangelogs dh_link dh_strip dh_compress dh_fixperms # dh_makeshlibs dh_installdeb # dh_perl dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure debian/control0000644000000000000000000000102511413145277010574 0ustar Source: pnscan Section: net Priority: optional Maintainer: William Vera DM-Upload-Allowed: yes Build-Depends: debhelper (>=7.0.50), docbook-to-man, docbook-utils Standards-Version: 3.9.0 Homepage: http://www.lysator.liu.se/~pen/pnscan/ Package: pnscan Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Multi threaded port scanner Pnscan is a multi threaded port scanner that can scan a large network very quickly. If does not have all the features that nmap have but is much faster. debian/compat0000644000000000000000000000000211413134052010356 0ustar 7 debian/source/0000755000000000000000000000000011413135231010460 5ustar debian/source/format0000644000000000000000000000001411413263213011670 0ustar 3.0 (quilt) debian/pnscan.dirs0000644000000000000000000000003311413124340011320 0ustar usr/bin usr/share/man/man1