mirror of
https://github.com/nmap/nmap.git
synced 2025-12-08 21:51:28 +00:00
Nmap 3.999 truly just about ready now
This commit is contained in:
34
CHANGELOG
34
CHANGELOG
@@ -1,6 +1,32 @@
|
|||||||
# Nmap Changelog ($Id$); -*-text-*-
|
# Nmap Changelog ($Id$); -*-text-*-
|
||||||
|
3.999
|
||||||
|
|
||||||
|
o Added runtime interaction support to Windows, thanks to patches from
|
||||||
|
Andrew Lutomirski (luto(a)myrealbox.com) and Gisle Vanem (giva(a)bgnett.no).
|
||||||
|
|
||||||
|
o Changed a couple lines of tcpip.cc (put certain IP header fields in
|
||||||
|
host byte order rather than NBO) to (hopefully) support Mac OS X on
|
||||||
|
Intel. Thanks to Kurt Grutzmacher (grutz(a)jingojango.net) for the
|
||||||
|
patch.
|
||||||
|
|
||||||
|
o Upgraded the included LibPCRE from version 6.3 to 6.4. There was a
|
||||||
|
report of version detection crashes on the new Intel-based MACs with
|
||||||
|
6.3.
|
||||||
|
|
||||||
|
o Fixed an issue in which the installer would malfunction in rare
|
||||||
|
issues when installing to a directory with spaces in it. Thanks to
|
||||||
|
Thierry Zoller (Thierry(a)Zoller.lu) for the report.
|
||||||
|
|
||||||
3.99
|
3.99
|
||||||
|
|
||||||
|
o Integrated all remaining 2005 service submissions. The DB now has
|
||||||
|
surpassed 3,000 signatures for the first time. There now are 3,153
|
||||||
|
signatures for 381 service protocols. Those protocols span the
|
||||||
|
gamut from abc, acap, afp, and afs to zebedee, zebra, and
|
||||||
|
zenimaging. It even covers obscure protocols such as http, ftp,
|
||||||
|
smtp, and ssh :). Thanks to Version Detection Czar Doug Hoyte for
|
||||||
|
his excellent work on this.
|
||||||
|
|
||||||
o Created a Windows executable installer using the open source NSIS
|
o Created a Windows executable installer using the open source NSIS
|
||||||
(Nullsoft Scriptable Install System). It handles Pcap installation,
|
(Nullsoft Scriptable Install System). It handles Pcap installation,
|
||||||
registry performance changes, and adding Nmap to your cmd.exe
|
registry performance changes, and adding Nmap to your cmd.exe
|
||||||
@@ -17,14 +43,6 @@ o Fixed compilation to again work with gcc-derivatives such as
|
|||||||
MingW. Thanks to Gisle Vanem (giva(a)bgnett.no) for sending the
|
MingW. Thanks to Gisle Vanem (giva(a)bgnett.no) for sending the
|
||||||
patches
|
patches
|
||||||
|
|
||||||
o Integrated all remaining 2005 service submissions. The DB now has
|
|
||||||
surpassed 3,000 signatures for the first time. There now are 3,153
|
|
||||||
signatures for 381 service protocols. Those protocols span the
|
|
||||||
gamut from abc, acap, afp, and afs to zebedee, zebra, and
|
|
||||||
zenimaging. It even covers obscure protocols such as http, ftp,
|
|
||||||
smtp, and ssh :). Thanks to Version Detection Czar Doug Hoyte for
|
|
||||||
his excellent work on this.
|
|
||||||
|
|
||||||
3.98BETA1
|
3.98BETA1
|
||||||
|
|
||||||
o Added run time interaction as documented at
|
o Added run time interaction as documented at
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export NMAP_VERSION = 3.99
|
export NMAP_VERSION = 3.999
|
||||||
NMAP_NAME= Nmap
|
NMAP_NAME= Nmap
|
||||||
NMAP_URL= http://www.insecure.org/nmap/
|
NMAP_URL= http://www.insecure.org/nmap/
|
||||||
NMAP_PLATFORM=@host@
|
NMAP_PLATFORM=@host@
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
|
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
|
||||||
.\" Instead of manually editing it, you probably should edit the DocBook XML
|
.\" Instead of manually editing it, you probably should edit the DocBook XML
|
||||||
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
|
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
|
||||||
.TH "NMAP" "1" "01/24/2006" "" "Nmap Reference Guide"
|
.TH "NMAP" "1" "01/26/2006" "" "Nmap Reference Guide"
|
||||||
.\" disable hyphenation
|
.\" disable hyphenation
|
||||||
.nh
|
.nh
|
||||||
.\" disable justification (adjust text to left margin only)
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Nmap 3.99 ( http://www.insecure.org/nmap/ )
|
Nmap 3.999 ( http://www.insecure.org/nmap/ )
|
||||||
Usage: nmap [Scan Type(s)] [Options] {target specification}
|
Usage: nmap [Scan Type(s)] [Options] {target specification}
|
||||||
TARGET SPECIFICATION:
|
TARGET SPECIFICATION:
|
||||||
Can pass hostnames, IP addresses, networks, etc.
|
Can pass hostnames, IP addresses, networks, etc.
|
||||||
|
|||||||
2
libpcap/configure
vendored
2
libpcap/configure
vendored
@@ -1,5 +1,5 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.ac Revision: 2864 .
|
# From configure.ac Revision: 2867 .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.59.
|
# Generated by GNU Autoconf 2.59.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ OBJ = pcre_chartables.@OBJEXT@ \
|
|||||||
pcre_globals.@OBJEXT@ \
|
pcre_globals.@OBJEXT@ \
|
||||||
pcre_info.@OBJEXT@ \
|
pcre_info.@OBJEXT@ \
|
||||||
pcre_maketables.@OBJEXT@ \
|
pcre_maketables.@OBJEXT@ \
|
||||||
pcre_printint.@OBJEXT@ \
|
|
||||||
pcre_refcount.@OBJEXT@ \
|
pcre_refcount.@OBJEXT@ \
|
||||||
pcre_study.@OBJEXT@ \
|
pcre_study.@OBJEXT@ \
|
||||||
pcre_tables.@OBJEXT@ \
|
pcre_tables.@OBJEXT@ \
|
||||||
@@ -185,11 +184,6 @@ pcre_maketables.@OBJEXT@: Makefile config.h pcre.h \
|
|||||||
$(CC) -c $(CFLAGS) $(INCLS) $(DEFS) $(POSIX_MALLOC_THRESHOLD) \
|
$(CC) -c $(CFLAGS) $(INCLS) $(DEFS) $(POSIX_MALLOC_THRESHOLD) \
|
||||||
$(top_srcdir)/pcre_maketables.c
|
$(top_srcdir)/pcre_maketables.c
|
||||||
|
|
||||||
pcre_printint.@OBJEXT@: Makefile config.h pcre.h \
|
|
||||||
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_printint.c
|
|
||||||
$(CC) -c $(CFLAGS) $(INCLS) $(DEFS) $(POSIX_MALLOC_THRESHOLD) \
|
|
||||||
$(top_srcdir)/pcre_printint.c
|
|
||||||
|
|
||||||
pcre_refcount.@OBJEXT@: Makefile config.h pcre.h \
|
pcre_refcount.@OBJEXT@: Makefile config.h pcre.h \
|
||||||
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_refcount.c
|
$(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_refcount.c
|
||||||
$(CC) -c $(CFLAGS) $(INCLS) $(DEFS) $(POSIX_MALLOC_THRESHOLD) \
|
$(CC) -c $(CFLAGS) $(INCLS) $(DEFS) $(POSIX_MALLOC_THRESHOLD) \
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ configure.in.
|
|||||||
write pcre.h
|
write pcre.h
|
||||||
|
|
||||||
(3) Compile dftables.c as a stand-alone program, and then run it with
|
(3) Compile dftables.c as a stand-alone program, and then run it with
|
||||||
the single argument "chartables.c". This generates a set of standard
|
the single argument "pcre_chartables.c". This generates a set of standard
|
||||||
character tables and writes them to that file.
|
character tables and writes them to that file.
|
||||||
|
|
||||||
rem Mark Tetrode's commands
|
rem Mark Tetrode's commands
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ this can be done via --enable-ebcdic. */
|
|||||||
before the definition of an exported function, define this macro to contain the
|
before the definition of an exported function, define this macro to contain the
|
||||||
relevant magic. It apears at the start of every exported function. */
|
relevant magic. It apears at the start of every exported function. */
|
||||||
|
|
||||||
#define EXPORT
|
#define PCRE_EXPORT
|
||||||
|
|
||||||
/* Define to empty if the "const" keyword does not work. */
|
/* Define to empty if the "const" keyword does not work. */
|
||||||
|
|
||||||
@@ -18,10 +18,10 @@ dnl A safety precaution
|
|||||||
|
|
||||||
AC_PREREQ(2.57)
|
AC_PREREQ(2.57)
|
||||||
|
|
||||||
dnl Arrange to build config.h from config.in. Note that pcre.h is
|
dnl Arrange to build config.h from config.h.in. Note that pcre.h is
|
||||||
dnl built differently, as it is just a "substitution" file.
|
dnl built differently, as it is just a "substitution" file.
|
||||||
dnl Manual says this macro should come right after AC_INIT.
|
dnl Manual says this macro should come right after AC_INIT.
|
||||||
AC_CONFIG_HEADER(config.h:config.in)
|
AC_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
dnl Provide the current PCRE version information. Do not use numbers
|
dnl Provide the current PCRE version information. Do not use numbers
|
||||||
dnl with leading zeros for the minor version, as they end up in a C
|
dnl with leading zeros for the minor version, as they end up in a C
|
||||||
@@ -30,8 +30,8 @@ dnl digits for minor numbers less than 10. There are unlikely to be
|
|||||||
dnl that many releases anyway.
|
dnl that many releases anyway.
|
||||||
|
|
||||||
PCRE_MAJOR=6
|
PCRE_MAJOR=6
|
||||||
PCRE_MINOR=3
|
PCRE_MINOR=4
|
||||||
PCRE_DATE=15-Aug-2005
|
PCRE_DATE=05-Sep-2005
|
||||||
PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}
|
PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}
|
||||||
|
|
||||||
dnl Default values for miscellaneous macros
|
dnl Default values for miscellaneous macros
|
||||||
@@ -201,4 +201,4 @@ if test "x$enable_shared" = "xno" ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dnl This must be last; it determines what files are written as well as config.h
|
dnl This must be last; it determines what files are written as well as config.h
|
||||||
AC_OUTPUT(Makefile pcre.h:pcre.in)
|
AC_OUTPUT(Makefile pcre.h:pcre.h.in)
|
||||||
|
|||||||
@@ -129,9 +129,6 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\pcre_maketables.c">
|
RelativePath=".\pcre_maketables.c">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\pcre_printint.c">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\pcre_refcount.c">
|
RelativePath=".\pcre_refcount.c">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
@@ -45,6 +45,15 @@ supporting internal functions that are not used by other modules. */
|
|||||||
#include "pcre_internal.h"
|
#include "pcre_internal.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* When DEBUG is defined, we need the pcre_printint() function, which is also
|
||||||
|
used by pcretest. DEBUG is not defined when building a production library. */
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
#include "pcre_printint.src"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
* Code parameters and static tables *
|
* Code parameters and static tables *
|
||||||
*************************************************/
|
*************************************************/
|
||||||
@@ -3839,7 +3848,7 @@ Returns: pointer to compiled data block, or NULL on error,
|
|||||||
with errorptr and erroroffset set
|
with errorptr and erroroffset set
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXPORT pcre *
|
PCRE_EXPORT pcre *
|
||||||
pcre_compile(const char *pattern, int options, const char **errorptr,
|
pcre_compile(const char *pattern, int options, const char **errorptr,
|
||||||
int *erroroffset, const unsigned char *tables)
|
int *erroroffset, const unsigned char *tables)
|
||||||
{
|
{
|
||||||
@@ -3847,7 +3856,7 @@ return pcre_compile2(pattern, options, NULL, errorptr, erroroffset, tables);
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EXPORT pcre *
|
PCRE_EXPORT pcre *
|
||||||
pcre_compile2(const char *pattern, int options, int *errorcodeptr,
|
pcre_compile2(const char *pattern, int options, int *errorcodeptr,
|
||||||
const char **errorptr, int *erroroffset, const unsigned char *tables)
|
const char **errorptr, int *erroroffset, const unsigned char *tables)
|
||||||
{
|
{
|
||||||
@@ -5000,7 +5009,8 @@ if (reqbyte >= 0 &&
|
|||||||
re->options |= PCRE_REQCHSET;
|
re->options |= PCRE_REQCHSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print out the compiled data for debugging */
|
/* Print out the compiled data if debugging is enabled. This is never the
|
||||||
|
case when building a production library. */
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
@@ -5038,7 +5048,7 @@ if ((re->options & PCRE_REQCHSET) != 0)
|
|||||||
else printf("Req char = \\x%02x%s\n", ch, caseless);
|
else printf("Req char = \\x%02x%s\n", ch, caseless);
|
||||||
}
|
}
|
||||||
|
|
||||||
_pcre_printint(re, stdout);
|
pcre_printint(re, stdout);
|
||||||
|
|
||||||
/* This check is done here in the debugging case so that the code that
|
/* This check is done here in the debugging case so that the code that
|
||||||
was compiled can be seen. */
|
was compiled can be seen. */
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ Arguments:
|
|||||||
Returns: 0 if data returned, negative on error
|
Returns: 0 if data returned, negative on error
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXPORT int
|
PCRE_EXPORT int
|
||||||
pcre_config(int what, void *where)
|
pcre_config(int what, void *where)
|
||||||
{
|
{
|
||||||
switch (what)
|
switch (what)
|
||||||
|
|||||||
@@ -758,7 +758,7 @@ for (;;)
|
|||||||
if (clen > 0)
|
if (clen > 0)
|
||||||
{
|
{
|
||||||
int rqdtype, category;
|
int rqdtype, category;
|
||||||
category = ucp_findchar(c, &chartype, &othercase);
|
category = _pcre_ucp_findchar(c, &chartype, &othercase);
|
||||||
rqdtype = code[1];
|
rqdtype = code[1];
|
||||||
if (rqdtype >= 128)
|
if (rqdtype >= 128)
|
||||||
{
|
{
|
||||||
@@ -865,7 +865,7 @@ for (;;)
|
|||||||
if (count > 0) { ADD_ACTIVE(state_offset + 3, 0); }
|
if (count > 0) { ADD_ACTIVE(state_offset + 3, 0); }
|
||||||
if (clen > 0)
|
if (clen > 0)
|
||||||
{
|
{
|
||||||
int category = ucp_findchar(c, &chartype, &othercase);
|
int category = _pcre_ucp_findchar(c, &chartype, &othercase);
|
||||||
int rqdtype = code[2];
|
int rqdtype = code[2];
|
||||||
if ((d == OP_PROP) ==
|
if ((d == OP_PROP) ==
|
||||||
(rqdtype == ((rqdtype >= 128)? (category + 128) : chartype)))
|
(rqdtype == ((rqdtype >= 128)? (category + 128) : chartype)))
|
||||||
@@ -878,7 +878,7 @@ for (;;)
|
|||||||
case OP_EXTUNI_EXTRA + OP_TYPEMINPLUS:
|
case OP_EXTUNI_EXTRA + OP_TYPEMINPLUS:
|
||||||
count = current_state->count; /* Already matched */
|
count = current_state->count; /* Already matched */
|
||||||
if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); }
|
if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); }
|
||||||
if (clen > 0 && ucp_findchar(c, &chartype, &othercase) != ucp_M)
|
if (clen > 0 && _pcre_ucp_findchar(c, &chartype, &othercase) != ucp_M)
|
||||||
{
|
{
|
||||||
const uschar *nptr = ptr + clen;
|
const uschar *nptr = ptr + clen;
|
||||||
int ncount = 0;
|
int ncount = 0;
|
||||||
@@ -887,7 +887,7 @@ for (;;)
|
|||||||
int nd;
|
int nd;
|
||||||
int ndlen = 1;
|
int ndlen = 1;
|
||||||
GETCHARLEN(nd, nptr, ndlen);
|
GETCHARLEN(nd, nptr, ndlen);
|
||||||
if (ucp_findchar(nd, &chartype, &othercase) != ucp_M) break;
|
if (_pcre_ucp_findchar(nd, &chartype, &othercase) != ucp_M) break;
|
||||||
ncount++;
|
ncount++;
|
||||||
nptr += ndlen;
|
nptr += ndlen;
|
||||||
}
|
}
|
||||||
@@ -911,7 +911,7 @@ for (;;)
|
|||||||
ADD_ACTIVE(state_offset + 3, 0);
|
ADD_ACTIVE(state_offset + 3, 0);
|
||||||
if (clen > 0)
|
if (clen > 0)
|
||||||
{
|
{
|
||||||
int category = ucp_findchar(c, &chartype, &othercase);
|
int category = _pcre_ucp_findchar(c, &chartype, &othercase);
|
||||||
int rqdtype = code[2];
|
int rqdtype = code[2];
|
||||||
if ((d == OP_PROP) ==
|
if ((d == OP_PROP) ==
|
||||||
(rqdtype == ((rqdtype >= 128)? (category + 128) : chartype)))
|
(rqdtype == ((rqdtype >= 128)? (category + 128) : chartype)))
|
||||||
@@ -932,7 +932,7 @@ for (;;)
|
|||||||
QS2:
|
QS2:
|
||||||
|
|
||||||
ADD_ACTIVE(state_offset + 2, 0);
|
ADD_ACTIVE(state_offset + 2, 0);
|
||||||
if (clen > 0 && ucp_findchar(c, &chartype, &othercase) != ucp_M)
|
if (clen > 0 && _pcre_ucp_findchar(c, &chartype, &othercase) != ucp_M)
|
||||||
{
|
{
|
||||||
const uschar *nptr = ptr + clen;
|
const uschar *nptr = ptr + clen;
|
||||||
int ncount = 0;
|
int ncount = 0;
|
||||||
@@ -941,7 +941,7 @@ for (;;)
|
|||||||
int nd;
|
int nd;
|
||||||
int ndlen = 1;
|
int ndlen = 1;
|
||||||
GETCHARLEN(nd, nptr, ndlen);
|
GETCHARLEN(nd, nptr, ndlen);
|
||||||
if (ucp_findchar(nd, &chartype, &othercase) != ucp_M) break;
|
if (_pcre_ucp_findchar(nd, &chartype, &othercase) != ucp_M) break;
|
||||||
ncount++;
|
ncount++;
|
||||||
nptr += ndlen;
|
nptr += ndlen;
|
||||||
}
|
}
|
||||||
@@ -958,7 +958,7 @@ for (;;)
|
|||||||
count = current_state->count; /* Number already matched */
|
count = current_state->count; /* Number already matched */
|
||||||
if (clen > 0)
|
if (clen > 0)
|
||||||
{
|
{
|
||||||
int category = ucp_findchar(c, &chartype, &othercase);
|
int category = _pcre_ucp_findchar(c, &chartype, &othercase);
|
||||||
int rqdtype = code[4];
|
int rqdtype = code[4];
|
||||||
if ((d == OP_PROP) ==
|
if ((d == OP_PROP) ==
|
||||||
(rqdtype == ((rqdtype >= 128)? (category + 128) : chartype)))
|
(rqdtype == ((rqdtype >= 128)? (category + 128) : chartype)))
|
||||||
@@ -978,7 +978,7 @@ for (;;)
|
|||||||
if (codevalue != OP_EXTUNI_EXTRA + OP_TYPEEXACT)
|
if (codevalue != OP_EXTUNI_EXTRA + OP_TYPEEXACT)
|
||||||
{ ADD_ACTIVE(state_offset + 4, 0); }
|
{ ADD_ACTIVE(state_offset + 4, 0); }
|
||||||
count = current_state->count; /* Number already matched */
|
count = current_state->count; /* Number already matched */
|
||||||
if (clen > 0 && ucp_findchar(c, &chartype, &othercase) != ucp_M)
|
if (clen > 0 && _pcre_ucp_findchar(c, &chartype, &othercase) != ucp_M)
|
||||||
{
|
{
|
||||||
const uschar *nptr = ptr + clen;
|
const uschar *nptr = ptr + clen;
|
||||||
int ncount = 0;
|
int ncount = 0;
|
||||||
@@ -987,7 +987,7 @@ for (;;)
|
|||||||
int nd;
|
int nd;
|
||||||
int ndlen = 1;
|
int ndlen = 1;
|
||||||
GETCHARLEN(nd, nptr, ndlen);
|
GETCHARLEN(nd, nptr, ndlen);
|
||||||
if (ucp_findchar(nd, &chartype, &othercase) != ucp_M) break;
|
if (_pcre_ucp_findchar(nd, &chartype, &othercase) != ucp_M) break;
|
||||||
ncount++;
|
ncount++;
|
||||||
nptr += ndlen;
|
nptr += ndlen;
|
||||||
}
|
}
|
||||||
@@ -1022,11 +1022,11 @@ for (;;)
|
|||||||
|
|
||||||
/* If we have Unicode property support, we can use it to test the
|
/* If we have Unicode property support, we can use it to test the
|
||||||
other case of the character, if there is one. The result of
|
other case of the character, if there is one. The result of
|
||||||
ucp_findchar() is < 0 if the char isn't found, and othercase is
|
_pcre_ucp_findchar() is < 0 if the char isn't found, and othercase is
|
||||||
returned as zero if there isn't another case. */
|
returned as zero if there isn't another case. */
|
||||||
|
|
||||||
#ifdef SUPPORT_UCP
|
#ifdef SUPPORT_UCP
|
||||||
if (ucp_findchar(c, &chartype, &othercase) < 0)
|
if (_pcre_ucp_findchar(c, &chartype, &othercase) < 0)
|
||||||
#endif
|
#endif
|
||||||
othercase = -1;
|
othercase = -1;
|
||||||
|
|
||||||
@@ -1050,7 +1050,7 @@ for (;;)
|
|||||||
to wait for them to pass before continuing. */
|
to wait for them to pass before continuing. */
|
||||||
|
|
||||||
case OP_EXTUNI:
|
case OP_EXTUNI:
|
||||||
if (clen > 0 && ucp_findchar(c, &chartype, &othercase) != ucp_M)
|
if (clen > 0 && _pcre_ucp_findchar(c, &chartype, &othercase) != ucp_M)
|
||||||
{
|
{
|
||||||
const uschar *nptr = ptr + clen;
|
const uschar *nptr = ptr + clen;
|
||||||
int ncount = 0;
|
int ncount = 0;
|
||||||
@@ -1058,7 +1058,7 @@ for (;;)
|
|||||||
{
|
{
|
||||||
int nclen = 1;
|
int nclen = 1;
|
||||||
GETCHARLEN(c, nptr, nclen);
|
GETCHARLEN(c, nptr, nclen);
|
||||||
if (ucp_findchar(c, &chartype, &othercase) != ucp_M) break;
|
if (_pcre_ucp_findchar(c, &chartype, &othercase) != ucp_M) break;
|
||||||
ncount++;
|
ncount++;
|
||||||
nptr += nclen;
|
nptr += nclen;
|
||||||
}
|
}
|
||||||
@@ -1096,7 +1096,7 @@ for (;;)
|
|||||||
if (utf8 && c >= 128)
|
if (utf8 && c >= 128)
|
||||||
{
|
{
|
||||||
#ifdef SUPPORT_UCP
|
#ifdef SUPPORT_UCP
|
||||||
if (ucp_findchar(d, &chartype, &otherd) < 0) otherd = -1;
|
if (_pcre_ucp_findchar(d, &chartype, &otherd) < 0) otherd = -1;
|
||||||
#endif /* SUPPORT_UCP */
|
#endif /* SUPPORT_UCP */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1123,7 +1123,7 @@ for (;;)
|
|||||||
if (utf8 && c >= 128)
|
if (utf8 && c >= 128)
|
||||||
{
|
{
|
||||||
#ifdef SUPPORT_UCP
|
#ifdef SUPPORT_UCP
|
||||||
if (ucp_findchar(c, &chartype, &otherd) < 0) otherd = -1;
|
if (_pcre_ucp_findchar(c, &chartype, &otherd) < 0) otherd = -1;
|
||||||
#endif /* SUPPORT_UCP */
|
#endif /* SUPPORT_UCP */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1150,7 +1150,7 @@ for (;;)
|
|||||||
if (utf8 && c >= 128)
|
if (utf8 && c >= 128)
|
||||||
{
|
{
|
||||||
#ifdef SUPPORT_UCP
|
#ifdef SUPPORT_UCP
|
||||||
if (ucp_findchar(c, &chartype, &otherd) < 0) otherd = -1;
|
if (_pcre_ucp_findchar(c, &chartype, &otherd) < 0) otherd = -1;
|
||||||
#endif /* SUPPORT_UCP */
|
#endif /* SUPPORT_UCP */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1181,7 +1181,7 @@ for (;;)
|
|||||||
if (utf8 && c >= 128)
|
if (utf8 && c >= 128)
|
||||||
{
|
{
|
||||||
#ifdef SUPPORT_UCP
|
#ifdef SUPPORT_UCP
|
||||||
if (ucp_findchar(d, &chartype, &otherd) < 0) otherd = -1;
|
if (_pcre_ucp_findchar(d, &chartype, &otherd) < 0) otherd = -1;
|
||||||
#endif /* SUPPORT_UCP */
|
#endif /* SUPPORT_UCP */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1424,7 +1424,6 @@ for (;;)
|
|||||||
/*-----------------------------------------------------------------*/
|
/*-----------------------------------------------------------------*/
|
||||||
case OP_ONCE:
|
case OP_ONCE:
|
||||||
{
|
{
|
||||||
const uschar *endcode;
|
|
||||||
int local_offsets[2];
|
int local_offsets[2];
|
||||||
int local_workspace[1000];
|
int local_workspace[1000];
|
||||||
|
|
||||||
@@ -1446,7 +1445,6 @@ for (;;)
|
|||||||
const uschar *end_subpattern = code;
|
const uschar *end_subpattern = code;
|
||||||
int charcount = local_offsets[1] - local_offsets[0];
|
int charcount = local_offsets[1] - local_offsets[0];
|
||||||
int next_state_offset, repeat_state_offset;
|
int next_state_offset, repeat_state_offset;
|
||||||
BOOL is_repeated;
|
|
||||||
|
|
||||||
do { end_subpattern += GET(end_subpattern, 1); }
|
do { end_subpattern += GET(end_subpattern, 1); }
|
||||||
while (*end_subpattern == OP_ALT);
|
while (*end_subpattern == OP_ALT);
|
||||||
@@ -1613,7 +1611,7 @@ Returns: > 0 => number of match offset pairs placed in offsets
|
|||||||
< -1 => some kind of unexpected problem
|
< -1 => some kind of unexpected problem
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXPORT int
|
PCRE_EXPORT int
|
||||||
pcre_dfa_exec(const pcre *argument_re, const pcre_extra *extra_data,
|
pcre_dfa_exec(const pcre *argument_re, const pcre_extra *extra_data,
|
||||||
const char *subject, int length, int start_offset, int options, int *offsets,
|
const char *subject, int length, int start_offset, int options, int *offsets,
|
||||||
int offsetcount, int *workspace, int wscount)
|
int offsetcount, int *workspace, int wscount)
|
||||||
|
|||||||
@@ -1354,7 +1354,7 @@ for (;;)
|
|||||||
{
|
{
|
||||||
int chartype, rqdtype;
|
int chartype, rqdtype;
|
||||||
int othercase;
|
int othercase;
|
||||||
int category = ucp_findchar(c, &chartype, &othercase);
|
int category = _pcre_ucp_findchar(c, &chartype, &othercase);
|
||||||
|
|
||||||
rqdtype = *(++ecode);
|
rqdtype = *(++ecode);
|
||||||
ecode++;
|
ecode++;
|
||||||
@@ -1381,7 +1381,7 @@ for (;;)
|
|||||||
{
|
{
|
||||||
int chartype;
|
int chartype;
|
||||||
int othercase;
|
int othercase;
|
||||||
int category = ucp_findchar(c, &chartype, &othercase);
|
int category = _pcre_ucp_findchar(c, &chartype, &othercase);
|
||||||
if (category == ucp_M) RRETURN(MATCH_NOMATCH);
|
if (category == ucp_M) RRETURN(MATCH_NOMATCH);
|
||||||
while (eptr < md->end_subject)
|
while (eptr < md->end_subject)
|
||||||
{
|
{
|
||||||
@@ -1390,7 +1390,7 @@ for (;;)
|
|||||||
{
|
{
|
||||||
GETCHARLEN(c, eptr, len);
|
GETCHARLEN(c, eptr, len);
|
||||||
}
|
}
|
||||||
category = ucp_findchar(c, &chartype, &othercase);
|
category = _pcre_ucp_findchar(c, &chartype, &othercase);
|
||||||
if (category != ucp_M) break;
|
if (category != ucp_M) break;
|
||||||
eptr += len;
|
eptr += len;
|
||||||
}
|
}
|
||||||
@@ -1841,7 +1841,7 @@ for (;;)
|
|||||||
ecode += length;
|
ecode += length;
|
||||||
|
|
||||||
/* If we have Unicode property support, we can use it to test the other
|
/* If we have Unicode property support, we can use it to test the other
|
||||||
case of the character, if there is one. The result of ucp_findchar() is
|
case of the character, if there is one. The result of _pcre_ucp_findchar() is
|
||||||
< 0 if the char isn't found, and othercase is returned as zero if there
|
< 0 if the char isn't found, and othercase is returned as zero if there
|
||||||
isn't one. */
|
isn't one. */
|
||||||
|
|
||||||
@@ -1850,7 +1850,7 @@ for (;;)
|
|||||||
#ifdef SUPPORT_UCP
|
#ifdef SUPPORT_UCP
|
||||||
int chartype;
|
int chartype;
|
||||||
int othercase;
|
int othercase;
|
||||||
if (ucp_findchar(fc, &chartype, &othercase) < 0 || dc != othercase)
|
if (_pcre_ucp_findchar(fc, &chartype, &othercase) < 0 || dc != othercase)
|
||||||
#endif
|
#endif
|
||||||
RRETURN(MATCH_NOMATCH);
|
RRETURN(MATCH_NOMATCH);
|
||||||
}
|
}
|
||||||
@@ -1920,7 +1920,7 @@ for (;;)
|
|||||||
int othercase;
|
int othercase;
|
||||||
int chartype;
|
int chartype;
|
||||||
if ((ims & PCRE_CASELESS) != 0 &&
|
if ((ims & PCRE_CASELESS) != 0 &&
|
||||||
ucp_findchar(fc, &chartype, &othercase) >= 0 &&
|
_pcre_ucp_findchar(fc, &chartype, &othercase) >= 0 &&
|
||||||
othercase > 0)
|
othercase > 0)
|
||||||
oclength = _pcre_ord2utf8(othercase, occhars);
|
oclength = _pcre_ord2utf8(othercase, occhars);
|
||||||
#endif /* SUPPORT_UCP */
|
#endif /* SUPPORT_UCP */
|
||||||
@@ -2439,7 +2439,7 @@ for (;;)
|
|||||||
for (i = 1; i <= min; i++)
|
for (i = 1; i <= min; i++)
|
||||||
{
|
{
|
||||||
GETCHARINC(c, eptr);
|
GETCHARINC(c, eptr);
|
||||||
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
|
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
|
||||||
if ((*prop_test_variable == prop_test_against) == prop_fail_result)
|
if ((*prop_test_variable == prop_test_against) == prop_fail_result)
|
||||||
RRETURN(MATCH_NOMATCH);
|
RRETURN(MATCH_NOMATCH);
|
||||||
}
|
}
|
||||||
@@ -2453,7 +2453,7 @@ for (;;)
|
|||||||
for (i = 1; i <= min; i++)
|
for (i = 1; i <= min; i++)
|
||||||
{
|
{
|
||||||
GETCHARINCTEST(c, eptr);
|
GETCHARINCTEST(c, eptr);
|
||||||
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
|
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
|
||||||
if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);
|
if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);
|
||||||
while (eptr < md->end_subject)
|
while (eptr < md->end_subject)
|
||||||
{
|
{
|
||||||
@@ -2462,7 +2462,7 @@ for (;;)
|
|||||||
{
|
{
|
||||||
GETCHARLEN(c, eptr, len);
|
GETCHARLEN(c, eptr, len);
|
||||||
}
|
}
|
||||||
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
|
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
|
||||||
if (prop_category != ucp_M) break;
|
if (prop_category != ucp_M) break;
|
||||||
eptr += len;
|
eptr += len;
|
||||||
}
|
}
|
||||||
@@ -2632,7 +2632,7 @@ for (;;)
|
|||||||
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
|
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
|
||||||
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
|
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
|
||||||
GETCHARINC(c, eptr);
|
GETCHARINC(c, eptr);
|
||||||
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
|
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
|
||||||
if ((*prop_test_variable == prop_test_against) == prop_fail_result)
|
if ((*prop_test_variable == prop_test_against) == prop_fail_result)
|
||||||
RRETURN(MATCH_NOMATCH);
|
RRETURN(MATCH_NOMATCH);
|
||||||
}
|
}
|
||||||
@@ -2649,7 +2649,7 @@ for (;;)
|
|||||||
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
|
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
|
||||||
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
|
if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
|
||||||
GETCHARINCTEST(c, eptr);
|
GETCHARINCTEST(c, eptr);
|
||||||
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
|
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
|
||||||
if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);
|
if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);
|
||||||
while (eptr < md->end_subject)
|
while (eptr < md->end_subject)
|
||||||
{
|
{
|
||||||
@@ -2658,7 +2658,7 @@ for (;;)
|
|||||||
{
|
{
|
||||||
GETCHARLEN(c, eptr, len);
|
GETCHARLEN(c, eptr, len);
|
||||||
}
|
}
|
||||||
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
|
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
|
||||||
if (prop_category != ucp_M) break;
|
if (prop_category != ucp_M) break;
|
||||||
eptr += len;
|
eptr += len;
|
||||||
}
|
}
|
||||||
@@ -2790,7 +2790,7 @@ for (;;)
|
|||||||
int len = 1;
|
int len = 1;
|
||||||
if (eptr >= md->end_subject) break;
|
if (eptr >= md->end_subject) break;
|
||||||
GETCHARLEN(c, eptr, len);
|
GETCHARLEN(c, eptr, len);
|
||||||
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
|
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
|
||||||
if ((*prop_test_variable == prop_test_against) == prop_fail_result)
|
if ((*prop_test_variable == prop_test_against) == prop_fail_result)
|
||||||
break;
|
break;
|
||||||
eptr+= len;
|
eptr+= len;
|
||||||
@@ -2816,7 +2816,7 @@ for (;;)
|
|||||||
{
|
{
|
||||||
if (eptr >= md->end_subject) break;
|
if (eptr >= md->end_subject) break;
|
||||||
GETCHARINCTEST(c, eptr);
|
GETCHARINCTEST(c, eptr);
|
||||||
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
|
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
|
||||||
if (prop_category == ucp_M) break;
|
if (prop_category == ucp_M) break;
|
||||||
while (eptr < md->end_subject)
|
while (eptr < md->end_subject)
|
||||||
{
|
{
|
||||||
@@ -2825,7 +2825,7 @@ for (;;)
|
|||||||
{
|
{
|
||||||
GETCHARLEN(c, eptr, len);
|
GETCHARLEN(c, eptr, len);
|
||||||
}
|
}
|
||||||
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
|
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
|
||||||
if (prop_category != ucp_M) break;
|
if (prop_category != ucp_M) break;
|
||||||
eptr += len;
|
eptr += len;
|
||||||
}
|
}
|
||||||
@@ -2846,7 +2846,7 @@ for (;;)
|
|||||||
{
|
{
|
||||||
GETCHARLEN(c, eptr, len);
|
GETCHARLEN(c, eptr, len);
|
||||||
}
|
}
|
||||||
prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
|
prop_category = _pcre_ucp_findchar(c, &prop_chartype, &prop_othercase);
|
||||||
if (prop_category != ucp_M) break;
|
if (prop_category != ucp_M) break;
|
||||||
eptr--;
|
eptr--;
|
||||||
}
|
}
|
||||||
@@ -3200,7 +3200,7 @@ Returns: > 0 => success; value is the number of elements filled in
|
|||||||
< -1 => some kind of unexpected problem
|
< -1 => some kind of unexpected problem
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXPORT int
|
PCRE_EXPORT int
|
||||||
pcre_exec(const pcre *argument_re, const pcre_extra *extra_data,
|
pcre_exec(const pcre *argument_re, const pcre_extra *extra_data,
|
||||||
const char *subject, int length, int start_offset, int options, int *offsets,
|
const char *subject, int length, int start_offset, int options, int *offsets,
|
||||||
int offsetcount)
|
int offsetcount)
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ Arguments:
|
|||||||
Returns: 0 if data returned, negative on error
|
Returns: 0 if data returned, negative on error
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXPORT int
|
PCRE_EXPORT int
|
||||||
pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data, int what,
|
pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data, int what,
|
||||||
void *where)
|
void *where)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Returns: number of capturing subpatterns
|
|||||||
or negative values on error
|
or negative values on error
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXPORT int
|
PCRE_EXPORT int
|
||||||
pcre_info(const pcre *argument_re, int *optptr, int *first_byte)
|
pcre_info(const pcre *argument_re, int *optptr, int *first_byte)
|
||||||
{
|
{
|
||||||
real_pcre internal_re;
|
real_pcre internal_re;
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ modules, but which are not relevant to the exported API. This includes some
|
|||||||
functions whose names all begin with "_pcre_". */
|
functions whose names all begin with "_pcre_". */
|
||||||
|
|
||||||
/* Get the definitions provided by running "configure" */
|
/* Get the definitions provided by running "configure" */
|
||||||
|
|
||||||
|
#ifndef PCRE_INTERNAL_H
|
||||||
|
#define PCRE_INTERNAL_H
|
||||||
|
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#else
|
#else
|
||||||
@@ -51,9 +56,9 @@ functions whose names all begin with "_pcre_". */
|
|||||||
|
|
||||||
/* Define DEBUG to get debugging output on stdout. */
|
/* Define DEBUG to get debugging output on stdout. */
|
||||||
|
|
||||||
/****
|
#if 0
|
||||||
#define DEBUG
|
#define DEBUG
|
||||||
****/
|
#endif
|
||||||
|
|
||||||
/* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef
|
/* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef
|
||||||
inline, and there are *still* stupid compilers about that don't like indented
|
inline, and there are *still* stupid compilers about that don't like indented
|
||||||
@@ -116,9 +121,12 @@ Unix, where it is defined in sys/types, so use "uschar" instead. */
|
|||||||
|
|
||||||
typedef unsigned char uschar;
|
typedef unsigned char uschar;
|
||||||
|
|
||||||
/* Include the public PCRE header */
|
/* Include the public PCRE header and the definitions of UCP character
|
||||||
|
property values. */
|
||||||
|
|
||||||
#include "pcre.h"
|
#include "pcre.h"
|
||||||
|
#include "ucp.h"
|
||||||
|
|
||||||
|
|
||||||
/* Include the (copy of) the public ucp header, changing the external name into a private one. This does no harm, even if we aren't compiling UCP support. */
|
/* Include the (copy of) the public ucp header, changing the external name into a private one. This does no harm, even if we aren't compiling UCP support. */
|
||||||
|
|
||||||
@@ -865,7 +873,7 @@ total length. */
|
|||||||
#define tables_length (ctypes_offset + 256)
|
#define tables_length (ctypes_offset + 256)
|
||||||
|
|
||||||
/* Layout of the UCP type table that translates property names into codes for
|
/* Layout of the UCP type table that translates property names into codes for
|
||||||
ucp_findchar(). */
|
pcre_ucp_findchar(). */
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
@@ -898,11 +906,12 @@ one of the exported public functions. They have to be "external" in the C
|
|||||||
sense, but are not part of the PCRE public API. */
|
sense, but are not part of the PCRE public API. */
|
||||||
|
|
||||||
extern int _pcre_ord2utf8(int, uschar *);
|
extern int _pcre_ord2utf8(int, uschar *);
|
||||||
extern void _pcre_printint(pcre *, FILE *);
|
|
||||||
extern real_pcre * _pcre_try_flipped(const real_pcre *, real_pcre *,
|
extern real_pcre * _pcre_try_flipped(const real_pcre *, real_pcre *,
|
||||||
const pcre_study_data *, pcre_study_data *);
|
const pcre_study_data *, pcre_study_data *);
|
||||||
extern int _pcre_ucp_findchar(const int, int *, int *);
|
extern int _pcre_ucp_findchar(const int, int *, int *);
|
||||||
extern int _pcre_valid_utf8(const uschar *, int);
|
extern int _pcre_valid_utf8(const uschar *, int);
|
||||||
extern BOOL _pcre_xclass(int, const uschar *);
|
extern BOOL _pcre_xclass(int, const uschar *);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* End of pcre_internal.h */
|
/* End of pcre_internal.h */
|
||||||
|
|||||||
@@ -38,12 +38,15 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* This module contains an PCRE private debugging function for printing out the
|
/* This module contains a PCRE private debugging function for printing out the
|
||||||
internal form of a compiled regular expression, along with some supporting
|
internal form of a compiled regular expression, along with some supporting
|
||||||
local functions. */
|
local functions. This source file is used in two places:
|
||||||
|
|
||||||
|
(1) It is #included by pcre_compile.c when it is compiled in debugging mode
|
||||||
|
(DEBUG defined in pcre_internal.h). It is not included in production compiles.
|
||||||
|
|
||||||
#include "pcre_internal.h"
|
(2) It is always #included by pcretest.c, which can be asked to print out a
|
||||||
|
compiled regex for debugging purposes. */
|
||||||
|
|
||||||
|
|
||||||
static const char *OP_names[] = { OP_NAME_LIST };
|
static const char *OP_names[] = { OP_NAME_LIST };
|
||||||
@@ -121,8 +124,8 @@ return "??";
|
|||||||
/* Make this function work for a regex with integers either byte order.
|
/* Make this function work for a regex with integers either byte order.
|
||||||
However, we assume that what we are passed is a compiled regex. */
|
However, we assume that what we are passed is a compiled regex. */
|
||||||
|
|
||||||
EXPORT void
|
static void
|
||||||
_pcre_printint(pcre *external_re, FILE *f)
|
pcre_printint(pcre *external_re, FILE *f)
|
||||||
{
|
{
|
||||||
real_pcre *re = (real_pcre *)external_re;
|
real_pcre *re = (real_pcre *)external_re;
|
||||||
uschar *codestart, *code;
|
uschar *codestart, *code;
|
||||||
@@ -448,4 +451,4 @@ for(;;)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End of pcre_printint.c */
|
/* End of pcre_printint.src */
|
||||||
@@ -63,7 +63,7 @@ Returns: the (possibly updated) count value (a non-negative number), or
|
|||||||
a negative error number
|
a negative error number
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXPORT int
|
PCRE_EXPORT int
|
||||||
pcre_refcount(pcre *argument_re, int adjust)
|
pcre_refcount(pcre *argument_re, int adjust)
|
||||||
{
|
{
|
||||||
real_pcre *re = (real_pcre *)argument_re;
|
real_pcre *re = (real_pcre *)argument_re;
|
||||||
|
|||||||
@@ -401,7 +401,7 @@ Returns: pointer to a pcre_extra block, with study_data filled in and the
|
|||||||
NULL on error or if no optimization possible
|
NULL on error or if no optimization possible
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXPORT pcre_extra *
|
PCRE_EXPORT pcre_extra *
|
||||||
pcre_study(const pcre *external_re, int options, const char **errorptr)
|
pcre_study(const pcre *external_re, int options, const char **errorptr)
|
||||||
{
|
{
|
||||||
uschar start_bits[32];
|
uschar start_bits[32];
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
|
|
||||||
/* This module contains some fixed tables that are used by more than one of the
|
/* This module contains some fixed tables that are used by more than one of the
|
||||||
PCRE code modules. */
|
PCRE code modules. The tables are also #included by the pcretest program, which
|
||||||
|
uses macros to change their names from _pcre_xxx to xxxx, thereby avoiding name
|
||||||
|
clashes with the library. */
|
||||||
|
|
||||||
|
|
||||||
#include "pcre_internal.h"
|
#include "pcre_internal.h"
|
||||||
@@ -81,8 +83,7 @@ const uschar _pcre_utf8_table4[] = {
|
|||||||
3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 };
|
3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 };
|
||||||
|
|
||||||
/* This table translates Unicode property names into code values for the
|
/* This table translates Unicode property names into code values for the
|
||||||
ucp_findchar() function. It is used by pcretest as well as by the library
|
ucp_findchar() function. */
|
||||||
functions. */
|
|
||||||
|
|
||||||
const ucp_type_table _pcre_utt[] = {
|
const ucp_type_table _pcre_utt[] = {
|
||||||
{ "C", 128 + ucp_C },
|
{ "C", 128 + ucp_C },
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ Returns: the new block if is is indeed a byte-flipped regex
|
|||||||
NULL if it is not
|
NULL if it is not
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXPORT real_pcre *
|
PCRE_EXPORT real_pcre *
|
||||||
_pcre_try_flipped(const real_pcre *re, real_pcre *internal_re,
|
_pcre_try_flipped(const real_pcre *re, real_pcre *internal_re,
|
||||||
const pcre_study_data *study, pcre_study_data *internal_study)
|
const pcre_study_data *study, pcre_study_data *internal_study)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ string that identifies the PCRE version that is in use. */
|
|||||||
#define STRING(a) # a
|
#define STRING(a) # a
|
||||||
#define XSTRING(s) STRING(s)
|
#define XSTRING(s) STRING(s)
|
||||||
|
|
||||||
EXPORT const char *
|
PCRE_EXPORT const char *
|
||||||
pcre_version(void)
|
pcre_version(void)
|
||||||
{
|
{
|
||||||
return XSTRING(PCRE_MAJOR) "." XSTRING(PCRE_MINOR) " " XSTRING(PCRE_DATE);
|
return XSTRING(PCRE_MAJOR) "." XSTRING(PCRE_MINOR) " " XSTRING(PCRE_DATE);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#define EXPORT
|
#define PCRE_EXPORT
|
||||||
#define HAVE_STRERROR 1
|
#define HAVE_STRERROR 1
|
||||||
#define HAVE_MEMMOVE 1
|
#define HAVE_MEMMOVE 1
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ Arguments:
|
|||||||
Returns: TRUE if character matches, else FALSE
|
Returns: TRUE if character matches, else FALSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXPORT BOOL
|
PCRE_EXPORT BOOL
|
||||||
_pcre_xclass(int c, const uschar *data)
|
_pcre_xclass(int c, const uschar *data)
|
||||||
{
|
{
|
||||||
int t;
|
int t;
|
||||||
@@ -102,7 +102,7 @@ while ((t = *data++) != XCL_END)
|
|||||||
{
|
{
|
||||||
int chartype, othercase;
|
int chartype, othercase;
|
||||||
int rqdtype = *data++;
|
int rqdtype = *data++;
|
||||||
int category = ucp_findchar(c, &chartype, &othercase);
|
int category = _pcre_ucp_findchar(c, &chartype, &othercase);
|
||||||
if (rqdtype >= 128)
|
if (rqdtype >= 128)
|
||||||
{
|
{
|
||||||
if ((rqdtype - 128 == category) == (t == XCL_PROP)) return !negated;
|
if ((rqdtype - 128 == category) == (t == XCL_PROP)) return !negated;
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ static const char *const pstring[] = {
|
|||||||
* Translate error code to string *
|
* Translate error code to string *
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
EXPORT size_t
|
PCRE_EXPORT size_t
|
||||||
regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
|
regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
|
||||||
{
|
{
|
||||||
const char *message, *addmessage;
|
const char *message, *addmessage;
|
||||||
@@ -166,7 +166,7 @@ return length + addlength;
|
|||||||
* Free store held by a regex *
|
* Free store held by a regex *
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
EXPORT void
|
PCRE_EXPORT void
|
||||||
regfree(regex_t *preg)
|
regfree(regex_t *preg)
|
||||||
{
|
{
|
||||||
(pcre_free)(preg->re_pcre);
|
(pcre_free)(preg->re_pcre);
|
||||||
@@ -189,7 +189,7 @@ Returns: 0 on success
|
|||||||
various non-zero codes on failure
|
various non-zero codes on failure
|
||||||
*/
|
*/
|
||||||
|
|
||||||
EXPORT int
|
PCRE_EXPORT int
|
||||||
regcomp(regex_t *preg, const char *pattern, int cflags)
|
regcomp(regex_t *preg, const char *pattern, int cflags)
|
||||||
{
|
{
|
||||||
const char *errorptr;
|
const char *errorptr;
|
||||||
@@ -225,7 +225,7 @@ ints. However, if the number of possible capturing brackets is small, use a
|
|||||||
block of store on the stack, to reduce the use of malloc/free. The threshold is
|
block of store on the stack, to reduce the use of malloc/free. The threshold is
|
||||||
in a macro that can be changed at configure time. */
|
in a macro that can be changed at configure time. */
|
||||||
|
|
||||||
EXPORT int
|
PCRE_EXPORT int
|
||||||
regexec(const regex_t *preg, const char *string, size_t nmatch,
|
regexec(const regex_t *preg, const char *string, size_t nmatch,
|
||||||
regmatch_t pmatch[], int eflags)
|
regmatch_t pmatch[], int eflags)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ enum {
|
|||||||
ucp_Zs /* Space separator */
|
ucp_Zs /* Space separator */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int ucp_findchar(const int, int *, int *);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* End of ucp.h */
|
/* End of ucp.h */
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ SectionEnd
|
|||||||
|
|
||||||
Section "WinPcap 3.1" SecWinPcap
|
Section "WinPcap 3.1" SecWinPcap
|
||||||
File winpcap_3_1.exe
|
File winpcap_3_1.exe
|
||||||
Exec "$INSTDIR\WinPcap_3_1.exe"
|
Exec '"$INSTDIR\WinPcap_3_1.exe"'
|
||||||
Delete "$INSTDIR\Winpcap_3_1.exe"
|
Delete "$INSTDIR\Winpcap_3_1.exe"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
|||||||
@@ -104,7 +104,7 @@
|
|||||||
#ifndef NMAP_WINCONFIG_H
|
#ifndef NMAP_WINCONFIG_H
|
||||||
#define NMAP_WINCONFIG_H
|
#define NMAP_WINCONFIG_H
|
||||||
|
|
||||||
#define NMAP_VERSION "3.99"
|
#define NMAP_VERSION "3.999"
|
||||||
#define NMAP_NAME "Nmap"
|
#define NMAP_NAME "Nmap"
|
||||||
#define NMAP_URL "http://www.insecure.org/nmap"
|
#define NMAP_URL "http://www.insecure.org/nmap"
|
||||||
#define NMAP_PLATFORM "i686-pc-windows-windows"
|
#define NMAP_PLATFORM "i686-pc-windows-windows"
|
||||||
|
|||||||
@@ -145,14 +145,14 @@ distro:
|
|||||||
*.c *.h CHANGELOG /usr/tmp/nmap-$(NMAP_VERSION)/nbase
|
*.c *.h CHANGELOG /usr/tmp/nmap-$(NMAP_VERSION)/nbase
|
||||||
|
|
||||||
$(SHTOOL) mkdir /usr/tmp/nmap-$(NMAP_VERSION)/libpcre
|
$(SHTOOL) mkdir /usr/tmp/nmap-$(NMAP_VERSION)/libpcre
|
||||||
cd ../libpcre; cp -a AUTHORS config.guess config.in config.sub \
|
cd ../libpcre; cp -a AUTHORS config.guess config.h.in config.sub \
|
||||||
configure configure.ac dftables.c INSTALL install-sh \
|
configure configure.ac dftables.c INSTALL install-sh \
|
||||||
libpcre.vcproj LICENCE Makefile.in makevp.bat mkinstalldirs \
|
libpcre.vcproj LICENCE Makefile.in makevp.bat mkinstalldirs \
|
||||||
NMAP_MODIFICATIONS NON-UNIX-USE pcre_chartables.c \
|
NMAP_MODIFICATIONS NON-UNIX-USE pcre_chartables.c \
|
||||||
pcre_compile.c pcre_config.c pcre_dfa_exec.c pcre_exec.c \
|
pcre_compile.c pcre_config.c pcre_dfa_exec.c pcre_exec.c \
|
||||||
pcre_fullinfo.c pcre_get.c pcre_globals.c pcre.h pcre.in \
|
pcre_fullinfo.c pcre_get.c pcre_globals.c pcre.h pcre.h.in \
|
||||||
pcre_info.c pcre_internal.h pcre_maketables.c pcreposix.c \
|
pcre_info.c pcre_internal.h pcre_maketables.c pcreposix.c \
|
||||||
pcreposix.h pcre_printint.c pcre_refcount.c pcre_study.c \
|
pcreposix.h pcre_printint.src pcre_refcount.c pcre_study.c \
|
||||||
pcre_tables.c pcre_try_flipped.c pcre_version.c \
|
pcre_tables.c pcre_try_flipped.c pcre_version.c \
|
||||||
pcre_winconfig.h pcre_xclass.c README ucp.h \
|
pcre_winconfig.h pcre_xclass.c README ucp.h \
|
||||||
/usr/tmp/nmap-$(NMAP_VERSION)/libpcre
|
/usr/tmp/nmap-$(NMAP_VERSION)/libpcre
|
||||||
|
|||||||
2
tcpip.cc
2
tcpip.cc
@@ -987,7 +987,7 @@ int send_ip_packet(int sd, struct eth_nfo *eth, u8 *packet, unsigned int packetl
|
|||||||
must deal with it here rather than when building the packet,
|
must deal with it here rather than when building the packet,
|
||||||
because they should be in NBO when I'm sending over raw
|
because they should be in NBO when I'm sending over raw
|
||||||
ethernet */
|
ethernet */
|
||||||
#if FREEBSD || BSDI || NETBSD || DEC
|
#if FREEBSD || BSDI || NETBSD || DEC || MACOSX
|
||||||
ip->ip_len = ntohs(ip->ip_len);
|
ip->ip_len = ntohs(ip->ip_len);
|
||||||
ip->ip_off = ntohs(ip->ip_off);
|
ip->ip_off = ntohs(ip->ip_off);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
48
tty.cc
48
tty.cc
@@ -115,16 +115,18 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "output.h"
|
||||||
|
#include "tty.h"
|
||||||
|
#include "NmapOps.h"
|
||||||
|
|
||||||
|
extern NmapOps o;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
|
|
||||||
// We currently just have stub functions for Win32 that don't actually
|
// Microsoft's runtime makes this fairly simple. :)
|
||||||
// do anything. Any volunteers to add real support?
|
|
||||||
void tty_init() { return; }
|
void tty_init() { return; }
|
||||||
bool keyWasPressed() {
|
static int tty_getchar() { return _kbhit() ? getch() : -1; }
|
||||||
return false;
|
|
||||||
//return _kbhit();
|
|
||||||
}
|
|
||||||
void tty_done() { return; }
|
void tty_done() { return; }
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -141,12 +143,6 @@ extern int tcsetattr(int fd, int actions, struct termios *termios_p);
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "output.h"
|
|
||||||
#include "tty.h"
|
|
||||||
#include "NmapOps.h"
|
|
||||||
|
|
||||||
extern NmapOps o;
|
|
||||||
|
|
||||||
static int tty_fd = 0;
|
static int tty_fd = 0;
|
||||||
static struct termios saved_ti;
|
static struct termios saved_ti;
|
||||||
|
|
||||||
@@ -204,6 +200,20 @@ static int tty_getchar()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tty_done()
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
if (!tty_fd) return;
|
||||||
|
|
||||||
|
fd = tty_fd; tty_fd = 0;
|
||||||
|
tcsetattr(fd, TCSANOW, &saved_ti);
|
||||||
|
|
||||||
|
close(fd);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //!win32
|
||||||
|
|
||||||
/* This is the best method here. It will catch all of the predefined
|
/* This is the best method here. It will catch all of the predefined
|
||||||
keypresses and interpret them, and it will also tell you if you
|
keypresses and interpret them, and it will also tell you if you
|
||||||
should print anything. A value of true being returned means a
|
should print anything. A value of true being returned means a
|
||||||
@@ -248,17 +258,3 @@ bool keyWasPressed()
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tty_done()
|
|
||||||
{
|
|
||||||
int fd;
|
|
||||||
|
|
||||||
if (!tty_fd) return;
|
|
||||||
|
|
||||||
fd = tty_fd; tty_fd = 0;
|
|
||||||
tcsetattr(fd, TCSANOW, &saved_ti);
|
|
||||||
|
|
||||||
close(fd);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif //!win32
|
|
||||||
|
|||||||
Reference in New Issue
Block a user