summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/FILEFORMAT13
-rw-r--r--tests/Makefile.am37
-rw-r--r--tests/Makefile.in61
-rw-r--r--tests/README35
-rw-r--r--tests/certs/Makefile.in19
-rw-r--r--tests/certs/Server-localhost-sv.pem2
-rw-r--r--tests/certs/Server-localhost-sv.prm2
-rw-r--r--tests/certs/Server-localhost.nn-sv.pem2
-rw-r--r--tests/certs/Server-localhost.nn-sv.prm2
-rw-r--r--tests/certs/scripts/Makefile.in19
-rwxr-xr-xtests/certs/scripts/genserv.sh2
-rwxr-xr-xtests/curl_test_data.py56
-rw-r--r--tests/data/DISABLED4
-rw-r--r--tests/data/Makefile.in62
-rw-r--r--tests/data/Makefile.inc39
-rw-r--r--tests/data/test12
-rw-r--r--tests/data/test10072
-rw-r--r--tests/data/test10083
-rw-r--r--tests/data/test10104
-rw-r--r--tests/data/test10216
-rw-r--r--tests/data/test103412
-rw-r--r--tests/data/test103512
-rw-r--r--tests/data/test10492
-rw-r--r--tests/data/test10632
-rw-r--r--tests/data/test10681
-rw-r--r--tests/data/test10932
-rw-r--r--tests/data/test10942
-rw-r--r--tests/data/test10992
-rw-r--r--tests/data/test11002
-rw-r--r--tests/data/test11042
-rw-r--r--tests/data/test11052
-rw-r--r--tests/data/test11092
-rw-r--r--tests/data/test11102
-rw-r--r--tests/data/test11112
-rw-r--r--tests/data/test11393
-rw-r--r--tests/data/test114540
-rw-r--r--tests/data/test114645
-rw-r--r--tests/data/test114764
-rw-r--r--tests/data/test114857
-rw-r--r--tests/data/test12052
-rw-r--r--tests/data/test12152
-rw-r--r--tests/data/test12312
-rw-r--r--tests/data/test12322
-rw-r--r--tests/data/test12382
-rw-r--r--tests/data/test12422
-rw-r--r--tests/data/test12432
-rw-r--r--tests/data/test12452
-rw-r--r--tests/data/test124849
-rw-r--r--tests/data/test124952
-rw-r--r--tests/data/test125053
-rw-r--r--tests/data/test125154
-rw-r--r--tests/data/test125252
-rw-r--r--tests/data/test125353
-rw-r--r--tests/data/test125453
-rw-r--r--tests/data/test125553
-rw-r--r--tests/data/test125654
-rw-r--r--tests/data/test125754
-rw-r--r--tests/data/test125854
-rw-r--r--tests/data/test125947
-rw-r--r--tests/data/test126036
-rw-r--r--tests/data/test126161
-rw-r--r--tests/data/test126240
-rw-r--r--tests/data/test128245
-rw-r--r--tests/data/test128357
-rw-r--r--tests/data/test128489
-rw-r--r--tests/data/test128597
-rw-r--r--tests/data/test1286110
-rw-r--r--tests/data/test128791
-rw-r--r--tests/data/test128896
-rw-r--r--tests/data/test128935
-rw-r--r--tests/data/test129856
-rw-r--r--tests/data/test129955
-rw-r--r--tests/data/test1301
-rw-r--r--tests/data/test1309111
-rw-r--r--tests/data/test132332
-rw-r--r--tests/data/test13331
-rw-r--r--tests/data/test139926
-rw-r--r--tests/data/test14004
-rw-r--r--tests/data/test14016
-rw-r--r--tests/data/test14026
-rw-r--r--tests/data/test14036
-rw-r--r--tests/data/test14044
-rw-r--r--tests/data/test14054
-rw-r--r--tests/data/test140613
-rw-r--r--tests/data/test140715
-rw-r--r--tests/data/test142015
-rw-r--r--tests/data/test1425bin0 -> 1726 bytes
-rw-r--r--tests/data/test1426bin0 -> 1663 bytes
-rw-r--r--tests/data/test142729
-rw-r--r--tests/data/test14294
-rw-r--r--tests/data/test14302
-rw-r--r--tests/data/test14312
-rw-r--r--tests/data/test14322
-rw-r--r--tests/data/test143320
-rw-r--r--tests/data/test144035
-rw-r--r--tests/data/test144135
-rw-r--r--tests/data/test144235
-rw-r--r--tests/data/test144368
-rw-r--r--tests/data/test144452
-rw-r--r--tests/data/test144535
-rw-r--r--tests/data/test144642
-rw-r--r--tests/data/test145034
-rw-r--r--tests/data/test145136
-rwxr-xr-xtests/data/test145241
-rw-r--r--tests/data/test1502
-rw-r--r--tests/data/test152130
-rw-r--r--tests/data/test15342
-rw-r--r--tests/data/test153745
-rw-r--r--tests/data/test1538149
-rw-r--r--tests/data/test154064
-rw-r--r--tests/data/test1552
-rw-r--r--tests/data/test155029
-rw-r--r--tests/data/test155172
-rw-r--r--tests/data/test160626
-rw-r--r--tests/data/test1657
-rw-r--r--tests/data/test1692
-rw-r--r--tests/data/test18002
-rw-r--r--tests/data/test18012
-rw-r--r--tests/data/test19004
-rw-r--r--tests/data/test19014
-rw-r--r--tests/data/test19024
-rw-r--r--tests/data/test19034
-rw-r--r--tests/data/test1992
-rw-r--r--tests/data/test20312
-rw-r--r--tests/data/test203234
-rw-r--r--tests/data/test203333
-rw-r--r--tests/data/test20466
-rw-r--r--tests/data/test20476
-rwxr-xr-xtests/data/test205580
-rw-r--r--tests/data/test2073
-rw-r--r--tests/data/test2092
-rw-r--r--tests/data/test2132
-rw-r--r--tests/data/test2164
-rw-r--r--tests/data/test2181
-rw-r--r--tests/data/test2392
-rw-r--r--tests/data/test2432
-rw-r--r--tests/data/test2566
-rw-r--r--tests/data/test2652
-rw-r--r--tests/data/test2672
-rw-r--r--tests/data/test2712
-rw-r--r--tests/data/test2832
-rw-r--r--tests/data/test2842
-rw-r--r--tests/data/test2852
-rw-r--r--tests/data/test2862
-rw-r--r--tests/data/test312
-rw-r--r--tests/data/test386
-rw-r--r--tests/data/test472
-rw-r--r--tests/data/test5002
-rw-r--r--tests/data/test5012
-rw-r--r--tests/data/test5065
-rw-r--r--tests/data/test5101
-rw-r--r--tests/data/test54013
-rw-r--r--tests/data/test5472
-rw-r--r--tests/data/test5482
-rw-r--r--tests/data/test552bin142985 -> 142985 bytes
-rw-r--r--tests/data/test5542
-rw-r--r--tests/data/test5554
-rw-r--r--tests/data/test55950
-rw-r--r--tests/data/test5632
-rw-r--r--tests/data/test5651
-rw-r--r--tests/data/test5694
-rw-r--r--tests/data/test5714
-rw-r--r--tests/data/test5782
-rw-r--r--tests/data/test592
-rw-r--r--tests/data/test5902
-rw-r--r--tests/data/test5991
-rw-r--r--tests/data/test601
-rw-r--r--tests/data/test672
-rw-r--r--tests/data/test682
-rw-r--r--tests/data/test692
-rw-r--r--tests/data/test7002
-rw-r--r--tests/data/test7012
-rw-r--r--tests/data/test7082
-rw-r--r--tests/data/test7121
-rwxr-xr-xtests/data/test71349
-rwxr-xr-xtests/data/test71467
-rwxr-xr-xtests/data/test71569
-rw-r--r--tests/data/test812
-rw-r--r--tests/data/test8224
-rw-r--r--tests/data/test8234
-rw-r--r--tests/data/test8274
-rw-r--r--tests/data/test8422
-rw-r--r--tests/data/test8432
-rw-r--r--tests/data/test8442
-rw-r--r--tests/data/test8452
-rw-r--r--tests/data/test8684
-rw-r--r--tests/data/test8694
-rw-r--r--tests/data/test874
-rw-r--r--tests/data/test8734
-rw-r--r--tests/data/test8872
-rw-r--r--tests/data/test8882
-rw-r--r--tests/data/test8892
-rw-r--r--tests/data/test894
-rw-r--r--tests/data/test8902
-rw-r--r--tests/data/test904
-rw-r--r--tests/data/test9064
-rw-r--r--tests/data/test9074
-rw-r--r--tests/data/test912
-rw-r--r--tests/data/test9214
-rw-r--r--tests/data/test9462
-rw-r--r--tests/data/test9472
-rw-r--r--tests/data/test9482
-rw-r--r--tests/data/test9492
-rwxr-xr-xtests/extern-scan.pl4
-rw-r--r--tests/fuzz/CMakeLists.txt1
-rw-r--r--tests/fuzz/Makefile.am57
-rw-r--r--tests/fuzz/Makefile.in880
-rw-r--r--tests/fuzz/Makefile.inc19
-rw-r--r--tests/fuzz/README14
-rw-r--r--tests/fuzz/curl_fuzzer.c128
-rwxr-xr-xtests/http2-server.pl10
-rwxr-xr-xtests/httpserver.pl2
-rw-r--r--tests/libtest/CMakeLists.txt13
-rw-r--r--tests/libtest/Makefile.am23
-rw-r--r--tests/libtest/Makefile.in1154
-rw-r--r--tests/libtest/Makefile.inc32
-rw-r--r--tests/libtest/first.c2
-rw-r--r--tests/libtest/lib1501.c25
-rw-r--r--tests/libtest/lib1507.c21
-rw-r--r--tests/libtest/lib1509.c2
-rw-r--r--tests/libtest/lib1515.c7
-rw-r--r--tests/libtest/lib1521.c2512
-rw-r--r--tests/libtest/lib1525.c2
-rw-r--r--tests/libtest/lib1526.c2
-rw-r--r--tests/libtest/lib1527.c2
-rw-r--r--tests/libtest/lib1531.c11
-rw-r--r--tests/libtest/lib1537.c94
-rw-r--r--tests/libtest/lib1538.c51
-rw-r--r--tests/libtest/lib1540.c121
-rw-r--r--tests/libtest/lib1550.c39
-rw-r--r--tests/libtest/lib1551.c45
-rw-r--r--tests/libtest/lib1900.c30
-rw-r--r--tests/libtest/lib505.c7
-rw-r--r--tests/libtest/lib506.c16
-rw-r--r--tests/libtest/lib509.c14
-rw-r--r--tests/libtest/lib510.c4
-rw-r--r--tests/libtest/lib518.c16
-rw-r--r--tests/libtest/lib525.c7
-rw-r--r--tests/libtest/lib526.c4
-rw-r--r--tests/libtest/lib537.c20
-rw-r--r--tests/libtest/lib540.c2
-rw-r--r--tests/libtest/lib541.c7
-rw-r--r--tests/libtest/lib552.c3
-rw-r--r--tests/libtest/lib555.c2
-rw-r--r--tests/libtest/lib557.c22
-rw-r--r--tests/libtest/lib559.c56
-rw-r--r--tests/libtest/lib571.c2
-rw-r--r--tests/libtest/lib574.c6
-rw-r--r--tests/libtest/lib578.c2
-rw-r--r--tests/libtest/lib582.c13
-rw-r--r--tests/libtest/lib583.c8
-rw-r--r--tests/libtest/lib586.c4
-rw-r--r--tests/libtest/lib591.c4
-rw-r--r--tests/libtest/libauthretry.c5
-rw-r--r--tests/libtest/libntlmconnect.c66
-rw-r--r--tests/libtest/mk-lib1521.pl303
-rw-r--r--tests/libtest/test.h2
-rwxr-xr-xtests/libtest/test613.pl4
-rw-r--r--tests/libtest/testtrace.c1
-rw-r--r--tests/libtest/testutil.c15
-rw-r--r--tests/libtest/testutil.h2
-rw-r--r--tests/manpage-scan.pl10
-rw-r--r--tests/python_dependencies/impacket/__init__.py25
-rw-r--r--tests/python_dependencies/impacket/nmb.py980
-rw-r--r--tests/python_dependencies/impacket/nt_errors.py3586
-rw-r--r--tests/python_dependencies/impacket/ntlm.py971
-rw-r--r--tests/python_dependencies/impacket/smb.py4099
-rw-r--r--tests/python_dependencies/impacket/smb3.py1629
-rw-r--r--tests/python_dependencies/impacket/smb3structs.py1363
-rw-r--r--tests/python_dependencies/impacket/smbserver.py4168
-rw-r--r--tests/python_dependencies/impacket/spnego.py372
-rw-r--r--tests/python_dependencies/impacket/structure.py743
-rw-r--r--tests/python_dependencies/impacket/uuid.py68
-rw-r--r--tests/python_dependencies/impacket/version.py12
-rwxr-xr-xtests/rtspserver.pl4
-rw-r--r--tests/runtests.17
-rw-r--r--tests/runtests.html98
-rw-r--r--tests/runtests.pdfbin7639 -> 0 bytes
-rwxr-xr-xtests/runtests.pl519
-rwxr-xr-xtests/secureserver.pl8
-rw-r--r--tests/server/CMakeLists.txt6
-rw-r--r--tests/server/Makefile.am17
-rw-r--r--tests/server/Makefile.in43
-rw-r--r--tests/server/fake_ntlm.c30
-rw-r--r--tests/server/getpart.c4
-rw-r--r--tests/server/resolve.c54
-rw-r--r--tests/server/rtspd.c4
-rw-r--r--tests/server/sockfilt.c7
-rw-r--r--tests/server/sws.c46
-rw-r--r--tests/server/testpart.c3
-rw-r--r--tests/server/tftpd.c10
-rw-r--r--tests/server/util.c22
-rw-r--r--tests/serverhelp.pm2
-rwxr-xr-xtests/smbserver.py377
-rwxr-xr-xtests/sshserver.pl2
-rw-r--r--tests/testcurl.13
-rw-r--r--tests/testcurl.html122
-rw-r--r--tests/testcurl.pdfbin7238 -> 0 bytes
-rwxr-xr-xtests/testcurl.pl17
-rwxr-xr-xtests/tftpserver.pl4
-rw-r--r--tests/unit/CMakeLists.txt2
-rw-r--r--tests/unit/Makefile.am15
-rw-r--r--tests/unit/Makefile.in249
-rw-r--r--tests/unit/Makefile.inc15
-rw-r--r--tests/unit/curlcheck.h7
-rw-r--r--tests/unit/unit1300.c214
-rw-r--r--tests/unit/unit1303.c8
-rw-r--r--tests/unit/unit1305.c7
-rw-r--r--tests/unit/unit1309.c47
-rw-r--r--tests/unit/unit1323.c66
-rw-r--r--tests/unit/unit1395.c11
-rw-r--r--tests/unit/unit1396.c2
-rw-r--r--tests/unit/unit1399.c100
-rw-r--r--tests/unit/unit1600.c4
-rw-r--r--tests/unit/unit1604.c35
-rw-r--r--tests/unit/unit1605.c3
-rw-r--r--tests/unit/unit1606.c90
-rw-r--r--tests/valgrind.pm4
-rw-r--r--tests/valgrind.supp21
319 files changed, 28542 insertions, 1604 deletions
diff --git a/tests/FILEFORMAT b/tests/FILEFORMAT
index 04a6daeb..75e561ae 100644
--- a/tests/FILEFORMAT
+++ b/tests/FILEFORMAT
@@ -86,11 +86,18 @@ The connect section is used instead of the 'data' for all CONNECT
requests. The remainder of the rules for the data section then apply but with
a connect prefix.
</connect>
-<datacheck [nonewline="yes"]>
+<datacheck [mode="text"] [nonewline="yes"]>
if the data is sent but this is what should be checked afterwards. If
'nonewline' is set, we will cut off the trailing newline of this given data
-before comparing with the one actually received by the client
+before comparing with the one actually received by the client.
+
+Use the mode="text" attribute if the output is in text mode on platforms that
+have a text/binary difference.
</datacheck>
+<datacheckNUM [nonewline="yes"] [mode="text"]>
+The contents of numbered datacheck sections are appended to the non-numbered
+one.
+</datacheckNUM>
<size>
number to return on a ftp SIZE command (set to -1 to make this command fail)
</size>
@@ -176,6 +183,7 @@ ftp-ipv6
ftps
http
http-ipv6
+http-pipe
http-proxy
http-unix
https
@@ -231,6 +239,7 @@ SSLpinning
SSPI
TLS-SRP
TrackMemory
+threaded-resolver
unittest
unix-sockets
WinSSL
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d9dbf0e1..d058eecc 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -22,14 +22,21 @@
HTMLPAGES = testcurl.html runtests.html
PDFPAGES = testcurl.pdf runtests.pdf
+MANDISTPAGES = runtests.1.dist testcurl.1.dist
+
+# the path to the impacket python lib used for SMB tests
+IMP = python_dependencies/impacket
+SMBDEPS = $(IMP)/__init__.py $(IMP)/nmb.py $(IMP)/nt_errors.py \
+ $(IMP)/ntlm.py $(IMP)/smb.py $(IMP)/smb3.py $(IMP)/smb3structs.py \
+ $(IMP)/smbserver.py $(IMP)/spnego.py $(IMP)/structure.py \
+ $(IMP)/uuid.py $(IMP)/version.py smbserver.py curl_test_data.py
EXTRA_DIST = ftpserver.pl httpserver.pl secureserver.pl runtests.pl getpart.pm \
FILEFORMAT README stunnel.pem memanalyze.pl testcurl.pl valgrind.pm ftp.pm \
sshserver.pl sshhelp.pm pathhelp.pm testcurl.1 runtests.1 \
- $(HTMLPAGES) $(PDFPAGES) \
serverhelp.pm tftpserver.pl rtspserver.pl directories.pm symbol-scan.pl \
CMakeLists.txt mem-include-scan.pl valgrind.supp http_pipe.py extern-scan.pl \
- manpage-scan.pl nroff-scan.pl http2-server.pl
+ manpage-scan.pl nroff-scan.pl http2-server.pl $(SMBDEPS)
DISTCLEANFILES = configurehelp.pm
@@ -45,11 +52,11 @@ DIST_UNIT = unit
endif
SUBDIRS = certs data server libtest $(BUILD_UNIT)
-DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT)
+DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT) fuzz
PERLFLAGS = -I$(srcdir)
-CLEANFILES = .http.pid .https.pid .ftp.pid .ftps.pid
+CLEANFILES = .http.pid .https.pid .ftp.pid .ftps.pid $(MANDISTPAGES)
MAN2HTML= roffit $< >$@
@@ -64,6 +71,10 @@ TEST_Q = -a -s
TEST_AM = -a -am
TEST_F = -a -p -r
TEST_T = -a -t
+TEST_E = -a -e
+
+# !flaky means that it'll skip all tests using the flaky keyword
+TEST_NF = -a -p -r !flaky
endif
# make sure that PERL is pointing to an executable
@@ -71,19 +82,25 @@ perlcheck:
@if ! test -x "$(PERL)"; then echo "No perl!"; exit 2; fi
test: perlcheck all
- $(TEST)
+ $(TEST) $(TFLAGS)
quiet-test: perlcheck all
- $(TEST) $(TEST_Q)
+ $(TEST) $(TEST_Q) $(TFLAGS)
am-test: perlcheck all
- $(TEST) $(TEST_AM)
+ $(TEST) $(TEST_AM) $(TFLAGS)
full-test: perlcheck all
- $(TEST) $(TEST_F)
+ $(TEST) $(TEST_F) $(TFLAGS)
+
+nonflaky-test: perlcheck all
+ $(TEST) $(TEST_NF) $(TFLAGS)
torture-test: perlcheck all
- $(TEST) $(TEST_T)
+ $(TEST) $(TEST_T) $(TFLAGS)
+
+event-test: perlcheck all
+ $(TEST) $(TEST_E) $(TFLAGS)
.1.html:
$(MAN2HTML)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 5f9ebcb1..e8f668cc 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -21,7 +21,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -111,7 +111,8 @@ build_triplet = @build@
host_triplet = @host@
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \
+ $(top_srcdir)/m4/curl-compilers.m4 \
$(top_srcdir)/m4/curl-confopts.m4 \
$(top_srcdir)/m4/curl-functions.m4 \
$(top_srcdir)/m4/curl-openssl.m4 \
@@ -132,8 +133,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
@@ -231,6 +231,12 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
+CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
+CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
+CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -270,6 +276,8 @@ ENABLE_SHARED = @ENABLE_SHARED@
ENABLE_STATIC = @ENABLE_STATIC@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GCOV = @GCOV@
+GENHTML = @GENHTML@
GREP = @GREP@
HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
@@ -282,6 +290,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPV6_ENABLED = @IPV6_ENABLED@
+LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_LIBS = @LIBCURL_LIBS@
@@ -409,13 +418,21 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
HTMLPAGES = testcurl.html runtests.html
PDFPAGES = testcurl.pdf runtests.pdf
+MANDISTPAGES = runtests.1.dist testcurl.1.dist
+
+# the path to the impacket python lib used for SMB tests
+IMP = python_dependencies/impacket
+SMBDEPS = $(IMP)/__init__.py $(IMP)/nmb.py $(IMP)/nt_errors.py \
+ $(IMP)/ntlm.py $(IMP)/smb.py $(IMP)/smb3.py $(IMP)/smb3structs.py \
+ $(IMP)/smbserver.py $(IMP)/spnego.py $(IMP)/structure.py \
+ $(IMP)/uuid.py $(IMP)/version.py smbserver.py curl_test_data.py
+
EXTRA_DIST = ftpserver.pl httpserver.pl secureserver.pl runtests.pl getpart.pm \
FILEFORMAT README stunnel.pem memanalyze.pl testcurl.pl valgrind.pm ftp.pm \
sshserver.pl sshhelp.pm pathhelp.pm testcurl.1 runtests.1 \
- $(HTMLPAGES) $(PDFPAGES) \
serverhelp.pm tftpserver.pl rtspserver.pl directories.pm symbol-scan.pl \
CMakeLists.txt mem-include-scan.pl valgrind.supp http_pipe.py extern-scan.pl \
- manpage-scan.pl nroff-scan.pl http2-server.pl
+ manpage-scan.pl nroff-scan.pl http2-server.pl $(SMBDEPS)
DISTCLEANFILES = configurehelp.pm
@BUILD_UNITTESTS_FALSE@BUILD_UNIT =
@@ -427,9 +444,9 @@ DISTCLEANFILES = configurehelp.pm
@BUILD_UNITTESTS_FALSE@DIST_UNIT = unit
@BUILD_UNITTESTS_TRUE@DIST_UNIT =
SUBDIRS = certs data server libtest $(BUILD_UNIT)
-DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT)
+DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT) fuzz
PERLFLAGS = -I$(srcdir)
-CLEANFILES = .http.pid .https.pid .ftp.pid .ftps.pid
+CLEANFILES = .http.pid .https.pid .ftp.pid .ftps.pid $(MANDISTPAGES)
MAN2HTML = roffit $< >$@
@CROSSCOMPILING_FALSE@TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
@CROSSCOMPILING_TRUE@TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
@@ -437,6 +454,10 @@ MAN2HTML = roffit $< >$@
@CROSSCOMPILING_FALSE@TEST_AM = -a -am
@CROSSCOMPILING_FALSE@TEST_F = -a -p -r
@CROSSCOMPILING_FALSE@TEST_T = -a -t
+@CROSSCOMPILING_FALSE@TEST_E = -a -e
+
+# !flaky means that it'll skip all tests using the flaky keyword
+@CROSSCOMPILING_FALSE@TEST_NF = -a -p -r !flaky
all: all-recursive
.SUFFIXES:
@@ -450,9 +471,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
$(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu tests/Makefile
+ $(AUTOMAKE) --foreign tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -761,19 +782,25 @@ perlcheck:
@if ! test -x "$(PERL)"; then echo "No perl!"; exit 2; fi
test: perlcheck all
- $(TEST)
+ $(TEST) $(TFLAGS)
quiet-test: perlcheck all
- $(TEST) $(TEST_Q)
+ $(TEST) $(TEST_Q) $(TFLAGS)
am-test: perlcheck all
- $(TEST) $(TEST_AM)
+ $(TEST) $(TEST_AM) $(TFLAGS)
full-test: perlcheck all
- $(TEST) $(TEST_F)
+ $(TEST) $(TEST_F) $(TFLAGS)
+
+nonflaky-test: perlcheck all
+ $(TEST) $(TEST_NF) $(TFLAGS)
torture-test: perlcheck all
- $(TEST) $(TEST_T)
+ $(TEST) $(TEST_T) $(TFLAGS)
+
+event-test: perlcheck all
+ $(TEST) $(TEST_E) $(TFLAGS)
.1.html:
$(MAN2HTML)
diff --git a/tests/README b/tests/README
index 8f52688c..16a8f06e 100644
--- a/tests/README
+++ b/tests/README
@@ -44,6 +44,7 @@ The curl Test Suite
stunnel (for HTTPS and FTPS tests)
OpenSSH or SunSSH (for SCP, SFTP and SOCKS4/5 tests)
nghttpx (for HTTP/2 tests)
+ nroff (for --manual tests)
1.2 Port numbers used by test servers
@@ -59,14 +60,24 @@ The curl Test Suite
- TCP/8999 for SCP/SFTP
- TCP/9000 for SOCKS
- TCP/9001 for POP3
- - TCP/9002 for IMAP
- - TCP/9003 for SMTP
- - TCP/9004 for SMTP IPv6
- - TCP/9005 for RTSP
- - TCP/9006 for RTSP IPv6
- - TCP/9007 for GOPHER
- - TCP/9008 for GOPHER IPv6
- - TCP/9008 for HTTPS server with TLS-SRP support
+ - TCP/9002 for POP3 IPv6
+ - TCP/9003 for IMAP
+ - TCP/9004 for IMAP IPv6
+ - TCP/9005 for SMTP
+ - TCP/9006 for SMTP IPv6
+ - TCP/9007 for RTSP
+ - TCP/9008 for RTSP IPv6
+ - TCP/9009 for GOPHER
+ - TCP/9010 for GOPHER IPv6
+ - TCP/9011 for HTTPS server with TLS-SRP support
+ - TCP/9012 for HTTPS IPv6 server with TLS-SRP support
+ - TCP/9013 for HTTP proxy server for CONNECT
+ - TCP/9014 for HTTP pipelining server
+ - TCP/9015 for HTTP/2 server
+ - TCP/9016 for DICT server
+ - TCP/9017 for SMB server
+ - TCP/9018 for SMBS server (reserved)
+ - TCP/9019 for TELNET server with negotiation support
1.3 Test servers
@@ -87,10 +98,10 @@ The curl Test Suite
1.4 Run
- 'make test'. This builds the test suite support code and invokes the
- 'runtests.pl' perl script to run all the tests. Edit the top variables
- of that script in case you have some specific needs, or run the script
- manually (after the support code has been built).
+ './configure && make && make test'. This builds the test suite support code
+ and invokes the 'runtests.pl' perl script to run all the tests. Edit the top
+ variables of that script in case you have some specific needs, or run the
+ script manually (after the support code has been built).
The script breaks on the first test that doesn't do OK. Use -a to prevent
the script from aborting on the first error. Run the script with -v for more
diff --git a/tests/certs/Makefile.in b/tests/certs/Makefile.in
index 140bf3c5..1c690562 100644
--- a/tests/certs/Makefile.in
+++ b/tests/certs/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -89,7 +89,8 @@ build_triplet = @build@
host_triplet = @host@
subdir = tests/certs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \
+ $(top_srcdir)/m4/curl-compilers.m4 \
$(top_srcdir)/m4/curl-confopts.m4 \
$(top_srcdir)/m4/curl-functions.m4 \
$(top_srcdir)/m4/curl-openssl.m4 \
@@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
@@ -210,6 +210,12 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
+CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
+CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
+CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -249,6 +255,8 @@ ENABLE_SHARED = @ENABLE_SHARED@
ENABLE_STATIC = @ENABLE_STATIC@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GCOV = @GCOV@
+GENHTML = @GENHTML@
GREP = @GREP@
HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
@@ -261,6 +269,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPV6_ENABLED = @IPV6_ENABLED@
+LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_LIBS = @LIBCURL_LIBS@
diff --git a/tests/certs/Server-localhost-sv.pem b/tests/certs/Server-localhost-sv.pem
index 6ef1fd51..a6d9b035 100644
--- a/tests/certs/Server-localhost-sv.pem
+++ b/tests/certs/Server-localhost-sv.pem
@@ -21,7 +21,7 @@ commonName_value = localhost
[something]
# The key
-# the certficate
+# the certificate
# some dhparam
-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQC6X0tpdDGZTfS0typluLcxwTjPNje7XhjjUh9SqlolLwxmiDKw
diff --git a/tests/certs/Server-localhost-sv.prm b/tests/certs/Server-localhost-sv.prm
index 97e64cec..50ccfd85 100644
--- a/tests/certs/Server-localhost-sv.prm
+++ b/tests/certs/Server-localhost-sv.prm
@@ -21,5 +21,5 @@ commonName_value = localhost
[something]
# The key
-# the certficate
+# the certificate
# some dhparam
diff --git a/tests/certs/Server-localhost.nn-sv.pem b/tests/certs/Server-localhost.nn-sv.pem
index b3712f74..7dfd4e6e 100644
--- a/tests/certs/Server-localhost.nn-sv.pem
+++ b/tests/certs/Server-localhost.nn-sv.pem
@@ -21,7 +21,7 @@ commonName_value = localhost.nn
[something]
# The key
-# the certficate
+# the certificate
# some dhparam
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQCszBFwdCntewBEisBHA1Cdb1G3yXvdfu4pZ1uRm8fF5p1ZPmsz
diff --git a/tests/certs/Server-localhost.nn-sv.prm b/tests/certs/Server-localhost.nn-sv.prm
index 399e38a4..093d4756 100644
--- a/tests/certs/Server-localhost.nn-sv.prm
+++ b/tests/certs/Server-localhost.nn-sv.prm
@@ -21,5 +21,5 @@ commonName_value = localhost.nn
[something]
# The key
-# the certficate
+# the certificate
# some dhparam
diff --git a/tests/certs/scripts/Makefile.in b/tests/certs/scripts/Makefile.in
index 395420e6..7d99feab 100644
--- a/tests/certs/scripts/Makefile.in
+++ b/tests/certs/scripts/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -89,7 +89,8 @@ build_triplet = @build@
host_triplet = @host@
subdir = tests/certs/scripts
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \
+ $(top_srcdir)/m4/curl-compilers.m4 \
$(top_srcdir)/m4/curl-confopts.m4 \
$(top_srcdir)/m4/curl-functions.m4 \
$(top_srcdir)/m4/curl-openssl.m4 \
@@ -110,8 +111,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
@@ -150,6 +150,12 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
+CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
+CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
+CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -189,6 +195,8 @@ ENABLE_SHARED = @ENABLE_SHARED@
ENABLE_STATIC = @ENABLE_STATIC@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GCOV = @GCOV@
+GENHTML = @GENHTML@
GREP = @GREP@
HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
@@ -201,6 +209,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPV6_ENABLED = @IPV6_ENABLED@
+LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_LIBS = @LIBCURL_LIBS@
diff --git a/tests/certs/scripts/genserv.sh b/tests/certs/scripts/genserv.sh
index e7845c5c..50bac011 100755
--- a/tests/certs/scripts/genserv.sh
+++ b/tests/certs/scripts/genserv.sh
@@ -39,7 +39,7 @@ if [ ".$CAPREFIX" = . ] ; then
NOTOK=1
else
if [ ! -f $CAPREFIX-ca.cacert ] ; then
- echo No CA certficate file $CAPREFIX-ca.caert
+ echo No CA certificate file $CAPREFIX-ca.caert
NOTOK=1
fi
if [ ! -f $CAPREFIX-ca.key ] ; then
diff --git a/tests/curl_test_data.py b/tests/curl_test_data.py
new file mode 100755
index 00000000..bfe1287d
--- /dev/null
+++ b/tests/curl_test_data.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.haxx.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+"""Module for extracting test data from the test data folder"""
+
+from __future__ import (absolute_import, division, print_function,
+ unicode_literals)
+import os
+import xml.etree.ElementTree as ET
+import logging
+
+log = logging.getLogger(__name__)
+
+
+class TestData(object):
+ def __init__(self, data_folder):
+ self.data_folder = data_folder
+
+ def get_test_data(self, test_number):
+ # Create the test file name
+ filename = os.path.join(self.data_folder,
+ "test{0}".format(test_number))
+
+ # The user should handle the exception from failing to find the file.
+ tree = ET.parse(filename)
+
+ # We need the <reply><data> text.
+ reply = tree.find("reply")
+ data = reply.find("data")
+
+ # Return the text contents of the data
+ return data.text
+
+
+if __name__ == '__main__':
+ td = TestData("./data")
+ data = td.get_test_data(1)
+ print(data)
diff --git a/tests/data/DISABLED b/tests/data/DISABLED
index 50544aba..11d54b46 100644
--- a/tests/data/DISABLED
+++ b/tests/data/DISABLED
@@ -13,6 +13,8 @@
# test 1801 causes problems on Mac OS X and github
# https://github.com/curl/curl/issues/380
1801
-# test 1510 casues problems on the CI on github
+# test 1510 causes problems on the CI on github
# example: https://travis-ci.org/curl/curl/builds/81633600
1510
+# Pipelining test that is causing false positives a little too often
+1903
diff --git a/tests/data/Makefile.in b/tests/data/Makefile.in
index 9b855b1a..8176b775 100644
--- a/tests/data/Makefile.in
+++ b/tests/data/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -21,7 +21,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -111,7 +111,8 @@ build_triplet = @build@
host_triplet = @host@
subdir = tests/data
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \
+ $(top_srcdir)/m4/curl-compilers.m4 \
$(top_srcdir)/m4/curl-confopts.m4 \
$(top_srcdir)/m4/curl-functions.m4 \
$(top_srcdir)/m4/curl-openssl.m4 \
@@ -132,8 +133,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
@@ -172,6 +172,12 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
+CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
+CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
+CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -211,6 +217,8 @@ ENABLE_SHARED = @ENABLE_SHARED@
ENABLE_STATIC = @ENABLE_STATIC@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GCOV = @GCOV@
+GENHTML = @GENHTML@
GREP = @GREP@
HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
@@ -223,6 +231,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPV6_ENABLED = @IPV6_ENABLED@
+LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_LIBS = @LIBCURL_LIBS@
@@ -397,7 +406,7 @@ test518 test519 test520 test521 test522 test523 test524 test525 test526 \
test527 test528 test529 test530 test531 test532 test533 test534 test535 \
test536 test537 test538 test539 test540 test541 test542 test543 test544 \
test545 test546 test547 test548 test549 test550 test551 test552 test553 \
-test554 test555 test556 test557 test558 test560 test561 test562 \
+test554 test555 test556 test557 test558 test559 test560 test561 test562 \
test563 test564 test565 test566 test567 test568 test569 test570 test571 \
test572 test573 test574 test575 test576 test578 test579 test580 \
test581 test582 test583 test584 test585 test586 test587 test588 \
@@ -409,7 +418,7 @@ test626 test627 test628 test629 test630 test631 test632 test633 test634 \
test635 test636 test637 test638 test639 test640 test641 \
\
test700 test701 test702 test703 test704 test705 test706 test707 test708 \
-test709 test710 test711 test712 \
+test709 test710 test711 test712 test713 test714 test715 \
\
test800 test801 test802 test803 test804 test805 test806 test807 test808 \
test809 test810 test811 test812 test813 test814 test815 test816 test817 \
@@ -449,20 +458,23 @@ test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 \
test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \
test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \
-test1144 \
+test1144 test1145 test1146 test1147 test1148 \
test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
test1216 test1217 test1218 test1219 \
test1220 test1221 test1222 test1223 test1224 test1225 test1226 test1227 \
test1228 test1229 test1230 test1231 test1232 test1233 test1234 test1235 \
test1236 test1237 test1238 test1239 test1240 test1241 test1242 test1243 \
-test1244 test1245 test1246 test1247 \
-\
-test1280 test1281 \
+test1244 test1245 test1246 test1247 test1248 test1249 test1250 test1251 \
+test1252 test1253 test1254 test1255 test1256 test1257 test1258 test1259 \
+test1260 test1261 test1262 \
\
+test1280 test1281 test1282 test1283 test1284 test1285 test1286 test1287 \
+test1288 test1289 \
+test1298 test1299 \
test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 \
test1308 test1309 test1310 test1311 test1312 test1313 test1314 test1315 \
-test1316 test1317 test1318 test1319 test1320 test1321 test1322 \
+test1316 test1317 test1318 test1319 test1320 test1321 test1322 test1323 \
test1325 test1326 test1327 test1328 test1329 test1330 test1331 \
test1332 test1333 test1334 test1335 test1336 test1337 test1338 test1339 \
test1340 test1341 test1342 test1343 test1344 test1345 test1346 test1347 \
@@ -472,25 +484,27 @@ test1364 test1365 test1366 test1367 test1368 test1369 test1370 test1371 \
test1372 test1373 test1374 test1375 test1376 test1377 test1378 test1379 \
test1380 test1381 test1382 test1383 test1384 test1385 test1386 test1387 \
test1388 test1389 test1390 test1391 test1392 test1393 test1394 test1395 \
-test1396 test1397 test1398 \
+test1396 test1397 test1398 test1399 \
\
test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
test1408 test1409 test1410 test1411 test1412 test1413 test1414 test1415 \
test1416 test1417 test1418 test1419 test1420 test1421 test1422 test1423 \
-test1424 \
+test1424 test1425 test1426 test1427 \
test1428 test1429 test1430 test1431 test1432 test1433 test1434 test1435 \
-test1436 test1437 test1438 test1439 \
-\
+test1436 test1437 test1438 test1439 test1440 test1441 test1442 test1443 \
+test1444 test1445 test1446 test1450 test1451 \
+test1452 \
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \
test1516 test1517 \
\
-test1520 \
+test1520 test1521 \
\
test1525 test1526 test1527 test1528 test1529 test1530 test1531 test1532 \
-test1533 test1534 test1535 test1536 \
-\
-test1600 test1601 test1602 test1603 test1604 test1605 \
+test1533 test1534 test1535 test1536 test1537 test1538 \
+test1540 \
+test1550 test1551 \
+test1600 test1601 test1602 test1603 test1604 test1605 test1606 \
\
test1700 test1701 test1702 \
\
@@ -504,7 +518,7 @@ test2016 test2017 test2018 test2019 test2020 test2021 test2022 test2023 \
test2024 test2025 test2026 test2027 test2028 test2029 test2030 test2031 \
test2032 test2033 test2034 test2035 test2036 test2037 test2038 test2039 \
test2040 test2041 test2042 test2043 test2044 test2045 test2046 test2047 \
-test2048 test2049 test2050 test2051 test2052 test2053 test2054
+test2048 test2049 test2050 test2051 test2052 test2053 test2054 test2055
# TESTCASES are taken from Makefile.inc
@@ -521,9 +535,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Ma
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/data/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/data/Makefile'; \
$(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu tests/data/Makefile
+ $(AUTOMAKE) --foreign tests/data/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
index deabaacc..1c637f8f 100644
--- a/tests/data/Makefile.inc
+++ b/tests/data/Makefile.inc
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -68,7 +68,7 @@ test518 test519 test520 test521 test522 test523 test524 test525 test526 \
test527 test528 test529 test530 test531 test532 test533 test534 test535 \
test536 test537 test538 test539 test540 test541 test542 test543 test544 \
test545 test546 test547 test548 test549 test550 test551 test552 test553 \
-test554 test555 test556 test557 test558 test560 test561 test562 \
+test554 test555 test556 test557 test558 test559 test560 test561 test562 \
test563 test564 test565 test566 test567 test568 test569 test570 test571 \
test572 test573 test574 test575 test576 test578 test579 test580 \
test581 test582 test583 test584 test585 test586 test587 test588 \
@@ -80,7 +80,7 @@ test626 test627 test628 test629 test630 test631 test632 test633 test634 \
test635 test636 test637 test638 test639 test640 test641 \
\
test700 test701 test702 test703 test704 test705 test706 test707 test708 \
-test709 test710 test711 test712 \
+test709 test710 test711 test712 test713 test714 test715 \
\
test800 test801 test802 test803 test804 test805 test806 test807 test808 \
test809 test810 test811 test812 test813 test814 test815 test816 test817 \
@@ -120,20 +120,23 @@ test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 \
test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \
test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \
-test1144 \
+test1144 test1145 test1146 test1147 test1148 \
test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
test1216 test1217 test1218 test1219 \
test1220 test1221 test1222 test1223 test1224 test1225 test1226 test1227 \
test1228 test1229 test1230 test1231 test1232 test1233 test1234 test1235 \
test1236 test1237 test1238 test1239 test1240 test1241 test1242 test1243 \
-test1244 test1245 test1246 test1247 \
-\
-test1280 test1281 \
+test1244 test1245 test1246 test1247 test1248 test1249 test1250 test1251 \
+test1252 test1253 test1254 test1255 test1256 test1257 test1258 test1259 \
+test1260 test1261 test1262 \
\
+test1280 test1281 test1282 test1283 test1284 test1285 test1286 test1287 \
+test1288 test1289 \
+test1298 test1299 \
test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 \
test1308 test1309 test1310 test1311 test1312 test1313 test1314 test1315 \
-test1316 test1317 test1318 test1319 test1320 test1321 test1322 \
+test1316 test1317 test1318 test1319 test1320 test1321 test1322 test1323 \
test1325 test1326 test1327 test1328 test1329 test1330 test1331 \
test1332 test1333 test1334 test1335 test1336 test1337 test1338 test1339 \
test1340 test1341 test1342 test1343 test1344 test1345 test1346 test1347 \
@@ -143,25 +146,27 @@ test1364 test1365 test1366 test1367 test1368 test1369 test1370 test1371 \
test1372 test1373 test1374 test1375 test1376 test1377 test1378 test1379 \
test1380 test1381 test1382 test1383 test1384 test1385 test1386 test1387 \
test1388 test1389 test1390 test1391 test1392 test1393 test1394 test1395 \
-test1396 test1397 test1398 \
+test1396 test1397 test1398 test1399 \
\
test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
test1408 test1409 test1410 test1411 test1412 test1413 test1414 test1415 \
test1416 test1417 test1418 test1419 test1420 test1421 test1422 test1423 \
-test1424 \
+test1424 test1425 test1426 test1427 \
test1428 test1429 test1430 test1431 test1432 test1433 test1434 test1435 \
-test1436 test1437 test1438 test1439 \
-\
+test1436 test1437 test1438 test1439 test1440 test1441 test1442 test1443 \
+test1444 test1445 test1446 test1450 test1451 \
+test1452 \
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \
test1516 test1517 \
\
-test1520 \
+test1520 test1521 \
\
test1525 test1526 test1527 test1528 test1529 test1530 test1531 test1532 \
-test1533 test1534 test1535 test1536 \
-\
-test1600 test1601 test1602 test1603 test1604 test1605 \
+test1533 test1534 test1535 test1536 test1537 test1538 \
+test1540 \
+test1550 test1551 \
+test1600 test1601 test1602 test1603 test1604 test1605 test1606 \
\
test1700 test1701 test1702 \
\
@@ -175,4 +180,4 @@ test2016 test2017 test2018 test2019 test2020 test2021 test2022 test2023 \
test2024 test2025 test2026 test2027 test2028 test2029 test2030 test2031 \
test2032 test2033 test2034 test2035 test2036 test2037 test2038 test2039 \
test2040 test2041 test2042 test2043 test2044 test2045 test2046 test2047 \
-test2048 test2049 test2050 test2051 test2052 test2053 test2054
+test2048 test2049 test2050 test2051 test2052 test2053 test2054 test2055
diff --git a/tests/data/test1 b/tests/data/test1
index b8827351..7c0e1602 100644
--- a/tests/data/test1
+++ b/tests/data/test1
@@ -8,7 +8,7 @@ HTTP GET
#
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
diff --git a/tests/data/test1007 b/tests/data/test1007
index 6baf221e..db2717ae 100644
--- a/tests/data/test1007
+++ b/tests/data/test1007
@@ -17,7 +17,7 @@ tftp
TFTP send with invalid permission on server
</name>
<command>
--T log/test1007.txt tftp://%HOSTIP:%TFTPPORT//invalid-file --trace-ascii log/traceit
+-T log/test1007.txt tftp://%HOSTIP:%TFTPPORT//invalid-file
</command>
<file name="log/test1007.txt">
This data will not be sent
diff --git a/tests/data/test1008 b/tests/data/test1008
index bcc503e5..0bc41310 100644
--- a/tests/data/test1008
+++ b/tests/data/test1008
@@ -6,6 +6,7 @@ HTTP GET
HTTP CONNECT
HTTP proxy
HTTP proxy NTLM auth
+chunked Transfer-Encoding
</keywords>
</info>
@@ -118,7 +119,7 @@ Proxy-Connection: Keep-Alive
CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1
Host: test.remote.example.com.1008:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
Proxy-Connection: Keep-Alive
GET /path/10080002 HTTP/1.1
diff --git a/tests/data/test1010 b/tests/data/test1010
index a51d68ab..b2083af7 100644
--- a/tests/data/test1010
+++ b/tests/data/test1010
@@ -36,7 +36,7 @@ ftp
FTP dir list nocwd
</name>
<command>
-ftp://%HOSTIP:%FTPPORT//list/this/path/1010/ --ftp-method nocwd
+ftp://%HOSTIP:%FTPPORT//list/this/path/1010/ ftp://%HOSTIP:%FTPPORT//list/this/path/1010/ --ftp-method nocwd
</command>
</client>
@@ -50,6 +50,8 @@ PWD
EPSV
TYPE A
LIST /list/this/path/1010/
+EPSV
+LIST /list/this/path/1010/
QUIT
</protocol>
</verify>
diff --git a/tests/data/test1021 b/tests/data/test1021
index 2705730e..85845a5b 100644
--- a/tests/data/test1021
+++ b/tests/data/test1021
@@ -15,7 +15,7 @@ HTTP proxy NTLM auth
<connect>
HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
Proxy-Authenticate: NTLM
-Content-Length: 21
+Content-Length: 16
Connection: close
data to discard
@@ -62,7 +62,7 @@ Nice proxy auth sir!
<datacheck>
HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
Proxy-Authenticate: NTLM
-Content-Length: 21
+Content-Length: 16
Connection: close
HTTP/1.1 407 Authorization Required to proxy me my dear
@@ -128,7 +128,7 @@ Proxy-Connection: Keep-Alive
CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1
Host: test.remote.example.com.1021:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
Proxy-Connection: Keep-Alive
GET /path/10210002 HTTP/1.1
diff --git a/tests/data/test1034 b/tests/data/test1034
index c4757405..6c1beb67 100644
--- a/tests/data/test1034
+++ b/tests/data/test1034
@@ -6,6 +6,7 @@ HTTP GET
HTTP proxy
IDN
FAILURE
+config file
</keywords>
</info>
@@ -32,16 +33,23 @@ http
idn
</features>
<setenv>
-CHARSET=UTF-8
+LC_ALL=
+LC_CTYPE=en_US.UTF-8
</setenv>
+<precheck>
+perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
+</precheck>
<name>
HTTP over proxy with malformatted IDN host name
</name>
# This host name contains an invalid UTF-8 byte sequence that can't be
# converted into an IDN name
+<stdin>
+url = "http://invalid-utf8-â.local/page/1034"
+</stdin>
<command>
-http://invalid-utf8-â.local/page/1034 -x %HOSTIP:%HTTPPORT
+-K - -x %HOSTIP:%HTTPPORT
</command>
</client>
diff --git a/tests/data/test1035 b/tests/data/test1035
index 20b434c3..033a48a7 100644
--- a/tests/data/test1035
+++ b/tests/data/test1035
@@ -32,13 +32,17 @@ http
idn
</features>
<setenv>
-CHARSET=ISO8859-1
+LC_ALL=
+LC_CTYPE=en_US.UTF-8
</setenv>
+<precheck>
+perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
+</precheck>
<name>
HTTP over proxy with too long IDN host name
</name>
<command>
-http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/1035 -x %HOSTIP:%HTTPPORT
+http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/1035 -x %HOSTIP:%HTTPPORT
</command>
</client>
@@ -49,8 +53,8 @@ http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/1035
^User-Agent:.*
</strip>
<protocol>
-GET http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/1035 HTTP/1.1
-Host: too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local
+GET http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/1035 HTTP/1.1
+Host: too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test1049 b/tests/data/test1049
index 60f41366..de18bee3 100644
--- a/tests/data/test1049
+++ b/tests/data/test1049
@@ -28,7 +28,7 @@ tftp
TFTP retrieve with localhost --interface
</name>
<command>
-tftp://%HOSTIP:%TFTPPORT//1049 --trace-ascii log/traceit --interface %CLIENTIP
+tftp://%HOSTIP:%TFTPPORT//1049 --interface %CLIENTIP
</command>
</client>
diff --git a/tests/data/test1063 b/tests/data/test1063
index cc07e6bf..2979094d 100644
--- a/tests/data/test1063
+++ b/tests/data/test1063
@@ -41,7 +41,5 @@ Invalid large X- range on a file://
<errorcode>
36
</errorcode>
-<stdout>
-</stdout>
</verify>
</testcase>
diff --git a/tests/data/test1068 b/tests/data/test1068
index ff26d78c..f9bfec90 100644
--- a/tests/data/test1068
+++ b/tests/data/test1068
@@ -4,6 +4,7 @@
<keywords>
HTTP
HTTP PUT
+chunked Transfer-Encoding
</keywords>
</info>
diff --git a/tests/data/test1093 b/tests/data/test1093
index 2087c827..da2d83cd 100644
--- a/tests/data/test1093
+++ b/tests/data/test1093
@@ -28,7 +28,7 @@ tftp
TFTP retrieve with mode=i
</name>
<command>
-"tftp://%HOSTIP:%TFTPPORT//1093;mode=i" --use-ascii --trace-ascii log/traceit
+"tftp://%HOSTIP:%TFTPPORT//1093;mode=i" --use-ascii
</command>
</client>
diff --git a/tests/data/test1094 b/tests/data/test1094
index 91317226..c7b09caa 100644
--- a/tests/data/test1094
+++ b/tests/data/test1094
@@ -34,7 +34,7 @@ tftp
TFTP retrieve with mode=netascii
</name>
<command>
-"tftp://%HOSTIP:%TFTPPORT//1094;mode=netascii" --trace-ascii log/traceit
+"tftp://%HOSTIP:%TFTPPORT//1094;mode=netascii"
</command>
</client>
diff --git a/tests/data/test1099 b/tests/data/test1099
index 7aacc11d..4a33189e 100644
--- a/tests/data/test1099
+++ b/tests/data/test1099
@@ -23,7 +23,7 @@ tftp
TFTP get first a non-existing file then an existing
</name>
<command>
-tftp://%HOSTIP:%TFTPPORT/an/invalid-file tftp://%HOSTIP:%TFTPPORT//1099 --trace-ascii log/traceit
+tftp://%HOSTIP:%TFTPPORT/an/invalid-file tftp://%HOSTIP:%TFTPPORT//1099
</command>
</client>
diff --git a/tests/data/test1100 b/tests/data/test1100
index cd616918..2e8d761a 100644
--- a/tests/data/test1100
+++ b/tests/data/test1100
@@ -102,7 +102,7 @@ Content-Type: application/x-www-form-urlencoded
POST /1100 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
Content-Length: 18
diff --git a/tests/data/test1104 b/tests/data/test1104
index 21efe3c1..102d5228 100644
--- a/tests/data/test1104
+++ b/tests/data/test1104
@@ -59,7 +59,7 @@ http
HTTP cookie expiry date at Jan 1 00:00:00 GMT 1970
</name>
<command>
-http://%HOSTIP:%HTTPPORT/want/1104 -L -x %HOSTIP:%HTTPPORT -c log/cookies.jar
+http://%HOSTIP:%HTTPPORT/want/1104 -L -x %HOSTIP:%HTTPPORT -c log/cookies1104.jar
</command>
</client>
diff --git a/tests/data/test1105 b/tests/data/test1105
index 76ac4500..4b5e0c83 100644
--- a/tests/data/test1105
+++ b/tests/data/test1105
@@ -35,7 +35,7 @@ HTTP with cookie parser and header recording
"http://%HOSTIP:%HTTPPORT/we/want/1105?parm1=this*that/other/thing&parm2=foobar/1105" -c log/cookie1105.txt -d "userid=myname&password=mypassword"
</command>
<precheck>
-perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}'
+perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
</precheck>
</client>
diff --git a/tests/data/test1109 b/tests/data/test1109
index c18ae46c..b68b5a22 100644
--- a/tests/data/test1109
+++ b/tests/data/test1109
@@ -8,7 +8,7 @@ CURLOPT_URL
</info>
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.1 200 OK
Content-Length: 6
diff --git a/tests/data/test1110 b/tests/data/test1110
index 90ffc41e..94cfe910 100644
--- a/tests/data/test1110
+++ b/tests/data/test1110
@@ -9,7 +9,7 @@ CURLOPT_URL
</info>
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.1 200 OK
Content-Length: 6
diff --git a/tests/data/test1111 b/tests/data/test1111
index 77b78f75..d9db12c7 100644
--- a/tests/data/test1111
+++ b/tests/data/test1111
@@ -9,7 +9,7 @@ CURLOPT_URL
</info>
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.1 200 OK
Content-Length: 6
diff --git a/tests/data/test1139 b/tests/data/test1139
index 30f730c2..72761c67 100644
--- a/tests/data/test1139
+++ b/tests/data/test1139
@@ -4,6 +4,7 @@
source analysis
symbols-in-versions
documentation
+--manual
</keywords>
</info>
@@ -19,7 +20,7 @@ Verify that all libcurl options have man pages
</name>
<command type="perl">
-%SRCDIR/manpage-scan.pl %SRCDIR/..
+%SRCDIR/manpage-scan.pl %SRCDIR/.. %PWD/..
</command>
</client>
diff --git a/tests/data/test1145 b/tests/data/test1145
new file mode 100644
index 00000000..287bebfc
--- /dev/null
+++ b/tests/data/test1145
@@ -0,0 +1,40 @@
+<testcase>
+<info>
+<keywords>
+FILE
+</keywords>
+</info>
+
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+file
+</server>
+<name>
+file:// bad host
+</name>
+# This command should not succeed since we only accept
+# file:/// file://localhost/ file://127.0.0.1/
+<command>
+file://bad-host%PWD/log/test1145.txt
+</command>
+<file name="log/test1145.txt">
+foo
+ bar
+bar
+ foo
+moo
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# CURLE_URL_MALFORMAT is error code 3
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1146 b/tests/data/test1146
new file mode 100644
index 00000000..43f33b79
--- /dev/null
+++ b/tests/data/test1146
@@ -0,0 +1,45 @@
+<testcase>
+<info>
+<keywords>
+FILE
+--proto-default
+</keywords>
+</info>
+
+<reply>
+<data>
+foo
+ bar
+bar
+ foo
+moo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+file
+</server>
+<name>
+--proto-default file
+</name>
+<command>
+--proto-default file %PWD/log/test1146.txt
+</command>
+<file name="log/test1146.txt">
+foo
+ bar
+bar
+ foo
+moo
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+0
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1147 b/tests/data/test1147
new file mode 100644
index 00000000..faad8999
--- /dev/null
+++ b/tests/data/test1147
@@ -0,0 +1,64 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-H
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+Get -H headers from a file
+ </name>
+<file name="log/heads1147.txt">
+One: 1
+Two: 2
+no-colon
+
+ And A Funny One : wohoo
+User-Agent:
+</file>
+ <command>
+http://%HOSTIP:%HTTPPORT/1147 -H @log/heads1147.txt
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /1147 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+One: 1
+Two: 2
+ And A Funny One : wohoo
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1148 b/tests/data/test1148
new file mode 100644
index 00000000..52f6c7eb
--- /dev/null
+++ b/tests/data/test1148
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+progressbar
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 60
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+progress-bar
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1148 -# --stderr log/stderrlog1148
+</command>
+</client>
+
+#
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1148 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file name="log/stderrlog1148">
+ ######################################################################## 100.0%
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test1205 b/tests/data/test1205
index 6d7bb7b0..7e4a882c 100644
--- a/tests/data/test1205
+++ b/tests/data/test1205
@@ -8,7 +8,7 @@ HTTP GET
#
# Server-side
-<reply name="1205">
+<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
diff --git a/tests/data/test1215 b/tests/data/test1215
index f8c52a9a..262910ad 100644
--- a/tests/data/test1215
+++ b/tests/data/test1215
@@ -96,7 +96,7 @@ Proxy-Connection: Keep-Alive
GET http://%HOSTIP:%HTTPPORT/1215 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.30.0-DEV
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test1231 b/tests/data/test1231
index 16533a85..61998d1c 100644
--- a/tests/data/test1231
+++ b/tests/data/test1231
@@ -9,7 +9,7 @@ dotdot removal
#
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.1 200 OK
Content-Length: 6
diff --git a/tests/data/test1232 b/tests/data/test1232
index ead43365..d0659f12 100644
--- a/tests/data/test1232
+++ b/tests/data/test1232
@@ -11,7 +11,7 @@ dotdot removal
#
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.1 200 OK
Content-Length: 6
diff --git a/tests/data/test1238 b/tests/data/test1238
index 4c976c77..a0eef417 100644
--- a/tests/data/test1238
+++ b/tests/data/test1238
@@ -10,7 +10,7 @@ TFTP RRQ
# Server-side
<reply>
<servercmd>
-writedelay: 1
+writedelay: 2
</servercmd>
# ~1200 bytes (so that they don't fit in two 512 byte chunks)
<data nocheck="yes">
diff --git a/tests/data/test1242 b/tests/data/test1242
index c8bc3d4a..80111eba 100644
--- a/tests/data/test1242
+++ b/tests/data/test1242
@@ -27,7 +27,7 @@ tftp
TFTP retrieve without TFTP options requests
</name>
<command>
-tftp://%HOSTIP:%TFTPPORT//1242 --tftp-no-options --trace-ascii log/traceit
+tftp://%HOSTIP:%TFTPPORT//1242 --tftp-no-options
</command>
</client>
diff --git a/tests/data/test1243 b/tests/data/test1243
index 0303a5de..8a89af05 100644
--- a/tests/data/test1243
+++ b/tests/data/test1243
@@ -16,7 +16,7 @@ tftp
TFTP send without TFTP options requests
</name>
<command>
--T log/test1243.txt tftp://%HOSTIP:%TFTPPORT// --tftp-no-options --trace-ascii log/traceit
+-T log/test1243.txt tftp://%HOSTIP:%TFTPPORT// --tftp-no-options
</command>
<file name="log/test1243.txt">
a chunk of
diff --git a/tests/data/test1245 b/tests/data/test1245
index 34d6549d..851d78d3 100644
--- a/tests/data/test1245
+++ b/tests/data/test1245
@@ -28,8 +28,8 @@ Connection: close
# Client-side
<client>
<server>
-ftp
http
+ftp
</server>
<name>
--proto deny must override --proto-redir allow
diff --git a/tests/data/test1248 b/tests/data/test1248
new file mode 100644
index 00000000..28e7a852
--- /dev/null
+++ b/tests/data/test1248
@@ -0,0 +1,49 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+noproxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+
+foo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Access a non-proxied host with using the combination of --proxy option and --noproxy option
+</name>
+<command>
+http://user:secret@%HOSTIP:%HTTPPORT/1248 --proxy http://dummy:%PROXYPORT/ --noproxy %HOSTIP --max-time 5
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1248 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dXNlcjpzZWNyZXQ=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1249 b/tests/data/test1249
new file mode 100644
index 00000000..ab561406
--- /dev/null
+++ b/tests/data/test1249
@@ -0,0 +1,52 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+NO_PROXY
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+
+foo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Access a non-proxied host with using the combination of --proxy option and NO_PROXY env var
+</name>
+<setenv>
+NO_PROXY=%HOSTIP
+</setenv>
+<command>
+http://user:secret@%HOSTIP:%HTTPPORT/1249 --proxy http://dummy:%PROXYPORT/ --max-time 5
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1249 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dXNlcjpzZWNyZXQ=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1250 b/tests/data/test1250
new file mode 100644
index 00000000..bf67b7fe
--- /dev/null
+++ b/tests/data/test1250
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+http_proxy
+noproxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+
+foo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Access a non-proxied host with using the combination of http_proxy env var and --noproxy option
+</name>
+<setenv>
+http_proxy=http://dummy:%PROXYPORT/
+</setenv>
+<command>
+http://user:secret@%HOSTIP:%HTTPPORT/1250 --noproxy %HOSTIP --max-time 5
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1250 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dXNlcjpzZWNyZXQ=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1251 b/tests/data/test1251
new file mode 100644
index 00000000..f37a685e
--- /dev/null
+++ b/tests/data/test1251
@@ -0,0 +1,54 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+http_proxy
+NO_PROXY
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+
+foo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Access a non-proxied host with using the combination of http_proxy env var and NO_PROXY env var
+</name>
+<setenv>
+http_proxy=http://dummy:%PROXYPORT/
+NO_PROXY=%HOSTIP
+</setenv>
+<command>
+http://user:secret@%HOSTIP:%HTTPPORT/1251 --max-time 5
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1251 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dXNlcjpzZWNyZXQ=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1252 b/tests/data/test1252
new file mode 100644
index 00000000..cbaef48b
--- /dev/null
+++ b/tests/data/test1252
@@ -0,0 +1,52 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+NO_PROXY
+noproxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+
+foo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Under condition using --proxy, override NO_PROXY by --nproxy and access target URL directly
+</name>
+<setenv>
+NO_PROXY=example.com
+</setenv>
+<command>
+http://%HOSTIP:%HTTPPORT/1252 --proxy http://%HOSTIP:%HTTPPORT --noproxy %HOSTIP
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1252 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1253 b/tests/data/test1253
new file mode 100644
index 00000000..74002994
--- /dev/null
+++ b/tests/data/test1253
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+NO_PROXY
+noproxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+
+foo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Under condition using --proxy, override NO_PROXY by --nproxy and access target URL through proxy
+</name>
+<setenv>
+NO_PROXY=example.com
+</setenv>
+<command>
+http://somewhere.example.com/1253 --proxy http://%HOSTIP:%HTTPPORT --noproxy %HOSTIP
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://somewhere.example.com/1253 HTTP/1.1
+Host: somewhere.example.com
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1254 b/tests/data/test1254
new file mode 100644
index 00000000..817b9342
--- /dev/null
+++ b/tests/data/test1254
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+NO_PROXY
+noproxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+
+foo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Under condition using --proxy, override NO_PROXY by --nproxy and access target URL through proxy
+</name>
+<setenv>
+NO_PROXY=example.com
+</setenv>
+<command>
+http://somewhere.example.com/1254 --proxy http://%HOSTIP:%HTTPPORT --noproxy ""
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://somewhere.example.com/1254 HTTP/1.1
+Host: somewhere.example.com
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1255 b/tests/data/test1255
new file mode 100644
index 00000000..d82310f6
--- /dev/null
+++ b/tests/data/test1255
@@ -0,0 +1,53 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+NO_PROXY
+noproxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+
+foo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Under condition using http_proxy, override NO_PROXY by --nproxy and access target URL directly
+</name>
+<setenv>
+http_proxy=http://%HOSTIP:%HTTPPORT
+NO_PROXY=example.com
+</setenv>
+<command>
+http://%HOSTIP:%HTTPPORT/1255 --noproxy %HOSTIP
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1255 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1256 b/tests/data/test1256
new file mode 100644
index 00000000..09c59f4f
--- /dev/null
+++ b/tests/data/test1256
@@ -0,0 +1,54 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+NO_PROXY
+noproxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+
+foo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Under condition using http_proxy, override NO_PROXY by --nproxy and access target URL through proxy
+</name>
+<setenv>
+http_proxy=http://%HOSTIP:%HTTPPORT
+NO_PROXY=example.com
+</setenv>
+<command>
+http://somewhere.example.com/1256 --noproxy %HOSTIP
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://somewhere.example.com/1256 HTTP/1.1
+Host: somewhere.example.com
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1257 b/tests/data/test1257
new file mode 100644
index 00000000..6b7e9373
--- /dev/null
+++ b/tests/data/test1257
@@ -0,0 +1,54 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP proxy
+NO_PROXY
+noproxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 4
+Content-Type: text/html
+
+foo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+Under condition using http_proxy, override NO_PROXY by --nproxy and access target URL through proxy
+</name>
+<setenv>
+http_proxy=http://%HOSTIP:%HTTPPORT
+NO_PROXY=example.com
+</setenv>
+<command>
+http://somewhere.example.com/1257 --noproxy ""
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET http://somewhere.example.com/1257 HTTP/1.1
+Host: somewhere.example.com
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1258 b/tests/data/test1258
new file mode 100644
index 00000000..6fa88e16
--- /dev/null
+++ b/tests/data/test1258
@@ -0,0 +1,54 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP replaced headers
+cookies
+httponly
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.0 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Type: text/html
+Set-Cookie: I-am=here; domain=localhost;
+
+boo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP, use cookies with localhost
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/1258 http://%HOSTIP:%HTTPPORT/we/want?hoge=fuga -b non-existing -H "Host: localhost"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /we/want/1258 HTTP/1.1
+Host: localhost
+Accept: */*
+
+GET /we/want?hoge=fuga HTTP/1.1
+Host: localhost
+Accept: */*
+Cookie: I-am=here
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1259 b/tests/data/test1259
new file mode 100644
index 00000000..bad4ee25
--- /dev/null
+++ b/tests/data/test1259
@@ -0,0 +1,47 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.0 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Type: text/html
+Set-Cookie: I-am=here; domain=localhost;
+
+boo
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP URL with semicolon in password
+ </name>
+ <command>
+"http://user:pass;word@%HOSTIP:%HTTPPORT/we/want/1259"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /we/want/1259 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Basic dXNlcjpwYXNzO3dvcmQ=
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1260 b/tests/data/test1260
new file mode 100644
index 00000000..1d86ecd4
--- /dev/null
+++ b/tests/data/test1260
@@ -0,0 +1,36 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+http
+</features>
+ <name>
+HTTP URL with rubbish after port number
+ </name>
+ <command>
+-g "http://[%HOSTIP]:%HTTPPORT:80/we/want/1260" "http://%HOSTIP:%HTTPPORT:80/we/want/1260" "http://user@example.com:80@localhost"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# CURLE_URL_MALFORMAT == 3
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1261 b/tests/data/test1261
new file mode 100644
index 00000000..7f887994
--- /dev/null
+++ b/tests/data/test1261
@@ -0,0 +1,61 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+redirect_url
+followlocation
+--write-out
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 301 This is a weirdo text message swsclose
+Location: data/10290002.txt?coolsite=yes
+Content-Length: 62
+Connection: close
+
+This server reply is for testing a simple Location: following
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+'redirect_url' with --location and --max-redir
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/our/1261 -w '%{redirect_url}\n' --location --max-redir 0
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /we/want/our/1261 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+# CURLE_TOO_MANY_REDIRECTS
+<errorcode>
+47
+</errorcode>
+<stdout>
+HTTP/1.1 301 This is a weirdo text message swsclose
+Location: data/10290002.txt?coolsite=yes
+Content-Length: 62
+Connection: close
+
+http://%HOSTIP:%HTTPPORT/we/want/our/data/10290002.txt?coolsite=yes
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1262 b/tests/data/test1262
new file mode 100644
index 00000000..4b08a2cf
--- /dev/null
+++ b/tests/data/test1262
@@ -0,0 +1,40 @@
+# similar to test 139 but with a reversed time condition
+<testcase>
+<info>
+<keywords>
+FTP
+RETR
+-z
+</keywords>
+</info>
+# Server-side
+<reply>
+<mdtm>
+213 20030409102659
+</mdtm>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP request and denied to download an older file with -z
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/blalbla/1262 -z "-1 jan 2001"
+</command>
+</client>
+
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+CWD blalbla
+MDTM 1262
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1282 b/tests/data/test1282
new file mode 100644
index 00000000..197356c6
--- /dev/null
+++ b/tests/data/test1282
@@ -0,0 +1,45 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<servercmd>
+REPLY PASS 633 XXXXXXXX\x00\x00XXXXXXXX
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+<features>
+GSS-API
+</features>
+ <name>
+FTP with 633 response before gss initialized
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1282
+</command>
+
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+</protocol>
+
+# 67 == CURLE_LOGIN_DENIED
+<errorcode>
+67
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1283 b/tests/data/test1283
new file mode 100644
index 00000000..ac275e92
--- /dev/null
+++ b/tests/data/test1283
@@ -0,0 +1,57 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+globbing
+[] range
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+
+bytes
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+globbing range with same start and stop
+</name>
+<command option="no-output">
+http://%HOSTIP:%HTTPPORT/[a-a][1-1][b-b:1][2-2:1]/1283 -o "log/outfile1283_#1#2#3#4.dump"
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /a1b2/1283 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file name="log/outfile1283_a1b2.dump">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Connection: close
+
+bytes
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test1284 b/tests/data/test1284
new file mode 100644
index 00000000..8437a408
--- /dev/null
+++ b/tests/data/test1284
@@ -0,0 +1,89 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+HTTP Digest auth
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 401 authentication please swsbounce
+Server: Microsoft-IIS/6.0
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 0
+
+</data>
+<data1000>
+HTTP/1.1 200 A OK
+Server: Microsoft-IIS/6.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 3
+
+ok
+</data1000>
+
+<datacheck>
+HTTP/1.1 401 authentication please swsbounce
+Server: Microsoft-IIS/6.0
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 0
+
+HTTP/1.1 200 A OK
+Server: Microsoft-IIS/6.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 3
+
+ok
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+#
+<server>
+http
+</server>
+<features>
+!SSPI
+crypto
+</features>
+<name>
+HTTP POST --digest with user-specified Content-Length header
+</name>
+# This test is to ensure 'Content-Length: 0' is sent while negotiating auth
+# even when there is a user-specified Content-Length header.
+# https://github.com/curl/curl/pull/1242
+<command>
+-H "Content-Length: 11" -u auser:apasswd --digest -d "junkelijunk" http://%HOSTIP:%HTTPPORT/1284
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol nonewline="yes">
+POST /1284 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 0
+Content-Type: application/x-www-form-urlencoded
+
+POST /1284 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1284", response="5763079608de439072861a59ac733515"
+Accept: */*
+Content-Length: 11
+Content-Type: application/x-www-form-urlencoded
+
+junkelijunk
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1285 b/tests/data/test1285
new file mode 100644
index 00000000..16c66238
--- /dev/null
+++ b/tests/data/test1285
@@ -0,0 +1,97 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP PUT
+HTTP Digest auth
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 401 authentication please swsbounce
+Server: Microsoft-IIS/6.0
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 0
+
+</data>
+<data1000>
+HTTP/1.1 200 A OK
+Server: Microsoft-IIS/6.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 3
+
+ok
+</data1000>
+
+<datacheck>
+HTTP/1.1 401 authentication please swsbounce
+Server: Microsoft-IIS/6.0
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 0
+
+HTTP/1.1 200 A OK
+Server: Microsoft-IIS/6.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 3
+
+ok
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+#
+<server>
+http
+</server>
+<features>
+!SSPI
+crypto
+</features>
+<name>
+HTTP PUT --digest with user-specified Content-Length header
+</name>
+# This test is to ensure 'Content-Length: 0' is sent while negotiating auth
+# even when there is a user-specified Content-Length header.
+# https://github.com/curl/curl/pull/1242
+<command>
+-H "Content-Length: 85" -u auser:apasswd --digest -T log/put1285 http://%HOSTIP:%HTTPPORT/1285
+</command>
+<file name="log/put1285">
+This is data we upload with PUT
+a second line
+line three
+four is the number of lines
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+PUT /1285 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 0
+
+PUT /1285 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1285", response="dc185587d5e8391b347eef194c2a3cd6"
+Accept: */*
+Content-Length: 85
+Expect: 100-continue
+
+This is data we upload with PUT
+a second line
+line three
+four is the number of lines
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1286 b/tests/data/test1286
new file mode 100644
index 00000000..41782cb0
--- /dev/null
+++ b/tests/data/test1286
@@ -0,0 +1,110 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP Digest auth
+followlocation
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 401 authentication please swsbounce
+Server: Microsoft-IIS/6.0
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604144", qop="auth"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 0
+
+</data>
+<data1000>
+HTTP/1.1 302 Thanks for this, but we want to redir you!
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Location: /12860001
+Content-Length: 0
+
+</data1000>
+<data1001>
+HTTP/1.1 404 Not Found
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 0
+
+</data1001>
+
+<datacheck>
+HTTP/1.1 401 authentication please swsbounce
+Server: Microsoft-IIS/6.0
+WWW-Authenticate: Digest realm="testrealm", nonce="1053604144", qop="auth"
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 0
+
+HTTP/1.1 302 Thanks for this, but we want to redir you!
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Location: /12860001
+Content-Length: 0
+
+HTTP/1.1 404 Not Found
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 0
+
+</datacheck>
+
+</reply>
+
+# Client-side
+<client>
+#
+<server>
+http
+</server>
+<features>
+crypto
+</features>
+<name>
+HTTP GET --digest increasing nonce-count
+</name>
+# This test is to ensure the nonce-count (nc) increases
+# https://github.com/curl/curl/pull/1251
+<command>
+-u auser:apasswd --location --digest http://%HOSTIP:%HTTPPORT/1286
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+# Reorder the fields in 'Authorization: Digest' header.
+# Since regular and SSPI digest auth header fields may not have the same order
+# or whitespace we homogenize so that both may be tested. Also:
+# - Remove the unique value from cnonce if in RFC format
+# - Remove the unique value from response if in RFC format
+# - Remove quotes from qop="auth" used by SSPI
+# The if statement is one line because runtests evaluates one line at a time.
+<strippart>
+if(s/^(Authorization: Digest )([^\r\n]+)(\r?\n)$//) { $_ = $1 . join(', ', map { s/^(cnonce=)"[a-zA-Z0-9+\/=]+"$/$1REMOVED/; s/^(response=)"[a-f0-9]{32}"$/$1REMOVED/; s/^qop="auth"$/qop=auth/; $_ } sort split(/, */, $2)) . $3; }
+</strippart>
+<protocol>
+GET /1286 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /1286 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest cnonce=REMOVED, nc=00000001, nonce="1053604144", qop=auth, realm="testrealm", response=REMOVED, uri="/1286", username="auser"
+Accept: */*
+
+GET /12860001 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Authorization: Digest cnonce=REMOVED, nc=00000002, nonce="1053604144", qop=auth, realm="testrealm", response=REMOVED, uri="/12860001", username="auser"
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1287 b/tests/data/test1287
new file mode 100644
index 00000000..46c29249
--- /dev/null
+++ b/tests/data/test1287
@@ -0,0 +1,91 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP CONNECT
+proxytunnel
+verbose logs
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake swsclose
+Content-Type: text/html
+Funny-head: yesyes
+Content-Length: 9
+
+contents
+</data>
+
+# The purpose of this test is to make sure curl ignores headers
+# Content-Length and Transfer-Encoding in a successful CONNECT 2xx reply.
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+Content-Length: 123
+Transfer-Encoding: chunked
+
+</connect>
+
+<datacheck>
+HTTP/1.1 200 Mighty fine indeed
+Content-Length: 123
+Transfer-Encoding: chunked
+
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake swsclose
+Content-Type: text/html
+Funny-head: yesyes
+Content-Length: 9
+
+contents
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+http-proxy
+</server>
+<name>
+HTTP over proxy-tunnel ignore TE and CL in CONNECT 2xx responses
+</name>
+<command>
+-v --proxytunnel -x %HOSTIP:%PROXYPORT http://test.1287:%HTTPPORT/we/want/that/page/1287
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<proxy>
+CONNECT test.1287:%HTTPPORT HTTP/1.1
+Host: test.1287:%HTTPPORT
+Proxy-Connection: Keep-Alive
+
+</proxy>
+<protocol>
+GET /we/want/that/page/1287 HTTP/1.1
+Host: test.1287:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file name="log/stderr1287" mode="text">
+* Ignoring Content-Length in CONNECT 200 response
+* Ignoring Transfer-Encoding in CONNECT 200 response
+</file>
+<stripfile>
+s/^.*(?=\* Ignoring (?:Content-Length|Transfer-Encoding) )// or $_ = ''
+</stripfile>
+</verify>
+</testcase>
diff --git a/tests/data/test1288 b/tests/data/test1288
new file mode 100644
index 00000000..543aa3d6
--- /dev/null
+++ b/tests/data/test1288
@@ -0,0 +1,96 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP CONNECT
+HTTP proxy
+proxytunnel
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 Mighty fine indeed
+Server: test tunnel 2000
+
+</connect>
+
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Type: text/html
+Funny-head: yesyes
+Content-Length: 9
+Connection: keep-alive
+
+contents
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+http-proxy
+</server>
+<name>
+Suppress proxy CONNECT response headers
+</name>
+<command>
+--proxytunnel --suppress-connect-headers --dump-header - --include --write-out "\nCONNECT CODE: %{http_connect}\nRECEIVED HEADER BYTE TOTAL: %{size_header}\n" --proxy %HOSTIP:%PROXYPORT http://%HOSTIP.1288:%HTTPPORT/we/want/that/page/1288
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<proxy>
+CONNECT %HOSTIP.1288:%HTTPPORT HTTP/1.1
+Host: %HOSTIP.1288:%HTTPPORT
+Proxy-Connection: Keep-Alive
+
+</proxy>
+<protocol>
+GET /we/want/that/page/1288 HTTP/1.1
+Host: %HOSTIP.1288:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+# This test is structured to test all the expectations of
+# --suppress-connect-headers, which are:
+# Must suppress in --include and --dump-header
+# Must not suppress in --verbose and --trace
+# Must not suppress in statistics (eg received header byte total)
+<stdout>
+HTTP/1.1 200 OK
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Server: test-server/fake
+Content-Type: text/html
+Content-Type: text/html
+Funny-head: yesyes
+Funny-head: yesyes
+Content-Length: 9
+Content-Length: 9
+Connection: keep-alive
+Connection: keep-alive
+
+
+contents
+
+CONNECT CODE: 200
+RECEIVED HEADER BYTE TOTAL: 231
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1289 b/tests/data/test1289
new file mode 100644
index 00000000..d679cc0b
--- /dev/null
+++ b/tests/data/test1289
@@ -0,0 +1,35 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+globbing
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+globbing with overflow and bad syntxx
+</name>
+<command>
+http://ur%20[0-60000000000000000000
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# curl: (3) [globbing] bad range in column
+<errorcode>
+3
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1298 b/tests/data/test1298
new file mode 100644
index 00000000..061a4e1e
--- /dev/null
+++ b/tests/data/test1298
@@ -0,0 +1,56 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+--request-target
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 0
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET special path with --request-target
+ </name>
+ <command>
+--request-target "XXX" "http://%HOSTIP:%HTTPPORT/" -H "Testno: 1298"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET XXX HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Testno: 1298
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1299 b/tests/data/test1299
new file mode 100644
index 00000000..5ed92da5
--- /dev/null
+++ b/tests/data/test1299
@@ -0,0 +1,55 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+--request-target
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 0
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+Send "OPTIONS *" with --request-target
+ </name>
+ <command>
+--request-target "*" -X OPTIONS http://%HOSTIP:%HTTPPORT/ -H "Testno: 1299"
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+OPTIONS * HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Testno: 1299
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test130 b/tests/data/test130
index 6e6d9c16..85892f1e 100644
--- a/tests/data/test130
+++ b/tests/data/test130
@@ -41,6 +41,7 @@ FTP (optional .netrc; no user/pass) dir list PASV
</command>
<file name="log/netrc130" >
# the following two lines were created while testing curl
+# machine %HOSTIP login user1 password commented
machine %HOSTIP login user1 password passwd1
machine %HOSTIP login user2 password passwd2
default login userdef password passwddef
diff --git a/tests/data/test1309 b/tests/data/test1309
index c2f67ff1..0e0cad1e 100644
--- a/tests/data/test1309
+++ b/tests/data/test1309
@@ -1451,6 +1451,117 @@ remove pointer 5, payload 659
Tree look:
0.177[0]
remove pointer 6, payload 177
+Removing nodes not larger than 0
+removed payload 0[0]
+Removing nodes not larger than 100
+removed payload 39[0]
+removed payload 49[0]
+removed payload 49[1]
+removed payload 59[0]
+removed payload 59[1]
+removed payload 59[2]
+removed payload 98[0]
+removed payload 98[1]
+removed payload 98[2]
+Removing nodes not larger than 200
+removed payload 108[0]
+removed payload 118[0]
+removed payload 118[1]
+removed payload 157[0]
+removed payload 157[1]
+removed payload 167[0]
+removed payload 167[1]
+removed payload 167[2]
+removed payload 177[0]
+Removing nodes not larger than 300
+removed payload 216[0]
+removed payload 226[0]
+removed payload 226[1]
+removed payload 236[0]
+removed payload 236[1]
+removed payload 236[2]
+removed payload 275[0]
+removed payload 275[1]
+removed payload 275[2]
+removed payload 285[0]
+removed payload 295[0]
+removed payload 295[1]
+Removing nodes not larger than 400
+removed payload 334[0]
+removed payload 334[1]
+removed payload 344[0]
+removed payload 344[1]
+removed payload 344[2]
+removed payload 354[0]
+removed payload 393[0]
+Removing nodes not larger than 500
+removed payload 403[0]
+removed payload 403[1]
+removed payload 413[0]
+removed payload 413[1]
+removed payload 413[2]
+removed payload 462[0]
+removed payload 472[0]
+removed payload 472[1]
+Removing nodes not larger than 600
+removed payload 521[0]
+removed payload 521[1]
+removed payload 521[2]
+removed payload 531[0]
+removed payload 541[0]
+removed payload 541[1]
+removed payload 580[0]
+removed payload 580[1]
+removed payload 590[0]
+removed payload 590[1]
+removed payload 590[2]
+removed payload 600[0]
+Removing nodes not larger than 700
+removed payload 639[0]
+removed payload 649[0]
+removed payload 649[1]
+removed payload 659[0]
+removed payload 659[1]
+removed payload 659[2]
+removed payload 698[0]
+removed payload 698[1]
+removed payload 698[2]
+Removing nodes not larger than 800
+removed payload 708[0]
+removed payload 718[0]
+removed payload 718[1]
+removed payload 757[0]
+removed payload 757[1]
+removed payload 767[0]
+removed payload 767[1]
+removed payload 767[2]
+removed payload 777[0]
+Removing nodes not larger than 900
+removed payload 816[0]
+removed payload 826[0]
+removed payload 826[1]
+removed payload 836[0]
+removed payload 836[1]
+removed payload 836[2]
+removed payload 875[0]
+removed payload 875[1]
+removed payload 875[2]
+removed payload 885[0]
+removed payload 895[0]
+removed payload 895[1]
+Removing nodes not larger than 1000
+removed payload 934[0]
+removed payload 934[1]
+removed payload 944[0]
+removed payload 944[1]
+removed payload 944[2]
+removed payload 954[0]
+Removing nodes not larger than 1100
+removed payload 1003[0]
+removed payload 1003[1]
+removed payload 1013[0]
+removed payload 1013[1]
+removed payload 1013[2]
</stdout>
</verify>
diff --git a/tests/data/test1323 b/tests/data/test1323
new file mode 100644
index 00000000..c5e598cc
--- /dev/null
+++ b/tests/data/test1323
@@ -0,0 +1,32 @@
+<testcase>
+<info>
+<keywords>
+unittest
+curlx_tvdiff
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<name>
+curlx_tvdiff
+</name>
+<tool>
+unit1323
+</tool>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1333 b/tests/data/test1333
index a2ea3014..50ca42a2 100644
--- a/tests/data/test1333
+++ b/tests/data/test1333
@@ -3,6 +3,7 @@
<keywords>
HTTP
HTTP GET
+chunked Transfer-Encoding
</keywords>
</info>
diff --git a/tests/data/test1399 b/tests/data/test1399
new file mode 100644
index 00000000..fe3879df
--- /dev/null
+++ b/tests/data/test1399
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+Curl_pgrsTime
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+Curl_pgrsTime unit tests
+ </name>
+<tool>
+unit1399
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test1400 b/tests/data/test1400
index 838fe638..0cef18df 100644
--- a/tests/data/test1400
+++ b/tests/data/test1400
@@ -27,6 +27,9 @@ http
<name>
--libcurl for simple HTTP GET
</name>
+<setenv>
+SSL_CERT_FILE=
+</setenv>
<command>
http://%HOSTIP:%HTTPPORT/we/want/1400 --libcurl log/test1400.c
</command>
@@ -65,6 +68,7 @@ int main(int argc, char *argv[])
CURL *hnd;
hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1400");
curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
diff --git a/tests/data/test1401 b/tests/data/test1401
index 1e2b4a77..2217ed8c 100644
--- a/tests/data/test1401
+++ b/tests/data/test1401
@@ -31,6 +31,9 @@ http
<name>
--libcurl for GET with various options
</name>
+<setenv>
+SSL_CERT_FILE=
+</setenv>
<command>
http://%HOSTIP:%HTTPPORT/we/want/1401 --libcurl log/test1401.c --basic -u fake:user -H "X-Files: Mulder" -H "X-Men: cyclops, iceman" -A MyUA -b chocolate=chip --proto "=http,ftp,file"
</command>
@@ -77,6 +80,7 @@ int main(int argc, char *argv[])
slist1 = curl_slist_append(slist1, "X-Men: cyclops, iceman");
hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1401");
curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_USERPWD, "fake:user");
@@ -122,7 +126,5 @@ int main(int argc, char *argv[])
}
/**** End of sample code ****/
</file>
-<stdout>
-</stdout>
</verify>
</testcase>
diff --git a/tests/data/test1402 b/tests/data/test1402
index 07c3f491..d2b05f56 100644
--- a/tests/data/test1402
+++ b/tests/data/test1402
@@ -28,6 +28,9 @@ http
<name>
--libcurl for simple POST
</name>
+<setenv>
+SSL_CERT_FILE=
+</setenv>
<command>
http://%HOSTIP:%HTTPPORT/we/want/1402 --libcurl log/test1402.c -d "foo=bar" -d "baz=quux"
</command>
@@ -70,6 +73,7 @@ int main(int argc, char *argv[])
CURL *hnd;
hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1402");
curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "foo=bar&baz=quux");
@@ -108,7 +112,5 @@ int main(int argc, char *argv[])
}
/**** End of sample code ****/
</file>
-<stdout>
-</stdout>
</verify>
</testcase>
diff --git a/tests/data/test1403 b/tests/data/test1403
index 18167b4f..b0872831 100644
--- a/tests/data/test1403
+++ b/tests/data/test1403
@@ -28,6 +28,9 @@ http
<name>
--libcurl for GET with query
</name>
+<setenv>
+SSL_CERT_FILE=
+</setenv>
<command>
http://%HOSTIP:%HTTPPORT/we/want/1403 --libcurl log/test1403.c -G -d "foo=bar" -d "baz=quux"
</command>
@@ -67,6 +70,7 @@ int main(int argc, char *argv[])
CURL *hnd;
hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1403?foo=bar&baz=quux");
curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
@@ -103,7 +107,5 @@ int main(int argc, char *argv[])
}
/**** End of sample code ****/
</file>
-<stdout>
-</stdout>
</verify>
</testcase>
diff --git a/tests/data/test1404 b/tests/data/test1404
index 6f53ca8c..c86d2602 100644
--- a/tests/data/test1404
+++ b/tests/data/test1404
@@ -29,6 +29,9 @@ http
<name>
--libcurl for HTTP RFC1867-type formposting - -F with three files, one with explicit type
</name>
+<setenv>
+SSL_CERT_FILE=
+</setenv>
<command>
http://%HOSTIP:%HTTPPORT/we/want/1404 -F name=value -F 'file=@log/test1404.txt,log/test1404.txt;type=magic/content,log/test1404.txt' --libcurl log/test1404.c
</command>
@@ -120,6 +123,7 @@ int main(int argc, char *argv[])
CURLFORM_END);
hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "http://%HOSTIP:%HTTPPORT/we/want/1404");
curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_HTTPPOST, post1);
diff --git a/tests/data/test1405 b/tests/data/test1405
index 4e8d46d7..f3ad3e79 100644
--- a/tests/data/test1405
+++ b/tests/data/test1405
@@ -32,6 +32,9 @@ ftp
<name>
--libcurl for FTP with quote ops
</name>
+<setenv>
+SSL_CERT_FILE=
+</setenv>
<command>
ftp://%HOSTIP:%FTPPORT/1405 -Q "NOOP 1" -Q "+NOOP 2" -Q "-NOOP 3" -Q "*FAIL" -Q "+*FAIL HARD" --libcurl log/test1405.c
</command>
@@ -80,6 +83,7 @@ int main(int argc, char *argv[])
slist3 = curl_slist_append(slist3, "*FAIL HARD");
hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "ftp://%HOSTIP:%FTPPORT/1405");
curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_QUOTE, slist1);
diff --git a/tests/data/test1406 b/tests/data/test1406
index 0ccb08a7..033957f6 100644
--- a/tests/data/test1406
+++ b/tests/data/test1406
@@ -25,6 +25,9 @@ smtp
<name>
--libcurl for SMTP
</name>
+<setenv>
+SSL_CERT_FILE=
+</setenv>
<file name="log/test1406.eml">
From: different
To: another
@@ -72,12 +75,11 @@ int main(int argc, char *argv[])
slist1 = curl_slist_append(slist1, "recipient.two@example.com");
hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, (curl_off_t)38);
curl_easy_setopt(hnd, CURLOPT_URL, "smtp://%HOSTIP:%SMTPPORT/1406");
curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
- curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
- curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
curl_easy_setopt(hnd, CURLOPT_MAIL_FROM, "sender@example.com");
@@ -115,10 +117,9 @@ int main(int argc, char *argv[])
/**** End of sample code ****/
</file>
<stripfile>
-# curl's default user-agent varies with version, libraries etc.
-s/(USERAGENT, \")[^\"]+/${1}stripped/
-# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
-# configurations - just ignore them
+# These options vary with configurations - just ignore them
+$_ = '' if /CURLOPT_USERAGENT/
+$_ = '' if /CURLOPT_MAXREDIRS/
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
$_ = '' if /CURLOPT_HTTP_VERSION/
diff --git a/tests/data/test1407 b/tests/data/test1407
index 981e4e41..5a3de1b1 100644
--- a/tests/data/test1407
+++ b/tests/data/test1407
@@ -26,7 +26,10 @@ pop3
<name>
--libcurl for POP3 LIST one message
</name>
- <command>
+<setenv>
+SSL_CERT_FILE=
+</setenv>
+<command>
pop3://%HOSTIP:%POP3PORT/1407 -l -u user:secret --libcurl log/test1407.c
</command>
</client>
@@ -54,12 +57,11 @@ int main(int argc, char *argv[])
CURL *hnd;
hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "pop3://%HOSTIP:%POP3PORT/1407");
curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_DIRLISTONLY, 1L);
curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
- curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
- curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
@@ -93,10 +95,9 @@ int main(int argc, char *argv[])
/**** End of sample code ****/
</file>
<stripfile>
-# curl's default user-agent varies with version, libraries etc.
-s/(USERAGENT, \")[^\"]+/${1}stripped/
-# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
-# configurations - just ignore them
+# These options vary with configurations - just ignore them
+$_ = '' if /CURLOPT_USERAGENT/
+$_ = '' if /CURLOPT_MAXREDIRS/
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
$_ = '' if /CURLOPT_HTTP_VERSION/
diff --git a/tests/data/test1420 b/tests/data/test1420
index a20f8986..38139e0b 100644
--- a/tests/data/test1420
+++ b/tests/data/test1420
@@ -32,7 +32,10 @@ imap
<name>
--libcurl for IMAP FETCH message
</name>
- <command>
+<setenv>
+SSL_CERT_FILE=
+</setenv>
+<command>
'imap://%HOSTIP:%IMAPPORT/1420/;UID=1' -u user:secret --libcurl log/test1420.c
</command>
</client>
@@ -60,11 +63,10 @@ int main(int argc, char *argv[])
CURL *hnd;
hnd = curl_easy_init();
+ curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
curl_easy_setopt(hnd, CURLOPT_URL, "imap://%HOSTIP:%IMAPPORT/1420/;UID=1");
curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
curl_easy_setopt(hnd, CURLOPT_USERPWD, "user:secret");
- curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
- curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
@@ -98,10 +100,9 @@ int main(int argc, char *argv[])
/**** End of sample code ****/
</file>
<stripfile>
-# curl's default user-agent varies with version, libraries etc.
-s/(USERAGENT, \")[^\"]+/${1}stripped/
-# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
-# configurations - just ignore them
+# These options vary with configurations - just ignore them
+$_ = '' if /CURLOPT_USERAGENT/
+$_ = '' if /CURLOPT_MAXREDIRS/
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
$_ = '' if /CURLOPT_HTTP_VERSION/
diff --git a/tests/data/test1425 b/tests/data/test1425
new file mode 100644
index 00000000..0044c69d
--- /dev/null
+++ b/tests/data/test1425
Binary files differ
diff --git a/tests/data/test1426 b/tests/data/test1426
new file mode 100644
index 00000000..dd6a8d11
--- /dev/null
+++ b/tests/data/test1426
Binary files differ
diff --git a/tests/data/test1427 b/tests/data/test1427
new file mode 100644
index 00000000..03cab4b9
--- /dev/null
+++ b/tests/data/test1427
@@ -0,0 +1,29 @@
+<testcase>
+<info>
+<keywords>
+integer overflow
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+ <name>
+too large -m timeout value
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1427 -m 184467440737095510
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<errorcode>
+2
+</errorcode>
+</verify>
+</testcase>
diff --git a/tests/data/test1429 b/tests/data/test1429
index da09dca4..114dc0db 100644
--- a/tests/data/test1429
+++ b/tests/data/test1429
@@ -31,7 +31,7 @@ http
</server>
<name>
-HTTP GET with 4-digit reponse code
+HTTP GET with 4-digit response code
</name>
<command>
http://%HOSTIP:%HTTPPORT/1429 --write-out '%{response_code}'
@@ -54,7 +54,7 @@ Content-Type: text/html
Funny-head: yesyes
-foo-
-1234
+123
</stdout>
<strip>
^User-Agent:.*
diff --git a/tests/data/test1430 b/tests/data/test1430
index c5f65cfc..e3c9b1d6 100644
--- a/tests/data/test1430
+++ b/tests/data/test1430
@@ -30,7 +30,7 @@ Funny-head: yesyes
http
</server>
<name>
-HTTP GET with negative reponse code
+HTTP GET with negative response code
</name>
<command>
http://%HOSTIP:%HTTPPORT/1430
diff --git a/tests/data/test1431 b/tests/data/test1431
index 4ea33edc..bec3ebbd 100644
--- a/tests/data/test1431
+++ b/tests/data/test1431
@@ -30,7 +30,7 @@ Funny-head: yesyes
http
</server>
<name>
-HTTP GET with single-digit reponse code
+HTTP GET with single-digit response code
</name>
<command>
http://%HOSTIP:%HTTPPORT/1431
diff --git a/tests/data/test1432 b/tests/data/test1432
index eb1d0c2a..7f41c65b 100644
--- a/tests/data/test1432
+++ b/tests/data/test1432
@@ -31,7 +31,7 @@ http
</server>
<name>
-HTTP GET with 100-digit reponse code and survive
+HTTP GET with 100-digit response code and survive
</name>
<command>
http://%HOSTIP:%HTTPPORT/1432
diff --git a/tests/data/test1433 b/tests/data/test1433
index 8634db2c..a159daff 100644
--- a/tests/data/test1433
+++ b/tests/data/test1433
@@ -34,28 +34,13 @@ http
HTTP GET with 100-digit subversion number in response
</name>
<command>
-http://%HOSTIP:%HTTPPORT/1433 --write-out '%{response_code}'
+http://%HOSTIP:%HTTPPORT/1433
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
-<stdout nonewline="yes">
-HTTP/1.0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 200 OK
-Date: Thu, 09 Nov 2010 14:49:00 GMT
-Server: test-server/fake
-Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
-ETag: "21025-dc7-39462498"
-Accept-Ranges: bytes
-Content-Length: 6
-Connection: close
-Content-Type: text/html
-Funny-head: yesyes
-
--foo-
-200
-</stdout>
<strip>
^User-Agent:.*
</strip>
@@ -65,5 +50,8 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
+<errorcode>
+1
+</errorcode>
</verify>
</testcase>
diff --git a/tests/data/test1440 b/tests/data/test1440
new file mode 100644
index 00000000..e87cafb0
--- /dev/null
+++ b/tests/data/test1440
@@ -0,0 +1,35 @@
+<testcase>
+<info>
+<keywords>
+--write-out
+FILE
+</keywords>
+</info>
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+file
+</server>
+
+<name>
+Check --write-out with trailing %{
+</name>
+<command>
+file://localhost/%PWD/log/non-existent-file.txt --write-out '%{'
+</command>
+</client>
+
+# Verify data
+<verify>
+<errorcode>
+37
+</errorcode>
+<stdout nonewline="yes">
+%{
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1441 b/tests/data/test1441
new file mode 100644
index 00000000..8d841df5
--- /dev/null
+++ b/tests/data/test1441
@@ -0,0 +1,35 @@
+<testcase>
+<info>
+<keywords>
+--write-out
+FILE
+</keywords>
+</info>
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+file
+</server>
+
+<name>
+Check --write-out with trailing %
+</name>
+<command>
+file://localhost/%PWD/log/non-existent-file.txt --write-out '%'
+</command>
+</client>
+
+# Verify data
+<verify>
+<errorcode>
+37
+</errorcode>
+<stdout nonewline="yes">
+%
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1442 b/tests/data/test1442
new file mode 100644
index 00000000..255a4c9f
--- /dev/null
+++ b/tests/data/test1442
@@ -0,0 +1,35 @@
+<testcase>
+<info>
+<keywords>
+--write-out
+FILE
+</keywords>
+</info>
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+file
+</server>
+
+<name>
+Check --write-out with trailing \
+</name>
+<command>
+file://localhost/%PWD/log/non-existent-file.txt --write-out '\'
+</command>
+</client>
+
+# Verify data
+<verify>
+<errorcode>
+37
+</errorcode>
+<stdout nonewline="yes">
+\
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1443 b/tests/data/test1443
new file mode 100644
index 00000000..69688670
--- /dev/null
+++ b/tests/data/test1443
@@ -0,0 +1,68 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-O
+--remote-time
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+Content-Length: 6
+Connection: close
+
+12345
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# This relies on the debug feature to allow us to set a directory
+# in which to store the -O output
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -O and --remote-time
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1443 -O --remote-time
+</command>
+# Verify the mtime of the file. The mtime is specifically chosen to be an even
+# number so that it can be represented exactly on a FAT filesystem.
+<postcheck>
+perl -e 'exit((stat("log/1443"))[9] != 960898200)'
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1443 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+<file name="log/1443">
+12345
+</file>
+</verify>
+</testcase>
diff --git a/tests/data/test1444 b/tests/data/test1444
new file mode 100644
index 00000000..7eec21b9
--- /dev/null
+++ b/tests/data/test1444
@@ -0,0 +1,52 @@
+<testcase>
+<info>
+<keywords>
+FTP
+EPSV
+RETR
+--remote-time
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+file data
+</data>
+<mdtm>
+213 20090213233130
+</mdtm>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP with --remote-time
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/1444 --remote-time
+</command>
+# Verify the mtime of the file. The mtime is specifically chosen to be an even
+# number so that it can be represented exactly on a FAT filesystem.
+<postcheck>
+perl -e 'exit((stat("log/curl1444.out"))[9] != 1234567890)'
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+MDTM 1444
+EPSV
+TYPE I
+SIZE 1444
+RETR 1444
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1445 b/tests/data/test1445
new file mode 100644
index 00000000..f60483dc
--- /dev/null
+++ b/tests/data/test1445
@@ -0,0 +1,35 @@
+<testcase>
+<info>
+<keywords>
+FILE
+--remote-time
+</keywords>
+</info>
+
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+file
+</server>
+<precheck>
+perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test1445.dir
+</precheck>
+ <name>
+file:// with --remote-time
+ </name>
+ <command>
+file://localhost/%PWD/log/test1445.dir/plainfile.txt --remote-time
+</command>
+<postcheck>
+perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test1445.dir && \
+perl -e 'exit((stat("log/curl1445.out"))[9] != 946728000)'
+</postcheck>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1446 b/tests/data/test1446
new file mode 100644
index 00000000..7d5ec9fc
--- /dev/null
+++ b/tests/data/test1446
@@ -0,0 +1,42 @@
+<testcase>
+<info>
+<keywords>
+SFTP
+--remote-time
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+sftp
+</server>
+<precheck>
+perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test1446.dir
+</precheck>
+ <name>
+SFTP with --remote-time
+ </name>
+ <command>
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%PWD/log/test1446.dir/rofile.txt --insecure --remote-time
+</command>
+<postcheck>
+perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test1446.dir && \
+perl -e 'exit((stat("log/curl1446.out"))[9] != 978264000)'
+</postcheck>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<valgrind>
+disable
+</valgrind>
+</verify>
+</testcase>
diff --git a/tests/data/test1450 b/tests/data/test1450
new file mode 100644
index 00000000..ca3ac884
--- /dev/null
+++ b/tests/data/test1450
@@ -0,0 +1,34 @@
+<testcase>
+<info>
+<keywords>
+DICT
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+dict
+</server>
+<features>
+dict
+</features>
+ <name>
+Basic DICT lookup
+ </name>
+ <command>
+dict://%HOSTIP:%DICTPORT/d:basic
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1451 b/tests/data/test1451
new file mode 100644
index 00000000..0c114e18
--- /dev/null
+++ b/tests/data/test1451
@@ -0,0 +1,36 @@
+<testcase>
+<info>
+<keywords>
+SMB
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>Basic SMB test complete</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+smb
+</server>
+<features>
+smb
+</features>
+ <name>
+Basic SMB request
+ </name>
+ <command>
+-u 'curltest:curltest' smb://%HOSTIP:%SMBPORT/TESTS/1451
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout>Basic SMB test complete</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1452 b/tests/data/test1452
new file mode 100755
index 00000000..dbbb7d6c
--- /dev/null
+++ b/tests/data/test1452
@@ -0,0 +1,41 @@
+<testcase>
+<info>
+<keywords>
+TELNET
+UPLOAD
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+telnet
+</server>
+<features>
+telnet
+</features>
+ <name>
+Basic TELNET negotiation
+ </name>
+<stdin>
+test1452
+</stdin>
+ <command>
+telnet://%HOSTIP:%NEGTELNETPORT --upload-file -
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout>test1452</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test150 b/tests/data/test150
index 69c5835c..e19826e3 100644
--- a/tests/data/test150
+++ b/tests/data/test150
@@ -94,7 +94,7 @@ Accept: */*
GET /150 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
diff --git a/tests/data/test1521 b/tests/data/test1521
new file mode 100644
index 00000000..791a50dc
--- /dev/null
+++ b/tests/data/test1521
@@ -0,0 +1,30 @@
+<testcase>
+<info>
+<keywords>
+curl_easy_setopt
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<tool>
+lib1521
+</tool>
+
+ <name>
+Test all curl_easy_setopt and curl_easy_getinfo options
+ </name>
+ <command>
+unused
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+</testcase>
diff --git a/tests/data/test1534 b/tests/data/test1534
index f3cd2f0e..5ebf57d3 100644
--- a/tests/data/test1534
+++ b/tests/data/test1534
@@ -27,7 +27,7 @@ http
lib1534
</tool>
<name>
-Test CURLINFO_RESPONSE_CODE
+CURLINFO_FILETIME init and reset
</name>
<command>
http://%HOSTIP:%HTTPPORT/1534
diff --git a/tests/data/test1537 b/tests/data/test1537
new file mode 100644
index 00000000..33d8ab3d
--- /dev/null
+++ b/tests/data/test1537
@@ -0,0 +1,45 @@
+<testcase>
+<info>
+<keywords>
+URL escape
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+<tool>
+lib1537
+</tool>
+
+<name>
+libcurl URL escape/unescape tests
+</name>
+<command>
+nothing
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+%2F%3A%3B%3C%3D%3E%3F%91%A2%B3%C4%D5%E6%F7
+%2F%3A%3B%3C%3D%3E%3F%91%A2%B3%C4%D5%E6%F7
+outlen == 14
+unescape == original? YES
+[old] outlen == 14
+[old] unescape == original? YES
+escape -1 length: (nil)
+unescape -1 length: (nil) 2017
+</stdout>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1538 b/tests/data/test1538
new file mode 100644
index 00000000..25b39a6f
--- /dev/null
+++ b/tests/data/test1538
@@ -0,0 +1,149 @@
+<testcase>
+<info>
+<keywords>
+strerror
+verbose logs
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+<tool>
+lib1538
+</tool>
+
+<name>
+libcurl strerror API call tests
+</name>
+<command>
+nothing
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<stdout>
+e0: No error
+e1: Unsupported protocol
+e2: Failed initialization
+e3: URL using bad/illegal format or missing URL
+e4: A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
+e5: Couldn't resolve proxy name
+e6: Couldn't resolve host name
+e7: Couldn't connect to server
+e8: Weird server reply
+e9: Access denied to remote resource
+e10: FTP: The server failed to connect to data port
+e11: FTP: unknown PASS reply
+e12: FTP: Accepting server connect has timed out
+e13: FTP: unknown PASV reply
+e14: FTP: unknown 227 response format
+e15: FTP: can't figure out the host in the PASV response
+e16: Error in the HTTP2 framing layer
+e17: FTP: couldn't set file type
+e18: Transferred a partial file
+e19: FTP: couldn't retrieve (RETR failed) the specified file
+e20: Unknown error
+e21: Quote command returned error
+e22: HTTP response code said error
+e23: Failed writing received data to disk/application
+e24: Unknown error
+e25: Upload failed (at start/before it took off)
+e26: Failed to open/read local data from file/application
+e27: Out of memory
+e28: Timeout was reached
+e29: Unknown error
+e30: FTP: command PORT failed
+e31: FTP: command REST failed
+e32: Unknown error
+e33: Requested range was not delivered by the server
+e34: Internal problem setting up the POST
+e35: SSL connect error
+e36: Couldn't resume download
+e37: Couldn't read a file:// file
+e38: LDAP: cannot bind
+e39: LDAP: search failed
+e40: Unknown error
+e41: A required function in the library was not found
+e42: Operation was aborted by an application callback
+e43: A libcurl function was given a bad argument
+e44: Unknown error
+e45: Failed binding local connection end
+e46: Unknown error
+e47: Number of redirects hit maximum amount
+e48: An unknown option was passed in to libcurl
+e49: Malformed telnet option
+e50: Unknown error
+e51: SSL peer certificate or SSH remote key was not OK
+e52: Server returned nothing (no headers, no data)
+e53: SSL crypto engine not found
+e54: Can not set SSL crypto engine as default
+e55: Failed sending data to the peer
+e56: Failure when receiving data from the peer
+e57: Unknown error
+e58: Problem with the local SSL certificate
+e59: Couldn't use specified SSL cipher
+e60: Peer certificate cannot be authenticated with given CA certificates
+e61: Unrecognized or bad HTTP Content or Transfer-Encoding
+e62: Invalid LDAP URL
+e63: Maximum file size exceeded
+e64: Requested SSL level failed
+e65: Send failed since rewinding of the data stream failed
+e66: Failed to initialise SSL crypto engine
+e67: Login denied
+e68: TFTP: File Not Found
+e69: TFTP: Access Violation
+e70: Disk full or allocation exceeded
+e71: TFTP: Illegal operation
+e72: TFTP: Unknown transfer ID
+e73: Remote file already exists
+e74: TFTP: No such user
+e75: Conversion failed
+e76: Caller must register CURLOPT_CONV_ callback options
+e77: Problem with the SSL CA cert (path? access rights?)
+e78: Remote file not found
+e79: Error in the SSH layer
+e80: Failed to shut down the SSL connection
+e81: Socket not ready for send/recv
+e82: Failed to load CRL file (path? access rights?, format?)
+e83: Issuer check against peer certificate failed
+e84: FTP: The server did not accept the PRET command.
+e85: RTSP CSeq mismatch or invalid CSeq
+e86: RTSP session error
+e87: Unable to parse FTP file list
+e88: Chunk callback failed
+e89: The max connection limit is reached
+e90: SSL public key does not match pinned public key
+e91: SSL server certificate status verification FAILED
+e92: Stream error in the HTTP/2 framing layer
+e93: Unknown error
+m-1: Please call curl_multi_perform() soon
+m0: No error
+m1: Invalid multi handle
+m2: Invalid easy handle
+m3: Out of memory
+m4: Internal error
+m5: Invalid socket argument
+m6: Unknown option
+m7: The easy handle is already added to a multi handle
+m8: Unknown error
+s0: No error
+s1: Unknown share option
+s2: Share currently in use
+s3: Invalid share handle
+s4: Out of memory
+s5: Feature not enabled in this library
+s6: CURLSHcode unknown
+</stdout>
+</verify>
+
+</testcase>
diff --git a/tests/data/test1540 b/tests/data/test1540
new file mode 100644
index 00000000..1c1cf5db
--- /dev/null
+++ b/tests/data/test1540
@@ -0,0 +1,64 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+CURLPAUSE_RECV
+chunked Transfer-Encoding
+Trailer:
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK swsclose
+Transfer-Encoding: chunked
+Trailer: MyCoolTrailerHeader
+
+4
+data
+5
+d474
+
+0
+MyCoolTrailerHeader: amazingtrailer
+
+</data>
+<datacheck>
+HTTP/1.1 200 OK swsclose
+Transfer-Encoding: chunked
+Trailer: MyCoolTrailerHeader
+
+Got 4 bytes but pausing!
+datad474
+MyCoolTrailerHeader: amazingtrailer
+</datacheck>
+
+</reply>
+# Client-side
+<client>
+<server>
+http
+</server>
+<tool>
+lib1540
+</tool>
+ <name>
+chunked with trailers and pausing the receive
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1540
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+GET /1540 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test155 b/tests/data/test155
index 46f890fc..b6451ec2 100644
--- a/tests/data/test155
+++ b/tests/data/test155
@@ -125,7 +125,7 @@ Content-Length: 0
PUT /155 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
Content-Length: 85
diff --git a/tests/data/test1550 b/tests/data/test1550
new file mode 100644
index 00000000..b78756e9
--- /dev/null
+++ b/tests/data/test1550
@@ -0,0 +1,29 @@
+<testcase>
+<info>
+<keywords>
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+none
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib1550
+</tool>
+
+ <name>
+verify setting pipeling blacklisting options
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1550
+</command>
+</client>
+</testcase>
diff --git a/tests/data/test1551 b/tests/data/test1551
new file mode 100644
index 00000000..507266a8
--- /dev/null
+++ b/tests/data/test1551
@@ -0,0 +1,72 @@
+<testcase>
+<info>
+<keywords>
+multi
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 302 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 6
+Location: /15510002
+
+-foo-
+</data>
+<data2>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 11
+
+redirected
+</data2>
+<datacheck>
+redirected
+redirected
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib1551
+</tool>
+
+ <name>
+re-run redirected transfer without setting URL again
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1551
+</command>
+</client>
+
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1551 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /15510002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /1551 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /15510002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1606 b/tests/data/test1606
new file mode 100644
index 00000000..15488d40
--- /dev/null
+++ b/tests/data/test1606
@@ -0,0 +1,26 @@
+<testcase>
+<info>
+<keywords>
+unittest
+speedcheck
+</keywords>
+</info>
+
+#
+# Client-side
+<client>
+<server>
+none
+</server>
+<features>
+unittest
+</features>
+ <name>
+verify speedcheck
+ </name>
+<tool>
+unit1606
+</tool>
+</client>
+
+</testcase>
diff --git a/tests/data/test165 b/tests/data/test165
index 6fc0ad2d..b9a1ed78 100644
--- a/tests/data/test165
+++ b/tests/data/test165
@@ -31,9 +31,12 @@ http
idn
</features>
<setenv>
-CHARSET=UTF-8
-LANG=en_US.UTF-8
+LC_ALL=
+LC_CTYPE=en_US.UTF-8
</setenv>
+<precheck>
+perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
+</precheck>
<name>
HTTP over proxy with IDN host name
</name>
diff --git a/tests/data/test169 b/tests/data/test169
index 73ca9bd2..c1f1b376 100644
--- a/tests/data/test169
+++ b/tests/data/test169
@@ -112,7 +112,7 @@ Proxy-Connection: Keep-Alive
GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
Host: data.from.server.requiring.digest.hohoho.com
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test1800 b/tests/data/test1800
index 0a2bb1f6..01101840 100644
--- a/tests/data/test1800
+++ b/tests/data/test1800
@@ -48,7 +48,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
Connection: Upgrade, HTTP2-Settings
Upgrade: %H2CVER
-HTTP2-Settings: AAMAAABkAARAAAAA
+HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
</protocol>
</verify>
diff --git a/tests/data/test1801 b/tests/data/test1801
index 9e1900b9..b827ab51 100644
--- a/tests/data/test1801
+++ b/tests/data/test1801
@@ -58,7 +58,7 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
Connection: Upgrade, HTTP2-Settings
Upgrade: %H2CVER
-HTTP2-Settings: AAMAAABkAARAAAAA
+HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
</protocol>
# CURLE_HTTP2: Send failure: Broken pipe
diff --git a/tests/data/test1900 b/tests/data/test1900
index 04c59a82..2e3c93a0 100644
--- a/tests/data/test1900
+++ b/tests/data/test1900
@@ -42,9 +42,9 @@ lib1900
HTTP GET using pipelining
</name>
<command>
-http://%HOSTIP:%HTTPPIPEPORT/
+http://%HOSTIP:%HTTPPIPEPORT/ log/urls1900.txt
</command>
-<file name="log/urls.txt">
+<file name="log/urls1900.txt">
0 1k.txt
1000 100k.txt
0 1k.txt
diff --git a/tests/data/test1901 b/tests/data/test1901
index 17c04d14..83cdf729 100644
--- a/tests/data/test1901
+++ b/tests/data/test1901
@@ -43,9 +43,9 @@ lib1900
HTTP GET using pipelining, blacklisted site
</name>
<command>
-http://%HOSTIP:%HTTPPIPEPORT/
+http://%HOSTIP:%HTTPPIPEPORT/ log/urls1901.txt
</command>
-<file name="log/urls.txt">
+<file name="log/urls1901.txt">
blacklist_site 127.0.0.1:%HTTPPIPEPORT
0 1k.txt
1000 100k.txt
diff --git a/tests/data/test1902 b/tests/data/test1902
index 533ed55a..3c999316 100644
--- a/tests/data/test1902
+++ b/tests/data/test1902
@@ -43,9 +43,9 @@ lib1900
HTTP GET using pipelining, broken pipe
</name>
<command>
-http://%HOSTIP:%HTTPPIPEPORT/
+http://%HOSTIP:%HTTPPIPEPORT/ log/urls1902.txt
</command>
-<file name="log/urls.txt">
+<file name="log/urls1902.txt">
0 1k.txt
1000 connection_close.txt
1 1k.txt
diff --git a/tests/data/test1903 b/tests/data/test1903
index c7256183..219ffe11 100644
--- a/tests/data/test1903
+++ b/tests/data/test1903
@@ -43,9 +43,9 @@ lib1900
HTTP GET using pipelining, penalized on content-length
</name>
<command>
-http://%HOSTIP:%HTTPPIPEPORT/
+http://%HOSTIP:%HTTPPIPEPORT/ log/urls1903.txt
</command>
-<file name="log/urls.txt">
+<file name="log/urls1903.txt">
0 1k.txt
1000 100k.txt
550 alphabet.txt
diff --git a/tests/data/test199 b/tests/data/test199
index 881ee03a..72675b53 100644
--- a/tests/data/test199
+++ b/tests/data/test199
@@ -8,7 +8,7 @@ globbing
</info>
#
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
diff --git a/tests/data/test2031 b/tests/data/test2031
index bd5aa074..23b1a521 100644
--- a/tests/data/test2031
+++ b/tests/data/test2031
@@ -40,7 +40,7 @@ WWW-Authenticate: NTLM
This is a bad password page!
</data1102>
-<!-- Second request has NTML auth, right password -->
+<!-- Second request has NTLM auth, right password -->
<data200>
HTTP/1.1 401 Need NTLM auth (2)
Server: Microsoft-IIS/5.0
diff --git a/tests/data/test2032 b/tests/data/test2032
index 12fdbee3..8776c3b0 100644
--- a/tests/data/test2032
+++ b/tests/data/test2032
@@ -5,7 +5,6 @@ HTTP
HTTP GET
HTTP Basic auth
HTTP NTLM auth
-flaky
</keywords>
</info>
# Server-side
@@ -23,7 +22,7 @@ WWW-Authenticate: Basic realm="testrealm"
This is a bad password page!
</data100>
-<!-- NTML auth -->
+<!-- NTLM auth -->
<data200>
HTTP/1.1 401 Need Basic or NTLM auth (2)
Server: Microsoft-IIS/5.0
@@ -55,34 +54,9 @@ Finally, this is the real page!
</data1202>
<datacheck>
-HTTP/1.1 401 Need Basic or NTLM auth
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 29
-WWW-Authenticate: NTLM
-WWW-Authenticate: Basic realm="testrealm"
-
-This is a bad password page!
-HTTP/1.1 401 Need Basic or NTLM auth
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 29
-WWW-Authenticate: NTLM
-WWW-Authenticate: Basic realm="testrealm"
-
-This is a bad password page!
-HTTP/1.1 401 NTLM intermediate (2)
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 33
-WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
-
-HTTP/1.1 200 Things are fine in server land
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 32
-
-Finally, this is the real page!
+Data connection 0: 228
+Data connection 1: 228
+Data connection 2: 402
</datacheck>
</reply>
diff --git a/tests/data/test2033 b/tests/data/test2033
index 6c41700a..405d12a2 100644
--- a/tests/data/test2033
+++ b/tests/data/test2033
@@ -23,7 +23,7 @@ WWW-Authenticate: Basic realm="testrealm"
This is a bad password page!
</data100>
-<!-- NTML auth -->
+<!-- NTLM auth -->
<data200>
HTTP/1.1 401 Need Basic or NTLM auth (2)
Server: Microsoft-IIS/5.0
@@ -55,34 +55,9 @@ Finally, this is the real page!
</data1202>
<datacheck>
-HTTP/1.1 401 Need Basic or NTLM auth
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 29
-WWW-Authenticate: NTLM
-WWW-Authenticate: Basic realm="testrealm"
-
-This is a bad password page!
-HTTP/1.1 401 Need Basic or NTLM auth
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 29
-WWW-Authenticate: NTLM
-WWW-Authenticate: Basic realm="testrealm"
-
-This is a bad password page!
-HTTP/1.1 401 NTLM intermediate (2)
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 33
-WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
-
-HTTP/1.1 200 Things are fine in server land
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 32
-
-Finally, this is the real page!
+Data connection 0: 228
+Data connection 1: 228
+Data connection 2: 402
</datacheck>
</reply>
diff --git a/tests/data/test2046 b/tests/data/test2046
index 133c14d7..dcd202f0 100644
--- a/tests/data/test2046
+++ b/tests/data/test2046
@@ -41,8 +41,12 @@ http
idn
</features>
<setenv>
-CHARSET=UTF-8
+LC_ALL=
+LC_CTYPE=en_US.UTF-8
</setenv>
+<precheck>
+perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
+</precheck>
<name>
Connection re-use with IDN host name
</name>
diff --git a/tests/data/test2047 b/tests/data/test2047
index 44229780..fc140486 100644
--- a/tests/data/test2047
+++ b/tests/data/test2047
@@ -42,8 +42,12 @@ http
idn
</features>
<setenv>
-CHARSET=UTF-8
+LC_ALL=
+LC_CTYPE=en_US.UTF-8
</setenv>
+<precheck>
+perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
+</precheck>
<name>
Connection re-use with IDN host name over HTTP proxy
</name>
diff --git a/tests/data/test2055 b/tests/data/test2055
new file mode 100755
index 00000000..cca44942
--- /dev/null
+++ b/tests/data/test2055
@@ -0,0 +1,80 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+HTTP CONNECT
+HTTP proxy
+proxytunnel
+CURLOPT_CONNECT_TO
+SOCKS5
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 Connection established
+
+</connect>
+
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 3
+Content-Type: text/plain
+
+OK
+</data>
+
+<datacheck>
+HTTP/1.1 200 Connection established
+
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Content-Length: 3
+Content-Type: text/plain
+
+OK
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+http-proxy
+socks5
+</server>
+ <name>
+Connect to specific host via SOCKS proxy and HTTP proxy (switch to tunnel mode automatically)
+ </name>
+
+ <command>
+http://www.example.com.2055/2055 --connect-to ::connect.example.com.2055:%HTTPPORT -x %HOSTIP:%PROXYPORT --preproxy socks5://%HOSTIP:%SOCKSPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<proxy>
+CONNECT connect.example.com.2055:%HTTPPORT HTTP/1.1
+Host: connect.example.com.2055:%HTTPPORT
+Proxy-Connection: Keep-Alive
+
+</proxy>
+<protocol>
+GET /2055 HTTP/1.1
+Host: www.example.com.2055
+Accept: */*
+
+</protocol>
+
+</verify>
+</testcase>
diff --git a/tests/data/test207 b/tests/data/test207
index e44385f1..caff8105 100644
--- a/tests/data/test207
+++ b/tests/data/test207
@@ -5,6 +5,7 @@ HTTP
HTTP GET
CURLE_PARTIAL_FILE
FAILURE
+chunked Transfer-Encoding
</keywords>
</info>
#
@@ -37,7 +38,7 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
http
</server>
<name>
-HTTP GET with chunked Transfer-Encoding closed pre-maturely
+HTTP GET with chunked Transfer-Encoding closed prematurely
</name>
<command>
http://%HOSTIP:%HTTPPORT/207
diff --git a/tests/data/test209 b/tests/data/test209
index 3aefac4e..37c9ad22 100644
--- a/tests/data/test209
+++ b/tests/data/test209
@@ -110,7 +110,7 @@ Proxy-Connection: Keep-Alive
CONNECT test.remote.example.com.209:%HTTPPORT HTTP/1.1
Host: test.remote.example.com.209:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
Proxy-Connection: Keep-Alive
GET /path/2090002 HTTP/1.1
diff --git a/tests/data/test213 b/tests/data/test213
index a0de1fad..93aaf64b 100644
--- a/tests/data/test213
+++ b/tests/data/test213
@@ -110,7 +110,7 @@ Proxy-Connection: Keep-Alive
CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0
Host: test.remote.example.com.213:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
Proxy-Connection: Keep-Alive
POST /path/2130002 HTTP/1.1
diff --git a/tests/data/test216 b/tests/data/test216
index 0c4de0a6..404e9c98 100644
--- a/tests/data/test216
+++ b/tests/data/test216
@@ -18,7 +18,7 @@ ftp
FTP upload two files to the same dir
</name>
<command>
--T log/upload.216 ftp://%HOSTIP:%FTPPORT/a/path/216/ -T log/upload.216 ftp://%HOSTIP:%FTPPORT/a/path/216/%2e%2eanotherup
+-T log/upload.216 ftp://%HOSTIP:%FTPPORT/a/path/216/ -T log/upload.216 ftp://%HOSTIP:%FTPPORT/a/path/216/%2e%2eanotherup.216
</command>
<file name="log/upload.216">
upload this file twice
@@ -38,7 +38,7 @@ EPSV
TYPE I
STOR upload.216
EPSV
-STOR ..anotherup
+STOR ..anotherup.216
QUIT
</protocol>
</verify>
diff --git a/tests/data/test218 b/tests/data/test218
index c201e77a..138c4b7b 100644
--- a/tests/data/test218
+++ b/tests/data/test218
@@ -3,6 +3,7 @@
<keywords>
HTTP
HTTP PUT
+chunked Transfer-Encoding
</keywords>
</info>
#
diff --git a/tests/data/test239 b/tests/data/test239
index 6b92f07f..e8fcb770 100644
--- a/tests/data/test239
+++ b/tests/data/test239
@@ -89,7 +89,7 @@ Content-Type: application/x-www-form-urlencoded
POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test243 b/tests/data/test243
index 3496055d..5f852989 100644
--- a/tests/data/test243
+++ b/tests/data/test243
@@ -118,7 +118,7 @@ Content-Type: application/x-www-form-urlencoded
POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test256 b/tests/data/test256
index 2b96ecf3..17ae807d 100644
--- a/tests/data/test256
+++ b/tests/data/test256
@@ -29,9 +29,9 @@ http
HTTP resume request over proxy with auth without server supporting it
</name>
<command option="no-output">
--x http://%HOSTIP:%HTTPPORT http://%HOSTIP:%HTTPPORT/want/256 -C - --no-include -o log/fewl.txt -U daniel:stenberg
+-x http://%HOSTIP:%HTTPPORT http://%HOSTIP:%HTTPPORT/want/256 -C - --no-include -o log/fewl256.txt -U daniel:stenberg
</command>
-<file name="log/fewl.txt">
+<file name="log/fewl256.txt">
This text is here to simulate a partly downloaded file to resume
download on.
</file>
@@ -56,7 +56,7 @@ Proxy-Connection: Keep-Alive
</protocol>
# the download target file must remain untouched
-<file name="log/fewl.txt">
+<file name="log/fewl256.txt">
This text is here to simulate a partly downloaded file to resume
download on.
</file>
diff --git a/tests/data/test265 b/tests/data/test265
index a7c456cc..17176ddd 100644
--- a/tests/data/test265
+++ b/tests/data/test265
@@ -111,7 +111,7 @@ Proxy-Connection: Keep-Alive
CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1
Host: test.remote.example.com.265:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
Proxy-Connection: Keep-Alive
POST /path/2650002 HTTP/1.1
diff --git a/tests/data/test267 b/tests/data/test267
index 7cc8375a..7a45d122 100644
--- a/tests/data/test267
+++ b/tests/data/test267
@@ -97,7 +97,7 @@ Content-Type: application/x-www-form-urlencoded
POST /267 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
Header1: yes
diff --git a/tests/data/test271 b/tests/data/test271
index 06d5a8b4..1557fd0f 100644
--- a/tests/data/test271
+++ b/tests/data/test271
@@ -27,7 +27,7 @@ tftp
TFTP retrieve
</name>
<command>
-tftp://%HOSTIP:%TFTPPORT//271 --trace-ascii log/traceit
+tftp://%HOSTIP:%TFTPPORT//271
</command>
</client>
diff --git a/tests/data/test283 b/tests/data/test283
index 0dc1270f..201df9f7 100644
--- a/tests/data/test283
+++ b/tests/data/test283
@@ -17,7 +17,7 @@ tftp
TFTP retrieve on invalid file
</name>
<command>
-tftp://%HOSTIP:%TFTPPORT//invalid-file --trace-ascii log/traceit --tftp-blksize 1024
+tftp://%HOSTIP:%TFTPPORT//invalid-file --tftp-blksize 1024
</command>
</client>
diff --git a/tests/data/test284 b/tests/data/test284
index 954c9026..9b946ecd 100644
--- a/tests/data/test284
+++ b/tests/data/test284
@@ -51,7 +51,7 @@ tftp
TFTP retrieve of boundary case 512 byte file
</name>
<command>
-tftp://%HOSTIP:%TFTPPORT//284 --trace-ascii log/traceit
+tftp://%HOSTIP:%TFTPPORT//284
</command>
</client>
diff --git a/tests/data/test285 b/tests/data/test285
index d7a4a390..09bfe319 100644
--- a/tests/data/test285
+++ b/tests/data/test285
@@ -16,7 +16,7 @@ tftp
TFTP send
</name>
<command>
--T log/test285.txt tftp://%HOSTIP:%TFTPPORT// --trace-ascii log/traceit
+-T log/test285.txt tftp://%HOSTIP:%TFTPPORT//
</command>
<file name="log/test285.txt">
a chunk of
diff --git a/tests/data/test286 b/tests/data/test286
index b909fd3d..505352a7 100644
--- a/tests/data/test286
+++ b/tests/data/test286
@@ -16,7 +16,7 @@ tftp
TFTP send of boundary case 512 byte file
</name>
<command>
--T log/test286.txt tftp://%HOSTIP:%TFTPPORT// --trace-ascii log/traceit
+-T log/test286.txt tftp://%HOSTIP:%TFTPPORT//
</command>
<file name="log/test286.txt">
A chunk of data which exactly fits into
diff --git a/tests/data/test31 b/tests/data/test31
index 2289d56d..54e360a4 100644
--- a/tests/data/test31
+++ b/tests/data/test31
@@ -80,7 +80,7 @@ TZ=GMT
http://%HOSTIP:%HTTPPORT/we/want/31 -b none -c log/jar31.txt
</command>
<precheck>
-perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}'
+perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
</precheck>
</client>
diff --git a/tests/data/test38 b/tests/data/test38
index 848150a3..db257f2f 100644
--- a/tests/data/test38
+++ b/tests/data/test38
@@ -28,9 +28,9 @@ http
HTTP resume request without server supporting it
</name>
<command option="no-output">
-http://%HOSTIP:%HTTPPORT/want/38 -C - --no-include -o log/fewl.txt
+http://%HOSTIP:%HTTPPORT/want/38 -C - --no-include -o log/fewl38.txt
</command>
-<file name="log/fewl.txt">
+<file name="log/fewl38.txt">
This text is here to simulate a partly downloaded file to resume
download on.
</file>
@@ -53,7 +53,7 @@ Accept: */*
</protocol>
# the download target file must remain untouched
-<file name="log/fewl.txt">
+<file name="log/fewl38.txt">
This text is here to simulate a partly downloaded file to resume
download on.
</file>
diff --git a/tests/data/test47 b/tests/data/test47
index 0a6d4da3..bd779d34 100644
--- a/tests/data/test47
+++ b/tests/data/test47
@@ -8,7 +8,7 @@ HTTP/1.0
</info>
#
# Server-side
-<reply name="47">
+<reply>
<data>
HTTP/1.0 200 OK swsclose
Date: Thu, 09 Nov 2010 14:49:00 GMT
diff --git a/tests/data/test500 b/tests/data/test500
index faf3d727..56a5c913 100644
--- a/tests/data/test500
+++ b/tests/data/test500
@@ -7,7 +7,7 @@ HTTP GET
</info>
#
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
diff --git a/tests/data/test501 b/tests/data/test501
index 9c9dcc9e..674bc43b 100644
--- a/tests/data/test501
+++ b/tests/data/test501
@@ -6,7 +6,7 @@ missing URL
</info>
#
# Server-side
-<reply name="1">
+<reply>
</reply>
# Client-side
diff --git a/tests/data/test506 b/tests/data/test506
index 96e690b2..40eee253 100644
--- a/tests/data/test506
+++ b/tests/data/test506
@@ -55,6 +55,11 @@ run 3: overwrite cookie 1 and 4, set cookie 6 with and without tailmatch
<server>
http
</server>
+# don't run this with the threaded-resolver since the events might trigger in
+# a different order!
+<features>
+!threaded-resolver
+</features>
<name>
HTTP with shared cookie list (and dns cache)
</name>
diff --git a/tests/data/test510 b/tests/data/test510
index 5ba0a7fe..a7acbe80 100644
--- a/tests/data/test510
+++ b/tests/data/test510
@@ -3,6 +3,7 @@
<keywords>
HTTP
HTTP POST
+chunked Transfer-Encoding
</keywords>
</info>
diff --git a/tests/data/test540 b/tests/data/test540
index 8decaea9..8391cbe7 100644
--- a/tests/data/test540
+++ b/tests/data/test540
@@ -11,6 +11,9 @@ multi
# Server-side
<reply>
+<servercmd>
+connection-monitor
+</servercmd>
# this is returned first since we get no proxy-auth
<data>
@@ -40,6 +43,10 @@ Content-Length: 21
Server: no
Nice proxy auth sir!
+HTTP/1.1 407 Authorization Required to proxy me my dear
+Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
+Content-Length: 33
+
HTTP/1.1 200 OK
Content-Length: 21
Server: no
@@ -88,10 +95,16 @@ Proxy-Connection: Keep-Alive
GET http://test.remote.example.com/path/540 HTTP/1.1
Host: custom.set.host.name
+Accept: */*
+Proxy-Connection: Keep-Alive
+
+GET http://test.remote.example.com/path/540 HTTP/1.1
+Host: custom.set.host.name
Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"
Accept: */*
Proxy-Connection: Keep-Alive
+[DISCONNECT]
</protocol>
</verify>
</testcase>
diff --git a/tests/data/test547 b/tests/data/test547
index cee22c6f..841c3ff7 100644
--- a/tests/data/test547
+++ b/tests/data/test547
@@ -122,7 +122,7 @@ Content-Type: application/x-www-form-urlencoded
POST http://test.remote.example.com/path/547 HTTP/1.1
Host: test.remote.example.com
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test548 b/tests/data/test548
index 34cf5e2e..9d1f258a 100644
--- a/tests/data/test548
+++ b/tests/data/test548
@@ -122,7 +122,7 @@ Content-Type: application/x-www-form-urlencoded
POST http://test.remote.example.com/path/548 HTTP/1.1
Host: test.remote.example.com
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test552 b/tests/data/test552
index b44ca345..5d1478bd 100644
--- a/tests/data/test552
+++ b/tests/data/test552
Binary files differ
diff --git a/tests/data/test554 b/tests/data/test554
index fdbd1868..3419e5e0 100644
--- a/tests/data/test554
+++ b/tests/data/test554
@@ -61,7 +61,7 @@ http://%HOSTIP:%HTTPPORT/554
s/^--------------------------[a-z0-9]*/------------------------------/
s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
</strippart>
-# Note that the stripping above removes 12 bytes from every occurance of the
+# Note that the stripping above removes 12 bytes from every occurrence of the
# boundary string and since 5 of them are in the body contents, we see
# (5*12) == 60 bytes less
<protocol>
diff --git a/tests/data/test555 b/tests/data/test555
index 0f3bb07f..3aa2ef14 100644
--- a/tests/data/test555
+++ b/tests/data/test555
@@ -1,6 +1,6 @@
<testcase>
# NOTE: this test case is a duplicate of 547 but the tool is built to use the
-# multi interface instead of easy, but that shouldn't be noticable at all in
+# multi interface instead of easy, but that shouldn't be noticeable at all in
# this file!
<info>
<keywords>
@@ -131,7 +131,7 @@ Content-Type: application/x-www-form-urlencoded
POST http://test.remote.example.com/path/555 HTTP/1.1
Host: test.remote.example.com
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test559 b/tests/data/test559
new file mode 100644
index 00000000..f08a5f8f
--- /dev/null
+++ b/tests/data/test559
@@ -0,0 +1,50 @@
+<testcase>
+<info>
+<keywords>
+CURLOPT_BUFFERSIZE
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 2049
+Connection: close
+Content-Type: text/html
+Silly-header: ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
+
+ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib559
+</tool>
+
+<name>
+use tiny CURLOPT_BUFFERSIZE
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/559
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+</verify>
+
+</testcase>
diff --git a/tests/data/test563 b/tests/data/test563
index 78515231..cecbedc2 100644
--- a/tests/data/test563
+++ b/tests/data/test563
@@ -23,8 +23,8 @@ hello
# Client-side
<client>
<server>
-ftp
http
+ftp
</server>
<tool>
lib562
diff --git a/tests/data/test565 b/tests/data/test565
index 6e215a24..ae8518c7 100644
--- a/tests/data/test565
+++ b/tests/data/test565
@@ -4,6 +4,7 @@
HTTP
HTTP POST
HTTP Digest auth
+chunked Transfer-Encoding
</keywords>
</info>
#
diff --git a/tests/data/test569 b/tests/data/test569
index c4c62a4c..ea6cd0bb 100644
--- a/tests/data/test569
+++ b/tests/data/test569
@@ -66,7 +66,7 @@ lib569
RTSP Session ID parsing
</name>
<command>
-rtsp://%HOSTIP:%RTSPPORT/569 log/idfile.txt
+rtsp://%HOSTIP:%RTSPPORT/569 log/idfile569.txt
</command>
</client>
@@ -100,7 +100,7 @@ CSeq: 6
Session: A
</protocol>
-<file name="log/idfile.txt">
+<file name="log/idfile569.txt">
Got Session ID: [00.+1-am-aSe55ion_id\$yes-i-am\$]
Got Session ID: [\$extraspaces]
Got Session ID: [A]
diff --git a/tests/data/test571 b/tests/data/test571
index 5e138cdf..494ac416 100644
--- a/tests/data/test571
+++ b/tests/data/test571
@@ -78,7 +78,7 @@ lib571
RTSP RTP Interleaving Test
</name>
<command>
-rtsp://%HOSTIP:%RTSPPORT/571 log/protofile.txt
+rtsp://%HOSTIP:%RTSPPORT/571 log/protofile571.txt
</command>
</client>
@@ -99,7 +99,7 @@ RTP: message size 85, channel 0
RTP: message size 24, channel 1
</stdout>
-<file name="log/protofile.txt">
+<file name="log/protofile571.txt">
$99
</file>
</verify>
diff --git a/tests/data/test578 b/tests/data/test578
index e4ee4ac1..abbe49a3 100644
--- a/tests/data/test578
+++ b/tests/data/test578
@@ -7,7 +7,7 @@ HTTP POST
</info>
#
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
diff --git a/tests/data/test59 b/tests/data/test59
index 1924650f..9c960177 100644
--- a/tests/data/test59
+++ b/tests/data/test59
@@ -7,7 +7,7 @@ HTTP GET
</info>
#
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.0 200 OK swsclose
Date: Thu, 09 Nov 2010 14:49:00 GMT
diff --git a/tests/data/test590 b/tests/data/test590
index 55ea4f0e..48144d40 100644
--- a/tests/data/test590
+++ b/tests/data/test590
@@ -115,7 +115,7 @@ Proxy-Connection: Keep-Alive
GET http://test.remote.example.com/path/590 HTTP/1.1
Host: test.remote.example.com
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAAAgACAPYAAAAIAAgA+AAAAAAAAAAAAAAABoKBAB3Hr6SDn3NDNkgebbaP88ExMjM0MjIzNFIW4N7aYT44bAIg1jt2blUBAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAbWVjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAAAgACAPYAAAAIAAgA+AAAAAAAAAAAAAAABoKBAPfkdFqeIuYPjDr2ZbNxCag0MzIxNTMyMQjxxEdSYaUsgjpD8o53NrMBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAbWVjdXJsaG9zdA==
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test599 b/tests/data/test599
index 9ce8b234..9a6c4126 100644
--- a/tests/data/test599
+++ b/tests/data/test599
@@ -3,6 +3,7 @@
<keywords>
HTTP
HTTP POST
+chunked Transfer-Encoding
</keywords>
</info>
#
diff --git a/tests/data/test60 b/tests/data/test60
index df9eeee1..0dd717f8 100644
--- a/tests/data/test60
+++ b/tests/data/test60
@@ -3,6 +3,7 @@
<keywords>
HTTP
HTTP PUT
+chunked Transfer-Encoding
</keywords>
</info>
diff --git a/tests/data/test67 b/tests/data/test67
index b3431111..739b82c2 100644
--- a/tests/data/test67
+++ b/tests/data/test67
@@ -93,7 +93,7 @@ Accept: */*
GET /67 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
diff --git a/tests/data/test68 b/tests/data/test68
index acd710fe..239da781 100644
--- a/tests/data/test68
+++ b/tests/data/test68
@@ -92,7 +92,7 @@ Accept: */*
GET /68 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
diff --git a/tests/data/test69 b/tests/data/test69
index 887a4603..c0503f7f 100644
--- a/tests/data/test69
+++ b/tests/data/test69
@@ -114,7 +114,7 @@ Accept: */*
GET /69 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
diff --git a/tests/data/test700 b/tests/data/test700
index ce6f894f..ac63fa59 100644
--- a/tests/data/test700
+++ b/tests/data/test700
@@ -9,7 +9,7 @@ SOCKS4
#
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
diff --git a/tests/data/test701 b/tests/data/test701
index 014aca24..799597f3 100644
--- a/tests/data/test701
+++ b/tests/data/test701
@@ -9,7 +9,7 @@ SOCKS5
#
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
diff --git a/tests/data/test708 b/tests/data/test708
index 716d9aec..e8bffc36 100644
--- a/tests/data/test708
+++ b/tests/data/test708
@@ -9,7 +9,7 @@ SOCKS4
#
# Server-side
-<reply name="1">
+<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
diff --git a/tests/data/test712 b/tests/data/test712
index c62e9f2c..252c9ef0 100644
--- a/tests/data/test712
+++ b/tests/data/test712
@@ -6,7 +6,6 @@ FTP
PASV
RETR
SOCKS5
-all_proxy
</keywords>
</info>
#
diff --git a/tests/data/test713 b/tests/data/test713
new file mode 100755
index 00000000..bb79994f
--- /dev/null
+++ b/tests/data/test713
@@ -0,0 +1,49 @@
+<testcase>
+#based off test 712
+<info>
+<keywords>
+FTP
+PASV
+RETR
+SOCKS5
+CURLOPT_CONNECT_TO
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+silly content
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+socks5
+</server>
+ <name>
+FTP fetch with --proxy set to socks5:// and with --connect-to
+ </name>
+ <command>
+ftp://ftp.example.com/713 --connect-to ::%HOSTIP:%FTPPORT --proxy socks5://%HOSTIP:%SOCKSPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+TYPE I
+SIZE 713
+RETR 713
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test714 b/tests/data/test714
new file mode 100755
index 00000000..efec0322
--- /dev/null
+++ b/tests/data/test714
@@ -0,0 +1,67 @@
+<testcase>
+#based off test 712
+<info>
+<keywords>
+FTP
+PASV
+RETR
+HTTP
+HTTP CONNECT
+proxytunnel
+CURLOPT_CONNECT_TO
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 Connection established
+
+</connect>
+
+<data nocheck="yes">
+silly content
+</data>
+
+<datacheck>
+HTTP/1.1 200 Connection established
+
+HTTP/1.1 200 Connection established
+
+silly content
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+http-proxy
+</server>
+<features>
+http
+</features>
+ <name>
+FTP fetch with --proxy set to http:// and with --connect-to
+ </name>
+ <command>
+ftp://ftp.example.com.714/714 --connect-to ::connect.example.com.714:%FTPPORT --proxytunnel --proxy http://%HOSTIP:%PROXYPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+TYPE I
+SIZE 714
+RETR 714
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test715 b/tests/data/test715
new file mode 100755
index 00000000..56936b94
--- /dev/null
+++ b/tests/data/test715
@@ -0,0 +1,69 @@
+<testcase>
+#based off test 712
+<info>
+<keywords>
+FTP
+PASV
+RETR
+HTTP
+HTTP CONNECT
+proxytunnel
+SOCKS5
+CURLOPT_CONNECT_TO
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<connect>
+HTTP/1.1 200 Connection established
+
+</connect>
+
+<data nocheck="yes">
+silly content
+</data>
+
+<datacheck>
+HTTP/1.1 200 Connection established
+
+HTTP/1.1 200 Connection established
+
+silly content
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+ftp
+http-proxy
+socks5
+</server>
+<features>
+http
+</features>
+ <name>
+FTP fetch with --preproxy, --proxy and --connect-to
+ </name>
+ <command>
+ftp://ftp.example.com.715/715 --connect-to ::connect.example.com.715:%FTPPORT --proxytunnel --proxy %HOSTIP:%PROXYPORT --preproxy socks5://%HOSTIP:%SOCKSPORT
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+TYPE I
+SIZE 715
+RETR 715
+QUIT
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test81 b/tests/data/test81
index dc054d29..7483bfb3 100644
--- a/tests/data/test81
+++ b/tests/data/test81
@@ -93,7 +93,7 @@ Proxy-Connection: Keep-Alive
GET http://%HOSTIP:%HTTPPORT/81 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
Proxy-Connection: Keep-Alive
diff --git a/tests/data/test822 b/tests/data/test822
index 65ac43e5..a6c0407e 100644
--- a/tests/data/test822
+++ b/tests/data/test822
@@ -14,7 +14,7 @@ SASL AUTH NTLM
AUTH NTLM
REPLY AUTHENTICATE +
REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
-REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== A002 OK AUTHENTICATE completed
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== A002 OK AUTHENTICATE completed
</servercmd>
<data>
From: me@somewhere
@@ -62,7 +62,7 @@ chkhostname curlhost
A001 CAPABILITY
A002 AUTHENTICATE NTLM
TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
A003 SELECT 822
A004 FETCH 1 BODY[]
A005 LOGOUT
diff --git a/tests/data/test823 b/tests/data/test823
index 6f8249b1..25c59ec6 100644
--- a/tests/data/test823
+++ b/tests/data/test823
@@ -14,7 +14,7 @@ RFC2831
<servercmd>
AUTH DIGEST-MD5
REPLY AUTHENTICATE + cmVhbG09ImN1cmwiLG5vbmNlPSI1MzAwZDE3YTFkNjk1YmQ0MTFlNGNkZjk2Zjk1NDhjMjNjZWQ2MTc1IixhbGdvcml0aG09bWQ1LXNlc3MscW9wPSJhdXRoIg==
-REPLY dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM0MzMzMjMyMzQzMzMyMzMzNDMzMzIzNCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJpbWFwL2N1cmwiLHJlc3BvbnNlPWJlYjMzYmY2MWFhMDgzNzZmZWE4ZjJkM2MwODliMjFmLHFvcD1hdXRo +
+REPLY dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM1MzMzMjMxMzYzMzMyMzEzNzMzMzIzMSIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJpbWFwL2N1cmwiLHJlc3BvbnNlPTVlNzk5N2ZhZDZjMzNiZWJmZjk3OWJkY2I4ZmU3MTZiLHFvcD1hdXRo +
REPLY A002 OK AUTHENTICATE completed
</servercmd>
<data>
@@ -53,7 +53,7 @@ IMAP DIGEST-MD5 authentication
<protocol>
A001 CAPABILITY
A002 AUTHENTICATE DIGEST-MD5
-dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM0MzMzMjMyMzQzMzMyMzMzNDMzMzIzNCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJpbWFwL2N1cmwiLHJlc3BvbnNlPWJlYjMzYmY2MWFhMDgzNzZmZWE4ZjJkM2MwODliMjFmLHFvcD1hdXRo
+dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM1MzMzMjMxMzYzMzMyMzEzNzMzMzIzMSIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJpbWFwL2N1cmwiLHJlc3BvbnNlPTVlNzk5N2ZhZDZjMzNiZWJmZjk3OWJkY2I4ZmU3MTZiLHFvcD1hdXRo
A003 SELECT 823
A004 FETCH 1 BODY[]
diff --git a/tests/data/test827 b/tests/data/test827
index 778e7658..5005271e 100644
--- a/tests/data/test827
+++ b/tests/data/test827
@@ -15,7 +15,7 @@ SASL-IR
AUTH NTLM
CAPA SASL-IR
REPLY AUTHENTICATE + TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
-REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== A002 OK AUTHENTICATE completed
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== A002 OK AUTHENTICATE completed
</servercmd>
<data>
From: me@somewhere
@@ -62,7 +62,7 @@ chkhostname curlhost
<protocol>
A001 CAPABILITY
A002 AUTHENTICATE NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
A003 SELECT 827
A004 FETCH 1 BODY[]
A005 LOGOUT
diff --git a/tests/data/test842 b/tests/data/test842
index b98d5a25..d5aabbca 100644
--- a/tests/data/test842
+++ b/tests/data/test842
@@ -40,7 +40,7 @@ IMAP OAuth 2.0 (OAUTHBEARER) authentication
<command>
'imap://%HOSTIP:%IMAPPORT/842/;UID=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
</command>
-# The protocol section doesn't support ways of specifing the raw data in the
+# The protocol section doesn't support ways of specifying the raw data in the
# base64 encoded message so we must assert this
<precheck>
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%IMAPPORT' ne '9003' );"
diff --git a/tests/data/test843 b/tests/data/test843
index 266aaa7c..a1c31a45 100644
--- a/tests/data/test843
+++ b/tests/data/test843
@@ -41,7 +41,7 @@ IMAP OAuth 2.0 (OAUTHBEARER) authentication with initial response
<command>
'imap://%HOSTIP:%IMAPPORT/843/;UID=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
</command>
-# The protocol section doesn't support ways of specifing the raw data in the
+# The protocol section doesn't support ways of specifying the raw data in the
# base64 encoded message so we must assert this
<precheck>
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%IMAPPORT' ne '9003' );"
diff --git a/tests/data/test844 b/tests/data/test844
index 4acd6672..055a9d2f 100644
--- a/tests/data/test844
+++ b/tests/data/test844
@@ -32,7 +32,7 @@ IMAP OAuth 2.0 (OAUTHBEARER) failure as continuation
<command>
'imap://%HOSTIP:%IMAPPORT/844/;UID=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
</command>
-# The protocol section doesn't support ways of specifing the raw data in the
+# The protocol section doesn't support ways of specifying the raw data in the
# base64 encoded message so we must assert this
<precheck>
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%IMAPPORT' ne '9003' );"
diff --git a/tests/data/test845 b/tests/data/test845
index 152ab582..e23b3d69 100644
--- a/tests/data/test845
+++ b/tests/data/test845
@@ -33,7 +33,7 @@ IMAP OAuth 2.0 (OAUTHBEARER) failure as continuation with initial response
<command>
'imap://%HOSTIP:%IMAPPORT/845/;UID=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
</command>
-# The protocol section doesn't support ways of specifing the raw data in the
+# The protocol section doesn't support ways of specifying the raw data in the
# base64 encoded message so we must assert this
<precheck>
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%IMAPPORT' ne '9003' );"
diff --git a/tests/data/test868 b/tests/data/test868
index 591bd509..30426fb6 100644
--- a/tests/data/test868
+++ b/tests/data/test868
@@ -16,7 +16,7 @@ RFC5034
AUTH NTLM
REPLY AUTH +
REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= + TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
-REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== +OK Login successful
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== +OK Login successful
</servercmd>
<data>
From: me@somewhere
@@ -64,7 +64,7 @@ chkhostname curlhost
CAPA
AUTH NTLM
TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
RETR 868
QUIT
</protocol>
diff --git a/tests/data/test869 b/tests/data/test869
index cba33b35..ecc422ca 100644
--- a/tests/data/test869
+++ b/tests/data/test869
@@ -16,7 +16,7 @@ RFC5034
<servercmd>
AUTH DIGEST-MD5
REPLY AUTH + cmVhbG09ImN1cmwiLG5vbmNlPSI1MzAwZDE3YTFkNjk1YmQ0MTFlNGNkZjk2Zjk1NDhjMjNjZWQ2MTc1IixhbGdvcml0aG09bWQ1LXNlc3MscW9wPSJhdXRoIg==
-REPLY dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM0MzMzMjMyMzQzMzMyMzMzNDMzMzIzNCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJwb3AvY3VybCIscmVzcG9uc2U9MDE2MTNmOWEwNTgxODNmYTc2NmFkNWEwOThiNmE3MTUscW9wPWF1dGg= +
+REPLY dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM1MzMzMjMxMzYzMzMyMzEzNzMzMzIzMSIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJwb3AvY3VybCIscmVzcG9uc2U9YzNhMGFiZTc5NDYyNTIyNGY5Njg3YTYzMTc3ZmRhNWIscW9wPWF1dGg= +
REPLY +OK Login successful
</servercmd>
<data>
@@ -55,7 +55,7 @@ pop3://%HOSTIP:%POP3PORT/869 -u user:secret
<protocol>
CAPA
AUTH DIGEST-MD5
-dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM0MzMzMjMyMzQzMzMyMzMzNDMzMzIzNCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJwb3AvY3VybCIscmVzcG9uc2U9MDE2MTNmOWEwNTgxODNmYTc2NmFkNWEwOThiNmE3MTUscW9wPWF1dGg=
+dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM1MzMzMjMxMzYzMzMyMzEzNzMzMzIzMSIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJwb3AvY3VybCIscmVzcG9uc2U9YzNhMGFiZTc5NDYyNTIyNGY5Njg3YTYzMTc3ZmRhNWIscW9wPWF1dGg=
RETR 869
QUIT
diff --git a/tests/data/test87 b/tests/data/test87
index 5e6aef30..ee5be78c 100644
--- a/tests/data/test87
+++ b/tests/data/test87
@@ -40,7 +40,7 @@ http
urlglob with out of range -o #[num] usage
</name>
<command option="no-output">
-"http://%HOSTIP:%HTTPPORT/[870001-870002]" -o "log/dumpit#2.dump"
+"http://%HOSTIP:%HTTPPORT/[870001-870002]" -o "log/dumpit87-#2.dump"
</command>
</client>
@@ -50,7 +50,7 @@ urlglob with out of range -o #[num] usage
# survives
#
<verify>
-<file name="log/dumpit#2.dump">
+<file name="log/dumpit87-#2.dump">
HTTP/1.1 200 OK
Funny-head: yesyes
Content-Length: 16
diff --git a/tests/data/test873 b/tests/data/test873
index a91b3608..448e8e20 100644
--- a/tests/data/test873
+++ b/tests/data/test873
@@ -16,7 +16,7 @@ RFC5034
<servercmd>
AUTH NTLM
REPLY AUTH + TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
-REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== +OK Login successful
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== +OK Login successful
</servercmd>
<data>
From: me@somewhere
@@ -63,7 +63,7 @@ chkhostname curlhost
<protocol>
CAPA
AUTH NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
RETR 873
QUIT
</protocol>
diff --git a/tests/data/test887 b/tests/data/test887
index b39dc21c..fed4e3d9 100644
--- a/tests/data/test887
+++ b/tests/data/test887
@@ -42,7 +42,7 @@ POP3 OAuth 2.0 (OAUTHBEARER) authentication
<command>
pop3://%HOSTIP:%POP3PORT/887 -u user --oauth2-bearer mF_9.B5f-4.1JqM
</command>
-# The protocol section doesn't support ways of specifing the raw data in the
+# The protocol section doesn't support ways of specifying the raw data in the
# base64 encoded message so we must assert this
<precheck>
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%POP3PORT' ne '9001' );"
diff --git a/tests/data/test888 b/tests/data/test888
index 1a359df2..c52974f1 100644
--- a/tests/data/test888
+++ b/tests/data/test888
@@ -42,7 +42,7 @@ POP3 OAuth 2.0 (OAUTHBEARER) authentication with initial response
<command>
pop3://%HOSTIP:%POP3PORT/888 -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir
</command>
-# The protocol section doesn't support ways of specifing the raw data in the
+# The protocol section doesn't support ways of specifying the raw data in the
# base64 encoded message so we must assert this
<precheck>
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%POP3PORT' ne '9001' );"
diff --git a/tests/data/test889 b/tests/data/test889
index 5fbd0ca8..da26a372 100644
--- a/tests/data/test889
+++ b/tests/data/test889
@@ -34,7 +34,7 @@ POP3 OAuth 2.0 (OAUTHBEARER) failure as continuation
<command>
pop3://%HOSTIP:%POP3PORT/889 -u user --oauth2-bearer mF_9.B5f-4.1JqM
</command>
-# The protocol section doesn't support ways of specifing the raw data in the
+# The protocol section doesn't support ways of specifying the raw data in the
# base64 encoded message so we must assert this
<precheck>
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%POP3PORT' ne '9001' );"
diff --git a/tests/data/test89 b/tests/data/test89
index c7f69a2b..1443a976 100644
--- a/tests/data/test89
+++ b/tests/data/test89
@@ -126,7 +126,7 @@ Accept: */*
GET /89 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
@@ -138,7 +138,7 @@ Accept: */*
GET /you/890010 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBALIBPdoGahtQQ8gQ7TJrKTYzMjM0NDIzNBFnpKw8B1BLcb456sVeozgBAQAAAAAAAACAPtXesZ0BMzIzNDQyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAOv8cm3wOKJ5nhWWScOgdUI2MzIxNzMyMVgNcU0f3zxHeccvitN7zHkBAQAAAAAAAACAPtXesZ0BNjMyMTczMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS
Accept: */*
diff --git a/tests/data/test890 b/tests/data/test890
index 6392dfa0..30aa0b23 100644
--- a/tests/data/test890
+++ b/tests/data/test890
@@ -34,7 +34,7 @@ POP3 OAuth 2.0 (OAUTHBEARER) failure as continuation with initial response
<command>
pop3://%HOSTIP:%POP3PORT/890 -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir
</command>
-# The protocol section doesn't support ways of specifing the raw data in the
+# The protocol section doesn't support ways of specifying the raw data in the
# base64 encoded message so we must assert this
<precheck>
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%POP3PORT' ne '9001' );"
diff --git a/tests/data/test90 b/tests/data/test90
index 3b1231a3..f18e3dfa 100644
--- a/tests/data/test90
+++ b/tests/data/test90
@@ -168,7 +168,7 @@ Accept: */*
GET /90 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
@@ -184,7 +184,7 @@ Accept: */*
GET /you/900010 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBALIBPdoGahtQQ8gQ7TJrKTYzMjM0NDIzNBFnpKw8B1BLcb456sVeozgBAQAAAAAAAACAPtXesZ0BMzIzNDQyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAOv8cm3wOKJ5nhWWScOgdUI2MzIxNzMyMVgNcU0f3zxHeccvitN7zHkBAQAAAAAAAACAPtXesZ0BNjMyMTczMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS
Accept: */*
diff --git a/tests/data/test906 b/tests/data/test906
index 3c04d15e..67745613 100644
--- a/tests/data/test906
+++ b/tests/data/test906
@@ -15,7 +15,7 @@ RFC4954
AUTH NTLM
REPLY AUTH 334 NTLM supported
REPLY TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 334 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
-REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== 235 Authenticated
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== 235 Authenticated
</servercmd>
</reply>
@@ -57,7 +57,7 @@ chkhostname curlhost
EHLO 906
AUTH NTLM
TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
MAIL FROM:<sender@example.com>
RCPT TO:<recipient@example.com>
DATA
diff --git a/tests/data/test907 b/tests/data/test907
index 65c87b40..c19e1e11 100644
--- a/tests/data/test907
+++ b/tests/data/test907
@@ -15,7 +15,7 @@ RFC4954
<servercmd>
AUTH DIGEST-MD5
REPLY AUTH 334 cmVhbG09ImN1cmwiLG5vbmNlPSI1MzAwZDE3YTFkNjk1YmQ0MTFlNGNkZjk2Zjk1NDhjMjNjZWQ2MTc1IixhbGdvcml0aG09bWQ1LXNlc3MscW9wPSJhdXRoIg==
-REPLY dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM0MzMzMjMyMzQzMzMyMzMzNDMzMzIzNCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJzbXRwL2N1cmwiLHJlc3BvbnNlPWJkYmExNzYwOGY4NmMyZjEzYTczMTM1NzdkZjkyMzNkLHFvcD1hdXRo 334
+REPLY dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM1MzMzMjMxMzYzMzMyMzEzNzMzMzIzMSIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJzbXRwL2N1cmwiLHJlc3BvbnNlPTk0M2YxNjk1OWYxY2M2ZjA3ZTZmMDk0ZjVkYmQ0NzNlLHFvcD1hdXRo 334
REPLY 235 Authenticated
</servercmd>
</reply>
@@ -48,7 +48,7 @@ smtp://%HOSTIP:%SMTPPORT/907 --mail-rcpt recipient@example.com --mail-from sende
<protocol>
EHLO 907
AUTH DIGEST-MD5
-dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM0MzMzMjMyMzQzMzMyMzMzNDMzMzIzNCIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJzbXRwL2N1cmwiLHJlc3BvbnNlPWJkYmExNzYwOGY4NmMyZjEzYTczMTM1NzdkZjkyMzNkLHFvcD1hdXRo
+dXNlcm5hbWU9InVzZXIiLHJlYWxtPSJjdXJsIixub25jZT0iNTMwMGQxN2ExZDY5NWJkNDExZTRjZGY5NmY5NTQ4YzIzY2VkNjE3NSIsY25vbmNlPSIzNDMzMzIzMTM1MzMzMjMxMzYzMzMyMzEzNzMzMzIzMSIsbmM9IjAwMDAwMDAxIixkaWdlc3QtdXJpPSJzbXRwL2N1cmwiLHJlc3BvbnNlPTk0M2YxNjk1OWYxY2M2ZjA3ZTZmMDk0ZjVkYmQ0NzNlLHFvcD1hdXRo
MAIL FROM:<sender@example.com>
RCPT TO:<recipient@example.com>
diff --git a/tests/data/test91 b/tests/data/test91
index 35195ad3..cd281425 100644
--- a/tests/data/test91
+++ b/tests/data/test91
@@ -115,7 +115,7 @@ Accept: */*
GET /91 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAgACAD2AAAABgAGAP4AAAAIAAgABAEAAAAAAAAAAAAABoKBAI9byKoy6qyyS+1JCYN1XYoxMjM0MjIzNEYCr85trkciZ2j/7/T8MmUBAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAbXlkb21haW5teXNlbGZjdXJsaG9zdA==
+Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAgACAD2AAAABgAGAP4AAAAIAAgABAEAAAAAAAAAAAAABoKBALJ3z6fQtyQwuFxoPXldKtQ0MzIxNTMyMWnrkzKLCbw9LP1SuH/yJwABAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAbXlkb21haW5teXNlbGZjdXJsaG9zdA==
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
Accept: */*
diff --git a/tests/data/test921 b/tests/data/test921
index 91a7c6f4..e11fe4fb 100644
--- a/tests/data/test921
+++ b/tests/data/test921
@@ -15,7 +15,7 @@ RFC4954
<servercmd>
AUTH NTLM
REPLY AUTH 334 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
-REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== 235 Authenticated
+REPLY TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== 235 Authenticated
</servercmd>
</reply>
@@ -56,7 +56,7 @@ chkhostname curlhost
<protocol>
EHLO 921
AUTH NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
-TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
+TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
MAIL FROM:<sender@example.com>
RCPT TO:<recipient@example.com>
DATA
diff --git a/tests/data/test946 b/tests/data/test946
index d34bd914..da4b924f 100644
--- a/tests/data/test946
+++ b/tests/data/test946
@@ -35,7 +35,7 @@ mail body
<command>
smtp://%HOSTIP:%SMTPPORT/946 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -T -
</command>
-# The protocol section doesn't support ways of specifing the raw data in the
+# The protocol section doesn't support ways of specifying the raw data in the
# base64 encoded message so we must assert this
<precheck>
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%SMTPPORT' ne '9005' );"
diff --git a/tests/data/test947 b/tests/data/test947
index 03648a41..d33a5593 100644
--- a/tests/data/test947
+++ b/tests/data/test947
@@ -35,7 +35,7 @@ mail body
<command>
smtp://%HOSTIP:%SMTPPORT/947 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir -T -
</command>
-# The protocol section doesn't support ways of specifing the raw data in the
+# The protocol section doesn't support ways of specifying the raw data in the
# base64 encoded message so we must assert this
<precheck>
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%SMTPPORT' ne '9005' );"
diff --git a/tests/data/test948 b/tests/data/test948
index 51bb41ad..9c1e31de 100644
--- a/tests/data/test948
+++ b/tests/data/test948
@@ -36,7 +36,7 @@ mail body
<command>
smtp://%HOSTIP:%SMTPPORT/948 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -T -
</command>
-# The protocol section doesn't support ways of specifing the raw data in the
+# The protocol section doesn't support ways of specifying the raw data in the
# base64 encoded message so we must assert this
<precheck>
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%SMTPPORT' ne '9005' );"
diff --git a/tests/data/test949 b/tests/data/test949
index f84c42b4..9145d61e 100644
--- a/tests/data/test949
+++ b/tests/data/test949
@@ -36,7 +36,7 @@ mail body
<command>
smtp://%HOSTIP:%SMTPPORT/949 --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM --sasl-ir -T -
</command>
-# The protocol section doesn't support ways of specifing the raw data in the
+# The protocol section doesn't support ways of specifying the raw data in the
# base64 encoded message so we must assert this
<precheck>
perl -e "print 'Test requires default test server host and port' if ( '%HOSTIP' ne '127.0.0.1' || '%SMTPPORT' ne '9005' );"
diff --git a/tests/extern-scan.pl b/tests/extern-scan.pl
index 7a5c2914..88594ed6 100755
--- a/tests/extern-scan.pl
+++ b/tests/extern-scan.pl
@@ -49,7 +49,9 @@ sub scanheader {
open H, "<$f" || die;
while(<H>) {
if (/^(CURL_EXTERN.*)/) {
- print "$1\n";
+ my $decl = $1;
+ $decl =~ s/\r$//;
+ print "$decl\n";
}
}
close H;
diff --git a/tests/fuzz/CMakeLists.txt b/tests/fuzz/CMakeLists.txt
new file mode 100644
index 00000000..aefedf26
--- /dev/null
+++ b/tests/fuzz/CMakeLists.txt
@@ -0,0 +1 @@
+# FIXME, probably adapt from file in ../unit
diff --git a/tests/fuzz/Makefile.am b/tests/fuzz/Makefile.am
new file mode 100644
index 00000000..0d20d792
--- /dev/null
+++ b/tests/fuzz/Makefile.am
@@ -0,0 +1,57 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.haxx.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign nostdinc
+
+# Specify our include paths here, and do it relative to $(top_srcdir) and
+# $(top_builddir), to ensure that these paths which belong to the library
+# being currently built and tested are searched before the library which
+# might possibly already be installed in the system.
+#
+# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
+# $(top_srcdir)/include is for libcurl's external include files
+# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/tests/fuzz
+
+EXTRA_DIST = Makefile.inc CMakeLists.txt
+
+LIBS = -lpthread -lFuzzer -lstdc++ -lm
+LDFLAGS = -L/usr/lib/llvm-5.0/lib #-L/home/daniel/src/Fuzzer/
+
+LDADD = $(top_builddir)/lib/libcurl.la \
+ @LDFLAGS@ @LIBCURL_LIBS@
+
+# Makefile.inc provides neat definitions
+include Makefile.inc
+
+checksrc:
+ @PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
+
+noinst_PROGRAMS = $(FUZZPROGS)
+
diff --git a/tests/fuzz/Makefile.in b/tests/fuzz/Makefile.in
new file mode 100644
index 00000000..8bce86b3
--- /dev/null
+++ b/tests/fuzz/Makefile.in
@@ -0,0 +1,880 @@
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = $(am__EXEEXT_1)
+subdir = tests/fuzz
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \
+ $(top_srcdir)/m4/curl-compilers.m4 \
+ $(top_srcdir)/m4/curl-confopts.m4 \
+ $(top_srcdir)/m4/curl-functions.m4 \
+ $(top_srcdir)/m4/curl-openssl.m4 \
+ $(top_srcdir)/m4/curl-override.m4 \
+ $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/xc-am-iface.m4 \
+ $(top_srcdir)/m4/xc-cc-check.m4 \
+ $(top_srcdir)/m4/xc-lt-iface.m4 \
+ $(top_srcdir)/m4/xc-translit.m4 \
+ $(top_srcdir)/m4/xc-val-flgs.m4 \
+ $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+ $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+ $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__EXEEXT_1 = http11$(EXEEXT) ftp$(EXEEXT) imap$(EXEEXT) \
+ pop3$(EXEEXT) httpupload$(EXEEXT) http2$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am_ftp_OBJECTS = ftp-curl_fuzzer.$(OBJEXT)
+ftp_OBJECTS = $(am_ftp_OBJECTS)
+ftp_LDADD = $(LDADD)
+ftp_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+am_http11_OBJECTS = http11-curl_fuzzer.$(OBJEXT)
+http11_OBJECTS = $(am_http11_OBJECTS)
+http11_LDADD = $(LDADD)
+http11_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
+am_http2_OBJECTS = http2-curl_fuzzer.$(OBJEXT)
+http2_OBJECTS = $(am_http2_OBJECTS)
+http2_LDADD = $(LDADD)
+http2_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
+am_httpupload_OBJECTS = httpupload-curl_fuzzer.$(OBJEXT)
+httpupload_OBJECTS = $(am_httpupload_OBJECTS)
+httpupload_LDADD = $(LDADD)
+httpupload_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
+am_imap_OBJECTS = imap-curl_fuzzer.$(OBJEXT)
+imap_OBJECTS = $(am_imap_OBJECTS)
+imap_LDADD = $(LDADD)
+imap_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
+am_pop3_OBJECTS = pop3-curl_fuzzer.$(OBJEXT)
+pop3_OBJECTS = $(am_pop3_OBJECTS)
+pop3_LDADD = $(LDADD)
+pop3_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES =
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(ftp_SOURCES) $(http11_SOURCES) $(http2_SOURCES) \
+ $(httpupload_SOURCES) $(imap_SOURCES) $(pop3_SOURCES)
+DIST_SOURCES = $(ftp_SOURCES) $(http11_SOURCES) $(http2_SOURCES) \
+ $(httpupload_SOURCES) $(imap_SOURCES) $(pop3_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.inc \
+ $(top_srcdir)/depcomp README
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
+CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
+CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
+CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@
+CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CURLVERSION = @CURLVERSION@
+CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
+CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
+CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
+CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
+CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
+CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
+CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
+CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
+CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
+CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
+CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
+CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
+CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
+CURL_DISABLE_SMB = @CURL_DISABLE_SMB@
+CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
+CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
+CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
+CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GCOV = @GCOV@
+GENHTML = @GENHTML@
+GREP = @GREP@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
+HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
+HAVE_LIBZ = @HAVE_LIBZ@
+HAVE_OPENSSL_SRP = @HAVE_OPENSSL_SRP@
+IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IPV6_ENABLED = @IPV6_ENABLED@
+LCOV = @LCOV@
+LD = @LD@
+LDFLAGS = -L/usr/lib/llvm-5.0/lib #-L/home/daniel/src/Fuzzer/
+LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
+LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
+LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = -lpthread -lFuzzer -lstdc++ -lm
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANOPT = @MANOPT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NROFF = @NROFF@
+NSS_LIBS = @NSS_LIBS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKGADD_NAME = @PKGADD_NAME@
+PKGADD_PKG = @PKGADD_PKG@
+PKGADD_VENDOR = @PKGADD_VENDOR@
+PKGCONFIG = @PKGCONFIG@
+RANDOM_FILE = @RANDOM_FILE@
+RANLIB = @RANLIB@
+REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SSL_ENABLED = @SSL_ENABLED@
+SSL_LIBS = @SSL_LIBS@
+STRIP = @STRIP@
+SUPPORT_FEATURES = @SUPPORT_FEATURES@
+SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
+USE_ARES = @USE_ARES@
+USE_AXTLS = @USE_AXTLS@
+USE_CYASSL = @USE_CYASSL@
+USE_DARWINSSL = @USE_DARWINSSL@
+USE_GNUTLS = @USE_GNUTLS@
+USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
+USE_LIBRTMP = @USE_LIBRTMP@
+USE_LIBSSH2 = @USE_LIBSSH2@
+USE_MBEDTLS = @USE_MBEDTLS@
+USE_NGHTTP2 = @USE_NGHTTP2@
+USE_NSS = @USE_NSS@
+USE_OPENLDAP = @USE_OPENLDAP@
+USE_POLARSSL = @USE_POLARSSL@
+USE_SCHANNEL = @USE_SCHANNEL@
+USE_UNIX_SOCKETS = @USE_UNIX_SOCKETS@
+USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
+VERSION = @VERSION@
+VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libext = @libext@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.haxx.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+###########################################################################
+AUTOMAKE_OPTIONS = foreign nostdinc
+
+# Specify our include paths here, and do it relative to $(top_srcdir) and
+# $(top_builddir), to ensure that these paths which belong to the library
+# being currently built and tested are searched before the library which
+# might possibly already be installed in the system.
+#
+# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
+# $(top_srcdir)/include is for libcurl's external include files
+# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/tests/fuzz
+
+EXTRA_DIST = Makefile.inc CMakeLists.txt
+LDADD = $(top_builddir)/lib/libcurl.la \
+ @LDFLAGS@ @LIBCURL_LIBS@
+
+FUZZPROGS = http11 ftp imap pop3 httpupload http2
+http11_SOURCES = curl_fuzzer.c
+http11_CPPFLAGS = $(AM_CPPFLAGS)
+ftp_SOURCES = curl_fuzzer.c
+ftp_CPPFLAGS = -DFUZZER_FTP $(AM_CPPFLAGS)
+imap_SOURCES = curl_fuzzer.c
+imap_CPPFLAGS = -DFUZZER_IMAP $(AM_CPPFLAGS)
+pop3_SOURCES = curl_fuzzer.c
+pop3_CPPFLAGS = -DFUZZER_POP3 $(AM_CPPFLAGS)
+httpupload_SOURCES = curl_fuzzer.c
+httpupload_CPPFLAGS = -DFUZZER_HTTP_UPLOAD $(AM_CPPFLAGS)
+http2_SOURCES = curl_fuzzer.c
+http2_CPPFLAGS = -DFUZZER_HTTP2 $(AM_CPPFLAGS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/fuzz/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tests/fuzz/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(srcdir)/Makefile.inc $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+ftp$(EXEEXT): $(ftp_OBJECTS) $(ftp_DEPENDENCIES) $(EXTRA_ftp_DEPENDENCIES)
+ @rm -f ftp$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ftp_OBJECTS) $(ftp_LDADD) $(LIBS)
+
+http11$(EXEEXT): $(http11_OBJECTS) $(http11_DEPENDENCIES) $(EXTRA_http11_DEPENDENCIES)
+ @rm -f http11$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(http11_OBJECTS) $(http11_LDADD) $(LIBS)
+
+http2$(EXEEXT): $(http2_OBJECTS) $(http2_DEPENDENCIES) $(EXTRA_http2_DEPENDENCIES)
+ @rm -f http2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(http2_OBJECTS) $(http2_LDADD) $(LIBS)
+
+httpupload$(EXEEXT): $(httpupload_OBJECTS) $(httpupload_DEPENDENCIES) $(EXTRA_httpupload_DEPENDENCIES)
+ @rm -f httpupload$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(httpupload_OBJECTS) $(httpupload_LDADD) $(LIBS)
+
+imap$(EXEEXT): $(imap_OBJECTS) $(imap_DEPENDENCIES) $(EXTRA_imap_DEPENDENCIES)
+ @rm -f imap$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_OBJECTS) $(imap_LDADD) $(LIBS)
+
+pop3$(EXEEXT): $(pop3_OBJECTS) $(pop3_DEPENDENCIES) $(EXTRA_pop3_DEPENDENCIES)
+ @rm -f pop3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pop3_OBJECTS) $(pop3_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftp-curl_fuzzer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http11-curl_fuzzer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http2-curl_fuzzer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpupload-curl_fuzzer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-curl_fuzzer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-curl_fuzzer.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+ftp-curl_fuzzer.o: curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftp-curl_fuzzer.o -MD -MP -MF $(DEPDIR)/ftp-curl_fuzzer.Tpo -c -o ftp-curl_fuzzer.o `test -f 'curl_fuzzer.c' || echo '$(srcdir)/'`curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ftp-curl_fuzzer.Tpo $(DEPDIR)/ftp-curl_fuzzer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_fuzzer.c' object='ftp-curl_fuzzer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftp-curl_fuzzer.o `test -f 'curl_fuzzer.c' || echo '$(srcdir)/'`curl_fuzzer.c
+
+ftp-curl_fuzzer.obj: curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftp-curl_fuzzer.obj -MD -MP -MF $(DEPDIR)/ftp-curl_fuzzer.Tpo -c -o ftp-curl_fuzzer.obj `if test -f 'curl_fuzzer.c'; then $(CYGPATH_W) 'curl_fuzzer.c'; else $(CYGPATH_W) '$(srcdir)/curl_fuzzer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ftp-curl_fuzzer.Tpo $(DEPDIR)/ftp-curl_fuzzer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_fuzzer.c' object='ftp-curl_fuzzer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftp-curl_fuzzer.obj `if test -f 'curl_fuzzer.c'; then $(CYGPATH_W) 'curl_fuzzer.c'; else $(CYGPATH_W) '$(srcdir)/curl_fuzzer.c'; fi`
+
+http11-curl_fuzzer.o: curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(http11_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT http11-curl_fuzzer.o -MD -MP -MF $(DEPDIR)/http11-curl_fuzzer.Tpo -c -o http11-curl_fuzzer.o `test -f 'curl_fuzzer.c' || echo '$(srcdir)/'`curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/http11-curl_fuzzer.Tpo $(DEPDIR)/http11-curl_fuzzer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_fuzzer.c' object='http11-curl_fuzzer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(http11_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o http11-curl_fuzzer.o `test -f 'curl_fuzzer.c' || echo '$(srcdir)/'`curl_fuzzer.c
+
+http11-curl_fuzzer.obj: curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(http11_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT http11-curl_fuzzer.obj -MD -MP -MF $(DEPDIR)/http11-curl_fuzzer.Tpo -c -o http11-curl_fuzzer.obj `if test -f 'curl_fuzzer.c'; then $(CYGPATH_W) 'curl_fuzzer.c'; else $(CYGPATH_W) '$(srcdir)/curl_fuzzer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/http11-curl_fuzzer.Tpo $(DEPDIR)/http11-curl_fuzzer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_fuzzer.c' object='http11-curl_fuzzer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(http11_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o http11-curl_fuzzer.obj `if test -f 'curl_fuzzer.c'; then $(CYGPATH_W) 'curl_fuzzer.c'; else $(CYGPATH_W) '$(srcdir)/curl_fuzzer.c'; fi`
+
+http2-curl_fuzzer.o: curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(http2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT http2-curl_fuzzer.o -MD -MP -MF $(DEPDIR)/http2-curl_fuzzer.Tpo -c -o http2-curl_fuzzer.o `test -f 'curl_fuzzer.c' || echo '$(srcdir)/'`curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/http2-curl_fuzzer.Tpo $(DEPDIR)/http2-curl_fuzzer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_fuzzer.c' object='http2-curl_fuzzer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(http2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o http2-curl_fuzzer.o `test -f 'curl_fuzzer.c' || echo '$(srcdir)/'`curl_fuzzer.c
+
+http2-curl_fuzzer.obj: curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(http2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT http2-curl_fuzzer.obj -MD -MP -MF $(DEPDIR)/http2-curl_fuzzer.Tpo -c -o http2-curl_fuzzer.obj `if test -f 'curl_fuzzer.c'; then $(CYGPATH_W) 'curl_fuzzer.c'; else $(CYGPATH_W) '$(srcdir)/curl_fuzzer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/http2-curl_fuzzer.Tpo $(DEPDIR)/http2-curl_fuzzer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_fuzzer.c' object='http2-curl_fuzzer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(http2_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o http2-curl_fuzzer.obj `if test -f 'curl_fuzzer.c'; then $(CYGPATH_W) 'curl_fuzzer.c'; else $(CYGPATH_W) '$(srcdir)/curl_fuzzer.c'; fi`
+
+httpupload-curl_fuzzer.o: curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(httpupload_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT httpupload-curl_fuzzer.o -MD -MP -MF $(DEPDIR)/httpupload-curl_fuzzer.Tpo -c -o httpupload-curl_fuzzer.o `test -f 'curl_fuzzer.c' || echo '$(srcdir)/'`curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/httpupload-curl_fuzzer.Tpo $(DEPDIR)/httpupload-curl_fuzzer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_fuzzer.c' object='httpupload-curl_fuzzer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(httpupload_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o httpupload-curl_fuzzer.o `test -f 'curl_fuzzer.c' || echo '$(srcdir)/'`curl_fuzzer.c
+
+httpupload-curl_fuzzer.obj: curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(httpupload_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT httpupload-curl_fuzzer.obj -MD -MP -MF $(DEPDIR)/httpupload-curl_fuzzer.Tpo -c -o httpupload-curl_fuzzer.obj `if test -f 'curl_fuzzer.c'; then $(CYGPATH_W) 'curl_fuzzer.c'; else $(CYGPATH_W) '$(srcdir)/curl_fuzzer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/httpupload-curl_fuzzer.Tpo $(DEPDIR)/httpupload-curl_fuzzer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_fuzzer.c' object='httpupload-curl_fuzzer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(httpupload_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o httpupload-curl_fuzzer.obj `if test -f 'curl_fuzzer.c'; then $(CYGPATH_W) 'curl_fuzzer.c'; else $(CYGPATH_W) '$(srcdir)/curl_fuzzer.c'; fi`
+
+imap-curl_fuzzer.o: curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(imap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT imap-curl_fuzzer.o -MD -MP -MF $(DEPDIR)/imap-curl_fuzzer.Tpo -c -o imap-curl_fuzzer.o `test -f 'curl_fuzzer.c' || echo '$(srcdir)/'`curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/imap-curl_fuzzer.Tpo $(DEPDIR)/imap-curl_fuzzer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_fuzzer.c' object='imap-curl_fuzzer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(imap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o imap-curl_fuzzer.o `test -f 'curl_fuzzer.c' || echo '$(srcdir)/'`curl_fuzzer.c
+
+imap-curl_fuzzer.obj: curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(imap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT imap-curl_fuzzer.obj -MD -MP -MF $(DEPDIR)/imap-curl_fuzzer.Tpo -c -o imap-curl_fuzzer.obj `if test -f 'curl_fuzzer.c'; then $(CYGPATH_W) 'curl_fuzzer.c'; else $(CYGPATH_W) '$(srcdir)/curl_fuzzer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/imap-curl_fuzzer.Tpo $(DEPDIR)/imap-curl_fuzzer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_fuzzer.c' object='imap-curl_fuzzer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(imap_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o imap-curl_fuzzer.obj `if test -f 'curl_fuzzer.c'; then $(CYGPATH_W) 'curl_fuzzer.c'; else $(CYGPATH_W) '$(srcdir)/curl_fuzzer.c'; fi`
+
+pop3-curl_fuzzer.o: curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pop3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pop3-curl_fuzzer.o -MD -MP -MF $(DEPDIR)/pop3-curl_fuzzer.Tpo -c -o pop3-curl_fuzzer.o `test -f 'curl_fuzzer.c' || echo '$(srcdir)/'`curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pop3-curl_fuzzer.Tpo $(DEPDIR)/pop3-curl_fuzzer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_fuzzer.c' object='pop3-curl_fuzzer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pop3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pop3-curl_fuzzer.o `test -f 'curl_fuzzer.c' || echo '$(srcdir)/'`curl_fuzzer.c
+
+pop3-curl_fuzzer.obj: curl_fuzzer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pop3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pop3-curl_fuzzer.obj -MD -MP -MF $(DEPDIR)/pop3-curl_fuzzer.Tpo -c -o pop3-curl_fuzzer.obj `if test -f 'curl_fuzzer.c'; then $(CYGPATH_W) 'curl_fuzzer.c'; else $(CYGPATH_W) '$(srcdir)/curl_fuzzer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pop3-curl_fuzzer.Tpo $(DEPDIR)/pop3-curl_fuzzer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curl_fuzzer.c' object='pop3-curl_fuzzer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pop3_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pop3-curl_fuzzer.obj `if test -f 'curl_fuzzer.c'; then $(CYGPATH_W) 'curl_fuzzer.c'; else $(CYGPATH_W) '$(srcdir)/curl_fuzzer.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Makefile.inc provides neat definitions
+
+checksrc:
+ @PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/fuzz/Makefile.inc b/tests/fuzz/Makefile.inc
new file mode 100644
index 00000000..fb6cdb11
--- /dev/null
+++ b/tests/fuzz/Makefile.inc
@@ -0,0 +1,19 @@
+FUZZPROGS = http11 ftp imap pop3 httpupload http2
+
+http11_SOURCES = curl_fuzzer.c
+http11_CPPFLAGS = $(AM_CPPFLAGS)
+
+ftp_SOURCES = curl_fuzzer.c
+ftp_CPPFLAGS = -DFUZZER_FTP $(AM_CPPFLAGS)
+
+imap_SOURCES = curl_fuzzer.c
+imap_CPPFLAGS = -DFUZZER_IMAP $(AM_CPPFLAGS)
+
+pop3_SOURCES = curl_fuzzer.c
+pop3_CPPFLAGS = -DFUZZER_POP3 $(AM_CPPFLAGS)
+
+httpupload_SOURCES = curl_fuzzer.c
+httpupload_CPPFLAGS = -DFUZZER_HTTP_UPLOAD $(AM_CPPFLAGS)
+
+http2_SOURCES = curl_fuzzer.c
+http2_CPPFLAGS = -DFUZZER_HTTP2 $(AM_CPPFLAGS)
diff --git a/tests/fuzz/README b/tests/fuzz/README
new file mode 100644
index 00000000..459bda46
--- /dev/null
+++ b/tests/fuzz/README
@@ -0,0 +1,14 @@
+Fuzz tests
+==========
+
+The goal is to add tests for *ALL* protocols supported in libcurl.
+We will need some additional patches in the future, to increase coverage.
+
+Building the fuzz target
+========================
+
+CC=clang-5.0 CFLAGS="-fsanitize=address -fsanitize-address-use-after-scope -fsanitize-coverage=trace-pc-guard,trace-cmp" ./configure --disable-shared --enable-debug --enable-maintainer-mode
+make -sj
+
+cd tests/fuzz
+make
diff --git a/tests/fuzz/curl_fuzzer.c b/tests/fuzz/curl_fuzzer.c
new file mode 100644
index 00000000..2ccf1b36
--- /dev/null
+++ b/tests/fuzz/curl_fuzzer.c
@@ -0,0 +1,128 @@
+/*
+# Copyright 2016 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+################################################################################
+*/
+
+#include <errno.h>
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/select.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <curl/curl.h>
+
+static const void *cur_data;
+static int cur_size = -1;
+static int server_fd = -1;
+static int client_fd = -1;
+static int wrote = 0;
+
+static void fail(const char *why) {
+ perror(why);
+ exit(1);
+}
+
+static curl_socket_t open_sock(void *ctx, curlsocktype purpose,
+ struct curl_sockaddr *address) {
+ if(cur_size == -1) {
+ fail("not fuzzing");
+ }
+ if(server_fd != -1 || client_fd != -1) {
+ fail("already connected");
+ }
+ int fds[2];
+ if(socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) {
+ fail("socketpair");
+ }
+ server_fd = fds[0];
+ client_fd = fds[1];
+ if(write(server_fd, cur_data, cur_size) != cur_size) {
+ fail("write");
+ }
+ if(shutdown(server_fd, SHUT_WR)) {
+ fail("shutdown");
+ }
+ return client_fd;
+}
+
+static int set_opt(void *ctx, curl_socket_t curlfd, curlsocktype purpose) {
+ return CURL_SOCKOPT_ALREADY_CONNECTED;
+}
+
+static size_t write_callback(char *ptr, size_t size, size_t n, void *ctx) {
+ return size * n;
+}
+
+static size_t read_callback(char *buf, size_t size, size_t n, void *ctx) {
+ if(wrote || size * n == 0) {
+ return 0;
+ }
+ wrote = 1;
+ buf[0] = 'a';
+ return 1;
+}
+
+int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
+ cur_data = Data;
+ cur_size = Size;
+ wrote = 0;
+ CURL *curl = curl_easy_init();
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, open_sock);
+ curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, set_opt);
+#if defined(FUZZER_FTP)
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://user@localhost/file.txt");
+#elif defined(FUZZER_IMAP)
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://localhost");
+#elif defined(FUZZER_POP3)
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://localhost");
+#elif defined(FUZZER_HTTP_UPLOAD)
+ curl_easy_setopt(curl, CURLOPT_URL, "http://localhost/");
+ curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+#elif defined(FUZZER_HTTP2)
+ curl_easy_setopt(curl, CURLOPT_URL, "http://localhost/");
+ /* use non-TLS HTTP/2 without HTTP/1.1 Upgrade: */
+ curl_easy_setopt(curl, CURLOPT_HTTP_VERSION,
+ CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE);
+#else
+ curl_easy_setopt(curl, CURLOPT_URL, "http://localhost/");
+ curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
+#endif
+ curl_easy_perform(curl);
+ curl_easy_cleanup(curl);
+ close(server_fd);
+ close(client_fd);
+ server_fd = -1;
+ client_fd = -1;
+ cur_data = NULL;
+ cur_size = -1;
+ return 0;
+}
diff --git a/tests/http2-server.pl b/tests/http2-server.pl
index 72ed12e8..086d5aa7 100755
--- a/tests/http2-server.pl
+++ b/tests/http2-server.pl
@@ -28,6 +28,7 @@ my $pidfile = "log/nghttpx.pid";
my $logfile = "log/http2.log";
my $nghttpx = "nghttpx";
my $listenport = 9015;
+my $connect = "127.0.0.1,8990";
#***************************************************************************
# Process command line options
@@ -54,6 +55,13 @@ while(@ARGV) {
shift @ARGV;
}
}
+ elsif($ARGV[0] eq '--connect') {
+ if($ARGV[1]) {
+ $connect = $ARGV[1];
+ $connect =~ s/:/,/;
+ shift @ARGV;
+ }
+ }
elsif($ARGV[0] eq '--logfile') {
if($ARGV[1]) {
$logfile = $ARGV[1];
@@ -66,7 +74,7 @@ while(@ARGV) {
shift @ARGV;
}
-my $cmdline="$nghttpx --backend=127.0.0.1,8990 ".
+my $cmdline="$nghttpx --backend=$connect ".
"--frontend=\"*,$listenport;no-tls\" ".
"--log-level=INFO ".
"--pid-file=$pidfile ".
diff --git a/tests/httpserver.pl b/tests/httpserver.pl
index 0be5667f..7f6c86a8 100755
--- a/tests/httpserver.pl
+++ b/tests/httpserver.pl
@@ -38,7 +38,7 @@ my $verbose = 0; # set to 1 for debugging
my $port = 8990; # just a default
my $unix_socket; # location to place a listening Unix socket
my $ipvnum = 4; # default IP version of http server
-my $idnum = 1; # dafault http server instance number
+my $idnum = 1; # default http server instance number
my $proto = 'http'; # protocol the http server speaks
my $pidfile; # http server pid file
my $logfile; # http server log file
diff --git a/tests/libtest/CMakeLists.txt b/tests/libtest/CMakeLists.txt
index a7449c37..4d42aa51 100644
--- a/tests/libtest/CMakeLists.txt
+++ b/tests/libtest/CMakeLists.txt
@@ -7,7 +7,8 @@ function(SETUP_TEST TEST_NAME) # ARGN are the files in the test
include_directories(
${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
- ${CURL_BINARY_DIR}/include # To be able to reach "curl/curlbuild.h"
+ ${CURL_BINARY_DIR}/include # To be able to reach "curl/curl.h"
+ ${CURL_SOURCE_DIR}/tests/libtest # To be able to build generated tests
)
if(USE_ARES)
include_directories(${CARES_INCLUDE_DIR})
@@ -49,7 +50,15 @@ if(NOT WIN32)
endif()
endif()
-# # files used only in some libcurl test programs
+add_custom_command(
+ OUTPUT lib1521.c
+ COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl < ${CMAKE_SOURCE_DIR}/include/curl/curl.h > lib1521.c
+ DEPENDS
+ "${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl"
+ "${CMAKE_SOURCE_DIR}/include/curl/curl.h"
+ VERBATIM)
+
+ # # files used only in some libcurl test programs
# SET(TESTUTIL testutil.c testutil.h)
# # these files are used in every single test program below
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index 826b3d4f..9128a453 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -26,8 +26,6 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# being currently built and tested are searched before the library which
# might possibly already be installed in the system.
#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
@@ -35,23 +33,19 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# $(top_srcdir)/ares is for in-tree c-ares's external include files
if USE_EMBEDDED_ARES
-AM_CPPFLAGS = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
+AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
-I$(top_builddir)/ares \
-I$(top_srcdir)/ares
else
-AM_CPPFLAGS = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
+AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib
endif
EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
-test1022.pl Makefile.inc notexists.pl CMakeLists.txt
+test1022.pl Makefile.inc notexists.pl CMakeLists.txt mk-lib1521.pl
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
@@ -66,9 +60,8 @@ SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_LIBS@ @NSS_LIBS
TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_AND_TIME_LIBS@ @NSS_LIBS@
endif
-# Dependencies (may need to be overriden)
+# Dependencies (may need to be overridden)
LDADD = $(SUPPORTFILES_LIBS)
-DEPENDENCIES = $(top_builddir)/lib/libcurl.la
# Makefile.inc provides the source defines (TESTUTIL, SUPPORTFILES,
# noinst_PROGRAMS, lib*_SOURCES, and lib*_CFLAGS)
@@ -116,5 +109,11 @@ libhostname_la_SOURCES = sethostname.c sethostname.h
libhostname_la_LIBADD =
libhostname_la_DEPENDENCIES =
+lib1521.c: $(top_srcdir)/tests/libtest/mk-lib1521.pl $(top_srcdir)/include/curl/curl.h
+ @PERL@ $(top_srcdir)/tests/libtest/mk-lib1521.pl < $(top_srcdir)/include/curl/curl.h > lib1521.c
+
checksrc:
@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
+
+dist:
+ rm lib1521.c
diff --git a/tests/libtest/Makefile.in b/tests/libtest/Makefile.in
index 4820f21a..1f3587d6 100644
--- a/tests/libtest/Makefile.in
+++ b/tests/libtest/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -107,26 +107,28 @@ noinst_PROGRAMS = chkhostname$(EXEEXT) libauthretry$(EXEEXT) \
lib548$(EXEEXT) lib549$(EXEEXT) lib552$(EXEEXT) \
lib553$(EXEEXT) lib554$(EXEEXT) lib555$(EXEEXT) \
lib556$(EXEEXT) lib557$(EXEEXT) lib558$(EXEEXT) \
- lib560$(EXEEXT) lib562$(EXEEXT) lib564$(EXEEXT) \
- lib565$(EXEEXT) lib566$(EXEEXT) lib567$(EXEEXT) \
- lib568$(EXEEXT) lib569$(EXEEXT) lib570$(EXEEXT) \
- lib571$(EXEEXT) lib572$(EXEEXT) lib573$(EXEEXT) \
- lib574$(EXEEXT) lib575$(EXEEXT) lib576$(EXEEXT) \
- lib578$(EXEEXT) lib579$(EXEEXT) lib582$(EXEEXT) \
- lib583$(EXEEXT) lib585$(EXEEXT) lib586$(EXEEXT) \
- lib587$(EXEEXT) lib590$(EXEEXT) lib591$(EXEEXT) \
- lib597$(EXEEXT) lib598$(EXEEXT) lib599$(EXEEXT) \
- lib1500$(EXEEXT) lib1501$(EXEEXT) lib1502$(EXEEXT) \
- lib1503$(EXEEXT) lib1504$(EXEEXT) lib1505$(EXEEXT) \
- lib1506$(EXEEXT) lib1507$(EXEEXT) lib1508$(EXEEXT) \
- lib1509$(EXEEXT) lib1510$(EXEEXT) lib1511$(EXEEXT) \
- lib1512$(EXEEXT) lib1513$(EXEEXT) lib1514$(EXEEXT) \
- lib1515$(EXEEXT) lib1517$(EXEEXT) lib1520$(EXEEXT) \
- lib1525$(EXEEXT) lib1526$(EXEEXT) lib1527$(EXEEXT) \
- lib1528$(EXEEXT) lib1529$(EXEEXT) lib1530$(EXEEXT) \
- lib1531$(EXEEXT) lib1532$(EXEEXT) lib1533$(EXEEXT) \
- lib1534$(EXEEXT) lib1535$(EXEEXT) lib1536$(EXEEXT) \
- lib1900$(EXEEXT) lib2033$(EXEEXT)
+ lib559$(EXEEXT) lib560$(EXEEXT) lib562$(EXEEXT) \
+ lib564$(EXEEXT) lib565$(EXEEXT) lib566$(EXEEXT) \
+ lib567$(EXEEXT) lib568$(EXEEXT) lib569$(EXEEXT) \
+ lib570$(EXEEXT) lib571$(EXEEXT) lib572$(EXEEXT) \
+ lib573$(EXEEXT) lib574$(EXEEXT) lib575$(EXEEXT) \
+ lib576$(EXEEXT) lib578$(EXEEXT) lib579$(EXEEXT) \
+ lib582$(EXEEXT) lib583$(EXEEXT) lib585$(EXEEXT) \
+ lib586$(EXEEXT) lib587$(EXEEXT) lib590$(EXEEXT) \
+ lib591$(EXEEXT) lib597$(EXEEXT) lib598$(EXEEXT) \
+ lib599$(EXEEXT) lib1500$(EXEEXT) lib1501$(EXEEXT) \
+ lib1502$(EXEEXT) lib1503$(EXEEXT) lib1504$(EXEEXT) \
+ lib1505$(EXEEXT) lib1506$(EXEEXT) lib1507$(EXEEXT) \
+ lib1508$(EXEEXT) lib1509$(EXEEXT) lib1510$(EXEEXT) \
+ lib1511$(EXEEXT) lib1512$(EXEEXT) lib1513$(EXEEXT) \
+ lib1514$(EXEEXT) lib1515$(EXEEXT) lib1517$(EXEEXT) \
+ lib1520$(EXEEXT) lib1521$(EXEEXT) lib1525$(EXEEXT) \
+ lib1526$(EXEEXT) lib1527$(EXEEXT) lib1528$(EXEEXT) \
+ lib1529$(EXEEXT) lib1530$(EXEEXT) lib1531$(EXEEXT) \
+ lib1532$(EXEEXT) lib1533$(EXEEXT) lib1534$(EXEEXT) \
+ lib1535$(EXEEXT) lib1536$(EXEEXT) lib1537$(EXEEXT) \
+ lib1538$(EXEEXT) lib1540$(EXEEXT) lib1550$(EXEEXT) \
+ lib1551$(EXEEXT) lib1900$(EXEEXT) lib2033$(EXEEXT)
@USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_1 = -DCURL_STATICLIB
@CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE@am__append_2 = -no-undefined
@CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE@am__append_3 = -mimpure-text
@@ -134,7 +136,8 @@ noinst_PROGRAMS = chkhostname$(EXEEXT) libauthretry$(EXEEXT) \
@DOING_CURL_SYMBOL_HIDING_TRUE@am__append_5 = $(CFLAG_CURL_SYMBOL_HIDING)
subdir = tests/libtest
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \
+ $(top_srcdir)/m4/curl-compilers.m4 \
$(top_srcdir)/m4/curl-confopts.m4 \
$(top_srcdir)/m4/curl-functions.m4 \
$(top_srcdir)/m4/curl-openssl.m4 \
@@ -155,8 +158,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
@@ -301,557 +303,598 @@ am_lib1520_OBJECTS = lib1520-lib1520.$(OBJEXT) $(am__objects_49)
lib1520_OBJECTS = $(am_lib1520_OBJECTS)
lib1520_LDADD = $(LDADD)
lib1520_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_50 = lib1525-first.$(OBJEXT)
-am__objects_51 = lib1525-testutil.$(OBJEXT)
-am__objects_52 = ../../lib/lib1525-warnless.$(OBJEXT)
-am_lib1525_OBJECTS = lib1525-lib1525.$(OBJEXT) $(am__objects_50) \
- $(am__objects_51) $(am__objects_52)
+am__objects_50 = lib1521-first.$(OBJEXT)
+am_lib1521_OBJECTS = lib1521-lib1521.$(OBJEXT) $(am__objects_50)
+lib1521_OBJECTS = $(am_lib1521_OBJECTS)
+lib1521_LDADD = $(LDADD)
+lib1521_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_51 = lib1525-first.$(OBJEXT)
+am__objects_52 = lib1525-testutil.$(OBJEXT)
+am__objects_53 = ../../lib/lib1525-warnless.$(OBJEXT)
+am_lib1525_OBJECTS = lib1525-lib1525.$(OBJEXT) $(am__objects_51) \
+ $(am__objects_52) $(am__objects_53)
lib1525_OBJECTS = $(am_lib1525_OBJECTS)
lib1525_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_53 = lib1526-first.$(OBJEXT)
-am__objects_54 = lib1526-testutil.$(OBJEXT)
-am__objects_55 = ../../lib/lib1526-warnless.$(OBJEXT)
-am_lib1526_OBJECTS = lib1526-lib1526.$(OBJEXT) $(am__objects_53) \
- $(am__objects_54) $(am__objects_55)
+am__objects_54 = lib1526-first.$(OBJEXT)
+am__objects_55 = lib1526-testutil.$(OBJEXT)
+am__objects_56 = ../../lib/lib1526-warnless.$(OBJEXT)
+am_lib1526_OBJECTS = lib1526-lib1526.$(OBJEXT) $(am__objects_54) \
+ $(am__objects_55) $(am__objects_56)
lib1526_OBJECTS = $(am_lib1526_OBJECTS)
lib1526_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_56 = lib1527-first.$(OBJEXT)
-am__objects_57 = lib1527-testutil.$(OBJEXT)
-am__objects_58 = ../../lib/lib1527-warnless.$(OBJEXT)
-am_lib1527_OBJECTS = lib1527-lib1527.$(OBJEXT) $(am__objects_56) \
- $(am__objects_57) $(am__objects_58)
+am__objects_57 = lib1527-first.$(OBJEXT)
+am__objects_58 = lib1527-testutil.$(OBJEXT)
+am__objects_59 = ../../lib/lib1527-warnless.$(OBJEXT)
+am_lib1527_OBJECTS = lib1527-lib1527.$(OBJEXT) $(am__objects_57) \
+ $(am__objects_58) $(am__objects_59)
lib1527_OBJECTS = $(am_lib1527_OBJECTS)
lib1527_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_59 = lib1528-first.$(OBJEXT)
-am__objects_60 = lib1528-testutil.$(OBJEXT)
-am__objects_61 = ../../lib/lib1528-warnless.$(OBJEXT)
-am_lib1528_OBJECTS = lib1528-lib1528.$(OBJEXT) $(am__objects_59) \
- $(am__objects_60) $(am__objects_61)
+am__objects_60 = lib1528-first.$(OBJEXT)
+am__objects_61 = lib1528-testutil.$(OBJEXT)
+am__objects_62 = ../../lib/lib1528-warnless.$(OBJEXT)
+am_lib1528_OBJECTS = lib1528-lib1528.$(OBJEXT) $(am__objects_60) \
+ $(am__objects_61) $(am__objects_62)
lib1528_OBJECTS = $(am_lib1528_OBJECTS)
lib1528_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_62 = lib1529-first.$(OBJEXT)
-am__objects_63 = lib1529-testutil.$(OBJEXT)
-am__objects_64 = ../../lib/lib1529-warnless.$(OBJEXT)
-am_lib1529_OBJECTS = lib1529-lib1529.$(OBJEXT) $(am__objects_62) \
- $(am__objects_63) $(am__objects_64)
+am__objects_63 = lib1529-first.$(OBJEXT)
+am__objects_64 = lib1529-testutil.$(OBJEXT)
+am__objects_65 = ../../lib/lib1529-warnless.$(OBJEXT)
+am_lib1529_OBJECTS = lib1529-lib1529.$(OBJEXT) $(am__objects_63) \
+ $(am__objects_64) $(am__objects_65)
lib1529_OBJECTS = $(am_lib1529_OBJECTS)
lib1529_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_65 = lib1530-first.$(OBJEXT)
-am__objects_66 = lib1530-testutil.$(OBJEXT)
-am__objects_67 = ../../lib/lib1530-warnless.$(OBJEXT)
-am_lib1530_OBJECTS = lib1530-lib1530.$(OBJEXT) $(am__objects_65) \
- $(am__objects_66) $(am__objects_67)
+am__objects_66 = lib1530-first.$(OBJEXT)
+am__objects_67 = lib1530-testutil.$(OBJEXT)
+am__objects_68 = ../../lib/lib1530-warnless.$(OBJEXT)
+am_lib1530_OBJECTS = lib1530-lib1530.$(OBJEXT) $(am__objects_66) \
+ $(am__objects_67) $(am__objects_68)
lib1530_OBJECTS = $(am_lib1530_OBJECTS)
lib1530_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_68 = lib1531-first.$(OBJEXT)
-am__objects_69 = lib1531-testutil.$(OBJEXT)
-am__objects_70 = ../../lib/lib1531-warnless.$(OBJEXT)
-am_lib1531_OBJECTS = lib1531-lib1531.$(OBJEXT) $(am__objects_68) \
- $(am__objects_69) $(am__objects_70)
+am__objects_69 = lib1531-first.$(OBJEXT)
+am__objects_70 = lib1531-testutil.$(OBJEXT)
+am__objects_71 = ../../lib/lib1531-warnless.$(OBJEXT)
+am_lib1531_OBJECTS = lib1531-lib1531.$(OBJEXT) $(am__objects_69) \
+ $(am__objects_70) $(am__objects_71)
lib1531_OBJECTS = $(am_lib1531_OBJECTS)
lib1531_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_71 = lib1532-first.$(OBJEXT)
-am__objects_72 = lib1532-testutil.$(OBJEXT)
-am__objects_73 = ../../lib/lib1532-warnless.$(OBJEXT)
-am_lib1532_OBJECTS = lib1532-lib1532.$(OBJEXT) $(am__objects_71) \
- $(am__objects_72) $(am__objects_73)
+am__objects_72 = lib1532-first.$(OBJEXT)
+am__objects_73 = lib1532-testutil.$(OBJEXT)
+am__objects_74 = ../../lib/lib1532-warnless.$(OBJEXT)
+am_lib1532_OBJECTS = lib1532-lib1532.$(OBJEXT) $(am__objects_72) \
+ $(am__objects_73) $(am__objects_74)
lib1532_OBJECTS = $(am_lib1532_OBJECTS)
lib1532_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_74 = lib1533-first.$(OBJEXT)
-am__objects_75 = lib1533-testutil.$(OBJEXT)
-am__objects_76 = ../../lib/lib1533-warnless.$(OBJEXT)
-am_lib1533_OBJECTS = lib1533-lib1533.$(OBJEXT) $(am__objects_74) \
- $(am__objects_75) $(am__objects_76)
+am__objects_75 = lib1533-first.$(OBJEXT)
+am__objects_76 = lib1533-testutil.$(OBJEXT)
+am__objects_77 = ../../lib/lib1533-warnless.$(OBJEXT)
+am_lib1533_OBJECTS = lib1533-lib1533.$(OBJEXT) $(am__objects_75) \
+ $(am__objects_76) $(am__objects_77)
lib1533_OBJECTS = $(am_lib1533_OBJECTS)
lib1533_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_77 = lib1534-first.$(OBJEXT)
-am__objects_78 = lib1534-testutil.$(OBJEXT)
-am__objects_79 = ../../lib/lib1534-warnless.$(OBJEXT)
-am_lib1534_OBJECTS = lib1534-lib1534.$(OBJEXT) $(am__objects_77) \
- $(am__objects_78) $(am__objects_79)
+am__objects_78 = lib1534-first.$(OBJEXT)
+am__objects_79 = lib1534-testutil.$(OBJEXT)
+am__objects_80 = ../../lib/lib1534-warnless.$(OBJEXT)
+am_lib1534_OBJECTS = lib1534-lib1534.$(OBJEXT) $(am__objects_78) \
+ $(am__objects_79) $(am__objects_80)
lib1534_OBJECTS = $(am_lib1534_OBJECTS)
lib1534_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_80 = lib1535-first.$(OBJEXT)
-am__objects_81 = lib1535-testutil.$(OBJEXT)
-am__objects_82 = ../../lib/lib1535-warnless.$(OBJEXT)
-am_lib1535_OBJECTS = lib1535-lib1535.$(OBJEXT) $(am__objects_80) \
- $(am__objects_81) $(am__objects_82)
+am__objects_81 = lib1535-first.$(OBJEXT)
+am__objects_82 = lib1535-testutil.$(OBJEXT)
+am__objects_83 = ../../lib/lib1535-warnless.$(OBJEXT)
+am_lib1535_OBJECTS = lib1535-lib1535.$(OBJEXT) $(am__objects_81) \
+ $(am__objects_82) $(am__objects_83)
lib1535_OBJECTS = $(am_lib1535_OBJECTS)
lib1535_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_83 = lib1536-first.$(OBJEXT)
-am__objects_84 = lib1536-testutil.$(OBJEXT)
-am__objects_85 = ../../lib/lib1536-warnless.$(OBJEXT)
-am_lib1536_OBJECTS = lib1536-lib1536.$(OBJEXT) $(am__objects_83) \
- $(am__objects_84) $(am__objects_85)
+am__objects_84 = lib1536-first.$(OBJEXT)
+am__objects_85 = lib1536-testutil.$(OBJEXT)
+am__objects_86 = ../../lib/lib1536-warnless.$(OBJEXT)
+am_lib1536_OBJECTS = lib1536-lib1536.$(OBJEXT) $(am__objects_84) \
+ $(am__objects_85) $(am__objects_86)
lib1536_OBJECTS = $(am_lib1536_OBJECTS)
lib1536_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_86 = lib1900-first.$(OBJEXT)
-am__objects_87 = lib1900-testutil.$(OBJEXT)
-am__objects_88 = ../../lib/lib1900-warnless.$(OBJEXT)
-am_lib1900_OBJECTS = lib1900-lib1900.$(OBJEXT) $(am__objects_86) \
- $(am__objects_87) $(am__objects_88)
+am__objects_87 = lib1537-first.$(OBJEXT)
+am__objects_88 = lib1537-testutil.$(OBJEXT)
+am__objects_89 = ../../lib/lib1537-warnless.$(OBJEXT)
+am_lib1537_OBJECTS = lib1537-lib1537.$(OBJEXT) $(am__objects_87) \
+ $(am__objects_88) $(am__objects_89)
+lib1537_OBJECTS = $(am_lib1537_OBJECTS)
+lib1537_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_90 = lib1538-first.$(OBJEXT)
+am__objects_91 = lib1538-testutil.$(OBJEXT)
+am__objects_92 = ../../lib/lib1538-warnless.$(OBJEXT)
+am_lib1538_OBJECTS = lib1538-lib1538.$(OBJEXT) $(am__objects_90) \
+ $(am__objects_91) $(am__objects_92)
+lib1538_OBJECTS = $(am_lib1538_OBJECTS)
+lib1538_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_93 = lib1540-first.$(OBJEXT)
+am__objects_94 = lib1540-testutil.$(OBJEXT)
+am__objects_95 = ../../lib/lib1540-warnless.$(OBJEXT)
+am_lib1540_OBJECTS = lib1540-lib1540.$(OBJEXT) $(am__objects_93) \
+ $(am__objects_94) $(am__objects_95)
+lib1540_OBJECTS = $(am_lib1540_OBJECTS)
+lib1540_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_96 = lib1550-first.$(OBJEXT)
+am_lib1550_OBJECTS = lib1550-lib1550.$(OBJEXT) $(am__objects_96)
+lib1550_OBJECTS = $(am_lib1550_OBJECTS)
+lib1550_LDADD = $(LDADD)
+lib1550_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_97 = lib1551-first.$(OBJEXT)
+am_lib1551_OBJECTS = lib1551-lib1551.$(OBJEXT) $(am__objects_97)
+lib1551_OBJECTS = $(am_lib1551_OBJECTS)
+lib1551_LDADD = $(LDADD)
+lib1551_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_98 = lib1900-first.$(OBJEXT)
+am__objects_99 = lib1900-testutil.$(OBJEXT)
+am__objects_100 = ../../lib/lib1900-warnless.$(OBJEXT)
+am_lib1900_OBJECTS = lib1900-lib1900.$(OBJEXT) $(am__objects_98) \
+ $(am__objects_99) $(am__objects_100)
lib1900_OBJECTS = $(am_lib1900_OBJECTS)
lib1900_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_89 = lib2033-first.$(OBJEXT)
-am__objects_90 = lib2033-testutil.$(OBJEXT)
-am__objects_91 = ../../lib/lib2033-warnless.$(OBJEXT)
+am__objects_101 = lib2033-first.$(OBJEXT)
+am__objects_102 = lib2033-testutil.$(OBJEXT)
+am__objects_103 = ../../lib/lib2033-warnless.$(OBJEXT)
am_lib2033_OBJECTS = lib2033-libntlmconnect.$(OBJEXT) \
- $(am__objects_89) $(am__objects_90) $(am__objects_91)
+ $(am__objects_101) $(am__objects_102) $(am__objects_103)
lib2033_OBJECTS = $(am_lib2033_OBJECTS)
lib2033_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_92 = lib500-first.$(OBJEXT)
-am__objects_93 = lib500-testutil.$(OBJEXT)
-am__objects_94 = lib500-testtrace.$(OBJEXT)
-am_lib500_OBJECTS = lib500-lib500.$(OBJEXT) $(am__objects_92) \
- $(am__objects_93) $(am__objects_94)
+am__objects_104 = lib500-first.$(OBJEXT)
+am__objects_105 = lib500-testutil.$(OBJEXT)
+am__objects_106 = lib500-testtrace.$(OBJEXT)
+am_lib500_OBJECTS = lib500-lib500.$(OBJEXT) $(am__objects_104) \
+ $(am__objects_105) $(am__objects_106)
lib500_OBJECTS = $(am_lib500_OBJECTS)
lib500_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_95 = lib501-first.$(OBJEXT)
-am_lib501_OBJECTS = lib501-lib501.$(OBJEXT) $(am__objects_95)
+am__objects_107 = lib501-first.$(OBJEXT)
+am_lib501_OBJECTS = lib501-lib501.$(OBJEXT) $(am__objects_107)
lib501_OBJECTS = $(am_lib501_OBJECTS)
lib501_LDADD = $(LDADD)
lib501_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_96 = lib502-first.$(OBJEXT)
-am__objects_97 = lib502-testutil.$(OBJEXT)
-am__objects_98 = ../../lib/lib502-warnless.$(OBJEXT)
-am_lib502_OBJECTS = lib502-lib502.$(OBJEXT) $(am__objects_96) \
- $(am__objects_97) $(am__objects_98)
+am__objects_108 = lib502-first.$(OBJEXT)
+am__objects_109 = lib502-testutil.$(OBJEXT)
+am__objects_110 = ../../lib/lib502-warnless.$(OBJEXT)
+am_lib502_OBJECTS = lib502-lib502.$(OBJEXT) $(am__objects_108) \
+ $(am__objects_109) $(am__objects_110)
lib502_OBJECTS = $(am_lib502_OBJECTS)
lib502_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_99 = lib503-first.$(OBJEXT)
-am__objects_100 = lib503-testutil.$(OBJEXT)
-am__objects_101 = ../../lib/lib503-warnless.$(OBJEXT)
-am_lib503_OBJECTS = lib503-lib503.$(OBJEXT) $(am__objects_99) \
- $(am__objects_100) $(am__objects_101)
+am__objects_111 = lib503-first.$(OBJEXT)
+am__objects_112 = lib503-testutil.$(OBJEXT)
+am__objects_113 = ../../lib/lib503-warnless.$(OBJEXT)
+am_lib503_OBJECTS = lib503-lib503.$(OBJEXT) $(am__objects_111) \
+ $(am__objects_112) $(am__objects_113)
lib503_OBJECTS = $(am_lib503_OBJECTS)
lib503_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_102 = lib504-first.$(OBJEXT)
-am__objects_103 = lib504-testutil.$(OBJEXT)
-am__objects_104 = ../../lib/lib504-warnless.$(OBJEXT)
-am_lib504_OBJECTS = lib504-lib504.$(OBJEXT) $(am__objects_102) \
- $(am__objects_103) $(am__objects_104)
+am__objects_114 = lib504-first.$(OBJEXT)
+am__objects_115 = lib504-testutil.$(OBJEXT)
+am__objects_116 = ../../lib/lib504-warnless.$(OBJEXT)
+am_lib504_OBJECTS = lib504-lib504.$(OBJEXT) $(am__objects_114) \
+ $(am__objects_115) $(am__objects_116)
lib504_OBJECTS = $(am_lib504_OBJECTS)
lib504_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_105 = lib505-first.$(OBJEXT)
-am_lib505_OBJECTS = lib505-lib505.$(OBJEXT) $(am__objects_105)
+am__objects_117 = lib505-first.$(OBJEXT)
+am_lib505_OBJECTS = lib505-lib505.$(OBJEXT) $(am__objects_117)
lib505_OBJECTS = $(am_lib505_OBJECTS)
lib505_LDADD = $(LDADD)
lib505_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_106 = lib506-first.$(OBJEXT)
-am_lib506_OBJECTS = lib506-lib506.$(OBJEXT) $(am__objects_106)
+am__objects_118 = lib506-first.$(OBJEXT)
+am_lib506_OBJECTS = lib506-lib506.$(OBJEXT) $(am__objects_118)
lib506_OBJECTS = $(am_lib506_OBJECTS)
lib506_LDADD = $(LDADD)
lib506_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_107 = lib507-first.$(OBJEXT)
-am__objects_108 = lib507-testutil.$(OBJEXT)
-am__objects_109 = ../../lib/lib507-warnless.$(OBJEXT)
-am_lib507_OBJECTS = lib507-lib507.$(OBJEXT) $(am__objects_107) \
- $(am__objects_108) $(am__objects_109)
+am__objects_119 = lib507-first.$(OBJEXT)
+am__objects_120 = lib507-testutil.$(OBJEXT)
+am__objects_121 = ../../lib/lib507-warnless.$(OBJEXT)
+am_lib507_OBJECTS = lib507-lib507.$(OBJEXT) $(am__objects_119) \
+ $(am__objects_120) $(am__objects_121)
lib507_OBJECTS = $(am_lib507_OBJECTS)
lib507_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_110 = lib508-first.$(OBJEXT)
-am_lib508_OBJECTS = lib508-lib508.$(OBJEXT) $(am__objects_110)
+am__objects_122 = lib508-first.$(OBJEXT)
+am_lib508_OBJECTS = lib508-lib508.$(OBJEXT) $(am__objects_122)
lib508_OBJECTS = $(am_lib508_OBJECTS)
lib508_LDADD = $(LDADD)
lib508_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_111 = lib509-first.$(OBJEXT)
-am_lib509_OBJECTS = lib509-lib509.$(OBJEXT) $(am__objects_111)
+am__objects_123 = lib509-first.$(OBJEXT)
+am_lib509_OBJECTS = lib509-lib509.$(OBJEXT) $(am__objects_123)
lib509_OBJECTS = $(am_lib509_OBJECTS)
lib509_LDADD = $(LDADD)
lib509_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_112 = lib510-first.$(OBJEXT)
-am_lib510_OBJECTS = lib510-lib510.$(OBJEXT) $(am__objects_112)
+am__objects_124 = lib510-first.$(OBJEXT)
+am_lib510_OBJECTS = lib510-lib510.$(OBJEXT) $(am__objects_124)
lib510_OBJECTS = $(am_lib510_OBJECTS)
lib510_LDADD = $(LDADD)
lib510_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_113 = lib511-first.$(OBJEXT)
-am_lib511_OBJECTS = lib511-lib511.$(OBJEXT) $(am__objects_113)
+am__objects_125 = lib511-first.$(OBJEXT)
+am_lib511_OBJECTS = lib511-lib511.$(OBJEXT) $(am__objects_125)
lib511_OBJECTS = $(am_lib511_OBJECTS)
lib511_LDADD = $(LDADD)
lib511_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_114 = lib512-first.$(OBJEXT)
-am_lib512_OBJECTS = lib512-lib512.$(OBJEXT) $(am__objects_114)
+am__objects_126 = lib512-first.$(OBJEXT)
+am_lib512_OBJECTS = lib512-lib512.$(OBJEXT) $(am__objects_126)
lib512_OBJECTS = $(am_lib512_OBJECTS)
lib512_LDADD = $(LDADD)
lib512_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_115 = lib513-first.$(OBJEXT)
-am_lib513_OBJECTS = lib513-lib513.$(OBJEXT) $(am__objects_115)
+am__objects_127 = lib513-first.$(OBJEXT)
+am_lib513_OBJECTS = lib513-lib513.$(OBJEXT) $(am__objects_127)
lib513_OBJECTS = $(am_lib513_OBJECTS)
lib513_LDADD = $(LDADD)
lib513_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_116 = lib514-first.$(OBJEXT)
-am_lib514_OBJECTS = lib514-lib514.$(OBJEXT) $(am__objects_116)
+am__objects_128 = lib514-first.$(OBJEXT)
+am_lib514_OBJECTS = lib514-lib514.$(OBJEXT) $(am__objects_128)
lib514_OBJECTS = $(am_lib514_OBJECTS)
lib514_LDADD = $(LDADD)
lib514_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_117 = lib515-first.$(OBJEXT)
-am_lib515_OBJECTS = lib515-lib515.$(OBJEXT) $(am__objects_117)
+am__objects_129 = lib515-first.$(OBJEXT)
+am_lib515_OBJECTS = lib515-lib515.$(OBJEXT) $(am__objects_129)
lib515_OBJECTS = $(am_lib515_OBJECTS)
lib515_LDADD = $(LDADD)
lib515_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_118 = lib516-first.$(OBJEXT)
-am_lib516_OBJECTS = lib516-lib516.$(OBJEXT) $(am__objects_118)
+am__objects_130 = lib516-first.$(OBJEXT)
+am_lib516_OBJECTS = lib516-lib516.$(OBJEXT) $(am__objects_130)
lib516_OBJECTS = $(am_lib516_OBJECTS)
lib516_LDADD = $(LDADD)
lib516_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_119 = lib517-first.$(OBJEXT)
-am_lib517_OBJECTS = lib517-lib517.$(OBJEXT) $(am__objects_119)
+am__objects_131 = lib517-first.$(OBJEXT)
+am_lib517_OBJECTS = lib517-lib517.$(OBJEXT) $(am__objects_131)
lib517_OBJECTS = $(am_lib517_OBJECTS)
lib517_LDADD = $(LDADD)
lib517_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_120 = lib518-first.$(OBJEXT)
-am__objects_121 = ../../lib/lib518-warnless.$(OBJEXT)
-am_lib518_OBJECTS = lib518-lib518.$(OBJEXT) $(am__objects_120) \
- $(am__objects_121)
+am__objects_132 = lib518-first.$(OBJEXT)
+am__objects_133 = ../../lib/lib518-warnless.$(OBJEXT)
+am_lib518_OBJECTS = lib518-lib518.$(OBJEXT) $(am__objects_132) \
+ $(am__objects_133)
lib518_OBJECTS = $(am_lib518_OBJECTS)
lib518_LDADD = $(LDADD)
lib518_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_122 = lib519-first.$(OBJEXT)
-am_lib519_OBJECTS = lib519-lib519.$(OBJEXT) $(am__objects_122)
+am__objects_134 = lib519-first.$(OBJEXT)
+am_lib519_OBJECTS = lib519-lib519.$(OBJEXT) $(am__objects_134)
lib519_OBJECTS = $(am_lib519_OBJECTS)
lib519_LDADD = $(LDADD)
lib519_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_123 = lib520-first.$(OBJEXT)
-am_lib520_OBJECTS = lib520-lib520.$(OBJEXT) $(am__objects_123)
+am__objects_135 = lib520-first.$(OBJEXT)
+am_lib520_OBJECTS = lib520-lib520.$(OBJEXT) $(am__objects_135)
lib520_OBJECTS = $(am_lib520_OBJECTS)
lib520_LDADD = $(LDADD)
lib520_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_124 = lib521-first.$(OBJEXT)
-am_lib521_OBJECTS = lib521-lib521.$(OBJEXT) $(am__objects_124)
+am__objects_136 = lib521-first.$(OBJEXT)
+am_lib521_OBJECTS = lib521-lib521.$(OBJEXT) $(am__objects_136)
lib521_OBJECTS = $(am_lib521_OBJECTS)
lib521_LDADD = $(LDADD)
lib521_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_125 = lib523-first.$(OBJEXT)
-am_lib523_OBJECTS = lib523-lib523.$(OBJEXT) $(am__objects_125)
+am__objects_137 = lib523-first.$(OBJEXT)
+am_lib523_OBJECTS = lib523-lib523.$(OBJEXT) $(am__objects_137)
lib523_OBJECTS = $(am_lib523_OBJECTS)
lib523_LDADD = $(LDADD)
lib523_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_126 = lib524-first.$(OBJEXT)
-am_lib524_OBJECTS = lib524-lib524.$(OBJEXT) $(am__objects_126)
+am__objects_138 = lib524-first.$(OBJEXT)
+am_lib524_OBJECTS = lib524-lib524.$(OBJEXT) $(am__objects_138)
lib524_OBJECTS = $(am_lib524_OBJECTS)
lib524_LDADD = $(LDADD)
lib524_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_127 = lib525-first.$(OBJEXT)
-am__objects_128 = lib525-testutil.$(OBJEXT)
-am__objects_129 = ../../lib/lib525-warnless.$(OBJEXT)
-am_lib525_OBJECTS = lib525-lib525.$(OBJEXT) $(am__objects_127) \
- $(am__objects_128) $(am__objects_129)
+am__objects_139 = lib525-first.$(OBJEXT)
+am__objects_140 = lib525-testutil.$(OBJEXT)
+am__objects_141 = ../../lib/lib525-warnless.$(OBJEXT)
+am_lib525_OBJECTS = lib525-lib525.$(OBJEXT) $(am__objects_139) \
+ $(am__objects_140) $(am__objects_141)
lib525_OBJECTS = $(am_lib525_OBJECTS)
lib525_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_130 = lib526-first.$(OBJEXT)
-am__objects_131 = lib526-testutil.$(OBJEXT)
-am__objects_132 = ../../lib/lib526-warnless.$(OBJEXT)
-am_lib526_OBJECTS = lib526-lib526.$(OBJEXT) $(am__objects_130) \
- $(am__objects_131) $(am__objects_132)
+am__objects_142 = lib526-first.$(OBJEXT)
+am__objects_143 = lib526-testutil.$(OBJEXT)
+am__objects_144 = ../../lib/lib526-warnless.$(OBJEXT)
+am_lib526_OBJECTS = lib526-lib526.$(OBJEXT) $(am__objects_142) \
+ $(am__objects_143) $(am__objects_144)
lib526_OBJECTS = $(am_lib526_OBJECTS)
lib526_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_133 = lib527-first.$(OBJEXT)
-am__objects_134 = lib527-testutil.$(OBJEXT)
-am__objects_135 = ../../lib/lib527-warnless.$(OBJEXT)
-am_lib527_OBJECTS = lib527-lib526.$(OBJEXT) $(am__objects_133) \
- $(am__objects_134) $(am__objects_135)
+am__objects_145 = lib527-first.$(OBJEXT)
+am__objects_146 = lib527-testutil.$(OBJEXT)
+am__objects_147 = ../../lib/lib527-warnless.$(OBJEXT)
+am_lib527_OBJECTS = lib527-lib526.$(OBJEXT) $(am__objects_145) \
+ $(am__objects_146) $(am__objects_147)
lib527_OBJECTS = $(am_lib527_OBJECTS)
lib527_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_136 = lib529-first.$(OBJEXT)
-am__objects_137 = lib529-testutil.$(OBJEXT)
-am__objects_138 = ../../lib/lib529-warnless.$(OBJEXT)
-am_lib529_OBJECTS = lib529-lib525.$(OBJEXT) $(am__objects_136) \
- $(am__objects_137) $(am__objects_138)
+am__objects_148 = lib529-first.$(OBJEXT)
+am__objects_149 = lib529-testutil.$(OBJEXT)
+am__objects_150 = ../../lib/lib529-warnless.$(OBJEXT)
+am_lib529_OBJECTS = lib529-lib525.$(OBJEXT) $(am__objects_148) \
+ $(am__objects_149) $(am__objects_150)
lib529_OBJECTS = $(am_lib529_OBJECTS)
lib529_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_139 = lib530-first.$(OBJEXT)
-am__objects_140 = lib530-testutil.$(OBJEXT)
-am__objects_141 = ../../lib/lib530-warnless.$(OBJEXT)
-am_lib530_OBJECTS = lib530-lib530.$(OBJEXT) $(am__objects_139) \
- $(am__objects_140) $(am__objects_141)
+am__objects_151 = lib530-first.$(OBJEXT)
+am__objects_152 = lib530-testutil.$(OBJEXT)
+am__objects_153 = ../../lib/lib530-warnless.$(OBJEXT)
+am_lib530_OBJECTS = lib530-lib530.$(OBJEXT) $(am__objects_151) \
+ $(am__objects_152) $(am__objects_153)
lib530_OBJECTS = $(am_lib530_OBJECTS)
lib530_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_142 = lib532-first.$(OBJEXT)
-am__objects_143 = lib532-testutil.$(OBJEXT)
-am__objects_144 = ../../lib/lib532-warnless.$(OBJEXT)
-am_lib532_OBJECTS = lib532-lib526.$(OBJEXT) $(am__objects_142) \
- $(am__objects_143) $(am__objects_144)
+am__objects_154 = lib532-first.$(OBJEXT)
+am__objects_155 = lib532-testutil.$(OBJEXT)
+am__objects_156 = ../../lib/lib532-warnless.$(OBJEXT)
+am_lib532_OBJECTS = lib532-lib526.$(OBJEXT) $(am__objects_154) \
+ $(am__objects_155) $(am__objects_156)
lib532_OBJECTS = $(am_lib532_OBJECTS)
lib532_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_145 = lib533-first.$(OBJEXT)
-am__objects_146 = lib533-testutil.$(OBJEXT)
-am__objects_147 = ../../lib/lib533-warnless.$(OBJEXT)
-am_lib533_OBJECTS = lib533-lib533.$(OBJEXT) $(am__objects_145) \
- $(am__objects_146) $(am__objects_147)
+am__objects_157 = lib533-first.$(OBJEXT)
+am__objects_158 = lib533-testutil.$(OBJEXT)
+am__objects_159 = ../../lib/lib533-warnless.$(OBJEXT)
+am_lib533_OBJECTS = lib533-lib533.$(OBJEXT) $(am__objects_157) \
+ $(am__objects_158) $(am__objects_159)
lib533_OBJECTS = $(am_lib533_OBJECTS)
lib533_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_148 = lib536-first.$(OBJEXT)
-am__objects_149 = lib536-testutil.$(OBJEXT)
-am__objects_150 = ../../lib/lib536-warnless.$(OBJEXT)
-am_lib536_OBJECTS = lib536-lib536.$(OBJEXT) $(am__objects_148) \
- $(am__objects_149) $(am__objects_150)
+am__objects_160 = lib536-first.$(OBJEXT)
+am__objects_161 = lib536-testutil.$(OBJEXT)
+am__objects_162 = ../../lib/lib536-warnless.$(OBJEXT)
+am_lib536_OBJECTS = lib536-lib536.$(OBJEXT) $(am__objects_160) \
+ $(am__objects_161) $(am__objects_162)
lib536_OBJECTS = $(am_lib536_OBJECTS)
lib536_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_151 = lib537-first.$(OBJEXT)
-am__objects_152 = ../../lib/lib537-warnless.$(OBJEXT)
-am_lib537_OBJECTS = lib537-lib537.$(OBJEXT) $(am__objects_151) \
- $(am__objects_152)
+am__objects_163 = lib537-first.$(OBJEXT)
+am__objects_164 = ../../lib/lib537-warnless.$(OBJEXT)
+am_lib537_OBJECTS = lib537-lib537.$(OBJEXT) $(am__objects_163) \
+ $(am__objects_164)
lib537_OBJECTS = $(am_lib537_OBJECTS)
lib537_LDADD = $(LDADD)
lib537_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_153 = lib539-first.$(OBJEXT)
-am_lib539_OBJECTS = lib539-lib539.$(OBJEXT) $(am__objects_153)
+am__objects_165 = lib539-first.$(OBJEXT)
+am_lib539_OBJECTS = lib539-lib539.$(OBJEXT) $(am__objects_165)
lib539_OBJECTS = $(am_lib539_OBJECTS)
lib539_LDADD = $(LDADD)
lib539_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_154 = lib540-first.$(OBJEXT)
-am__objects_155 = lib540-testutil.$(OBJEXT)
-am__objects_156 = ../../lib/lib540-warnless.$(OBJEXT)
-am_lib540_OBJECTS = lib540-lib540.$(OBJEXT) $(am__objects_154) \
- $(am__objects_155) $(am__objects_156)
+am__objects_166 = lib540-first.$(OBJEXT)
+am__objects_167 = lib540-testutil.$(OBJEXT)
+am__objects_168 = ../../lib/lib540-warnless.$(OBJEXT)
+am_lib540_OBJECTS = lib540-lib540.$(OBJEXT) $(am__objects_166) \
+ $(am__objects_167) $(am__objects_168)
lib540_OBJECTS = $(am_lib540_OBJECTS)
lib540_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_157 = lib541-first.$(OBJEXT)
-am_lib541_OBJECTS = lib541-lib541.$(OBJEXT) $(am__objects_157)
+am__objects_169 = lib541-first.$(OBJEXT)
+am_lib541_OBJECTS = lib541-lib541.$(OBJEXT) $(am__objects_169)
lib541_OBJECTS = $(am_lib541_OBJECTS)
lib541_LDADD = $(LDADD)
lib541_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_158 = lib542-first.$(OBJEXT)
-am_lib542_OBJECTS = lib542-lib542.$(OBJEXT) $(am__objects_158)
+am__objects_170 = lib542-first.$(OBJEXT)
+am_lib542_OBJECTS = lib542-lib542.$(OBJEXT) $(am__objects_170)
lib542_OBJECTS = $(am_lib542_OBJECTS)
lib542_LDADD = $(LDADD)
lib542_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_159 = lib543-first.$(OBJEXT)
-am_lib543_OBJECTS = lib543-lib543.$(OBJEXT) $(am__objects_159)
+am__objects_171 = lib543-first.$(OBJEXT)
+am_lib543_OBJECTS = lib543-lib543.$(OBJEXT) $(am__objects_171)
lib543_OBJECTS = $(am_lib543_OBJECTS)
lib543_LDADD = $(LDADD)
lib543_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_160 = lib544-first.$(OBJEXT)
-am_lib544_OBJECTS = lib544-lib544.$(OBJEXT) $(am__objects_160)
+am__objects_172 = lib544-first.$(OBJEXT)
+am_lib544_OBJECTS = lib544-lib544.$(OBJEXT) $(am__objects_172)
lib544_OBJECTS = $(am_lib544_OBJECTS)
lib544_LDADD = $(LDADD)
lib544_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_161 = lib545-first.$(OBJEXT)
-am_lib545_OBJECTS = lib545-lib544.$(OBJEXT) $(am__objects_161)
+am__objects_173 = lib545-first.$(OBJEXT)
+am_lib545_OBJECTS = lib545-lib544.$(OBJEXT) $(am__objects_173)
lib545_OBJECTS = $(am_lib545_OBJECTS)
lib545_LDADD = $(LDADD)
lib545_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_162 = lib547-first.$(OBJEXT)
-am_lib547_OBJECTS = lib547-lib547.$(OBJEXT) $(am__objects_162)
+am__objects_174 = lib547-first.$(OBJEXT)
+am_lib547_OBJECTS = lib547-lib547.$(OBJEXT) $(am__objects_174)
lib547_OBJECTS = $(am_lib547_OBJECTS)
lib547_LDADD = $(LDADD)
lib547_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_163 = lib548-first.$(OBJEXT)
-am_lib548_OBJECTS = lib548-lib547.$(OBJEXT) $(am__objects_163)
+am__objects_175 = lib548-first.$(OBJEXT)
+am_lib548_OBJECTS = lib548-lib547.$(OBJEXT) $(am__objects_175)
lib548_OBJECTS = $(am_lib548_OBJECTS)
lib548_LDADD = $(LDADD)
lib548_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_164 = lib549-first.$(OBJEXT)
-am_lib549_OBJECTS = lib549-lib549.$(OBJEXT) $(am__objects_164)
+am__objects_176 = lib549-first.$(OBJEXT)
+am_lib549_OBJECTS = lib549-lib549.$(OBJEXT) $(am__objects_176)
lib549_OBJECTS = $(am_lib549_OBJECTS)
lib549_LDADD = $(LDADD)
lib549_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_165 = lib552-first.$(OBJEXT)
-am__objects_166 = ../../lib/lib552-warnless.$(OBJEXT)
-am_lib552_OBJECTS = lib552-lib552.$(OBJEXT) $(am__objects_165) \
- $(am__objects_166)
+am__objects_177 = lib552-first.$(OBJEXT)
+am__objects_178 = ../../lib/lib552-warnless.$(OBJEXT)
+am_lib552_OBJECTS = lib552-lib552.$(OBJEXT) $(am__objects_177) \
+ $(am__objects_178)
lib552_OBJECTS = $(am_lib552_OBJECTS)
lib552_LDADD = $(LDADD)
lib552_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_167 = lib553-first.$(OBJEXT)
-am_lib553_OBJECTS = lib553-lib553.$(OBJEXT) $(am__objects_167)
+am__objects_179 = lib553-first.$(OBJEXT)
+am_lib553_OBJECTS = lib553-lib553.$(OBJEXT) $(am__objects_179)
lib553_OBJECTS = $(am_lib553_OBJECTS)
lib553_LDADD = $(LDADD)
lib553_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_168 = lib554-first.$(OBJEXT)
-am_lib554_OBJECTS = lib554-lib554.$(OBJEXT) $(am__objects_168)
+am__objects_180 = lib554-first.$(OBJEXT)
+am_lib554_OBJECTS = lib554-lib554.$(OBJEXT) $(am__objects_180)
lib554_OBJECTS = $(am_lib554_OBJECTS)
lib554_LDADD = $(LDADD)
lib554_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_169 = lib555-first.$(OBJEXT)
-am__objects_170 = lib555-testutil.$(OBJEXT)
-am__objects_171 = ../../lib/lib555-warnless.$(OBJEXT)
-am_lib555_OBJECTS = lib555-lib555.$(OBJEXT) $(am__objects_169) \
- $(am__objects_170) $(am__objects_171)
+am__objects_181 = lib555-first.$(OBJEXT)
+am__objects_182 = lib555-testutil.$(OBJEXT)
+am__objects_183 = ../../lib/lib555-warnless.$(OBJEXT)
+am_lib555_OBJECTS = lib555-lib555.$(OBJEXT) $(am__objects_181) \
+ $(am__objects_182) $(am__objects_183)
lib555_OBJECTS = $(am_lib555_OBJECTS)
lib555_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_172 = lib556-first.$(OBJEXT)
-am__objects_173 = ../../lib/lib556-warnless.$(OBJEXT)
-am_lib556_OBJECTS = lib556-lib556.$(OBJEXT) $(am__objects_172) \
- $(am__objects_173)
+am__objects_184 = lib556-first.$(OBJEXT)
+am__objects_185 = ../../lib/lib556-warnless.$(OBJEXT)
+am_lib556_OBJECTS = lib556-lib556.$(OBJEXT) $(am__objects_184) \
+ $(am__objects_185)
lib556_OBJECTS = $(am_lib556_OBJECTS)
lib556_LDADD = $(LDADD)
lib556_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_174 = lib557-first.$(OBJEXT)
-am_lib557_OBJECTS = lib557-lib557.$(OBJEXT) $(am__objects_174)
+am__objects_186 = lib557-first.$(OBJEXT)
+am_lib557_OBJECTS = lib557-lib557.$(OBJEXT) $(am__objects_186)
lib557_OBJECTS = $(am_lib557_OBJECTS)
lib557_LDADD = $(LDADD)
lib557_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_175 = lib558-first.$(OBJEXT)
-am_lib558_OBJECTS = lib558-lib558.$(OBJEXT) $(am__objects_175)
+am__objects_187 = lib558-first.$(OBJEXT)
+am_lib558_OBJECTS = lib558-lib558.$(OBJEXT) $(am__objects_187)
lib558_OBJECTS = $(am_lib558_OBJECTS)
lib558_LDADD = $(LDADD)
lib558_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_176 = lib560-first.$(OBJEXT)
-am__objects_177 = lib560-testutil.$(OBJEXT)
-am__objects_178 = ../../lib/lib560-warnless.$(OBJEXT)
-am_lib560_OBJECTS = lib560-lib560.$(OBJEXT) $(am__objects_176) \
- $(am__objects_177) $(am__objects_178)
+am__objects_188 = lib559-first.$(OBJEXT)
+am_lib559_OBJECTS = lib559-lib559.$(OBJEXT) $(am__objects_188)
+lib559_OBJECTS = $(am_lib559_OBJECTS)
+lib559_LDADD = $(LDADD)
+lib559_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am__objects_189 = lib560-first.$(OBJEXT)
+am__objects_190 = lib560-testutil.$(OBJEXT)
+am__objects_191 = ../../lib/lib560-warnless.$(OBJEXT)
+am_lib560_OBJECTS = lib560-lib560.$(OBJEXT) $(am__objects_189) \
+ $(am__objects_190) $(am__objects_191)
lib560_OBJECTS = $(am_lib560_OBJECTS)
lib560_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_179 = lib562-first.$(OBJEXT)
-am_lib562_OBJECTS = lib562-lib562.$(OBJEXT) $(am__objects_179)
+am__objects_192 = lib562-first.$(OBJEXT)
+am_lib562_OBJECTS = lib562-lib562.$(OBJEXT) $(am__objects_192)
lib562_OBJECTS = $(am_lib562_OBJECTS)
lib562_LDADD = $(LDADD)
lib562_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_180 = lib564-first.$(OBJEXT)
-am__objects_181 = lib564-testutil.$(OBJEXT)
-am__objects_182 = ../../lib/lib564-warnless.$(OBJEXT)
-am_lib564_OBJECTS = lib564-lib564.$(OBJEXT) $(am__objects_180) \
- $(am__objects_181) $(am__objects_182)
+am__objects_193 = lib564-first.$(OBJEXT)
+am__objects_194 = lib564-testutil.$(OBJEXT)
+am__objects_195 = ../../lib/lib564-warnless.$(OBJEXT)
+am_lib564_OBJECTS = lib564-lib564.$(OBJEXT) $(am__objects_193) \
+ $(am__objects_194) $(am__objects_195)
lib564_OBJECTS = $(am_lib564_OBJECTS)
lib564_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_183 = lib565-first.$(OBJEXT)
-am_lib565_OBJECTS = lib565-lib510.$(OBJEXT) $(am__objects_183)
+am__objects_196 = lib565-first.$(OBJEXT)
+am_lib565_OBJECTS = lib565-lib510.$(OBJEXT) $(am__objects_196)
lib565_OBJECTS = $(am_lib565_OBJECTS)
lib565_LDADD = $(LDADD)
lib565_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_184 = lib566-first.$(OBJEXT)
-am_lib566_OBJECTS = lib566-lib566.$(OBJEXT) $(am__objects_184)
+am__objects_197 = lib566-first.$(OBJEXT)
+am_lib566_OBJECTS = lib566-lib566.$(OBJEXT) $(am__objects_197)
lib566_OBJECTS = $(am_lib566_OBJECTS)
lib566_LDADD = $(LDADD)
lib566_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_185 = lib567-first.$(OBJEXT)
-am_lib567_OBJECTS = lib567-lib567.$(OBJEXT) $(am__objects_185)
+am__objects_198 = lib567-first.$(OBJEXT)
+am_lib567_OBJECTS = lib567-lib567.$(OBJEXT) $(am__objects_198)
lib567_OBJECTS = $(am_lib567_OBJECTS)
lib567_LDADD = $(LDADD)
lib567_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_186 = lib568-first.$(OBJEXT)
-am_lib568_OBJECTS = lib568-lib568.$(OBJEXT) $(am__objects_186)
+am__objects_199 = lib568-first.$(OBJEXT)
+am_lib568_OBJECTS = lib568-lib568.$(OBJEXT) $(am__objects_199)
lib568_OBJECTS = $(am_lib568_OBJECTS)
lib568_LDADD = $(LDADD)
lib568_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_187 = lib569-first.$(OBJEXT)
-am_lib569_OBJECTS = lib569-lib569.$(OBJEXT) $(am__objects_187)
+am__objects_200 = lib569-first.$(OBJEXT)
+am_lib569_OBJECTS = lib569-lib569.$(OBJEXT) $(am__objects_200)
lib569_OBJECTS = $(am_lib569_OBJECTS)
lib569_LDADD = $(LDADD)
lib569_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_188 = lib570-first.$(OBJEXT)
-am_lib570_OBJECTS = lib570-lib570.$(OBJEXT) $(am__objects_188)
+am__objects_201 = lib570-first.$(OBJEXT)
+am_lib570_OBJECTS = lib570-lib570.$(OBJEXT) $(am__objects_201)
lib570_OBJECTS = $(am_lib570_OBJECTS)
lib570_LDADD = $(LDADD)
lib570_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_189 = lib571-first.$(OBJEXT)
-am__objects_190 = ../../lib/lib571-warnless.$(OBJEXT)
-am_lib571_OBJECTS = lib571-lib571.$(OBJEXT) $(am__objects_189) \
- $(am__objects_190)
+am__objects_202 = lib571-first.$(OBJEXT)
+am__objects_203 = ../../lib/lib571-warnless.$(OBJEXT)
+am_lib571_OBJECTS = lib571-lib571.$(OBJEXT) $(am__objects_202) \
+ $(am__objects_203)
lib571_OBJECTS = $(am_lib571_OBJECTS)
lib571_LDADD = $(LDADD)
lib571_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_191 = lib572-first.$(OBJEXT)
-am_lib572_OBJECTS = lib572-lib572.$(OBJEXT) $(am__objects_191)
+am__objects_204 = lib572-first.$(OBJEXT)
+am_lib572_OBJECTS = lib572-lib572.$(OBJEXT) $(am__objects_204)
lib572_OBJECTS = $(am_lib572_OBJECTS)
lib572_LDADD = $(LDADD)
lib572_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_192 = lib573-first.$(OBJEXT)
-am__objects_193 = lib573-testutil.$(OBJEXT)
-am__objects_194 = ../../lib/lib573-warnless.$(OBJEXT)
-am__objects_195 = lib573-testtrace.$(OBJEXT)
-am_lib573_OBJECTS = lib573-lib573.$(OBJEXT) $(am__objects_192) \
- $(am__objects_193) $(am__objects_194) $(am__objects_195)
+am__objects_205 = lib573-first.$(OBJEXT)
+am__objects_206 = lib573-testutil.$(OBJEXT)
+am__objects_207 = ../../lib/lib573-warnless.$(OBJEXT)
+am__objects_208 = lib573-testtrace.$(OBJEXT)
+am_lib573_OBJECTS = lib573-lib573.$(OBJEXT) $(am__objects_205) \
+ $(am__objects_206) $(am__objects_207) $(am__objects_208)
lib573_OBJECTS = $(am_lib573_OBJECTS)
lib573_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_196 = lib574-first.$(OBJEXT)
-am_lib574_OBJECTS = lib574-lib574.$(OBJEXT) $(am__objects_196)
+am__objects_209 = lib574-first.$(OBJEXT)
+am_lib574_OBJECTS = lib574-lib574.$(OBJEXT) $(am__objects_209)
lib574_OBJECTS = $(am_lib574_OBJECTS)
lib574_LDADD = $(LDADD)
lib574_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_197 = lib575-first.$(OBJEXT)
-am__objects_198 = lib575-testutil.$(OBJEXT)
-am__objects_199 = ../../lib/lib575-warnless.$(OBJEXT)
-am_lib575_OBJECTS = lib575-lib575.$(OBJEXT) $(am__objects_197) \
- $(am__objects_198) $(am__objects_199)
+am__objects_210 = lib575-first.$(OBJEXT)
+am__objects_211 = lib575-testutil.$(OBJEXT)
+am__objects_212 = ../../lib/lib575-warnless.$(OBJEXT)
+am_lib575_OBJECTS = lib575-lib575.$(OBJEXT) $(am__objects_210) \
+ $(am__objects_211) $(am__objects_212)
lib575_OBJECTS = $(am_lib575_OBJECTS)
lib575_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_200 = lib576-first.$(OBJEXT)
-am_lib576_OBJECTS = lib576-lib576.$(OBJEXT) $(am__objects_200)
+am__objects_213 = lib576-first.$(OBJEXT)
+am_lib576_OBJECTS = lib576-lib576.$(OBJEXT) $(am__objects_213)
lib576_OBJECTS = $(am_lib576_OBJECTS)
lib576_LDADD = $(LDADD)
lib576_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_201 = lib578-first.$(OBJEXT)
-am_lib578_OBJECTS = lib578-lib578.$(OBJEXT) $(am__objects_201)
+am__objects_214 = lib578-first.$(OBJEXT)
+am_lib578_OBJECTS = lib578-lib578.$(OBJEXT) $(am__objects_214)
lib578_OBJECTS = $(am_lib578_OBJECTS)
lib578_LDADD = $(LDADD)
lib578_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_202 = lib579-first.$(OBJEXT)
-am_lib579_OBJECTS = lib579-lib579.$(OBJEXT) $(am__objects_202)
+am__objects_215 = lib579-first.$(OBJEXT)
+am_lib579_OBJECTS = lib579-lib579.$(OBJEXT) $(am__objects_215)
lib579_OBJECTS = $(am_lib579_OBJECTS)
lib579_LDADD = $(LDADD)
lib579_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_203 = lib582-first.$(OBJEXT)
-am__objects_204 = lib582-testutil.$(OBJEXT)
-am__objects_205 = ../../lib/lib582-warnless.$(OBJEXT)
-am_lib582_OBJECTS = lib582-lib582.$(OBJEXT) $(am__objects_203) \
- $(am__objects_204) $(am__objects_205)
+am__objects_216 = lib582-first.$(OBJEXT)
+am__objects_217 = lib582-testutil.$(OBJEXT)
+am__objects_218 = ../../lib/lib582-warnless.$(OBJEXT)
+am_lib582_OBJECTS = lib582-lib582.$(OBJEXT) $(am__objects_216) \
+ $(am__objects_217) $(am__objects_218)
lib582_OBJECTS = $(am_lib582_OBJECTS)
lib582_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_206 = lib583-first.$(OBJEXT)
-am_lib583_OBJECTS = lib583-lib583.$(OBJEXT) $(am__objects_206)
+am__objects_219 = lib583-first.$(OBJEXT)
+am_lib583_OBJECTS = lib583-lib583.$(OBJEXT) $(am__objects_219)
lib583_OBJECTS = $(am_lib583_OBJECTS)
lib583_LDADD = $(LDADD)
lib583_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_207 = lib585-first.$(OBJEXT)
-am__objects_208 = lib585-testutil.$(OBJEXT)
-am__objects_209 = lib585-testtrace.$(OBJEXT)
-am_lib585_OBJECTS = lib585-lib500.$(OBJEXT) $(am__objects_207) \
- $(am__objects_208) $(am__objects_209)
+am__objects_220 = lib585-first.$(OBJEXT)
+am__objects_221 = lib585-testutil.$(OBJEXT)
+am__objects_222 = lib585-testtrace.$(OBJEXT)
+am_lib585_OBJECTS = lib585-lib500.$(OBJEXT) $(am__objects_220) \
+ $(am__objects_221) $(am__objects_222)
lib585_OBJECTS = $(am_lib585_OBJECTS)
lib585_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_210 = lib586-first.$(OBJEXT)
-am_lib586_OBJECTS = lib586-lib586.$(OBJEXT) $(am__objects_210)
+am__objects_223 = lib586-first.$(OBJEXT)
+am_lib586_OBJECTS = lib586-lib586.$(OBJEXT) $(am__objects_223)
lib586_OBJECTS = $(am_lib586_OBJECTS)
lib586_LDADD = $(LDADD)
lib586_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_211 = lib587-first.$(OBJEXT)
-am_lib587_OBJECTS = lib587-lib554.$(OBJEXT) $(am__objects_211)
+am__objects_224 = lib587-first.$(OBJEXT)
+am_lib587_OBJECTS = lib587-lib554.$(OBJEXT) $(am__objects_224)
lib587_OBJECTS = $(am_lib587_OBJECTS)
lib587_LDADD = $(LDADD)
lib587_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_212 = lib590-first.$(OBJEXT)
-am_lib590_OBJECTS = lib590-lib590.$(OBJEXT) $(am__objects_212)
+am__objects_225 = lib590-first.$(OBJEXT)
+am_lib590_OBJECTS = lib590-lib590.$(OBJEXT) $(am__objects_225)
lib590_OBJECTS = $(am_lib590_OBJECTS)
lib590_LDADD = $(LDADD)
lib590_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_213 = lib591-first.$(OBJEXT)
-am__objects_214 = lib591-testutil.$(OBJEXT)
-am__objects_215 = ../../lib/lib591-warnless.$(OBJEXT)
-am_lib591_OBJECTS = lib591-lib591.$(OBJEXT) $(am__objects_213) \
- $(am__objects_214) $(am__objects_215)
+am__objects_226 = lib591-first.$(OBJEXT)
+am__objects_227 = lib591-testutil.$(OBJEXT)
+am__objects_228 = ../../lib/lib591-warnless.$(OBJEXT)
+am_lib591_OBJECTS = lib591-lib591.$(OBJEXT) $(am__objects_226) \
+ $(am__objects_227) $(am__objects_228)
lib591_OBJECTS = $(am_lib591_OBJECTS)
lib591_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_216 = lib597-first.$(OBJEXT)
-am__objects_217 = lib597-testutil.$(OBJEXT)
-am__objects_218 = ../../lib/lib597-warnless.$(OBJEXT)
-am_lib597_OBJECTS = lib597-lib597.$(OBJEXT) $(am__objects_216) \
- $(am__objects_217) $(am__objects_218)
+am__objects_229 = lib597-first.$(OBJEXT)
+am__objects_230 = lib597-testutil.$(OBJEXT)
+am__objects_231 = ../../lib/lib597-warnless.$(OBJEXT)
+am_lib597_OBJECTS = lib597-lib597.$(OBJEXT) $(am__objects_229) \
+ $(am__objects_230) $(am__objects_231)
lib597_OBJECTS = $(am_lib597_OBJECTS)
lib597_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_219 = lib598-first.$(OBJEXT)
-am_lib598_OBJECTS = lib598-lib598.$(OBJEXT) $(am__objects_219)
+am__objects_232 = lib598-first.$(OBJEXT)
+am_lib598_OBJECTS = lib598-lib598.$(OBJEXT) $(am__objects_232)
lib598_OBJECTS = $(am_lib598_OBJECTS)
lib598_LDADD = $(LDADD)
lib598_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_220 = lib599-first.$(OBJEXT)
-am_lib599_OBJECTS = lib599-lib599.$(OBJEXT) $(am__objects_220)
+am__objects_233 = lib599-first.$(OBJEXT)
+am_lib599_OBJECTS = lib599-lib599.$(OBJEXT) $(am__objects_233)
lib599_OBJECTS = $(am_lib599_OBJECTS)
lib599_LDADD = $(LDADD)
lib599_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_221 = libauthretry-first.$(OBJEXT)
+am__objects_234 = libauthretry-first.$(OBJEXT)
am_libauthretry_OBJECTS = libauthretry-libauthretry.$(OBJEXT) \
- $(am__objects_221)
+ $(am__objects_234)
libauthretry_OBJECTS = $(am_libauthretry_OBJECTS)
libauthretry_LDADD = $(LDADD)
libauthretry_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__objects_222 = libntlmconnect-first.$(OBJEXT)
-am__objects_223 = libntlmconnect-testutil.$(OBJEXT)
-am__objects_224 = ../../lib/libntlmconnect-warnless.$(OBJEXT)
+am__objects_235 = libntlmconnect-first.$(OBJEXT)
+am__objects_236 = libntlmconnect-testutil.$(OBJEXT)
+am__objects_237 = ../../lib/libntlmconnect-warnless.$(OBJEXT)
am_libntlmconnect_OBJECTS = libntlmconnect-libntlmconnect.$(OBJEXT) \
- $(am__objects_222) $(am__objects_223) $(am__objects_224)
+ $(am__objects_235) $(am__objects_236) $(am__objects_237)
libntlmconnect_OBJECTS = $(am_libntlmconnect_OBJECTS)
libntlmconnect_DEPENDENCIES = $(am__DEPENDENCIES_1)
AM_V_P = $(am__v_P_@AM_V@)
@@ -895,10 +938,12 @@ SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
$(lib1509_SOURCES) $(lib1510_SOURCES) $(lib1511_SOURCES) \
$(lib1512_SOURCES) $(lib1513_SOURCES) $(lib1514_SOURCES) \
$(lib1515_SOURCES) $(lib1517_SOURCES) $(lib1520_SOURCES) \
- $(lib1525_SOURCES) $(lib1526_SOURCES) $(lib1527_SOURCES) \
- $(lib1528_SOURCES) $(lib1529_SOURCES) $(lib1530_SOURCES) \
- $(lib1531_SOURCES) $(lib1532_SOURCES) $(lib1533_SOURCES) \
- $(lib1534_SOURCES) $(lib1535_SOURCES) $(lib1536_SOURCES) \
+ $(lib1521_SOURCES) $(lib1525_SOURCES) $(lib1526_SOURCES) \
+ $(lib1527_SOURCES) $(lib1528_SOURCES) $(lib1529_SOURCES) \
+ $(lib1530_SOURCES) $(lib1531_SOURCES) $(lib1532_SOURCES) \
+ $(lib1533_SOURCES) $(lib1534_SOURCES) $(lib1535_SOURCES) \
+ $(lib1536_SOURCES) $(lib1537_SOURCES) $(lib1538_SOURCES) \
+ $(lib1540_SOURCES) $(lib1550_SOURCES) $(lib1551_SOURCES) \
$(lib1900_SOURCES) $(lib2033_SOURCES) $(lib500_SOURCES) \
$(lib501_SOURCES) $(lib502_SOURCES) $(lib503_SOURCES) \
$(lib504_SOURCES) $(lib505_SOURCES) $(lib506_SOURCES) \
@@ -916,16 +961,16 @@ SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
$(lib547_SOURCES) $(lib548_SOURCES) $(lib549_SOURCES) \
$(lib552_SOURCES) $(lib553_SOURCES) $(lib554_SOURCES) \
$(lib555_SOURCES) $(lib556_SOURCES) $(lib557_SOURCES) \
- $(lib558_SOURCES) $(lib560_SOURCES) $(lib562_SOURCES) \
- $(lib564_SOURCES) $(lib565_SOURCES) $(lib566_SOURCES) \
- $(lib567_SOURCES) $(lib568_SOURCES) $(lib569_SOURCES) \
- $(lib570_SOURCES) $(lib571_SOURCES) $(lib572_SOURCES) \
- $(lib573_SOURCES) $(lib574_SOURCES) $(lib575_SOURCES) \
- $(lib576_SOURCES) $(lib578_SOURCES) $(lib579_SOURCES) \
- $(lib582_SOURCES) $(lib583_SOURCES) $(lib585_SOURCES) \
- $(lib586_SOURCES) $(lib587_SOURCES) $(lib590_SOURCES) \
- $(lib591_SOURCES) $(lib597_SOURCES) $(lib598_SOURCES) \
- $(lib599_SOURCES) $(libauthretry_SOURCES) \
+ $(lib558_SOURCES) $(lib559_SOURCES) $(lib560_SOURCES) \
+ $(lib562_SOURCES) $(lib564_SOURCES) $(lib565_SOURCES) \
+ $(lib566_SOURCES) $(lib567_SOURCES) $(lib568_SOURCES) \
+ $(lib569_SOURCES) $(lib570_SOURCES) $(lib571_SOURCES) \
+ $(lib572_SOURCES) $(lib573_SOURCES) $(lib574_SOURCES) \
+ $(lib575_SOURCES) $(lib576_SOURCES) $(lib578_SOURCES) \
+ $(lib579_SOURCES) $(lib582_SOURCES) $(lib583_SOURCES) \
+ $(lib585_SOURCES) $(lib586_SOURCES) $(lib587_SOURCES) \
+ $(lib590_SOURCES) $(lib591_SOURCES) $(lib597_SOURCES) \
+ $(lib598_SOURCES) $(lib599_SOURCES) $(libauthretry_SOURCES) \
$(libntlmconnect_SOURCES)
DIST_SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
$(lib1500_SOURCES) $(lib1501_SOURCES) $(lib1502_SOURCES) \
@@ -934,10 +979,12 @@ DIST_SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
$(lib1509_SOURCES) $(lib1510_SOURCES) $(lib1511_SOURCES) \
$(lib1512_SOURCES) $(lib1513_SOURCES) $(lib1514_SOURCES) \
$(lib1515_SOURCES) $(lib1517_SOURCES) $(lib1520_SOURCES) \
- $(lib1525_SOURCES) $(lib1526_SOURCES) $(lib1527_SOURCES) \
- $(lib1528_SOURCES) $(lib1529_SOURCES) $(lib1530_SOURCES) \
- $(lib1531_SOURCES) $(lib1532_SOURCES) $(lib1533_SOURCES) \
- $(lib1534_SOURCES) $(lib1535_SOURCES) $(lib1536_SOURCES) \
+ $(lib1521_SOURCES) $(lib1525_SOURCES) $(lib1526_SOURCES) \
+ $(lib1527_SOURCES) $(lib1528_SOURCES) $(lib1529_SOURCES) \
+ $(lib1530_SOURCES) $(lib1531_SOURCES) $(lib1532_SOURCES) \
+ $(lib1533_SOURCES) $(lib1534_SOURCES) $(lib1535_SOURCES) \
+ $(lib1536_SOURCES) $(lib1537_SOURCES) $(lib1538_SOURCES) \
+ $(lib1540_SOURCES) $(lib1550_SOURCES) $(lib1551_SOURCES) \
$(lib1900_SOURCES) $(lib2033_SOURCES) $(lib500_SOURCES) \
$(lib501_SOURCES) $(lib502_SOURCES) $(lib503_SOURCES) \
$(lib504_SOURCES) $(lib505_SOURCES) $(lib506_SOURCES) \
@@ -955,16 +1002,16 @@ DIST_SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \
$(lib547_SOURCES) $(lib548_SOURCES) $(lib549_SOURCES) \
$(lib552_SOURCES) $(lib553_SOURCES) $(lib554_SOURCES) \
$(lib555_SOURCES) $(lib556_SOURCES) $(lib557_SOURCES) \
- $(lib558_SOURCES) $(lib560_SOURCES) $(lib562_SOURCES) \
- $(lib564_SOURCES) $(lib565_SOURCES) $(lib566_SOURCES) \
- $(lib567_SOURCES) $(lib568_SOURCES) $(lib569_SOURCES) \
- $(lib570_SOURCES) $(lib571_SOURCES) $(lib572_SOURCES) \
- $(lib573_SOURCES) $(lib574_SOURCES) $(lib575_SOURCES) \
- $(lib576_SOURCES) $(lib578_SOURCES) $(lib579_SOURCES) \
- $(lib582_SOURCES) $(lib583_SOURCES) $(lib585_SOURCES) \
- $(lib586_SOURCES) $(lib587_SOURCES) $(lib590_SOURCES) \
- $(lib591_SOURCES) $(lib597_SOURCES) $(lib598_SOURCES) \
- $(lib599_SOURCES) $(libauthretry_SOURCES) \
+ $(lib558_SOURCES) $(lib559_SOURCES) $(lib560_SOURCES) \
+ $(lib562_SOURCES) $(lib564_SOURCES) $(lib565_SOURCES) \
+ $(lib566_SOURCES) $(lib567_SOURCES) $(lib568_SOURCES) \
+ $(lib569_SOURCES) $(lib570_SOURCES) $(lib571_SOURCES) \
+ $(lib572_SOURCES) $(lib573_SOURCES) $(lib574_SOURCES) \
+ $(lib575_SOURCES) $(lib576_SOURCES) $(lib578_SOURCES) \
+ $(lib579_SOURCES) $(lib582_SOURCES) $(lib583_SOURCES) \
+ $(lib585_SOURCES) $(lib586_SOURCES) $(lib587_SOURCES) \
+ $(lib590_SOURCES) $(lib591_SOURCES) $(lib597_SOURCES) \
+ $(lib598_SOURCES) $(lib599_SOURCES) $(libauthretry_SOURCES) \
$(libntlmconnect_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
@@ -1007,6 +1054,12 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
+CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
+CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
+CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -1046,6 +1099,8 @@ ENABLE_SHARED = @ENABLE_SHARED@
ENABLE_STATIC = @ENABLE_STATIC@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GCOV = @GCOV@
+GENHTML = @GENHTML@
GREP = @GREP@
HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
@@ -1058,6 +1113,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPV6_ENABLED = @IPV6_ENABLED@
+LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_LIBS = @LIBCURL_LIBS@
@@ -1193,7 +1249,7 @@ top_srcdir = @top_srcdir@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -1208,9 +1264,7 @@ top_srcdir = @top_srcdir@
#
###########################################################################
AUTOMAKE_OPTIONS = foreign nostdinc
-@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_srcdir)/include \
@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \
@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib $(am__append_1)
@@ -1219,31 +1273,26 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# being currently built and tested are searched before the library which
# might possibly already be installed in the system.
#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files
-@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_srcdir)/include \
@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \
@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \
@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \
@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/ares $(am__append_1)
EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
-test1022.pl Makefile.inc notexists.pl CMakeLists.txt
+test1022.pl Makefile.inc notexists.pl CMakeLists.txt mk-lib1521.pl
@USE_EXPLICIT_LIB_DEPS_FALSE@SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_LIBS@ @NSS_LIBS@
@USE_EXPLICIT_LIB_DEPS_TRUE@SUPPORTFILES_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
@USE_EXPLICIT_LIB_DEPS_FALSE@TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @CURL_NETWORK_AND_TIME_LIBS@ @NSS_LIBS@
@USE_EXPLICIT_LIB_DEPS_TRUE@TESTUTIL_LIBS = $(top_builddir)/lib/libcurl.la @LIBCURL_LIBS@
-# Dependencies (may need to be overriden)
+# Dependencies (may need to be overridden)
LDADD = $(SUPPORTFILES_LIBS)
-DEPENDENCIES = $(top_builddir)/lib/libcurl.la
# files used only in some libcurl test programs
TESTUTIL = testutil.c testutil.h
@@ -1380,6 +1429,8 @@ lib557_SOURCES = lib557.c $(SUPPORTFILES)
lib557_CPPFLAGS = $(AM_CPPFLAGS)
lib558_SOURCES = lib558.c $(SUPPORTFILES)
lib558_CPPFLAGS = $(AM_CPPFLAGS)
+lib559_SOURCES = lib559.c $(SUPPORTFILES)
+lib559_CPPFLAGS = $(AM_CPPFLAGS)
lib560_SOURCES = lib560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib560_LDADD = $(TESTUTIL_LIBS)
lib560_CPPFLAGS = $(AM_CPPFLAGS)
@@ -1494,6 +1545,8 @@ lib1517_SOURCES = lib1517.c $(SUPPORTFILES)
lib1517_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1517
lib1520_SOURCES = lib1520.c $(SUPPORTFILES)
lib1520_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1520
+lib1521_SOURCES = lib1521.c $(SUPPORTFILES)
+lib1521_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)
lib1525_SOURCES = lib1525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1525_LDADD = $(TESTUTIL_LIBS)
lib1525_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1525
@@ -1530,6 +1583,19 @@ lib1535_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1535
lib1536_SOURCES = lib1536.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1536_LDADD = $(TESTUTIL_LIBS)
lib1536_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1536
+lib1537_SOURCES = lib1537.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1537_LDADD = $(TESTUTIL_LIBS)
+lib1537_CPPFLAGS = $(AM_CPPFLAGS)
+lib1538_SOURCES = lib1538.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1538_LDADD = $(TESTUTIL_LIBS)
+lib1538_CPPFLAGS = $(AM_CPPFLAGS)
+lib1540_SOURCES = lib1540.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1540_LDADD = $(TESTUTIL_LIBS)
+lib1540_CPPFLAGS = $(AM_CPPFLAGS)
+lib1550_SOURCES = lib1550.c $(SUPPORTFILES)
+lib1550_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1517
+lib1551_SOURCES = lib1551.c $(SUPPORTFILES)
+lib1551_CPPFLAGS = $(AM_CPPFLAGS)
lib1900_SOURCES = lib1900.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1900_LDADD = $(TESTUTIL_LIBS)
lib1900_CPPFLAGS = $(AM_CPPFLAGS)
@@ -1727,6 +1793,10 @@ lib1517$(EXEEXT): $(lib1517_OBJECTS) $(lib1517_DEPENDENCIES) $(EXTRA_lib1517_DEP
lib1520$(EXEEXT): $(lib1520_OBJECTS) $(lib1520_DEPENDENCIES) $(EXTRA_lib1520_DEPENDENCIES)
@rm -f lib1520$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(lib1520_OBJECTS) $(lib1520_LDADD) $(LIBS)
+
+lib1521$(EXEEXT): $(lib1521_OBJECTS) $(lib1521_DEPENDENCIES) $(EXTRA_lib1521_DEPENDENCIES)
+ @rm -f lib1521$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(lib1521_OBJECTS) $(lib1521_LDADD) $(LIBS)
../../lib/lib1525-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
../../lib/$(DEPDIR)/$(am__dirstamp)
@@ -1799,6 +1869,32 @@ lib1535$(EXEEXT): $(lib1535_OBJECTS) $(lib1535_DEPENDENCIES) $(EXTRA_lib1535_DEP
lib1536$(EXEEXT): $(lib1536_OBJECTS) $(lib1536_DEPENDENCIES) $(EXTRA_lib1536_DEPENDENCIES)
@rm -f lib1536$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(lib1536_OBJECTS) $(lib1536_LDADD) $(LIBS)
+../../lib/lib1537-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
+ ../../lib/$(DEPDIR)/$(am__dirstamp)
+
+lib1537$(EXEEXT): $(lib1537_OBJECTS) $(lib1537_DEPENDENCIES) $(EXTRA_lib1537_DEPENDENCIES)
+ @rm -f lib1537$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(lib1537_OBJECTS) $(lib1537_LDADD) $(LIBS)
+../../lib/lib1538-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
+ ../../lib/$(DEPDIR)/$(am__dirstamp)
+
+lib1538$(EXEEXT): $(lib1538_OBJECTS) $(lib1538_DEPENDENCIES) $(EXTRA_lib1538_DEPENDENCIES)
+ @rm -f lib1538$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(lib1538_OBJECTS) $(lib1538_LDADD) $(LIBS)
+../../lib/lib1540-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
+ ../../lib/$(DEPDIR)/$(am__dirstamp)
+
+lib1540$(EXEEXT): $(lib1540_OBJECTS) $(lib1540_DEPENDENCIES) $(EXTRA_lib1540_DEPENDENCIES)
+ @rm -f lib1540$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(lib1540_OBJECTS) $(lib1540_LDADD) $(LIBS)
+
+lib1550$(EXEEXT): $(lib1550_OBJECTS) $(lib1550_DEPENDENCIES) $(EXTRA_lib1550_DEPENDENCIES)
+ @rm -f lib1550$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(lib1550_OBJECTS) $(lib1550_LDADD) $(LIBS)
+
+lib1551$(EXEEXT): $(lib1551_OBJECTS) $(lib1551_DEPENDENCIES) $(EXTRA_lib1551_DEPENDENCIES)
+ @rm -f lib1551$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(lib1551_OBJECTS) $(lib1551_LDADD) $(LIBS)
../../lib/lib1900-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
../../lib/$(DEPDIR)/$(am__dirstamp)
@@ -2047,6 +2143,10 @@ lib557$(EXEEXT): $(lib557_OBJECTS) $(lib557_DEPENDENCIES) $(EXTRA_lib557_DEPENDE
lib558$(EXEEXT): $(lib558_OBJECTS) $(lib558_DEPENDENCIES) $(EXTRA_lib558_DEPENDENCIES)
@rm -f lib558$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(lib558_OBJECTS) $(lib558_LDADD) $(LIBS)
+
+lib559$(EXEEXT): $(lib559_OBJECTS) $(lib559_DEPENDENCIES) $(EXTRA_lib559_DEPENDENCIES)
+ @rm -f lib559$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(lib559_OBJECTS) $(lib559_LDADD) $(LIBS)
../../lib/lib560-warnless.$(OBJEXT): ../../lib/$(am__dirstamp) \
../../lib/$(DEPDIR)/$(am__dirstamp)
@@ -2217,6 +2317,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/lib1534-warnless.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/lib1535-warnless.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/lib1536-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/lib1537-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/lib1538-warnless.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/lib1540-warnless.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/lib1900-warnless.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/lib2033-warnless.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../../lib/$(DEPDIR)/lib502-warnless.Po@am__quote@
@@ -2299,6 +2402,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1517-lib1517.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1520-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1520-lib1520.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1521-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1521-lib1521.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1525-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1525-lib1525.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1525-testutil.Po@am__quote@
@@ -2335,6 +2440,19 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1536-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1536-lib1536.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1536-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1537-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1537-lib1537.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1537-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1538-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1538-lib1538.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1538-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1540-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1540-lib1540.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1540-testutil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1550-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1550-lib1550.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1551-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1551-lib1551.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1900-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1900-lib1900.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1900-testutil.Po@am__quote@
@@ -2457,6 +2575,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib557-lib557.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib558-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib558-lib558.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib559-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib559-lib559.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib560-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib560-lib560.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib560-testutil.Po@am__quote@
@@ -3525,6 +3645,34 @@ lib1520-first.obj: first.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1520_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1520-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+lib1521-lib1521.o: lib1521.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1521-lib1521.o -MD -MP -MF $(DEPDIR)/lib1521-lib1521.Tpo -c -o lib1521-lib1521.o `test -f 'lib1521.c' || echo '$(srcdir)/'`lib1521.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1521-lib1521.Tpo $(DEPDIR)/lib1521-lib1521.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1521.c' object='lib1521-lib1521.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1521-lib1521.o `test -f 'lib1521.c' || echo '$(srcdir)/'`lib1521.c
+
+lib1521-lib1521.obj: lib1521.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1521-lib1521.obj -MD -MP -MF $(DEPDIR)/lib1521-lib1521.Tpo -c -o lib1521-lib1521.obj `if test -f 'lib1521.c'; then $(CYGPATH_W) 'lib1521.c'; else $(CYGPATH_W) '$(srcdir)/lib1521.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1521-lib1521.Tpo $(DEPDIR)/lib1521-lib1521.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1521.c' object='lib1521-lib1521.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1521-lib1521.obj `if test -f 'lib1521.c'; then $(CYGPATH_W) 'lib1521.c'; else $(CYGPATH_W) '$(srcdir)/lib1521.c'; fi`
+
+lib1521-first.o: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1521-first.o -MD -MP -MF $(DEPDIR)/lib1521-first.Tpo -c -o lib1521-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1521-first.Tpo $(DEPDIR)/lib1521-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1521-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1521-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib1521-first.obj: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1521-first.obj -MD -MP -MF $(DEPDIR)/lib1521-first.Tpo -c -o lib1521-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1521-first.Tpo $(DEPDIR)/lib1521-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1521-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1521_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1521-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
lib1525-lib1525.o: lib1525.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1525_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1525-lib1525.o -MD -MP -MF $(DEPDIR)/lib1525-lib1525.Tpo -c -o lib1525-lib1525.o `test -f 'lib1525.c' || echo '$(srcdir)/'`lib1525.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1525-lib1525.Tpo $(DEPDIR)/lib1525-lib1525.Po
@@ -4197,6 +4345,230 @@ lib1536-testutil.obj: testutil.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1536_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../../lib/lib1536-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+lib1537-lib1537.o: lib1537.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1537-lib1537.o -MD -MP -MF $(DEPDIR)/lib1537-lib1537.Tpo -c -o lib1537-lib1537.o `test -f 'lib1537.c' || echo '$(srcdir)/'`lib1537.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1537-lib1537.Tpo $(DEPDIR)/lib1537-lib1537.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1537.c' object='lib1537-lib1537.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1537-lib1537.o `test -f 'lib1537.c' || echo '$(srcdir)/'`lib1537.c
+
+lib1537-lib1537.obj: lib1537.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1537-lib1537.obj -MD -MP -MF $(DEPDIR)/lib1537-lib1537.Tpo -c -o lib1537-lib1537.obj `if test -f 'lib1537.c'; then $(CYGPATH_W) 'lib1537.c'; else $(CYGPATH_W) '$(srcdir)/lib1537.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1537-lib1537.Tpo $(DEPDIR)/lib1537-lib1537.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1537.c' object='lib1537-lib1537.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1537-lib1537.obj `if test -f 'lib1537.c'; then $(CYGPATH_W) 'lib1537.c'; else $(CYGPATH_W) '$(srcdir)/lib1537.c'; fi`
+
+lib1537-first.o: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1537-first.o -MD -MP -MF $(DEPDIR)/lib1537-first.Tpo -c -o lib1537-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1537-first.Tpo $(DEPDIR)/lib1537-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1537-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1537-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib1537-first.obj: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1537-first.obj -MD -MP -MF $(DEPDIR)/lib1537-first.Tpo -c -o lib1537-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1537-first.Tpo $(DEPDIR)/lib1537-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1537-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1537-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib1537-testutil.o: testutil.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1537-testutil.o -MD -MP -MF $(DEPDIR)/lib1537-testutil.Tpo -c -o lib1537-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1537-testutil.Tpo $(DEPDIR)/lib1537-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testutil.c' object='lib1537-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1537-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib1537-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1537-testutil.obj -MD -MP -MF $(DEPDIR)/lib1537-testutil.Tpo -c -o lib1537-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1537-testutil.Tpo $(DEPDIR)/lib1537-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testutil.c' object='lib1537-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1537-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+../../lib/lib1537-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../../lib/lib1537-warnless.o -MD -MP -MF ../../lib/$(DEPDIR)/lib1537-warnless.Tpo -c -o ../../lib/lib1537-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/lib1537-warnless.Tpo ../../lib/$(DEPDIR)/lib1537-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../lib/warnless.c' object='../../lib/lib1537-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../../lib/lib1537-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+../../lib/lib1537-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../../lib/lib1537-warnless.obj -MD -MP -MF ../../lib/$(DEPDIR)/lib1537-warnless.Tpo -c -o ../../lib/lib1537-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/lib1537-warnless.Tpo ../../lib/$(DEPDIR)/lib1537-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../lib/warnless.c' object='../../lib/lib1537-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1537_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../../lib/lib1537-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib1538-lib1538.o: lib1538.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1538-lib1538.o -MD -MP -MF $(DEPDIR)/lib1538-lib1538.Tpo -c -o lib1538-lib1538.o `test -f 'lib1538.c' || echo '$(srcdir)/'`lib1538.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1538-lib1538.Tpo $(DEPDIR)/lib1538-lib1538.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1538.c' object='lib1538-lib1538.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1538-lib1538.o `test -f 'lib1538.c' || echo '$(srcdir)/'`lib1538.c
+
+lib1538-lib1538.obj: lib1538.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1538-lib1538.obj -MD -MP -MF $(DEPDIR)/lib1538-lib1538.Tpo -c -o lib1538-lib1538.obj `if test -f 'lib1538.c'; then $(CYGPATH_W) 'lib1538.c'; else $(CYGPATH_W) '$(srcdir)/lib1538.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1538-lib1538.Tpo $(DEPDIR)/lib1538-lib1538.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1538.c' object='lib1538-lib1538.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1538-lib1538.obj `if test -f 'lib1538.c'; then $(CYGPATH_W) 'lib1538.c'; else $(CYGPATH_W) '$(srcdir)/lib1538.c'; fi`
+
+lib1538-first.o: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1538-first.o -MD -MP -MF $(DEPDIR)/lib1538-first.Tpo -c -o lib1538-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1538-first.Tpo $(DEPDIR)/lib1538-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1538-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1538-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib1538-first.obj: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1538-first.obj -MD -MP -MF $(DEPDIR)/lib1538-first.Tpo -c -o lib1538-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1538-first.Tpo $(DEPDIR)/lib1538-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1538-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1538-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib1538-testutil.o: testutil.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1538-testutil.o -MD -MP -MF $(DEPDIR)/lib1538-testutil.Tpo -c -o lib1538-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1538-testutil.Tpo $(DEPDIR)/lib1538-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testutil.c' object='lib1538-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1538-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib1538-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1538-testutil.obj -MD -MP -MF $(DEPDIR)/lib1538-testutil.Tpo -c -o lib1538-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1538-testutil.Tpo $(DEPDIR)/lib1538-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testutil.c' object='lib1538-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1538-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+../../lib/lib1538-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../../lib/lib1538-warnless.o -MD -MP -MF ../../lib/$(DEPDIR)/lib1538-warnless.Tpo -c -o ../../lib/lib1538-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/lib1538-warnless.Tpo ../../lib/$(DEPDIR)/lib1538-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../lib/warnless.c' object='../../lib/lib1538-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../../lib/lib1538-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+../../lib/lib1538-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../../lib/lib1538-warnless.obj -MD -MP -MF ../../lib/$(DEPDIR)/lib1538-warnless.Tpo -c -o ../../lib/lib1538-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/lib1538-warnless.Tpo ../../lib/$(DEPDIR)/lib1538-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../lib/warnless.c' object='../../lib/lib1538-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1538_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../../lib/lib1538-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib1540-lib1540.o: lib1540.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1540-lib1540.o -MD -MP -MF $(DEPDIR)/lib1540-lib1540.Tpo -c -o lib1540-lib1540.o `test -f 'lib1540.c' || echo '$(srcdir)/'`lib1540.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1540-lib1540.Tpo $(DEPDIR)/lib1540-lib1540.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1540.c' object='lib1540-lib1540.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1540-lib1540.o `test -f 'lib1540.c' || echo '$(srcdir)/'`lib1540.c
+
+lib1540-lib1540.obj: lib1540.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1540-lib1540.obj -MD -MP -MF $(DEPDIR)/lib1540-lib1540.Tpo -c -o lib1540-lib1540.obj `if test -f 'lib1540.c'; then $(CYGPATH_W) 'lib1540.c'; else $(CYGPATH_W) '$(srcdir)/lib1540.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1540-lib1540.Tpo $(DEPDIR)/lib1540-lib1540.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1540.c' object='lib1540-lib1540.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1540-lib1540.obj `if test -f 'lib1540.c'; then $(CYGPATH_W) 'lib1540.c'; else $(CYGPATH_W) '$(srcdir)/lib1540.c'; fi`
+
+lib1540-first.o: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1540-first.o -MD -MP -MF $(DEPDIR)/lib1540-first.Tpo -c -o lib1540-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1540-first.Tpo $(DEPDIR)/lib1540-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1540-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1540-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib1540-first.obj: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1540-first.obj -MD -MP -MF $(DEPDIR)/lib1540-first.Tpo -c -o lib1540-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1540-first.Tpo $(DEPDIR)/lib1540-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1540-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1540-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib1540-testutil.o: testutil.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1540-testutil.o -MD -MP -MF $(DEPDIR)/lib1540-testutil.Tpo -c -o lib1540-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1540-testutil.Tpo $(DEPDIR)/lib1540-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testutil.c' object='lib1540-testutil.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1540-testutil.o `test -f 'testutil.c' || echo '$(srcdir)/'`testutil.c
+
+lib1540-testutil.obj: testutil.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1540-testutil.obj -MD -MP -MF $(DEPDIR)/lib1540-testutil.Tpo -c -o lib1540-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1540-testutil.Tpo $(DEPDIR)/lib1540-testutil.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='testutil.c' object='lib1540-testutil.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1540-testutil.obj `if test -f 'testutil.c'; then $(CYGPATH_W) 'testutil.c'; else $(CYGPATH_W) '$(srcdir)/testutil.c'; fi`
+
+../../lib/lib1540-warnless.o: ../../lib/warnless.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../../lib/lib1540-warnless.o -MD -MP -MF ../../lib/$(DEPDIR)/lib1540-warnless.Tpo -c -o ../../lib/lib1540-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/lib1540-warnless.Tpo ../../lib/$(DEPDIR)/lib1540-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../lib/warnless.c' object='../../lib/lib1540-warnless.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../../lib/lib1540-warnless.o `test -f '../../lib/warnless.c' || echo '$(srcdir)/'`../../lib/warnless.c
+
+../../lib/lib1540-warnless.obj: ../../lib/warnless.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../../lib/lib1540-warnless.obj -MD -MP -MF ../../lib/$(DEPDIR)/lib1540-warnless.Tpo -c -o ../../lib/lib1540-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../../lib/$(DEPDIR)/lib1540-warnless.Tpo ../../lib/$(DEPDIR)/lib1540-warnless.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../../lib/warnless.c' object='../../lib/lib1540-warnless.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1540_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../../lib/lib1540-warnless.obj `if test -f '../../lib/warnless.c'; then $(CYGPATH_W) '../../lib/warnless.c'; else $(CYGPATH_W) '$(srcdir)/../../lib/warnless.c'; fi`
+
+lib1550-lib1550.o: lib1550.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1550_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1550-lib1550.o -MD -MP -MF $(DEPDIR)/lib1550-lib1550.Tpo -c -o lib1550-lib1550.o `test -f 'lib1550.c' || echo '$(srcdir)/'`lib1550.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1550-lib1550.Tpo $(DEPDIR)/lib1550-lib1550.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1550.c' object='lib1550-lib1550.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1550_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1550-lib1550.o `test -f 'lib1550.c' || echo '$(srcdir)/'`lib1550.c
+
+lib1550-lib1550.obj: lib1550.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1550_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1550-lib1550.obj -MD -MP -MF $(DEPDIR)/lib1550-lib1550.Tpo -c -o lib1550-lib1550.obj `if test -f 'lib1550.c'; then $(CYGPATH_W) 'lib1550.c'; else $(CYGPATH_W) '$(srcdir)/lib1550.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1550-lib1550.Tpo $(DEPDIR)/lib1550-lib1550.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1550.c' object='lib1550-lib1550.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1550_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1550-lib1550.obj `if test -f 'lib1550.c'; then $(CYGPATH_W) 'lib1550.c'; else $(CYGPATH_W) '$(srcdir)/lib1550.c'; fi`
+
+lib1550-first.o: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1550_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1550-first.o -MD -MP -MF $(DEPDIR)/lib1550-first.Tpo -c -o lib1550-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1550-first.Tpo $(DEPDIR)/lib1550-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1550-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1550_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1550-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib1550-first.obj: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1550_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1550-first.obj -MD -MP -MF $(DEPDIR)/lib1550-first.Tpo -c -o lib1550-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1550-first.Tpo $(DEPDIR)/lib1550-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1550-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1550_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1550-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
+lib1551-lib1551.o: lib1551.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1551_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1551-lib1551.o -MD -MP -MF $(DEPDIR)/lib1551-lib1551.Tpo -c -o lib1551-lib1551.o `test -f 'lib1551.c' || echo '$(srcdir)/'`lib1551.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1551-lib1551.Tpo $(DEPDIR)/lib1551-lib1551.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1551.c' object='lib1551-lib1551.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1551_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1551-lib1551.o `test -f 'lib1551.c' || echo '$(srcdir)/'`lib1551.c
+
+lib1551-lib1551.obj: lib1551.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1551_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1551-lib1551.obj -MD -MP -MF $(DEPDIR)/lib1551-lib1551.Tpo -c -o lib1551-lib1551.obj `if test -f 'lib1551.c'; then $(CYGPATH_W) 'lib1551.c'; else $(CYGPATH_W) '$(srcdir)/lib1551.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1551-lib1551.Tpo $(DEPDIR)/lib1551-lib1551.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib1551.c' object='lib1551-lib1551.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1551_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1551-lib1551.obj `if test -f 'lib1551.c'; then $(CYGPATH_W) 'lib1551.c'; else $(CYGPATH_W) '$(srcdir)/lib1551.c'; fi`
+
+lib1551-first.o: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1551_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1551-first.o -MD -MP -MF $(DEPDIR)/lib1551-first.Tpo -c -o lib1551-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1551-first.Tpo $(DEPDIR)/lib1551-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1551-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1551_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1551-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib1551-first.obj: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1551_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1551-first.obj -MD -MP -MF $(DEPDIR)/lib1551-first.Tpo -c -o lib1551-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1551-first.Tpo $(DEPDIR)/lib1551-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib1551-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1551_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib1551-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
lib1900-lib1900.o: lib1900.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib1900_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib1900-lib1900.o -MD -MP -MF $(DEPDIR)/lib1900-lib1900.Tpo -c -o lib1900-lib1900.o `test -f 'lib1900.c' || echo '$(srcdir)/'`lib1900.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib1900-lib1900.Tpo $(DEPDIR)/lib1900-lib1900.Po
@@ -6185,6 +6557,34 @@ lib558-first.obj: first.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib558_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib558-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+lib559-lib559.o: lib559.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib559_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib559-lib559.o -MD -MP -MF $(DEPDIR)/lib559-lib559.Tpo -c -o lib559-lib559.o `test -f 'lib559.c' || echo '$(srcdir)/'`lib559.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib559-lib559.Tpo $(DEPDIR)/lib559-lib559.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib559.c' object='lib559-lib559.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib559_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib559-lib559.o `test -f 'lib559.c' || echo '$(srcdir)/'`lib559.c
+
+lib559-lib559.obj: lib559.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib559_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib559-lib559.obj -MD -MP -MF $(DEPDIR)/lib559-lib559.Tpo -c -o lib559-lib559.obj `if test -f 'lib559.c'; then $(CYGPATH_W) 'lib559.c'; else $(CYGPATH_W) '$(srcdir)/lib559.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib559-lib559.Tpo $(DEPDIR)/lib559-lib559.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lib559.c' object='lib559-lib559.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib559_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib559-lib559.obj `if test -f 'lib559.c'; then $(CYGPATH_W) 'lib559.c'; else $(CYGPATH_W) '$(srcdir)/lib559.c'; fi`
+
+lib559-first.o: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib559_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib559-first.o -MD -MP -MF $(DEPDIR)/lib559-first.Tpo -c -o lib559-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib559-first.Tpo $(DEPDIR)/lib559-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib559-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib559_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib559-first.o `test -f 'first.c' || echo '$(srcdir)/'`first.c
+
+lib559-first.obj: first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib559_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib559-first.obj -MD -MP -MF $(DEPDIR)/lib559-first.Tpo -c -o lib559-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib559-first.Tpo $(DEPDIR)/lib559-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='first.c' object='lib559-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib559_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib559-first.obj `if test -f 'first.c'; then $(CYGPATH_W) 'first.c'; else $(CYGPATH_W) '$(srcdir)/first.c'; fi`
+
lib560-lib560.o: lib560.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib560_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib560-lib560.o -MD -MP -MF $(DEPDIR)/lib560-lib560.Tpo -c -o lib560-lib560.o `test -f 'lib560.c' || echo '$(srcdir)/'`lib560.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib560-lib560.Tpo $(DEPDIR)/lib560-lib560.Po
@@ -7491,9 +7891,15 @@ uninstall-am:
.PRECIOUS: Makefile
+lib1521.c: $(top_srcdir)/tests/libtest/mk-lib1521.pl $(top_srcdir)/include/curl/curl.h
+ @PERL@ $(top_srcdir)/tests/libtest/mk-lib1521.pl < $(top_srcdir)/include/curl/curl.h > lib1521.c
+
checksrc:
@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
+dist:
+ rm lib1521.c
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index 66628aae..727582bd 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
@@ -17,14 +17,16 @@ noinst_PROGRAMS = chkhostname libauthretry libntlmconnect \
lib520 lib521 lib523 lib524 lib525 lib526 lib527 lib529 lib530 lib532 \
lib533 lib536 lib537 lib539 lib540 lib541 lib542 lib543 lib544 lib545 \
lib547 lib548 lib549 lib552 lib553 lib554 lib555 lib556 lib557 lib558 \
- lib560 lib562 lib564 lib565 lib566 lib567 lib568 lib569 lib570 \
+ lib559 lib560 lib562 lib564 lib565 lib566 lib567 lib568 lib569 lib570 \
lib571 lib572 lib573 lib574 lib575 lib576 lib578 lib579 lib582 \
lib583 lib585 lib586 lib587 lib590 lib591 lib597 lib598 lib599 \
lib1500 lib1501 lib1502 lib1503 lib1504 lib1505 lib1506 lib1507 lib1508 \
lib1509 lib1510 lib1511 lib1512 lib1513 lib1514 lib1515 lib1517 \
- lib1520 \
+ lib1520 lib1521 \
lib1525 lib1526 lib1527 lib1528 lib1529 lib1530 lib1531 lib1532 lib1533 \
- lib1534 lib1535 lib1536 \
+ lib1534 lib1535 lib1536 lib1537 lib1538 \
+ lib1540 \
+ lib1550 lib1551 \
lib1900 \
lib2033
@@ -205,6 +207,9 @@ lib557_CPPFLAGS = $(AM_CPPFLAGS)
lib558_SOURCES = lib558.c $(SUPPORTFILES)
lib558_CPPFLAGS = $(AM_CPPFLAGS)
+lib559_SOURCES = lib559.c $(SUPPORTFILES)
+lib559_CPPFLAGS = $(AM_CPPFLAGS)
+
lib560_SOURCES = lib560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib560_LDADD = $(TESTUTIL_LIBS)
lib560_CPPFLAGS = $(AM_CPPFLAGS)
@@ -364,6 +369,9 @@ lib1517_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1517
lib1520_SOURCES = lib1520.c $(SUPPORTFILES)
lib1520_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1520
+lib1521_SOURCES = lib1521.c $(SUPPORTFILES)
+lib1521_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)
+
lib1525_SOURCES = lib1525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1525_LDADD = $(TESTUTIL_LIBS)
lib1525_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1525
@@ -412,6 +420,24 @@ lib1536_SOURCES = lib1536.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1536_LDADD = $(TESTUTIL_LIBS)
lib1536_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1536
+lib1537_SOURCES = lib1537.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1537_LDADD = $(TESTUTIL_LIBS)
+lib1537_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1538_SOURCES = lib1538.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1538_LDADD = $(TESTUTIL_LIBS)
+lib1538_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1540_SOURCES = lib1540.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1540_LDADD = $(TESTUTIL_LIBS)
+lib1540_CPPFLAGS = $(AM_CPPFLAGS)
+
+lib1550_SOURCES = lib1550.c $(SUPPORTFILES)
+lib1550_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1517
+
+lib1551_SOURCES = lib1551.c $(SUPPORTFILES)
+lib1551_CPPFLAGS = $(AM_CPPFLAGS)
+
lib1900_SOURCES = lib1900.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1900_LDADD = $(TESTUTIL_LIBS)
lib1900_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/tests/libtest/first.c b/tests/libtest/first.c
index 231ae368..72140e31 100644
--- a/tests/libtest/first.c
+++ b/tests/libtest/first.c
@@ -116,7 +116,7 @@ static void memory_tracking_init(void)
#endif
/* returns a hexdump in a static memory area */
-char *hexdump(unsigned char *buffer, size_t len)
+char *hexdump(const unsigned char *buffer, size_t len)
{
static char dump[200*3+1];
char *p = dump;
diff --git a/tests/libtest/lib1501.c b/tests/libtest/lib1501.c
index cc442b52..8a6ef517 100644
--- a/tests/libtest/lib1501.c
+++ b/tests/libtest/lib1501.c
@@ -31,22 +31,7 @@
/* 500 milliseconds allowed. An extreme number but lets be really conservative
to allow old and slow machines to run this test too */
-#define MAX_BLOCKED_TIME_US 500000
-
-/* return the number of microseconds between two time stamps */
-static int elapsed(struct timeval *before,
- struct timeval *after)
-{
- ssize_t result;
-
- result = (after->tv_sec - before->tv_sec) * 1000000 +
- after->tv_usec - before->tv_usec;
- if(result < 0)
- result = 0;
-
- return curlx_sztosi(result);
-}
-
+#define MAX_BLOCKED_TIME_MS 500
int test(char *URL)
{
@@ -80,7 +65,7 @@ int test(char *URL)
int maxfd = -99;
struct timeval before;
struct timeval after;
- int e;
+ long e;
timeout.tv_sec = 0;
timeout.tv_usec = 100000L; /* 100 ms */
@@ -105,10 +90,10 @@ int test(char *URL)
abort_on_test_timeout();
after = tutil_tvnow();
- e = elapsed(&before, &after);
- fprintf(stderr, "pong = %d\n", e);
+ e = tutil_tvdiff(after, before);
+ fprintf(stderr, "pong = %ld\n", e);
- if(e > MAX_BLOCKED_TIME_US) {
+ if(e > MAX_BLOCKED_TIME_MS) {
res = 100;
break;
}
diff --git a/tests/libtest/lib1507.c b/tests/libtest/lib1507.c
index 7ab30571..cd850019 100644
--- a/tests/libtest/lib1507.c
+++ b/tests/libtest/lib1507.c
@@ -44,23 +44,6 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
return CURL_READFUNC_ABORT;
}
-static struct timeval tvnow(void)
-{
- /*
- ** time() returns the value of time in seconds since the Epoch.
- */
- struct timeval now;
- now.tv_sec = (long)time(NULL);
- now.tv_usec = 0;
- return now;
-}
-
-static long tvdiff(struct timeval newer, struct timeval older)
-{
- return (newer.tv_sec-older.tv_sec)*1000+
- (newer.tv_usec-older.tv_usec)/1000;
-}
-
int test(char *URL)
{
int res = 0;
@@ -93,7 +76,7 @@ int test(char *URL)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
multi_add_handle(mcurl, curl);
- mp_start = tvnow();
+ mp_start = tutil_tvnow();
/* we start some action by calling perform right away */
curl_multi_perform(mcurl, &still_running);
@@ -137,7 +120,7 @@ int test(char *URL)
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
- if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
+ if(tutil_tvdiff(tutil_tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
fprintf(stderr, "ABORTING TEST, since it seems "
"that it would have run forever.\n");
break;
diff --git a/tests/libtest/lib1509.c b/tests/libtest/lib1509.c
index df428a0d..ccb66830 100644
--- a/tests/libtest/lib1509.c
+++ b/tests/libtest/lib1509.c
@@ -28,7 +28,7 @@
size_t WriteOutput(void *ptr, size_t size, size_t nmemb, void *stream);
size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream);
-unsigned long realHeaderSize = 0;
+static unsigned long realHeaderSize = 0;
int test(char *URL)
{
diff --git a/tests/libtest/lib1515.c b/tests/libtest/lib1515.c
index 7763c223..c1499381 100644
--- a/tests/libtest/lib1515.c
+++ b/tests/libtest/lib1515.c
@@ -95,12 +95,13 @@ static int do_one_request(CURLM *m, char *URL, char *resolve)
abort_on_test_timeout();
}
- while((msg = curl_multi_info_read(m, &msgs_left))) {
- if(msg->msg == CURLMSG_DONE && msg->easy_handle == curls) {
+ do {
+ msg = curl_multi_info_read(m, &msgs_left);
+ if(msg && msg->msg == CURLMSG_DONE && msg->easy_handle == curls) {
res = msg->data.result;
break;
}
- }
+ } while(msg);
test_cleanup:
diff --git a/tests/libtest/lib1521.c b/tests/libtest/lib1521.c
new file mode 100644
index 00000000..519922b6
--- /dev/null
+++ b/tests/libtest/lib1521.c
@@ -0,0 +1,2512 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2017, Daniel Stenberg, <daniel.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+#include "memdebug.h"
+#include <limits.h>
+
+/* This source code is generated by mk-lib1521.pl ! */
+
+struct data {
+ char *blaha;
+};
+
+#define LO LONG_MIN
+#define HI LONG_MAX
+#define OFF_LO (curl_off_t) LO
+#define OFF_HI (curl_off_t) ULONG_MAX
+#define OFF_NO (curl_off_t) 0
+
+/* Unexpected error.
+ CURLE_NOT_BUILT_IN - means disabled at build
+ CURLE_UNKNOWN_OPTION - means no such option (anymore?)
+ CURLE_SSL_ENGINE_NOTFOUND - set unkown ssl engine
+ CURLE_UNSUPPORTED_PROTOCOL - set bad HTTP version
+ CURLE_BAD_FUNCTION_ARGUMENT - unsupported value
+ */
+#define UNEX(x) ((x) && \
+ ((x) != CURLE_NOT_BUILT_IN) && \
+ ((x) != CURLE_UNKNOWN_OPTION) && \
+ ((x) != CURLE_SSL_ENGINE_NOTFOUND) && \
+ ((x) != CURLE_UNSUPPORTED_PROTOCOL) && \
+ ((x) != CURLE_BAD_FUNCTION_ARGUMENT) )
+
+static size_t writecb(char *buffer, size_t size, size_t nitems,
+ void *outstream)
+{
+ (void)buffer;
+ (void)size;
+ (void)nitems;
+ (void)outstream;
+ return 0;
+}
+
+static size_t readcb(char *buffer,
+ size_t size,
+ size_t nitems,
+ void *instream)
+{
+ (void)buffer;
+ (void)size;
+ (void)nitems;
+ (void)instream;
+ return 0;
+}
+
+static int err(const char *name, CURLcode val, int lineno)
+{
+ printf("CURLOPT_%s returned %d, \"%s\" on line %d\n",
+ name, val, curl_easy_strerror(val), lineno);
+ return (int)val;
+}
+
+static int geterr(const char *name, CURLcode val, int lineno)
+{
+ printf("CURLINFO_%s returned %d, \"%s\" on line %d\n",
+ name, val, curl_easy_strerror(val), lineno);
+ return (int)val;
+}
+
+static curl_progress_callback progresscb;
+static curl_write_callback headercb;
+static curl_debug_callback debugcb;
+static curl_ssl_ctx_callback ssl_ctx_cb;
+static curl_ioctl_callback ioctlcb;
+static curl_sockopt_callback sockoptcb;
+static curl_opensocket_callback opensocketcb;
+static curl_seek_callback seekcb;
+static curl_sshkeycallback ssh_keycb;
+static curl_chunk_bgn_callback chunk_bgn_cb;
+static curl_chunk_end_callback chunk_end_cb;
+static curl_fnmatch_callback fnmatch_cb;
+static curl_closesocket_callback closesocketcb;
+static curl_xferinfo_callback xferinfocb;
+
+int test(char *URL)
+{
+ CURL *curl = NULL;
+ CURL *dep = NULL;
+ CURLSH *share = NULL;
+ char errorbuffer[CURL_ERROR_SIZE];
+ void *conv_from_network_cb = NULL;
+ void *conv_to_network_cb = NULL;
+ void *conv_from_utf8_cb = NULL;
+ void *interleavecb = NULL;
+ char *stringpointerextra=(char *)"moooo";
+ struct curl_slist *slist=NULL;
+ struct curl_httppost *httppost=NULL;
+ FILE *stream = stderr;
+ struct data object;
+ char *charp;
+ long val;
+ curl_off_t oval;
+ double dval;
+ curl_socket_t sockfd;
+ struct curl_certinfo *certinfo;
+ struct curl_tlssessioninfo *tlssession;
+ CURLcode res = CURLE_OK;
+ (void)URL; /* not used */
+ easy_init(dep);
+ easy_init(curl);
+ share = curl_share_init();
+ if(!share) {
+ res = CURLE_OUT_OF_MEMORY;
+ goto test_cleanup;
+ }
+
+ res = curl_easy_setopt(curl, CURLOPT_WRITEDATA, &object);
+ if(UNEX(res)) {
+ err("WRITEDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_WRITEDATA, NULL);
+ if(UNEX(res)) {
+ err("WRITEDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_URL, "string");
+ if(UNEX(res)) {
+ err("URL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_URL, NULL);
+ if(UNEX(res)) {
+ err("URL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PORT, 0L);
+ if(UNEX(res)) {
+ err("PORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PORT, 22L);
+ if(UNEX(res)) {
+ err("PORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PORT, LO);
+ if(UNEX(res)) {
+ err("PORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PORT, HI);
+ if(UNEX(res)) {
+ err("PORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY, "string");
+ if(UNEX(res)) {
+ err("PROXY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY, NULL);
+ if(UNEX(res)) {
+ err("PROXY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_USERPWD, "string");
+ if(UNEX(res)) {
+ err("USERPWD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_USERPWD, NULL);
+ if(UNEX(res)) {
+ err("USERPWD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "string");
+ if(UNEX(res)) {
+ err("PROXYUSERPWD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, NULL);
+ if(UNEX(res)) {
+ err("PROXYUSERPWD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RANGE, "string");
+ if(UNEX(res)) {
+ err("RANGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RANGE, NULL);
+ if(UNEX(res)) {
+ err("RANGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_READDATA, &object);
+ if(UNEX(res)) {
+ err("READDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_READDATA, NULL);
+ if(UNEX(res)) {
+ err("READDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);
+ if(UNEX(res)) {
+ err("ERRORBUFFER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, NULL);
+ if(UNEX(res)) {
+ err("ERRORBUFFER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
+ writecb);
+ if(UNEX(res)) {
+ err("WRITEFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("WRITEFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_READFUNCTION,
+ readcb);
+ if(UNEX(res)) {
+ err("READFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_READFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("READFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMEOUT, 0L);
+ if(UNEX(res)) {
+ err("TIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMEOUT, 22L);
+ if(UNEX(res)) {
+ err("TIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMEOUT, LO);
+ if(UNEX(res)) {
+ err("TIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMEOUT, HI);
+ if(UNEX(res)) {
+ err("TIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INFILESIZE, 0L);
+ if(UNEX(res)) {
+ err("INFILESIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INFILESIZE, 22L);
+ if(UNEX(res)) {
+ err("INFILESIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INFILESIZE, LO);
+ if(UNEX(res)) {
+ err("INFILESIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INFILESIZE, HI);
+ if(UNEX(res)) {
+ err("INFILESIZE", res, __LINE__); goto test_cleanup; }
+ (void)curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0);
+ res = curl_easy_setopt(curl, CURLOPT_POSTFIELDS, stringpointerextra);
+ if(UNEX(res)) {
+ err("POSTFIELDS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTFIELDS, NULL);
+ if(UNEX(res)) {
+ err("POSTFIELDS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_REFERER, "string");
+ if(UNEX(res)) {
+ err("REFERER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_REFERER, NULL);
+ if(UNEX(res)) {
+ err("REFERER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTPPORT, "string");
+ if(UNEX(res)) {
+ err("FTPPORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTPPORT, NULL);
+ if(UNEX(res)) {
+ err("FTPPORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_USERAGENT, "string");
+ if(UNEX(res)) {
+ err("USERAGENT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_USERAGENT, NULL);
+ if(UNEX(res)) {
+ err("USERAGENT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 0L);
+ if(UNEX(res)) {
+ err("LOW_SPEED_LIMIT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 22L);
+ if(UNEX(res)) {
+ err("LOW_SPEED_LIMIT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, LO);
+ if(UNEX(res)) {
+ err("LOW_SPEED_LIMIT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, HI);
+ if(UNEX(res)) {
+ err("LOW_SPEED_LIMIT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 0L);
+ if(UNEX(res)) {
+ err("LOW_SPEED_TIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 22L);
+ if(UNEX(res)) {
+ err("LOW_SPEED_TIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, LO);
+ if(UNEX(res)) {
+ err("LOW_SPEED_TIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, HI);
+ if(UNEX(res)) {
+ err("LOW_SPEED_TIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RESUME_FROM, 0L);
+ if(UNEX(res)) {
+ err("RESUME_FROM", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RESUME_FROM, 22L);
+ if(UNEX(res)) {
+ err("RESUME_FROM", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RESUME_FROM, LO);
+ if(UNEX(res)) {
+ err("RESUME_FROM", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RESUME_FROM, HI);
+ if(UNEX(res)) {
+ err("RESUME_FROM", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COOKIE, "string");
+ if(UNEX(res)) {
+ err("COOKIE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COOKIE, NULL);
+ if(UNEX(res)) {
+ err("COOKIE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist);
+ if(UNEX(res)) {
+ err("HTTPHEADER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, NULL);
+ if(UNEX(res)) {
+ err("HTTPHEADER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPPOST, httppost);
+ if(UNEX(res)) {
+ err("HTTPPOST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPPOST, NULL);
+ if(UNEX(res)) {
+ err("HTTPPOST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLCERT, "string");
+ if(UNEX(res)) {
+ err("SSLCERT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLCERT, NULL);
+ if(UNEX(res)) {
+ err("SSLCERT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "string");
+ if(UNEX(res)) {
+ err("KEYPASSWD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_KEYPASSWD, NULL);
+ if(UNEX(res)) {
+ err("KEYPASSWD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CRLF, 0L);
+ if(UNEX(res)) {
+ err("CRLF", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CRLF, 22L);
+ if(UNEX(res)) {
+ err("CRLF", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CRLF, LO);
+ if(UNEX(res)) {
+ err("CRLF", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CRLF, HI);
+ if(UNEX(res)) {
+ err("CRLF", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_QUOTE, slist);
+ if(UNEX(res)) {
+ err("QUOTE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_QUOTE, NULL);
+ if(UNEX(res)) {
+ err("QUOTE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HEADERDATA, &object);
+ if(UNEX(res)) {
+ err("HEADERDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HEADERDATA, NULL);
+ if(UNEX(res)) {
+ err("HEADERDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "string");
+ if(UNEX(res)) {
+ err("COOKIEFILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COOKIEFILE, NULL);
+ if(UNEX(res)) {
+ err("COOKIEFILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLVERSION, 0L);
+ if(UNEX(res)) {
+ err("SSLVERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLVERSION, 22L);
+ if(UNEX(res)) {
+ err("SSLVERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLVERSION, LO);
+ if(UNEX(res)) {
+ err("SSLVERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLVERSION, HI);
+ if(UNEX(res)) {
+ err("SSLVERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMECONDITION, 0L);
+ if(UNEX(res)) {
+ err("TIMECONDITION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMECONDITION, 22L);
+ if(UNEX(res)) {
+ err("TIMECONDITION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMECONDITION, LO);
+ if(UNEX(res)) {
+ err("TIMECONDITION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMECONDITION, HI);
+ if(UNEX(res)) {
+ err("TIMECONDITION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMEVALUE, 0L);
+ if(UNEX(res)) {
+ err("TIMEVALUE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMEVALUE, 22L);
+ if(UNEX(res)) {
+ err("TIMEVALUE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMEVALUE, LO);
+ if(UNEX(res)) {
+ err("TIMEVALUE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMEVALUE, HI);
+ if(UNEX(res)) {
+ err("TIMEVALUE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "string");
+ if(UNEX(res)) {
+ err("CUSTOMREQUEST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);
+ if(UNEX(res)) {
+ err("CUSTOMREQUEST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_STDERR, stream);
+ if(UNEX(res)) {
+ err("STDERR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_STDERR, NULL);
+ if(UNEX(res)) {
+ err("STDERR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTQUOTE, slist);
+ if(UNEX(res)) {
+ err("POSTQUOTE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTQUOTE, NULL);
+ if(UNEX(res)) {
+ err("POSTQUOTE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_OBSOLETE40, &object);
+ if(UNEX(res)) {
+ err("OBSOLETE40", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_OBSOLETE40, NULL);
+ if(UNEX(res)) {
+ err("OBSOLETE40", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
+ if(UNEX(res)) {
+ err("VERBOSE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_VERBOSE, 22L);
+ if(UNEX(res)) {
+ err("VERBOSE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_VERBOSE, LO);
+ if(UNEX(res)) {
+ err("VERBOSE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_VERBOSE, HI);
+ if(UNEX(res)) {
+ err("VERBOSE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HEADER, 0L);
+ if(UNEX(res)) {
+ err("HEADER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HEADER, 22L);
+ if(UNEX(res)) {
+ err("HEADER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HEADER, LO);
+ if(UNEX(res)) {
+ err("HEADER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HEADER, HI);
+ if(UNEX(res)) {
+ err("HEADER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
+ if(UNEX(res)) {
+ err("NOPROGRESS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 22L);
+ if(UNEX(res)) {
+ err("NOPROGRESS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOPROGRESS, LO);
+ if(UNEX(res)) {
+ err("NOPROGRESS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOPROGRESS, HI);
+ if(UNEX(res)) {
+ err("NOPROGRESS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOBODY, 0L);
+ if(UNEX(res)) {
+ err("NOBODY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOBODY, 22L);
+ if(UNEX(res)) {
+ err("NOBODY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOBODY, LO);
+ if(UNEX(res)) {
+ err("NOBODY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOBODY, HI);
+ if(UNEX(res)) {
+ err("NOBODY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FAILONERROR, 0L);
+ if(UNEX(res)) {
+ err("FAILONERROR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FAILONERROR, 22L);
+ if(UNEX(res)) {
+ err("FAILONERROR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FAILONERROR, LO);
+ if(UNEX(res)) {
+ err("FAILONERROR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FAILONERROR, HI);
+ if(UNEX(res)) {
+ err("FAILONERROR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_UPLOAD, 0L);
+ if(UNEX(res)) {
+ err("UPLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_UPLOAD, 22L);
+ if(UNEX(res)) {
+ err("UPLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_UPLOAD, LO);
+ if(UNEX(res)) {
+ err("UPLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_UPLOAD, HI);
+ if(UNEX(res)) {
+ err("UPLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POST, 0L);
+ if(UNEX(res)) {
+ err("POST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POST, 22L);
+ if(UNEX(res)) {
+ err("POST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POST, LO);
+ if(UNEX(res)) {
+ err("POST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POST, HI);
+ if(UNEX(res)) {
+ err("POST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DIRLISTONLY, 0L);
+ if(UNEX(res)) {
+ err("DIRLISTONLY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DIRLISTONLY, 22L);
+ if(UNEX(res)) {
+ err("DIRLISTONLY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DIRLISTONLY, LO);
+ if(UNEX(res)) {
+ err("DIRLISTONLY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DIRLISTONLY, HI);
+ if(UNEX(res)) {
+ err("DIRLISTONLY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_APPEND, 0L);
+ if(UNEX(res)) {
+ err("APPEND", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_APPEND, 22L);
+ if(UNEX(res)) {
+ err("APPEND", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_APPEND, LO);
+ if(UNEX(res)) {
+ err("APPEND", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_APPEND, HI);
+ if(UNEX(res)) {
+ err("APPEND", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NETRC, 0L);
+ if(UNEX(res)) {
+ err("NETRC", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NETRC, 22L);
+ if(UNEX(res)) {
+ err("NETRC", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NETRC, LO);
+ if(UNEX(res)) {
+ err("NETRC", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NETRC, HI);
+ if(UNEX(res)) {
+ err("NETRC", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 0L);
+ if(UNEX(res)) {
+ err("FOLLOWLOCATION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 22L);
+ if(UNEX(res)) {
+ err("FOLLOWLOCATION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, LO);
+ if(UNEX(res)) {
+ err("FOLLOWLOCATION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, HI);
+ if(UNEX(res)) {
+ err("FOLLOWLOCATION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 0L);
+ if(UNEX(res)) {
+ err("TRANSFERTEXT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 22L);
+ if(UNEX(res)) {
+ err("TRANSFERTEXT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, LO);
+ if(UNEX(res)) {
+ err("TRANSFERTEXT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, HI);
+ if(UNEX(res)) {
+ err("TRANSFERTEXT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PUT, 0L);
+ if(UNEX(res)) {
+ err("PUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PUT, 22L);
+ if(UNEX(res)) {
+ err("PUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PUT, LO);
+ if(UNEX(res)) {
+ err("PUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PUT, HI);
+ if(UNEX(res)) {
+ err("PUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION,
+ progresscb);
+ if(UNEX(res)) {
+ err("PROGRESSFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("PROGRESSFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &object);
+ if(UNEX(res)) {
+ err("PROGRESSDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL);
+ if(UNEX(res)) {
+ err("PROGRESSDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 0L);
+ if(UNEX(res)) {
+ err("AUTOREFERER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 22L);
+ if(UNEX(res)) {
+ err("AUTOREFERER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_AUTOREFERER, LO);
+ if(UNEX(res)) {
+ err("AUTOREFERER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_AUTOREFERER, HI);
+ if(UNEX(res)) {
+ err("AUTOREFERER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYPORT, 0L);
+ if(UNEX(res)) {
+ err("PROXYPORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYPORT, 22L);
+ if(UNEX(res)) {
+ err("PROXYPORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYPORT, LO);
+ if(UNEX(res)) {
+ err("PROXYPORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYPORT, HI);
+ if(UNEX(res)) {
+ err("PROXYPORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0L);
+ if(UNEX(res)) {
+ err("POSTFIELDSIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 22L);
+ if(UNEX(res)) {
+ err("POSTFIELDSIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, LO);
+ if(UNEX(res)) {
+ err("POSTFIELDSIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, HI);
+ if(UNEX(res)) {
+ err("POSTFIELDSIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 0L);
+ if(UNEX(res)) {
+ err("HTTPPROXYTUNNEL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 22L);
+ if(UNEX(res)) {
+ err("HTTPPROXYTUNNEL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, LO);
+ if(UNEX(res)) {
+ err("HTTPPROXYTUNNEL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, HI);
+ if(UNEX(res)) {
+ err("HTTPPROXYTUNNEL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INTERFACE, "string");
+ if(UNEX(res)) {
+ err("INTERFACE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INTERFACE, NULL);
+ if(UNEX(res)) {
+ err("INTERFACE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_KRBLEVEL, "string");
+ if(UNEX(res)) {
+ err("KRBLEVEL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_KRBLEVEL, NULL);
+ if(UNEX(res)) {
+ err("KRBLEVEL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ if(UNEX(res)) {
+ err("SSL_VERIFYPEER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 22L);
+ if(UNEX(res)) {
+ err("SSL_VERIFYPEER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, LO);
+ if(UNEX(res)) {
+ err("SSL_VERIFYPEER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, HI);
+ if(UNEX(res)) {
+ err("SSL_VERIFYPEER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CAINFO, "string");
+ if(UNEX(res)) {
+ err("CAINFO", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CAINFO, NULL);
+ if(UNEX(res)) {
+ err("CAINFO", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 0L);
+ if(UNEX(res)) {
+ err("MAXREDIRS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 22L);
+ if(UNEX(res)) {
+ err("MAXREDIRS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXREDIRS, LO);
+ if(UNEX(res)) {
+ err("MAXREDIRS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXREDIRS, HI);
+ if(UNEX(res)) {
+ err("MAXREDIRS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FILETIME, 0L);
+ if(UNEX(res)) {
+ err("FILETIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FILETIME, 22L);
+ if(UNEX(res)) {
+ err("FILETIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FILETIME, LO);
+ if(UNEX(res)) {
+ err("FILETIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FILETIME, HI);
+ if(UNEX(res)) {
+ err("FILETIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TELNETOPTIONS, slist);
+ if(UNEX(res)) {
+ err("TELNETOPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TELNETOPTIONS, NULL);
+ if(UNEX(res)) {
+ err("TELNETOPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, 0L);
+ if(UNEX(res)) {
+ err("MAXCONNECTS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, 22L);
+ if(UNEX(res)) {
+ err("MAXCONNECTS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, LO);
+ if(UNEX(res)) {
+ err("MAXCONNECTS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, HI);
+ if(UNEX(res)) {
+ err("MAXCONNECTS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_OBSOLETE72, 0L);
+ if(UNEX(res)) {
+ err("OBSOLETE72", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_OBSOLETE72, 22L);
+ if(UNEX(res)) {
+ err("OBSOLETE72", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_OBSOLETE72, LO);
+ if(UNEX(res)) {
+ err("OBSOLETE72", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_OBSOLETE72, HI);
+ if(UNEX(res)) {
+ err("OBSOLETE72", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 0L);
+ if(UNEX(res)) {
+ err("FRESH_CONNECT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 22L);
+ if(UNEX(res)) {
+ err("FRESH_CONNECT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, LO);
+ if(UNEX(res)) {
+ err("FRESH_CONNECT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, HI);
+ if(UNEX(res)) {
+ err("FRESH_CONNECT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FORBID_REUSE, 0L);
+ if(UNEX(res)) {
+ err("FORBID_REUSE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FORBID_REUSE, 22L);
+ if(UNEX(res)) {
+ err("FORBID_REUSE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FORBID_REUSE, LO);
+ if(UNEX(res)) {
+ err("FORBID_REUSE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FORBID_REUSE, HI);
+ if(UNEX(res)) {
+ err("FORBID_REUSE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RANDOM_FILE, "string");
+ if(UNEX(res)) {
+ err("RANDOM_FILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RANDOM_FILE, NULL);
+ if(UNEX(res)) {
+ err("RANDOM_FILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_EGDSOCKET, "string");
+ if(UNEX(res)) {
+ err("EGDSOCKET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_EGDSOCKET, NULL);
+ if(UNEX(res)) {
+ err("EGDSOCKET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 0L);
+ if(UNEX(res)) {
+ err("CONNECTTIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 22L);
+ if(UNEX(res)) {
+ err("CONNECTTIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, LO);
+ if(UNEX(res)) {
+ err("CONNECTTIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, HI);
+ if(UNEX(res)) {
+ err("CONNECTTIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION,
+ headercb);
+ if(UNEX(res)) {
+ err("HEADERFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("HEADERFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPGET, 0L);
+ if(UNEX(res)) {
+ err("HTTPGET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPGET, 22L);
+ if(UNEX(res)) {
+ err("HTTPGET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPGET, LO);
+ if(UNEX(res)) {
+ err("HTTPGET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPGET, HI);
+ if(UNEX(res)) {
+ err("HTTPGET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ if(UNEX(res)) {
+ err("SSL_VERIFYHOST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 22L);
+ if(UNEX(res)) {
+ err("SSL_VERIFYHOST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, LO);
+ if(UNEX(res)) {
+ err("SSL_VERIFYHOST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, HI);
+ if(UNEX(res)) {
+ err("SSL_VERIFYHOST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "string");
+ if(UNEX(res)) {
+ err("COOKIEJAR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COOKIEJAR, NULL);
+ if(UNEX(res)) {
+ err("COOKIEJAR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_CIPHER_LIST, "string");
+ if(UNEX(res)) {
+ err("SSL_CIPHER_LIST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_CIPHER_LIST, NULL);
+ if(UNEX(res)) {
+ err("SSL_CIPHER_LIST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, 0L);
+ if(UNEX(res)) {
+ err("HTTP_VERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, 22L);
+ if(UNEX(res)) {
+ err("HTTP_VERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, LO);
+ if(UNEX(res)) {
+ err("HTTP_VERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, HI);
+ if(UNEX(res)) {
+ err("HTTP_VERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, 0L);
+ if(UNEX(res)) {
+ err("FTP_USE_EPSV", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, 22L);
+ if(UNEX(res)) {
+ err("FTP_USE_EPSV", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, LO);
+ if(UNEX(res)) {
+ err("FTP_USE_EPSV", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, HI);
+ if(UNEX(res)) {
+ err("FTP_USE_EPSV", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, "string");
+ if(UNEX(res)) {
+ err("SSLCERTTYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, NULL);
+ if(UNEX(res)) {
+ err("SSLCERTTYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLKEY, "string");
+ if(UNEX(res)) {
+ err("SSLKEY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLKEY, NULL);
+ if(UNEX(res)) {
+ err("SSLKEY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE, "string");
+ if(UNEX(res)) {
+ err("SSLKEYTYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE, NULL);
+ if(UNEX(res)) {
+ err("SSLKEYTYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLENGINE, "string");
+ if(UNEX(res)) {
+ err("SSLENGINE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLENGINE, NULL);
+ if(UNEX(res)) {
+ err("SSLENGINE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 0L);
+ if(UNEX(res)) {
+ err("SSLENGINE_DEFAULT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 22L);
+ if(UNEX(res)) {
+ err("SSLENGINE_DEFAULT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, LO);
+ if(UNEX(res)) {
+ err("SSLENGINE_DEFAULT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, HI);
+ if(UNEX(res)) {
+ err("SSLENGINE_DEFAULT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_USE_GLOBAL_CACHE, 0L);
+ if(UNEX(res)) {
+ err("DNS_USE_GLOBAL_CACHE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_USE_GLOBAL_CACHE, 22L);
+ if(UNEX(res)) {
+ err("DNS_USE_GLOBAL_CACHE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_USE_GLOBAL_CACHE, LO);
+ if(UNEX(res)) {
+ err("DNS_USE_GLOBAL_CACHE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_USE_GLOBAL_CACHE, HI);
+ if(UNEX(res)) {
+ err("DNS_USE_GLOBAL_CACHE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, 0L);
+ if(UNEX(res)) {
+ err("DNS_CACHE_TIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, 22L);
+ if(UNEX(res)) {
+ err("DNS_CACHE_TIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, LO);
+ if(UNEX(res)) {
+ err("DNS_CACHE_TIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, HI);
+ if(UNEX(res)) {
+ err("DNS_CACHE_TIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PREQUOTE, slist);
+ if(UNEX(res)) {
+ err("PREQUOTE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PREQUOTE, NULL);
+ if(UNEX(res)) {
+ err("PREQUOTE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION,
+ debugcb);
+ if(UNEX(res)) {
+ err("DEBUGFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("DEBUGFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &object);
+ if(UNEX(res)) {
+ err("DEBUGDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DEBUGDATA, NULL);
+ if(UNEX(res)) {
+ err("DEBUGDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COOKIESESSION, 0L);
+ if(UNEX(res)) {
+ err("COOKIESESSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COOKIESESSION, 22L);
+ if(UNEX(res)) {
+ err("COOKIESESSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COOKIESESSION, LO);
+ if(UNEX(res)) {
+ err("COOKIESESSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COOKIESESSION, HI);
+ if(UNEX(res)) {
+ err("COOKIESESSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CAPATH, "string");
+ if(UNEX(res)) {
+ err("CAPATH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CAPATH, NULL);
+ if(UNEX(res)) {
+ err("CAPATH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 0L);
+ if(UNEX(res)) {
+ err("BUFFERSIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 22L);
+ if(UNEX(res)) {
+ err("BUFFERSIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, LO);
+ if(UNEX(res)) {
+ err("BUFFERSIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, HI);
+ if(UNEX(res)) {
+ err("BUFFERSIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 0L);
+ if(UNEX(res)) {
+ err("NOSIGNAL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 22L);
+ if(UNEX(res)) {
+ err("NOSIGNAL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOSIGNAL, LO);
+ if(UNEX(res)) {
+ err("NOSIGNAL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOSIGNAL, HI);
+ if(UNEX(res)) {
+ err("NOSIGNAL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SHARE, share);
+ if(UNEX(res)) {
+ err("SHARE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SHARE, NULL);
+ if(UNEX(res)) {
+ err("SHARE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYTYPE, 0L);
+ if(UNEX(res)) {
+ err("PROXYTYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYTYPE, 22L);
+ if(UNEX(res)) {
+ err("PROXYTYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYTYPE, LO);
+ if(UNEX(res)) {
+ err("PROXYTYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYTYPE, HI);
+ if(UNEX(res)) {
+ err("PROXYTYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "string");
+ if(UNEX(res)) {
+ err("ACCEPT_ENCODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, NULL);
+ if(UNEX(res)) {
+ err("ACCEPT_ENCODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PRIVATE, &object);
+ if(UNEX(res)) {
+ err("PRIVATE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PRIVATE, NULL);
+ if(UNEX(res)) {
+ err("PRIVATE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP200ALIASES, slist);
+ if(UNEX(res)) {
+ err("HTTP200ALIASES", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP200ALIASES, NULL);
+ if(UNEX(res)) {
+ err("HTTP200ALIASES", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 0L);
+ if(UNEX(res)) {
+ err("UNRESTRICTED_AUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 22L);
+ if(UNEX(res)) {
+ err("UNRESTRICTED_AUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, LO);
+ if(UNEX(res)) {
+ err("UNRESTRICTED_AUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, HI);
+ if(UNEX(res)) {
+ err("UNRESTRICTED_AUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_USE_EPRT, 0L);
+ if(UNEX(res)) {
+ err("FTP_USE_EPRT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_USE_EPRT, 22L);
+ if(UNEX(res)) {
+ err("FTP_USE_EPRT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_USE_EPRT, LO);
+ if(UNEX(res)) {
+ err("FTP_USE_EPRT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_USE_EPRT, HI);
+ if(UNEX(res)) {
+ err("FTP_USE_EPRT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPAUTH, 0L);
+ if(UNEX(res)) {
+ err("HTTPAUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPAUTH, 22L);
+ if(UNEX(res)) {
+ err("HTTPAUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPAUTH, LO);
+ if(UNEX(res)) {
+ err("HTTPAUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTPAUTH, HI);
+ if(UNEX(res)) {
+ err("HTTPAUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION,
+ ssl_ctx_cb);
+ if(UNEX(res)) {
+ err("SSL_CTX_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, NULL);
+ if(UNEX(res)) {
+ err("SSL_CTX_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_CTX_DATA, &object);
+ if(UNEX(res)) {
+ err("SSL_CTX_DATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_CTX_DATA, NULL);
+ if(UNEX(res)) {
+ err("SSL_CTX_DATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, 0L);
+ if(UNEX(res)) {
+ err("FTP_CREATE_MISSING_DIRS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, 22L);
+ if(UNEX(res)) {
+ err("FTP_CREATE_MISSING_DIRS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, LO);
+ if(UNEX(res)) {
+ err("FTP_CREATE_MISSING_DIRS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, HI);
+ if(UNEX(res)) {
+ err("FTP_CREATE_MISSING_DIRS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYAUTH, 0L);
+ if(UNEX(res)) {
+ err("PROXYAUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYAUTH, 22L);
+ if(UNEX(res)) {
+ err("PROXYAUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYAUTH, LO);
+ if(UNEX(res)) {
+ err("PROXYAUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYAUTH, HI);
+ if(UNEX(res)) {
+ err("PROXYAUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, 0L);
+ if(UNEX(res)) {
+ err("FTP_RESPONSE_TIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, 22L);
+ if(UNEX(res)) {
+ err("FTP_RESPONSE_TIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, LO);
+ if(UNEX(res)) {
+ err("FTP_RESPONSE_TIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, HI);
+ if(UNEX(res)) {
+ err("FTP_RESPONSE_TIMEOUT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_IPRESOLVE, 0L);
+ if(UNEX(res)) {
+ err("IPRESOLVE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_IPRESOLVE, 22L);
+ if(UNEX(res)) {
+ err("IPRESOLVE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_IPRESOLVE, LO);
+ if(UNEX(res)) {
+ err("IPRESOLVE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_IPRESOLVE, HI);
+ if(UNEX(res)) {
+ err("IPRESOLVE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXFILESIZE, 0L);
+ if(UNEX(res)) {
+ err("MAXFILESIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXFILESIZE, 22L);
+ if(UNEX(res)) {
+ err("MAXFILESIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXFILESIZE, LO);
+ if(UNEX(res)) {
+ err("MAXFILESIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXFILESIZE, HI);
+ if(UNEX(res)) {
+ err("MAXFILESIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, OFF_NO);
+ if(UNEX(res)) {
+ err("INFILESIZE_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, OFF_HI);
+ if(UNEX(res)) {
+ err("INFILESIZE_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, OFF_LO);
+ if(UNEX(res)) {
+ err("INFILESIZE_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RESUME_FROM_LARGE, OFF_NO);
+ if(UNEX(res)) {
+ err("RESUME_FROM_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RESUME_FROM_LARGE, OFF_HI);
+ if(UNEX(res)) {
+ err("RESUME_FROM_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RESUME_FROM_LARGE, OFF_LO);
+ if(UNEX(res)) {
+ err("RESUME_FROM_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXFILESIZE_LARGE, OFF_NO);
+ if(UNEX(res)) {
+ err("MAXFILESIZE_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXFILESIZE_LARGE, OFF_HI);
+ if(UNEX(res)) {
+ err("MAXFILESIZE_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAXFILESIZE_LARGE, OFF_LO);
+ if(UNEX(res)) {
+ err("MAXFILESIZE_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NETRC_FILE, "string");
+ if(UNEX(res)) {
+ err("NETRC_FILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NETRC_FILE, NULL);
+ if(UNEX(res)) {
+ err("NETRC_FILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_USE_SSL, 0L);
+ if(UNEX(res)) {
+ err("USE_SSL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_USE_SSL, 22L);
+ if(UNEX(res)) {
+ err("USE_SSL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_USE_SSL, LO);
+ if(UNEX(res)) {
+ err("USE_SSL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_USE_SSL, HI);
+ if(UNEX(res)) {
+ err("USE_SSL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, OFF_NO);
+ if(UNEX(res)) {
+ err("POSTFIELDSIZE_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, OFF_HI);
+ if(UNEX(res)) {
+ err("POSTFIELDSIZE_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, OFF_LO);
+ if(UNEX(res)) {
+ err("POSTFIELDSIZE_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 0L);
+ if(UNEX(res)) {
+ err("TCP_NODELAY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 22L);
+ if(UNEX(res)) {
+ err("TCP_NODELAY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, LO);
+ if(UNEX(res)) {
+ err("TCP_NODELAY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, HI);
+ if(UNEX(res)) {
+ err("TCP_NODELAY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, 0L);
+ if(UNEX(res)) {
+ err("FTPSSLAUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, 22L);
+ if(UNEX(res)) {
+ err("FTPSSLAUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, LO);
+ if(UNEX(res)) {
+ err("FTPSSLAUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, HI);
+ if(UNEX(res)) {
+ err("FTPSSLAUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION,
+ ioctlcb);
+ if(UNEX(res)) {
+ err("IOCTLFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("IOCTLFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_IOCTLDATA, &object);
+ if(UNEX(res)) {
+ err("IOCTLDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_IOCTLDATA, NULL);
+ if(UNEX(res)) {
+ err("IOCTLDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_ACCOUNT, "string");
+ if(UNEX(res)) {
+ err("FTP_ACCOUNT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_ACCOUNT, NULL);
+ if(UNEX(res)) {
+ err("FTP_ACCOUNT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, "string");
+ if(UNEX(res)) {
+ err("COOKIELIST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, NULL);
+ if(UNEX(res)) {
+ err("COOKIELIST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, 0L);
+ if(UNEX(res)) {
+ err("IGNORE_CONTENT_LENGTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, 22L);
+ if(UNEX(res)) {
+ err("IGNORE_CONTENT_LENGTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, LO);
+ if(UNEX(res)) {
+ err("IGNORE_CONTENT_LENGTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, HI);
+ if(UNEX(res)) {
+ err("IGNORE_CONTENT_LENGTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, 0L);
+ if(UNEX(res)) {
+ err("FTP_SKIP_PASV_IP", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, 22L);
+ if(UNEX(res)) {
+ err("FTP_SKIP_PASV_IP", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, LO);
+ if(UNEX(res)) {
+ err("FTP_SKIP_PASV_IP", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, HI);
+ if(UNEX(res)) {
+ err("FTP_SKIP_PASV_IP", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, 0L);
+ if(UNEX(res)) {
+ err("FTP_FILEMETHOD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, 22L);
+ if(UNEX(res)) {
+ err("FTP_FILEMETHOD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, LO);
+ if(UNEX(res)) {
+ err("FTP_FILEMETHOD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, HI);
+ if(UNEX(res)) {
+ err("FTP_FILEMETHOD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOCALPORT, 0L);
+ if(UNEX(res)) {
+ err("LOCALPORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOCALPORT, 22L);
+ if(UNEX(res)) {
+ err("LOCALPORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOCALPORT, LO);
+ if(UNEX(res)) {
+ err("LOCALPORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOCALPORT, HI);
+ if(UNEX(res)) {
+ err("LOCALPORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 0L);
+ if(UNEX(res)) {
+ err("LOCALPORTRANGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 22L);
+ if(UNEX(res)) {
+ err("LOCALPORTRANGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, LO);
+ if(UNEX(res)) {
+ err("LOCALPORTRANGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, HI);
+ if(UNEX(res)) {
+ err("LOCALPORTRANGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 0L);
+ if(UNEX(res)) {
+ err("CONNECT_ONLY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 22L);
+ if(UNEX(res)) {
+ err("CONNECT_ONLY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, LO);
+ if(UNEX(res)) {
+ err("CONNECT_ONLY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, HI);
+ if(UNEX(res)) {
+ err("CONNECT_ONLY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION,
+ conv_from_network_cb);
+ if(UNEX(res)) {
+ err("CONV_FROM_NETWORK_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION, NULL);
+ if(UNEX(res)) {
+ err("CONV_FROM_NETWORK_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONV_TO_NETWORK_FUNCTION,
+ conv_to_network_cb);
+ if(UNEX(res)) {
+ err("CONV_TO_NETWORK_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONV_TO_NETWORK_FUNCTION, NULL);
+ if(UNEX(res)) {
+ err("CONV_TO_NETWORK_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONV_FROM_UTF8_FUNCTION,
+ conv_from_utf8_cb);
+ if(UNEX(res)) {
+ err("CONV_FROM_UTF8_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONV_FROM_UTF8_FUNCTION, NULL);
+ if(UNEX(res)) {
+ err("CONV_FROM_UTF8_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, OFF_NO);
+ if(UNEX(res)) {
+ err("MAX_SEND_SPEED_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, OFF_HI);
+ if(UNEX(res)) {
+ err("MAX_SEND_SPEED_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, OFF_LO);
+ if(UNEX(res)) {
+ err("MAX_SEND_SPEED_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, OFF_NO);
+ if(UNEX(res)) {
+ err("MAX_RECV_SPEED_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, OFF_HI);
+ if(UNEX(res)) {
+ err("MAX_RECV_SPEED_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, OFF_LO);
+ if(UNEX(res)) {
+ err("MAX_RECV_SPEED_LARGE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, "string");
+ if(UNEX(res)) {
+ err("FTP_ALTERNATIVE_TO_USER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, NULL);
+ if(UNEX(res)) {
+ err("FTP_ALTERNATIVE_TO_USER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION,
+ sockoptcb);
+ if(UNEX(res)) {
+ err("SOCKOPTFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("SOCKOPTFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKOPTDATA, &object);
+ if(UNEX(res)) {
+ err("SOCKOPTDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKOPTDATA, NULL);
+ if(UNEX(res)) {
+ err("SOCKOPTDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0L);
+ if(UNEX(res)) {
+ err("SSL_SESSIONID_CACHE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 22L);
+ if(UNEX(res)) {
+ err("SSL_SESSIONID_CACHE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, LO);
+ if(UNEX(res)) {
+ err("SSL_SESSIONID_CACHE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, HI);
+ if(UNEX(res)) {
+ err("SSL_SESSIONID_CACHE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES, 0L);
+ if(UNEX(res)) {
+ err("SSH_AUTH_TYPES", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES, 22L);
+ if(UNEX(res)) {
+ err("SSH_AUTH_TYPES", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES, LO);
+ if(UNEX(res)) {
+ err("SSH_AUTH_TYPES", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES, HI);
+ if(UNEX(res)) {
+ err("SSH_AUTH_TYPES", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_PUBLIC_KEYFILE, "string");
+ if(UNEX(res)) {
+ err("SSH_PUBLIC_KEYFILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_PUBLIC_KEYFILE, NULL);
+ if(UNEX(res)) {
+ err("SSH_PUBLIC_KEYFILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_PRIVATE_KEYFILE, "string");
+ if(UNEX(res)) {
+ err("SSH_PRIVATE_KEYFILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_PRIVATE_KEYFILE, NULL);
+ if(UNEX(res)) {
+ err("SSH_PRIVATE_KEYFILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, 0L);
+ if(UNEX(res)) {
+ err("FTP_SSL_CCC", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, 22L);
+ if(UNEX(res)) {
+ err("FTP_SSL_CCC", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, LO);
+ if(UNEX(res)) {
+ err("FTP_SSL_CCC", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, HI);
+ if(UNEX(res)) {
+ err("FTP_SSL_CCC", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, 0L);
+ if(UNEX(res)) {
+ err("TIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, 22L);
+ if(UNEX(res)) {
+ err("TIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, LO);
+ if(UNEX(res)) {
+ err("TIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, HI);
+ if(UNEX(res)) {
+ err("TIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, 0L);
+ if(UNEX(res)) {
+ err("CONNECTTIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, 22L);
+ if(UNEX(res)) {
+ err("CONNECTTIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, LO);
+ if(UNEX(res)) {
+ err("CONNECTTIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, HI);
+ if(UNEX(res)) {
+ err("CONNECTTIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, 0L);
+ if(UNEX(res)) {
+ err("HTTP_TRANSFER_DECODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, 22L);
+ if(UNEX(res)) {
+ err("HTTP_TRANSFER_DECODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, LO);
+ if(UNEX(res)) {
+ err("HTTP_TRANSFER_DECODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, HI);
+ if(UNEX(res)) {
+ err("HTTP_TRANSFER_DECODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 0L);
+ if(UNEX(res)) {
+ err("HTTP_CONTENT_DECODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 22L);
+ if(UNEX(res)) {
+ err("HTTP_CONTENT_DECODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, LO);
+ if(UNEX(res)) {
+ err("HTTP_CONTENT_DECODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, HI);
+ if(UNEX(res)) {
+ err("HTTP_CONTENT_DECODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NEW_FILE_PERMS, 0L);
+ if(UNEX(res)) {
+ err("NEW_FILE_PERMS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NEW_FILE_PERMS, 22L);
+ if(UNEX(res)) {
+ err("NEW_FILE_PERMS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NEW_FILE_PERMS, LO);
+ if(UNEX(res)) {
+ err("NEW_FILE_PERMS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NEW_FILE_PERMS, HI);
+ if(UNEX(res)) {
+ err("NEW_FILE_PERMS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NEW_DIRECTORY_PERMS, 0L);
+ if(UNEX(res)) {
+ err("NEW_DIRECTORY_PERMS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NEW_DIRECTORY_PERMS, 22L);
+ if(UNEX(res)) {
+ err("NEW_DIRECTORY_PERMS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NEW_DIRECTORY_PERMS, LO);
+ if(UNEX(res)) {
+ err("NEW_DIRECTORY_PERMS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NEW_DIRECTORY_PERMS, HI);
+ if(UNEX(res)) {
+ err("NEW_DIRECTORY_PERMS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTREDIR, 0L);
+ if(UNEX(res)) {
+ err("POSTREDIR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTREDIR, 22L);
+ if(UNEX(res)) {
+ err("POSTREDIR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTREDIR, LO);
+ if(UNEX(res)) {
+ err("POSTREDIR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_POSTREDIR, HI);
+ if(UNEX(res)) {
+ err("POSTREDIR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, "string");
+ if(UNEX(res)) {
+ err("SSH_HOST_PUBLIC_KEY_MD5", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, NULL);
+ if(UNEX(res)) {
+ err("SSH_HOST_PUBLIC_KEY_MD5", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION,
+ opensocketcb);
+ if(UNEX(res)) {
+ err("OPENSOCKETFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("OPENSOCKETFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &object);
+ if(UNEX(res)) {
+ err("OPENSOCKETDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, NULL);
+ if(UNEX(res)) {
+ err("OPENSOCKETDATA", res, __LINE__); goto test_cleanup; }
+ (void)curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0);
+ res = curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, stringpointerextra);
+ if(UNEX(res)) {
+ err("COPYPOSTFIELDS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, NULL);
+ if(UNEX(res)) {
+ err("COPYPOSTFIELDS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 0L);
+ if(UNEX(res)) {
+ err("PROXY_TRANSFER_MODE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 22L);
+ if(UNEX(res)) {
+ err("PROXY_TRANSFER_MODE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, LO);
+ if(UNEX(res)) {
+ err("PROXY_TRANSFER_MODE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, HI);
+ if(UNEX(res)) {
+ err("PROXY_TRANSFER_MODE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION,
+ seekcb);
+ if(UNEX(res)) {
+ err("SEEKFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("SEEKFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SEEKDATA, &object);
+ if(UNEX(res)) {
+ err("SEEKDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SEEKDATA, NULL);
+ if(UNEX(res)) {
+ err("SEEKDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CRLFILE, "string");
+ if(UNEX(res)) {
+ err("CRLFILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CRLFILE, NULL);
+ if(UNEX(res)) {
+ err("CRLFILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ISSUERCERT, "string");
+ if(UNEX(res)) {
+ err("ISSUERCERT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ISSUERCERT, NULL);
+ if(UNEX(res)) {
+ err("ISSUERCERT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, 0L);
+ if(UNEX(res)) {
+ err("ADDRESS_SCOPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, 22L);
+ if(UNEX(res)) {
+ err("ADDRESS_SCOPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, LO);
+ if(UNEX(res)) {
+ err("ADDRESS_SCOPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, HI);
+ if(UNEX(res)) {
+ err("ADDRESS_SCOPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CERTINFO, 0L);
+ if(UNEX(res)) {
+ err("CERTINFO", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CERTINFO, 22L);
+ if(UNEX(res)) {
+ err("CERTINFO", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CERTINFO, LO);
+ if(UNEX(res)) {
+ err("CERTINFO", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CERTINFO, HI);
+ if(UNEX(res)) {
+ err("CERTINFO", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_USERNAME, "string");
+ if(UNEX(res)) {
+ err("USERNAME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_USERNAME, NULL);
+ if(UNEX(res)) {
+ err("USERNAME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PASSWORD, "string");
+ if(UNEX(res)) {
+ err("PASSWORD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PASSWORD, NULL);
+ if(UNEX(res)) {
+ err("PASSWORD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "string");
+ if(UNEX(res)) {
+ err("PROXYUSERNAME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, NULL);
+ if(UNEX(res)) {
+ err("PROXYUSERNAME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "string");
+ if(UNEX(res)) {
+ err("PROXYPASSWORD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, NULL);
+ if(UNEX(res)) {
+ err("PROXYPASSWORD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOPROXY, "string");
+ if(UNEX(res)) {
+ err("NOPROXY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_NOPROXY, NULL);
+ if(UNEX(res)) {
+ err("NOPROXY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TFTP_BLKSIZE, 0L);
+ if(UNEX(res)) {
+ err("TFTP_BLKSIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TFTP_BLKSIZE, 22L);
+ if(UNEX(res)) {
+ err("TFTP_BLKSIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TFTP_BLKSIZE, LO);
+ if(UNEX(res)) {
+ err("TFTP_BLKSIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TFTP_BLKSIZE, HI);
+ if(UNEX(res)) {
+ err("TFTP_BLKSIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_SERVICE, "string");
+ if(UNEX(res)) {
+ err("SOCKS5_GSSAPI_SERVICE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_SERVICE, NULL);
+ if(UNEX(res)) {
+ err("SOCKS5_GSSAPI_SERVICE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_NEC, 0L);
+ if(UNEX(res)) {
+ err("SOCKS5_GSSAPI_NEC", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_NEC, 22L);
+ if(UNEX(res)) {
+ err("SOCKS5_GSSAPI_NEC", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_NEC, LO);
+ if(UNEX(res)) {
+ err("SOCKS5_GSSAPI_NEC", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_NEC, HI);
+ if(UNEX(res)) {
+ err("SOCKS5_GSSAPI_NEC", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROTOCOLS, 0L);
+ if(UNEX(res)) {
+ err("PROTOCOLS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROTOCOLS, 22L);
+ if(UNEX(res)) {
+ err("PROTOCOLS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROTOCOLS, LO);
+ if(UNEX(res)) {
+ err("PROTOCOLS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROTOCOLS, HI);
+ if(UNEX(res)) {
+ err("PROTOCOLS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, 0L);
+ if(UNEX(res)) {
+ err("REDIR_PROTOCOLS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, 22L);
+ if(UNEX(res)) {
+ err("REDIR_PROTOCOLS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, LO);
+ if(UNEX(res)) {
+ err("REDIR_PROTOCOLS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, HI);
+ if(UNEX(res)) {
+ err("REDIR_PROTOCOLS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_KNOWNHOSTS, "string");
+ if(UNEX(res)) {
+ err("SSH_KNOWNHOSTS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_KNOWNHOSTS, NULL);
+ if(UNEX(res)) {
+ err("SSH_KNOWNHOSTS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_KEYFUNCTION,
+ ssh_keycb);
+ if(UNEX(res)) {
+ err("SSH_KEYFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_KEYFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("SSH_KEYFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_KEYDATA, &object);
+ if(UNEX(res)) {
+ err("SSH_KEYDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSH_KEYDATA, NULL);
+ if(UNEX(res)) {
+ err("SSH_KEYDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAIL_FROM, "string");
+ if(UNEX(res)) {
+ err("MAIL_FROM", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAIL_FROM, NULL);
+ if(UNEX(res)) {
+ err("MAIL_FROM", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, slist);
+ if(UNEX(res)) {
+ err("MAIL_RCPT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, NULL);
+ if(UNEX(res)) {
+ err("MAIL_RCPT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_USE_PRET, 0L);
+ if(UNEX(res)) {
+ err("FTP_USE_PRET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_USE_PRET, 22L);
+ if(UNEX(res)) {
+ err("FTP_USE_PRET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_USE_PRET, LO);
+ if(UNEX(res)) {
+ err("FTP_USE_PRET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FTP_USE_PRET, HI);
+ if(UNEX(res)) {
+ err("FTP_USE_PRET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, 0L);
+ if(UNEX(res)) {
+ err("RTSP_REQUEST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, 22L);
+ if(UNEX(res)) {
+ err("RTSP_REQUEST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, LO);
+ if(UNEX(res)) {
+ err("RTSP_REQUEST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, HI);
+ if(UNEX(res)) {
+ err("RTSP_REQUEST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_SESSION_ID, "string");
+ if(UNEX(res)) {
+ err("RTSP_SESSION_ID", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_SESSION_ID, NULL);
+ if(UNEX(res)) {
+ err("RTSP_SESSION_ID", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, "string");
+ if(UNEX(res)) {
+ err("RTSP_STREAM_URI", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, NULL);
+ if(UNEX(res)) {
+ err("RTSP_STREAM_URI", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_TRANSPORT, "string");
+ if(UNEX(res)) {
+ err("RTSP_TRANSPORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_TRANSPORT, NULL);
+ if(UNEX(res)) {
+ err("RTSP_TRANSPORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_CLIENT_CSEQ, 0L);
+ if(UNEX(res)) {
+ err("RTSP_CLIENT_CSEQ", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_CLIENT_CSEQ, 22L);
+ if(UNEX(res)) {
+ err("RTSP_CLIENT_CSEQ", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_CLIENT_CSEQ, LO);
+ if(UNEX(res)) {
+ err("RTSP_CLIENT_CSEQ", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_CLIENT_CSEQ, HI);
+ if(UNEX(res)) {
+ err("RTSP_CLIENT_CSEQ", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_SERVER_CSEQ, 0L);
+ if(UNEX(res)) {
+ err("RTSP_SERVER_CSEQ", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_SERVER_CSEQ, 22L);
+ if(UNEX(res)) {
+ err("RTSP_SERVER_CSEQ", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_SERVER_CSEQ, LO);
+ if(UNEX(res)) {
+ err("RTSP_SERVER_CSEQ", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RTSP_SERVER_CSEQ, HI);
+ if(UNEX(res)) {
+ err("RTSP_SERVER_CSEQ", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, &object);
+ if(UNEX(res)) {
+ err("INTERLEAVEDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, NULL);
+ if(UNEX(res)) {
+ err("INTERLEAVEDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION,
+ interleavecb);
+ if(UNEX(res)) {
+ err("INTERLEAVEFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("INTERLEAVEFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, 0L);
+ if(UNEX(res)) {
+ err("WILDCARDMATCH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, 22L);
+ if(UNEX(res)) {
+ err("WILDCARDMATCH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, LO);
+ if(UNEX(res)) {
+ err("WILDCARDMATCH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_WILDCARDMATCH, HI);
+ if(UNEX(res)) {
+ err("WILDCARDMATCH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CHUNK_BGN_FUNCTION,
+ chunk_bgn_cb);
+ if(UNEX(res)) {
+ err("CHUNK_BGN_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CHUNK_BGN_FUNCTION, NULL);
+ if(UNEX(res)) {
+ err("CHUNK_BGN_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CHUNK_END_FUNCTION,
+ chunk_end_cb);
+ if(UNEX(res)) {
+ err("CHUNK_END_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CHUNK_END_FUNCTION, NULL);
+ if(UNEX(res)) {
+ err("CHUNK_END_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FNMATCH_FUNCTION,
+ fnmatch_cb);
+ if(UNEX(res)) {
+ err("FNMATCH_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FNMATCH_FUNCTION, NULL);
+ if(UNEX(res)) {
+ err("FNMATCH_FUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CHUNK_DATA, &object);
+ if(UNEX(res)) {
+ err("CHUNK_DATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CHUNK_DATA, NULL);
+ if(UNEX(res)) {
+ err("CHUNK_DATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FNMATCH_DATA, &object);
+ if(UNEX(res)) {
+ err("FNMATCH_DATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_FNMATCH_DATA, NULL);
+ if(UNEX(res)) {
+ err("FNMATCH_DATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RESOLVE, slist);
+ if(UNEX(res)) {
+ err("RESOLVE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_RESOLVE, NULL);
+ if(UNEX(res)) {
+ err("RESOLVE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "string");
+ if(UNEX(res)) {
+ err("TLSAUTH_USERNAME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, NULL);
+ if(UNEX(res)) {
+ err("TLSAUTH_USERNAME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "string");
+ if(UNEX(res)) {
+ err("TLSAUTH_PASSWORD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, NULL);
+ if(UNEX(res)) {
+ err("TLSAUTH_PASSWORD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "string");
+ if(UNEX(res)) {
+ err("TLSAUTH_TYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, NULL);
+ if(UNEX(res)) {
+ err("TLSAUTH_TYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TRANSFER_ENCODING, 0L);
+ if(UNEX(res)) {
+ err("TRANSFER_ENCODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TRANSFER_ENCODING, 22L);
+ if(UNEX(res)) {
+ err("TRANSFER_ENCODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TRANSFER_ENCODING, LO);
+ if(UNEX(res)) {
+ err("TRANSFER_ENCODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TRANSFER_ENCODING, HI);
+ if(UNEX(res)) {
+ err("TRANSFER_ENCODING", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION,
+ closesocketcb);
+ if(UNEX(res)) {
+ err("CLOSESOCKETFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("CLOSESOCKETFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CLOSESOCKETDATA, &object);
+ if(UNEX(res)) {
+ err("CLOSESOCKETDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CLOSESOCKETDATA, NULL);
+ if(UNEX(res)) {
+ err("CLOSESOCKETDATA", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_GSSAPI_DELEGATION, 0L);
+ if(UNEX(res)) {
+ err("GSSAPI_DELEGATION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_GSSAPI_DELEGATION, 22L);
+ if(UNEX(res)) {
+ err("GSSAPI_DELEGATION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_GSSAPI_DELEGATION, LO);
+ if(UNEX(res)) {
+ err("GSSAPI_DELEGATION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_GSSAPI_DELEGATION, HI);
+ if(UNEX(res)) {
+ err("GSSAPI_DELEGATION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_SERVERS, "string");
+ if(UNEX(res)) {
+ err("DNS_SERVERS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_SERVERS, NULL);
+ if(UNEX(res)) {
+ err("DNS_SERVERS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, 0L);
+ if(UNEX(res)) {
+ err("ACCEPTTIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, 22L);
+ if(UNEX(res)) {
+ err("ACCEPTTIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, LO);
+ if(UNEX(res)) {
+ err("ACCEPTTIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, HI);
+ if(UNEX(res)) {
+ err("ACCEPTTIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 0L);
+ if(UNEX(res)) {
+ err("TCP_KEEPALIVE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 22L);
+ if(UNEX(res)) {
+ err("TCP_KEEPALIVE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, LO);
+ if(UNEX(res)) {
+ err("TCP_KEEPALIVE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, HI);
+ if(UNEX(res)) {
+ err("TCP_KEEPALIVE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 0L);
+ if(UNEX(res)) {
+ err("TCP_KEEPIDLE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 22L);
+ if(UNEX(res)) {
+ err("TCP_KEEPIDLE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, LO);
+ if(UNEX(res)) {
+ err("TCP_KEEPIDLE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, HI);
+ if(UNEX(res)) {
+ err("TCP_KEEPIDLE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 0L);
+ if(UNEX(res)) {
+ err("TCP_KEEPINTVL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 22L);
+ if(UNEX(res)) {
+ err("TCP_KEEPINTVL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, LO);
+ if(UNEX(res)) {
+ err("TCP_KEEPINTVL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, HI);
+ if(UNEX(res)) {
+ err("TCP_KEEPINTVL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, 0L);
+ if(UNEX(res)) {
+ err("SSL_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, 22L);
+ if(UNEX(res)) {
+ err("SSL_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, LO);
+ if(UNEX(res)) {
+ err("SSL_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, HI);
+ if(UNEX(res)) {
+ err("SSL_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAIL_AUTH, "string");
+ if(UNEX(res)) {
+ err("MAIL_AUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_MAIL_AUTH, NULL);
+ if(UNEX(res)) {
+ err("MAIL_AUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SASL_IR, 0L);
+ if(UNEX(res)) {
+ err("SASL_IR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SASL_IR, 22L);
+ if(UNEX(res)) {
+ err("SASL_IR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SASL_IR, LO);
+ if(UNEX(res)) {
+ err("SASL_IR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SASL_IR, HI);
+ if(UNEX(res)) {
+ err("SASL_IR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION,
+ xferinfocb);
+ if(UNEX(res)) {
+ err("XFERINFOFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, NULL);
+ if(UNEX(res)) {
+ err("XFERINFOFUNCTION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_XOAUTH2_BEARER, "string");
+ if(UNEX(res)) {
+ err("XOAUTH2_BEARER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_XOAUTH2_BEARER, NULL);
+ if(UNEX(res)) {
+ err("XOAUTH2_BEARER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_INTERFACE, "string");
+ if(UNEX(res)) {
+ err("DNS_INTERFACE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_INTERFACE, NULL);
+ if(UNEX(res)) {
+ err("DNS_INTERFACE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP4, "string");
+ if(UNEX(res)) {
+ err("DNS_LOCAL_IP4", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP4, NULL);
+ if(UNEX(res)) {
+ err("DNS_LOCAL_IP4", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP6, "string");
+ if(UNEX(res)) {
+ err("DNS_LOCAL_IP6", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP6, NULL);
+ if(UNEX(res)) {
+ err("DNS_LOCAL_IP6", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "string");
+ if(UNEX(res)) {
+ err("LOGIN_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, NULL);
+ if(UNEX(res)) {
+ err("LOGIN_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_NPN, 0L);
+ if(UNEX(res)) {
+ err("SSL_ENABLE_NPN", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_NPN, 22L);
+ if(UNEX(res)) {
+ err("SSL_ENABLE_NPN", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_NPN, LO);
+ if(UNEX(res)) {
+ err("SSL_ENABLE_NPN", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_NPN, HI);
+ if(UNEX(res)) {
+ err("SSL_ENABLE_NPN", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_ALPN, 0L);
+ if(UNEX(res)) {
+ err("SSL_ENABLE_ALPN", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_ALPN, 22L);
+ if(UNEX(res)) {
+ err("SSL_ENABLE_ALPN", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_ALPN, LO);
+ if(UNEX(res)) {
+ err("SSL_ENABLE_ALPN", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_ALPN, HI);
+ if(UNEX(res)) {
+ err("SSL_ENABLE_ALPN", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_EXPECT_100_TIMEOUT_MS, 0L);
+ if(UNEX(res)) {
+ err("EXPECT_100_TIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_EXPECT_100_TIMEOUT_MS, 22L);
+ if(UNEX(res)) {
+ err("EXPECT_100_TIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_EXPECT_100_TIMEOUT_MS, LO);
+ if(UNEX(res)) {
+ err("EXPECT_100_TIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_EXPECT_100_TIMEOUT_MS, HI);
+ if(UNEX(res)) {
+ err("EXPECT_100_TIMEOUT_MS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYHEADER, slist);
+ if(UNEX(res)) {
+ err("PROXYHEADER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXYHEADER, NULL);
+ if(UNEX(res)) {
+ err("PROXYHEADER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HEADEROPT, 0L);
+ if(UNEX(res)) {
+ err("HEADEROPT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HEADEROPT, 22L);
+ if(UNEX(res)) {
+ err("HEADEROPT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HEADEROPT, LO);
+ if(UNEX(res)) {
+ err("HEADEROPT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_HEADEROPT, HI);
+ if(UNEX(res)) {
+ err("HEADEROPT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PINNEDPUBLICKEY, "string");
+ if(UNEX(res)) {
+ err("PINNEDPUBLICKEY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PINNEDPUBLICKEY, NULL);
+ if(UNEX(res)) {
+ err("PINNEDPUBLICKEY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_UNIX_SOCKET_PATH, "string");
+ if(UNEX(res)) {
+ err("UNIX_SOCKET_PATH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_UNIX_SOCKET_PATH, NULL);
+ if(UNEX(res)) {
+ err("UNIX_SOCKET_PATH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 0L);
+ if(UNEX(res)) {
+ err("SSL_VERIFYSTATUS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 22L);
+ if(UNEX(res)) {
+ err("SSL_VERIFYSTATUS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, LO);
+ if(UNEX(res)) {
+ err("SSL_VERIFYSTATUS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, HI);
+ if(UNEX(res)) {
+ err("SSL_VERIFYSTATUS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_FALSESTART, 0L);
+ if(UNEX(res)) {
+ err("SSL_FALSESTART", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_FALSESTART, 22L);
+ if(UNEX(res)) {
+ err("SSL_FALSESTART", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_FALSESTART, LO);
+ if(UNEX(res)) {
+ err("SSL_FALSESTART", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SSL_FALSESTART, HI);
+ if(UNEX(res)) {
+ err("SSL_FALSESTART", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PATH_AS_IS, 0L);
+ if(UNEX(res)) {
+ err("PATH_AS_IS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PATH_AS_IS, 22L);
+ if(UNEX(res)) {
+ err("PATH_AS_IS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PATH_AS_IS, LO);
+ if(UNEX(res)) {
+ err("PATH_AS_IS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PATH_AS_IS, HI);
+ if(UNEX(res)) {
+ err("PATH_AS_IS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SERVICE_NAME, "string");
+ if(UNEX(res)) {
+ err("PROXY_SERVICE_NAME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SERVICE_NAME, NULL);
+ if(UNEX(res)) {
+ err("PROXY_SERVICE_NAME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SERVICE_NAME, "string");
+ if(UNEX(res)) {
+ err("SERVICE_NAME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SERVICE_NAME, NULL);
+ if(UNEX(res)) {
+ err("SERVICE_NAME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PIPEWAIT, 0L);
+ if(UNEX(res)) {
+ err("PIPEWAIT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PIPEWAIT, 22L);
+ if(UNEX(res)) {
+ err("PIPEWAIT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PIPEWAIT, LO);
+ if(UNEX(res)) {
+ err("PIPEWAIT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PIPEWAIT, HI);
+ if(UNEX(res)) {
+ err("PIPEWAIT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "string");
+ if(UNEX(res)) {
+ err("DEFAULT_PROTOCOL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, NULL);
+ if(UNEX(res)) {
+ err("DEFAULT_PROTOCOL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_STREAM_WEIGHT, 0L);
+ if(UNEX(res)) {
+ err("STREAM_WEIGHT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_STREAM_WEIGHT, 22L);
+ if(UNEX(res)) {
+ err("STREAM_WEIGHT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_STREAM_WEIGHT, LO);
+ if(UNEX(res)) {
+ err("STREAM_WEIGHT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_STREAM_WEIGHT, HI);
+ if(UNEX(res)) {
+ err("STREAM_WEIGHT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_STREAM_DEPENDS, dep);
+ if(UNEX(res)) {
+ err("STREAM_DEPENDS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_STREAM_DEPENDS, NULL);
+ if(UNEX(res)) {
+ err("STREAM_DEPENDS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_STREAM_DEPENDS_E, dep);
+ if(UNEX(res)) {
+ err("STREAM_DEPENDS_E", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_STREAM_DEPENDS_E, NULL);
+ if(UNEX(res)) {
+ err("STREAM_DEPENDS_E", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TFTP_NO_OPTIONS, 0L);
+ if(UNEX(res)) {
+ err("TFTP_NO_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TFTP_NO_OPTIONS, 22L);
+ if(UNEX(res)) {
+ err("TFTP_NO_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TFTP_NO_OPTIONS, LO);
+ if(UNEX(res)) {
+ err("TFTP_NO_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TFTP_NO_OPTIONS, HI);
+ if(UNEX(res)) {
+ err("TFTP_NO_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECT_TO, &object);
+ if(UNEX(res)) {
+ err("CONNECT_TO", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_CONNECT_TO, NULL);
+ if(UNEX(res)) {
+ err("CONNECT_TO", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_FASTOPEN, 0L);
+ if(UNEX(res)) {
+ err("TCP_FASTOPEN", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_FASTOPEN, 22L);
+ if(UNEX(res)) {
+ err("TCP_FASTOPEN", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_FASTOPEN, LO);
+ if(UNEX(res)) {
+ err("TCP_FASTOPEN", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_TCP_FASTOPEN, HI);
+ if(UNEX(res)) {
+ err("TCP_FASTOPEN", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_KEEP_SENDING_ON_ERROR, 0L);
+ if(UNEX(res)) {
+ err("KEEP_SENDING_ON_ERROR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_KEEP_SENDING_ON_ERROR, 22L);
+ if(UNEX(res)) {
+ err("KEEP_SENDING_ON_ERROR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_KEEP_SENDING_ON_ERROR, LO);
+ if(UNEX(res)) {
+ err("KEEP_SENDING_ON_ERROR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_KEEP_SENDING_ON_ERROR, HI);
+ if(UNEX(res)) {
+ err("KEEP_SENDING_ON_ERROR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO, "string");
+ if(UNEX(res)) {
+ err("PROXY_CAINFO", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO, NULL);
+ if(UNEX(res)) {
+ err("PROXY_CAINFO", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_CAPATH, "string");
+ if(UNEX(res)) {
+ err("PROXY_CAPATH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_CAPATH, NULL);
+ if(UNEX(res)) {
+ err("PROXY_CAPATH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, 0L);
+ if(UNEX(res)) {
+ err("PROXY_SSL_VERIFYPEER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, 22L);
+ if(UNEX(res)) {
+ err("PROXY_SSL_VERIFYPEER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, LO);
+ if(UNEX(res)) {
+ err("PROXY_SSL_VERIFYPEER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, HI);
+ if(UNEX(res)) {
+ err("PROXY_SSL_VERIFYPEER", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYHOST, 0L);
+ if(UNEX(res)) {
+ err("PROXY_SSL_VERIFYHOST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYHOST, 22L);
+ if(UNEX(res)) {
+ err("PROXY_SSL_VERIFYHOST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYHOST, LO);
+ if(UNEX(res)) {
+ err("PROXY_SSL_VERIFYHOST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYHOST, HI);
+ if(UNEX(res)) {
+ err("PROXY_SSL_VERIFYHOST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSLVERSION, 0L);
+ if(UNEX(res)) {
+ err("PROXY_SSLVERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSLVERSION, 22L);
+ if(UNEX(res)) {
+ err("PROXY_SSLVERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSLVERSION, LO);
+ if(UNEX(res)) {
+ err("PROXY_SSLVERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSLVERSION, HI);
+ if(UNEX(res)) {
+ err("PROXY_SSLVERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "string");
+ if(UNEX(res)) {
+ err("PROXY_TLSAUTH_USERNAME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, NULL);
+ if(UNEX(res)) {
+ err("PROXY_TLSAUTH_USERNAME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "string");
+ if(UNEX(res)) {
+ err("PROXY_TLSAUTH_PASSWORD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, NULL);
+ if(UNEX(res)) {
+ err("PROXY_TLSAUTH_PASSWORD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "string");
+ if(UNEX(res)) {
+ err("PROXY_TLSAUTH_TYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, NULL);
+ if(UNEX(res)) {
+ err("PROXY_TLSAUTH_TYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "string");
+ if(UNEX(res)) {
+ err("PROXY_SSLCERT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, NULL);
+ if(UNEX(res)) {
+ err("PROXY_SSLCERT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERTTYPE, "string");
+ if(UNEX(res)) {
+ err("PROXY_SSLCERTTYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERTTYPE, NULL);
+ if(UNEX(res)) {
+ err("PROXY_SSLCERTTYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "string");
+ if(UNEX(res)) {
+ err("PROXY_SSLKEY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, NULL);
+ if(UNEX(res)) {
+ err("PROXY_SSLKEY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEYTYPE, "string");
+ if(UNEX(res)) {
+ err("PROXY_SSLKEYTYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEYTYPE, NULL);
+ if(UNEX(res)) {
+ err("PROXY_SSLKEYTYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "string");
+ if(UNEX(res)) {
+ err("PROXY_KEYPASSWD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, NULL);
+ if(UNEX(res)) {
+ err("PROXY_KEYPASSWD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_CIPHER_LIST, "string");
+ if(UNEX(res)) {
+ err("PROXY_SSL_CIPHER_LIST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_CIPHER_LIST, NULL);
+ if(UNEX(res)) {
+ err("PROXY_SSL_CIPHER_LIST", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_CRLFILE, "string");
+ if(UNEX(res)) {
+ err("PROXY_CRLFILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_CRLFILE, NULL);
+ if(UNEX(res)) {
+ err("PROXY_CRLFILE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS, 0L);
+ if(UNEX(res)) {
+ err("PROXY_SSL_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS, 22L);
+ if(UNEX(res)) {
+ err("PROXY_SSL_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS, LO);
+ if(UNEX(res)) {
+ err("PROXY_SSL_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS, HI);
+ if(UNEX(res)) {
+ err("PROXY_SSL_OPTIONS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PRE_PROXY, "string");
+ if(UNEX(res)) {
+ err("PRE_PROXY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PRE_PROXY, NULL);
+ if(UNEX(res)) {
+ err("PRE_PROXY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_PINNEDPUBLICKEY, "string");
+ if(UNEX(res)) {
+ err("PROXY_PINNEDPUBLICKEY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_PROXY_PINNEDPUBLICKEY, NULL);
+ if(UNEX(res)) {
+ err("PROXY_PINNEDPUBLICKEY", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ABSTRACT_UNIX_SOCKET, "string");
+ if(UNEX(res)) {
+ err("ABSTRACT_UNIX_SOCKET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_ABSTRACT_UNIX_SOCKET, NULL);
+ if(UNEX(res)) {
+ err("ABSTRACT_UNIX_SOCKET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SUPPRESS_CONNECT_HEADERS, 0L);
+ if(UNEX(res)) {
+ err("SUPPRESS_CONNECT_HEADERS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SUPPRESS_CONNECT_HEADERS, 22L);
+ if(UNEX(res)) {
+ err("SUPPRESS_CONNECT_HEADERS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SUPPRESS_CONNECT_HEADERS, LO);
+ if(UNEX(res)) {
+ err("SUPPRESS_CONNECT_HEADERS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SUPPRESS_CONNECT_HEADERS, HI);
+ if(UNEX(res)) {
+ err("SUPPRESS_CONNECT_HEADERS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_REQUEST_TARGET, "string");
+ if(UNEX(res)) {
+ err("REQUEST_TARGET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_REQUEST_TARGET, NULL);
+ if(UNEX(res)) {
+ err("REQUEST_TARGET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKS5_AUTH, 0L);
+ if(UNEX(res)) {
+ err("SOCKS5_AUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKS5_AUTH, 22L);
+ if(UNEX(res)) {
+ err("SOCKS5_AUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKS5_AUTH, LO);
+ if(UNEX(res)) {
+ err("SOCKS5_AUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_setopt(curl, CURLOPT_SOCKS5_AUTH, HI);
+ if(UNEX(res)) {
+ err("SOCKS5_AUTH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &charp);
+ if(UNEX(res)) {
+ geterr("EFFECTIVE_URL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &val);
+ if(UNEX(res)) {
+ geterr("RESPONSE_CODE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &dval);
+ if(UNEX(res)) {
+ geterr("TOTAL_TIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME, &dval);
+ if(UNEX(res)) {
+ geterr("NAMELOOKUP_TIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &dval);
+ if(UNEX(res)) {
+ geterr("CONNECT_TIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME, &dval);
+ if(UNEX(res)) {
+ geterr("PRETRANSFER_TIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &dval);
+ if(UNEX(res)) {
+ geterr("SIZE_UPLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &oval);
+ if(UNEX(res)) {
+ geterr("SIZE_UPLOAD_T", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &dval);
+ if(UNEX(res)) {
+ geterr("SIZE_DOWNLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &oval);
+ if(UNEX(res)) {
+ geterr("SIZE_DOWNLOAD_T", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &dval);
+ if(UNEX(res)) {
+ geterr("SPEED_DOWNLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &oval);
+ if(UNEX(res)) {
+ geterr("SPEED_DOWNLOAD_T", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &dval);
+ if(UNEX(res)) {
+ geterr("SPEED_UPLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &oval);
+ if(UNEX(res)) {
+ geterr("SPEED_UPLOAD_T", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &val);
+ if(UNEX(res)) {
+ geterr("HEADER_SIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &val);
+ if(UNEX(res)) {
+ geterr("REQUEST_SIZE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT, &val);
+ if(UNEX(res)) {
+ geterr("SSL_VERIFYRESULT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &val);
+ if(UNEX(res)) {
+ geterr("FILETIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &dval);
+ if(UNEX(res)) {
+ geterr("CONTENT_LENGTH_DOWNLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &oval);
+ if(UNEX(res)) {
+ geterr("CONTENT_LENGTH_DOWNLOAD_T", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &dval);
+ if(UNEX(res)) {
+ geterr("CONTENT_LENGTH_UPLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &oval);
+ if(UNEX(res)) {
+ geterr("CONTENT_LENGTH_UPLOAD_T", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME, &dval);
+ if(UNEX(res)) {
+ geterr("STARTTRANSFER_TIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &charp);
+ if(UNEX(res)) {
+ geterr("CONTENT_TYPE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME, &dval);
+ if(UNEX(res)) {
+ geterr("REDIRECT_TIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &val);
+ if(UNEX(res)) {
+ geterr("REDIRECT_COUNT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_PRIVATE, &charp);
+ if(UNEX(res)) {
+ geterr("PRIVATE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE, &val);
+ if(UNEX(res)) {
+ geterr("HTTP_CONNECTCODE", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_AVAIL, &val);
+ if(UNEX(res)) {
+ geterr("HTTPAUTH_AVAIL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_AVAIL, &val);
+ if(UNEX(res)) {
+ geterr("PROXYAUTH_AVAIL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_OS_ERRNO, &val);
+ if(UNEX(res)) {
+ geterr("OS_ERRNO", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &val);
+ if(UNEX(res)) {
+ geterr("NUM_CONNECTS", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &slist);
+ if(UNEX(res)) {
+ geterr("SSL_ENGINES", res, __LINE__); goto test_cleanup; }
+ if(slist)
+ curl_slist_free_all(slist);
+ res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &slist);
+ if(UNEX(res)) {
+ geterr("COOKIELIST", res, __LINE__); goto test_cleanup; }
+ if(slist)
+ curl_slist_free_all(slist);
+ res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &val);
+ if(UNEX(res)) {
+ geterr("LASTSOCKET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_FTP_ENTRY_PATH, &charp);
+ if(UNEX(res)) {
+ geterr("FTP_ENTRY_PATH", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &charp);
+ if(UNEX(res)) {
+ geterr("REDIRECT_URL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &charp);
+ if(UNEX(res)) {
+ geterr("PRIMARY_IP", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME, &dval);
+ if(UNEX(res)) {
+ geterr("APPCONNECT_TIME", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &certinfo);
+ if(UNEX(res)) {
+ geterr("CERTINFO", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &val);
+ if(UNEX(res)) {
+ geterr("CONDITION_UNMET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_RTSP_SESSION_ID, &charp);
+ if(UNEX(res)) {
+ geterr("RTSP_SESSION_ID", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_RTSP_CLIENT_CSEQ, &val);
+ if(UNEX(res)) {
+ geterr("RTSP_CLIENT_CSEQ", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_RTSP_SERVER_CSEQ, &val);
+ if(UNEX(res)) {
+ geterr("RTSP_SERVER_CSEQ", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_RTSP_CSEQ_RECV, &val);
+ if(UNEX(res)) {
+ geterr("RTSP_CSEQ_RECV", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_PORT, &val);
+ if(UNEX(res)) {
+ geterr("PRIMARY_PORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_LOCAL_IP, &charp);
+ if(UNEX(res)) {
+ geterr("LOCAL_IP", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_LOCAL_PORT, &val);
+ if(UNEX(res)) {
+ geterr("LOCAL_PORT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &tlssession);
+ if(UNEX(res)) {
+ geterr("TLS_SESSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
+ if(UNEX(res)) {
+ geterr("ACTIVESOCKET", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_TLS_SSL_PTR, &tlssession);
+ if(UNEX(res)) {
+ geterr("TLS_SSL_PTR", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_HTTP_VERSION, &val);
+ if(UNEX(res)) {
+ geterr("HTTP_VERSION", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT, &val);
+ if(UNEX(res)) {
+ geterr("PROXY_SSL_VERIFYRESULT", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &val);
+ if(UNEX(res)) {
+ geterr("PROTOCOL", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SCHEME, &charp);
+ if(UNEX(res)) {
+ geterr("SCHEME", res, __LINE__); goto test_cleanup; }
+ curl_easy_setopt(curl, 1, 0);
+ res = CURLE_OK;
+test_cleanup:
+ curl_easy_cleanup(curl);
+ curl_easy_cleanup(dep);
+ curl_share_cleanup(share);
+
+ return (int)res;
+}
diff --git a/tests/libtest/lib1525.c b/tests/libtest/lib1525.c
index 39d51bb1..a7649458 100644
--- a/tests/libtest/lib1525.c
+++ b/tests/libtest/lib1525.c
@@ -82,7 +82,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
- test_setopt(curl, CURLOPT_INFILESIZE, strlen(data));
+ test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(data));
res = curl_easy_perform(curl);
diff --git a/tests/libtest/lib1526.c b/tests/libtest/lib1526.c
index b2d2a411..704ae497 100644
--- a/tests/libtest/lib1526.c
+++ b/tests/libtest/lib1526.c
@@ -85,7 +85,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
- test_setopt(curl, CURLOPT_INFILESIZE, strlen(data));
+ test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(data));
res = curl_easy_perform(curl);
diff --git a/tests/libtest/lib1527.c b/tests/libtest/lib1527.c
index 5dec7fcc..689839e3 100644
--- a/tests/libtest/lib1527.c
+++ b/tests/libtest/lib1527.c
@@ -83,7 +83,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
- test_setopt(curl, CURLOPT_INFILESIZE, strlen(data));
+ test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(data));
test_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_UNIFIED);
res = curl_easy_perform(curl);
diff --git a/tests/libtest/lib1531.c b/tests/libtest/lib1531.c
index b21d0673..287acd6c 100644
--- a/tests/libtest/lib1531.c
+++ b/tests/libtest/lib1531.c
@@ -27,8 +27,8 @@
#define TEST_HANG_TIMEOUT 60 * 1000
-char const testData[] = ".abc\0xyz";
-off_t const testDataSize = sizeof(testData) - 1;
+static char const testData[] = ".abc\0xyz";
+static off_t const testDataSize = sizeof(testData) - 1;
int test(char *URL)
{
@@ -127,12 +127,13 @@ int test(char *URL)
} while(still_running);
/* See how the transfers went */
- while((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
- if(msg->msg == CURLMSG_DONE) {
+ do {
+ msg = curl_multi_info_read(multi_handle, &msgs_left);
+ if(msg && msg->msg == CURLMSG_DONE) {
printf("HTTP transfer completed with status %d\n", msg->data.result);
break;
}
- }
+ } while(msg);
curl_multi_cleanup(multi_handle);
diff --git a/tests/libtest/lib1537.c b/tests/libtest/lib1537.c
new file mode 100644
index 00000000..b07d64fc
--- /dev/null
+++ b/tests/libtest/lib1537.c
@@ -0,0 +1,94 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+ const unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+ 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7};
+ CURLcode res = CURLE_OK;
+ char *ptr = NULL;
+ int asize;
+ int outlen;
+ char *raw;
+
+ (void)URL; /* we don't use this */
+
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ fprintf(stderr, "curl_global_init() failed\n");
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ asize = (int)sizeof(a);
+ ptr = curl_easy_escape(NULL, (char *)a, asize);
+ printf("%s\n", ptr);
+ if(ptr)
+ curl_free(ptr);
+
+ /* deprecated API */
+ ptr = curl_escape((char *)a, asize);
+ printf("%s\n", ptr);
+ if(!ptr) {
+ res = TEST_ERR_MAJOR_BAD;
+ goto test_cleanup;
+ }
+
+ raw = curl_easy_unescape(NULL, ptr, (int)strlen(ptr), &outlen);
+ printf("outlen == %d\n", outlen);
+ printf("unescape == original? %s\n",
+ memcmp(raw, a, outlen) ? "no" : "YES");
+ if(raw)
+ curl_free(raw);
+
+ /* deprecated API */
+ raw = curl_unescape(ptr, (int)strlen(ptr));
+ if(!raw) {
+ res = TEST_ERR_MAJOR_BAD;
+ goto test_cleanup;
+ }
+ outlen = (int)strlen(raw);
+ printf("[old] outlen == %d\n", outlen);
+ printf("[old] unescape == original? %s\n",
+ memcmp(raw, a, outlen) ? "no" : "YES");
+ if(raw)
+ curl_free(raw);
+ if(ptr)
+ curl_free(ptr);
+
+ /* weird input length */
+ ptr = curl_easy_escape(NULL, (char *)a, -1);
+ printf("escape -1 length: %s\n", ptr);
+
+ /* weird input length */
+ outlen = 2017; /* just a value */
+ ptr = curl_easy_unescape(NULL, (char *)"moahahaha", -1, &outlen);
+ printf("unescape -1 length: %s %d\n", ptr, outlen);
+
+test_cleanup:
+ if(ptr)
+ curl_free(ptr);
+ curl_global_cleanup();
+
+ return (int)res;
+}
diff --git a/tests/libtest/lib1538.c b/tests/libtest/lib1538.c
new file mode 100644
index 00000000..e4e16f20
--- /dev/null
+++ b/tests/libtest/lib1538.c
@@ -0,0 +1,51 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+ int res = 0;
+ CURLcode easyret;
+ CURLMcode multiret;
+ CURLSHcode shareret;
+ (void)URL;
+
+ curl_easy_strerror(INT_MAX);
+ curl_multi_strerror(INT_MAX);
+ curl_share_strerror(INT_MAX);
+ curl_easy_strerror(-INT_MAX);
+ curl_multi_strerror(-INT_MAX);
+ curl_share_strerror(-INT_MAX);
+ for(easyret=CURLE_OK; easyret <= CURL_LAST; easyret++) {
+ printf("e%d: %s\n", (int)easyret, curl_easy_strerror(easyret));
+ }
+ for(multiret=CURLM_CALL_MULTI_PERFORM; multiret <= CURLM_LAST; multiret++) {
+ printf("m%d: %s\n", (int)multiret, curl_multi_strerror(multiret));
+ }
+ for(shareret=CURLSHE_OK; shareret <= CURLSHE_LAST; shareret++) {
+ printf("s%d: %s\n", (int)shareret, curl_share_strerror(shareret));
+ }
+
+ return (int)res;
+}
diff --git a/tests/libtest/lib1540.c b/tests/libtest/lib1540.c
new file mode 100644
index 00000000..86ba085c
--- /dev/null
+++ b/tests/libtest/lib1540.c
@@ -0,0 +1,121 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "testutil.h"
+#include "warnless.h"
+#include "memdebug.h"
+
+struct transfer_status {
+ CURL *easy;
+ int halted;
+ int counter; /* count write callback invokes */
+ int please; /* number of times xferinfo is called while halted */
+};
+
+static int please_continue(void *userp,
+ curl_off_t dltotal,
+ curl_off_t dlnow,
+ curl_off_t ultotal,
+ curl_off_t ulnow)
+{
+ struct transfer_status *st = (struct transfer_status *)userp;
+ (void)dltotal;
+ (void)dlnow;
+ (void)ultotal;
+ (void)ulnow;
+ if(st->halted) {
+ st->please++;
+ if(st->please == 2) {
+ /* waited enough, unpause! */
+ curl_easy_pause(st->easy, CURLPAUSE_CONT);
+ }
+ }
+ fprintf(stderr, "xferinfo: paused %d\n", st->halted);
+ return 0; /* go on */
+}
+
+static size_t header_callback(void *ptr, size_t size, size_t nmemb,
+ void *userp)
+{
+ size_t len = size * nmemb;
+ (void)userp;
+ (void)fwrite(ptr, size, nmemb, stdout);
+ return len;
+}
+
+static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct transfer_status *st = (struct transfer_status *)userp;
+ size_t len = size * nmemb;
+ st->counter++;
+ if(st->counter > 1) {
+ /* the first call puts us on pause, so subsequent calls are after
+ unpause */
+ fwrite(ptr, size, nmemb, stdout);
+ return len;
+ }
+ printf("Got %d bytes but pausing!\n", (int)len);
+ st->halted = 1;
+ return CURL_WRITEFUNC_PAUSE;
+}
+
+#define TEST_HANG_TIMEOUT 60 * 1000
+
+int test(char *URL)
+{
+ CURL *curls = NULL;
+ int i = 0;
+ int res = 0;
+ struct transfer_status st;
+
+ start_test_timing();
+
+ memset(&st, 0, sizeof(st));
+
+ global_init(CURL_GLOBAL_ALL);
+
+ easy_init(curls);
+ st.easy = curls; /* to allow callbacks access */
+
+ easy_setopt(curls, CURLOPT_URL, URL);
+ easy_setopt(curls, CURLOPT_WRITEFUNCTION, write_callback);
+ easy_setopt(curls, CURLOPT_WRITEDATA, &st);
+ easy_setopt(curls, CURLOPT_HEADERFUNCTION, header_callback);
+ easy_setopt(curls, CURLOPT_HEADERDATA, &st);
+
+ easy_setopt(curls, CURLOPT_XFERINFOFUNCTION, please_continue);
+ easy_setopt(curls, CURLOPT_XFERINFODATA, &st);
+ easy_setopt(curls, CURLOPT_NOPROGRESS, 0L);
+
+ res = curl_easy_perform(curls);
+
+test_cleanup:
+
+ curl_easy_cleanup(curls);
+ curl_global_cleanup();
+
+ if(res)
+ i = res;
+
+ return i; /* return the final return code */
+}
diff --git a/tests/libtest/lib1550.c b/tests/libtest/lib1550.c
new file mode 100644
index 00000000..94ee576c
--- /dev/null
+++ b/tests/libtest/lib1550.c
@@ -0,0 +1,39 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+#include <curl/multi.h>
+
+int test(char *URL)
+{
+ CURLM *handle = curl_multi_init();
+ const char *bl_servers[] = {"Microsoft-IIS/6.0", "nginx/0.8.54", NULL};
+ const char *bl_sites[] = {"curl.haxx.se:443", "example.com:80", NULL};
+ (void)URL; /* unused */
+
+ curl_multi_setopt(handle, CURLMOPT_PIPELINING_SERVER_BL, bl_servers);
+ curl_multi_setopt(handle, CURLMOPT_PIPELINING_SITE_BL, bl_sites);
+ curl_multi_cleanup(handle);
+ return 0;
+}
diff --git a/tests/libtest/lib1551.c b/tests/libtest/lib1551.c
new file mode 100644
index 00000000..16e27275
--- /dev/null
+++ b/tests/libtest/lib1551.c
@@ -0,0 +1,45 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+#include <curl/multi.h>
+
+int test(char *URL)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, URL);
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ res = curl_easy_perform(curl);
+
+ fprintf(stderr, "****************************** Do it again\n");
+ res = curl_easy_perform(curl);
+ curl_easy_cleanup(curl);
+ }
+ return (int)res;
+}
diff --git a/tests/libtest/lib1900.c b/tests/libtest/lib1900.c
index 4502fc0d..cac1dd1d 100644
--- a/tests/libtest/lib1900.c
+++ b/tests/libtest/lib1900.c
@@ -29,14 +29,14 @@
#define MAX_URLS 200
#define MAX_BLACKLIST 20
-int urltime[MAX_URLS];
-char *urlstring[MAX_URLS];
-CURL *handles[MAX_URLS];
-char *site_blacklist[MAX_BLACKLIST];
-char *server_blacklist[MAX_BLACKLIST];
-int num_handles;
-int blacklist_num_servers;
-int blacklist_num_sites;
+static int urltime[MAX_URLS];
+static char *urlstring[MAX_URLS];
+static CURL *handles[MAX_URLS];
+static char *site_blacklist[MAX_BLACKLIST];
+static char *server_blacklist[MAX_BLACKLIST];
+static int num_handles;
+static int blacklist_num_servers;
+static int blacklist_num_sites;
static size_t
write_callback(void *contents, size_t size, size_t nmemb, void *userp)
@@ -142,7 +142,7 @@ int test(char *URL)
int handlenum = 0;
struct timeval last_handle_add;
- if(parse_url_file("log/urls.txt") <= 0)
+ if(parse_url_file(libtest_arg2) <= 0)
goto test_cleanup;
start_test_timing();
@@ -167,7 +167,6 @@ int test(char *URL)
for(;;) {
struct timeval interval;
struct timeval now;
- long int msnow, mslast;
fd_set rd, wr, exc;
int maxfd = -99;
long timeout;
@@ -177,9 +176,7 @@ int test(char *URL)
if(handlenum < num_handles) {
now = tutil_tvnow();
- msnow = now.tv_sec * 1000 + now.tv_usec / 1000;
- mslast = last_handle_add.tv_sec * 1000 + last_handle_add.tv_usec / 1000;
- if((msnow - mslast) >= urltime[handlenum]) {
+ if(tutil_tvdiff(now, last_handle_add) >= urltime[handlenum]) {
fprintf(stdout, "Adding handle %d\n", handlenum);
setup_handle(URL, m, handlenum);
last_handle_add = now;
@@ -192,8 +189,9 @@ int test(char *URL)
abort_on_test_timeout();
/* See how the transfers went */
- while((msg = curl_multi_info_read(m, &msgs_left))) {
- if(msg->msg == CURLMSG_DONE) {
+ do {
+ msg = curl_multi_info_read(m, &msgs_left);
+ if(msg && msg->msg == CURLMSG_DONE) {
int i, found = 0;
/* Find out which handle this message is about */
@@ -206,7 +204,7 @@ int test(char *URL)
printf("Handle %d Completed with status %d\n", i, msg->data.result);
curl_multi_remove_handle(m, handles[i]);
}
- }
+ } while(msg);
if(handlenum == num_handles && !running) {
break; /* done */
diff --git a/tests/libtest/lib505.c b/tests/libtest/lib505.c
index 127fde77..ad5d214c 100644
--- a/tests/libtest/lib505.c
+++ b/tests/libtest/lib505.c
@@ -42,7 +42,6 @@ int test(char *URL)
int hd;
struct_stat file_info;
struct curl_slist *hl;
- int error;
struct curl_slist *headerlist=NULL;
const char *buf_1 = "RNFR 505";
@@ -55,9 +54,8 @@ int test(char *URL)
hd_src = fopen(libtest_arg2, "rb");
if(NULL == hd_src) {
- error = ERRNO;
fprintf(stderr, "fopen failed with error: %d %s\n",
- error, strerror(error));
+ errno, strerror(errno));
fprintf(stderr, "Error opening file: %s\n", libtest_arg2);
return TEST_ERR_MAJOR_BAD; /* if this happens things are major weird */
}
@@ -66,9 +64,8 @@ int test(char *URL)
hd = fstat(fileno(hd_src), &file_info);
if(hd == -1) {
/* can't open file, bail out */
- error = ERRNO;
fprintf(stderr, "fstat() failed with error: %d %s\n",
- error, strerror(error));
+ errno, strerror(errno));
fprintf(stderr, "ERROR: cannot open file %s\n", libtest_arg2);
fclose(hd_src);
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c
index 20d94877..d26252b6 100644
--- a/tests/libtest/lib506.c
+++ b/tests/libtest/lib506.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -33,11 +33,11 @@ struct Tdata {
};
struct userdata {
- char *text;
+ const char *text;
int counter;
};
-int lock[3];
+static int locks[3];
/* lock callback */
static void my_lock(CURL *handle, curl_lock_data data,
@@ -69,11 +69,11 @@ static void my_lock(CURL *handle, curl_lock_data data,
}
/* detect locking of locked locks */
- if(lock[locknum]) {
+ if(locks[locknum]) {
printf("lock: double locked %s\n", what);
return;
}
- lock[locknum]++;
+ locks[locknum]++;
printf("lock: %-6s [%s]: %d\n", what, user->text, user->counter);
user->counter++;
@@ -105,11 +105,11 @@ static void my_unlock(CURL *handle, curl_lock_data data, void *useptr)
}
/* detect unlocking of unlocked locks */
- if(!lock[locknum]) {
+ if(!locks[locknum]) {
printf("unlock: double unlocked %s\n", what);
return;
}
- lock[locknum]--;
+ locks[locknum]--;
printf("unlock: %-6s [%s]: %d\n", what, user->text, user->counter);
user->counter++;
@@ -184,7 +184,7 @@ int test(char *URL)
int i;
struct userdata user;
- user.text = (char *)"Pigs in space";
+ user.text = "Pigs in space";
user.counter = 0;
printf("GLOBAL_INIT\n");
diff --git a/tests/libtest/lib509.c b/tests/libtest/lib509.c
index a2522eb8..4f3e072a 100644
--- a/tests/libtest/lib509.c
+++ b/tests/libtest/lib509.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,7 +23,7 @@
/*
* This test uses these funny custom memory callbacks for the only purpose
- * of verifying that curl_global_init_mem() functionallity is present in
+ * of verifying that curl_global_init_mem() functionality is present in
* libcurl and that it works unconditionally no matter how libcurl is built,
* nothing more.
*
@@ -36,11 +36,11 @@
#include "memdebug.h"
*/
-int seen_malloc = 0;
-int seen_free = 0;
-int seen_realloc = 0;
-int seen_strdup = 0;
-int seen_calloc = 0;
+static int seen_malloc = 0;
+static int seen_free = 0;
+static int seen_realloc = 0;
+static int seen_strdup = 0;
+static int seen_calloc = 0;
void *custom_malloc(size_t size);
void custom_free(void *ptr);
diff --git a/tests/libtest/lib510.c b/tests/libtest/lib510.c
index 68588cfe..4c290f1e 100644
--- a/tests/libtest/lib510.c
+++ b/tests/libtest/lib510.c
@@ -48,6 +48,10 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
if(data) {
size_t len = strlen(data);
+ if(size*nmemb < len) {
+ fprintf(stderr, "read buffer is too small to run test\n");
+ return 0;
+ }
memcpy(ptr, data, len);
pooh->counter++; /* advance pointer */
return len;
diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c
index 960fcfca..e2dcb440 100644
--- a/tests/libtest/lib518.c
+++ b/tests/libtest/lib518.c
@@ -86,7 +86,7 @@ static int fopen_works(void)
for(i = 0; i < 3; i++) {
fpa[i] = fopen(DEV_NULL, FOPEN_READTEXT);
if(fpa[i] == NULL) {
- store_errmsg("fopen failed", ERRNO);
+ store_errmsg("fopen failed", errno);
fprintf(stderr, "%s\n", msgbuff);
ret = 0;
break;
@@ -122,7 +122,7 @@ static int rlimit(int keep_open)
/* get initial open file limits */
if(getrlimit(RLIMIT_NOFILE, &rl) != 0) {
- store_errmsg("getrlimit() failed", ERRNO);
+ store_errmsg("getrlimit() failed", errno);
fprintf(stderr, "%s\n", msgbuff);
return -1;
}
@@ -169,7 +169,7 @@ static int rlimit(int keep_open)
rl.rlim_cur = OPEN_MAX;
if(setrlimit(RLIMIT_NOFILE, &rl) != 0) {
/* on failure don't abort just issue a warning */
- store_errmsg("setrlimit() failed", ERRNO);
+ store_errmsg("setrlimit() failed", errno);
fprintf(stderr, "%s\n", msgbuff);
msgbuff[0] = '\0';
}
@@ -180,7 +180,7 @@ static int rlimit(int keep_open)
rl.rlim_cur = rl.rlim_max;
if(setrlimit(RLIMIT_NOFILE, &rl) != 0) {
/* on failure don't abort just issue a warning */
- store_errmsg("setrlimit() failed", ERRNO);
+ store_errmsg("setrlimit() failed", errno);
fprintf(stderr, "%s\n", msgbuff);
msgbuff[0] = '\0';
}
@@ -188,7 +188,7 @@ static int rlimit(int keep_open)
/* get current open file limits */
if(getrlimit(RLIMIT_NOFILE, &rl) != 0) {
- store_errmsg("getrlimit() failed", ERRNO);
+ store_errmsg("getrlimit() failed", errno);
fprintf(stderr, "%s\n", msgbuff);
return -3;
}
@@ -268,7 +268,7 @@ static int rlimit(int keep_open)
}
} while(nitems && !memchunk);
if(!memchunk) {
- store_errmsg("memchunk, malloc() failed", ERRNO);
+ store_errmsg("memchunk, malloc() failed", errno);
fprintf(stderr, "%s\n", msgbuff);
return -5;
}
@@ -303,7 +303,7 @@ static int rlimit(int keep_open)
fd = malloc(sizeof(*fd) * (size_t)(num_open.rlim_max));
if(!fd) {
- store_errmsg("fd, malloc() failed", ERRNO);
+ store_errmsg("fd, malloc() failed", errno);
fprintf(stderr, "%s\n", msgbuff);
free(memchunk);
return -7;
@@ -326,7 +326,7 @@ static int rlimit(int keep_open)
fd[0] = open(DEV_NULL, O_RDONLY);
if(fd[0] < 0) {
snprintf(strbuff, sizeof(strbuff), "opening of %s failed", DEV_NULL);
- store_errmsg(strbuff, ERRNO);
+ store_errmsg(strbuff, errno);
fprintf(stderr, "%s\n", msgbuff);
free(fd);
fd = NULL;
diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c
index 4bf259d2..715b7fbe 100644
--- a/tests/libtest/lib525.c
+++ b/tests/libtest/lib525.c
@@ -35,7 +35,6 @@ int test(char *URL)
CURL *curl = NULL;
FILE *hd_src = NULL;
int hd;
- int error;
struct_stat file_info;
CURLM *m = NULL;
int running;
@@ -55,9 +54,8 @@ int test(char *URL)
hd_src = fopen(libtest_arg2, "rb");
if(NULL == hd_src) {
- error = ERRNO;
fprintf(stderr, "fopen failed with error: %d (%s)\n",
- error, strerror(error));
+ errno, strerror(errno));
fprintf(stderr, "Error opening file: (%s)\n", libtest_arg2);
return TEST_ERR_FOPEN;
}
@@ -66,9 +64,8 @@ int test(char *URL)
hd = fstat(fileno(hd_src), &file_info);
if(hd == -1) {
/* can't open file, bail out */
- error = ERRNO;
fprintf(stderr, "fstat() failed with error: %d (%s)\n",
- error, strerror(error));
+ errno, strerror(errno));
fprintf(stderr, "ERROR: cannot open file (%s)\n", libtest_arg2);
fclose(hd_src);
return TEST_ERR_FSTAT;
diff --git a/tests/libtest/lib526.c b/tests/libtest/lib526.c
index 0ce7ebbe..522cd742 100644
--- a/tests/libtest/lib526.c
+++ b/tests/libtest/lib526.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -29,7 +29,7 @@
* controlling the small differences.
*
* - lib526 closes all easy handles after
- * they all have transfered the file over the single connection
+ * they all have transferred the file over the single connection
* - lib527 closes each easy handle after each single transfer.
* - lib532 uses only a single easy handle that is removed, reset and then
* re-added for each transfer
diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c
index 6d7c3e40..b5ee2ce5 100644
--- a/tests/libtest/lib537.c
+++ b/tests/libtest/lib537.c
@@ -87,7 +87,7 @@ static int fopen_works(void)
for(i = 0; i < 3; i++) {
fpa[i] = fopen(DEV_NULL, FOPEN_READTEXT);
if(fpa[i] == NULL) {
- store_errmsg("fopen failed", ERRNO);
+ store_errmsg("fopen failed", errno);
fprintf(stderr, "%s\n", msgbuff);
ret = 0;
break;
@@ -103,7 +103,7 @@ static int fopen_works(void)
static int rlimit(int keep_open)
{
int *tmpfd;
- int nitems, i;
+ rlim_t nitems, i;
int *memchunk = NULL;
char *fmt;
struct rlimit rl;
@@ -123,7 +123,7 @@ static int rlimit(int keep_open)
/* get initial open file limits */
if(getrlimit(RLIMIT_NOFILE, &rl) != 0) {
- store_errmsg("getrlimit() failed", ERRNO);
+ store_errmsg("getrlimit() failed", errno);
fprintf(stderr, "%s\n", msgbuff);
return -1;
}
@@ -164,7 +164,7 @@ static int rlimit(int keep_open)
rl.rlim_cur = OPEN_MAX;
if(setrlimit(RLIMIT_NOFILE, &rl) != 0) {
/* on failure don't abort just issue a warning */
- store_errmsg("setrlimit() failed", ERRNO);
+ store_errmsg("setrlimit() failed", errno);
fprintf(stderr, "%s\n", msgbuff);
msgbuff[0] = '\0';
}
@@ -175,7 +175,7 @@ static int rlimit(int keep_open)
rl.rlim_cur = rl.rlim_max;
if(setrlimit(RLIMIT_NOFILE, &rl) != 0) {
/* on failure don't abort just issue a warning */
- store_errmsg("setrlimit() failed", ERRNO);
+ store_errmsg("setrlimit() failed", errno);
fprintf(stderr, "%s\n", msgbuff);
msgbuff[0] = '\0';
}
@@ -183,7 +183,7 @@ static int rlimit(int keep_open)
/* get current open file limits */
if(getrlimit(RLIMIT_NOFILE, &rl) != 0) {
- store_errmsg("getrlimit() failed", ERRNO);
+ store_errmsg("getrlimit() failed", errno);
fprintf(stderr, "%s\n", msgbuff);
return -3;
}
@@ -232,7 +232,7 @@ static int rlimit(int keep_open)
if(nitems > 0x7fff)
nitems = 0x40000;
do {
- num_open.rlim_max = sizeof(*memchunk) * (size_t)nitems;
+ num_open.rlim_max = sizeof(*memchunk) * nitems;
snprintf(strbuff, sizeof(strbuff), fmt, num_open.rlim_max);
fprintf(stderr, "allocating memchunk %s byte array\n", strbuff);
memchunk = malloc(sizeof(*memchunk) * (size_t)nitems);
@@ -242,7 +242,7 @@ static int rlimit(int keep_open)
}
} while(nitems && !memchunk);
if(!memchunk) {
- store_errmsg("memchunk, malloc() failed", ERRNO);
+ store_errmsg("memchunk, malloc() failed", errno);
fprintf(stderr, "%s\n", msgbuff);
return -4;
}
@@ -297,7 +297,7 @@ static int rlimit(int keep_open)
}
} while(num_open.rlim_max && !fd);
if(!fd) {
- store_errmsg("fd, malloc() failed", ERRNO);
+ store_errmsg("fd, malloc() failed", errno);
fprintf(stderr, "%s\n", msgbuff);
free(memchunk);
return -6;
@@ -320,7 +320,7 @@ static int rlimit(int keep_open)
fd[0] = open(DEV_NULL, O_RDONLY);
if(fd[0] < 0) {
snprintf(strbuff, sizeof(strbuff), "opening of %s failed", DEV_NULL);
- store_errmsg(strbuff, ERRNO);
+ store_errmsg(strbuff, errno);
fprintf(stderr, "%s\n", msgbuff);
free(fd);
fd = NULL;
diff --git a/tests/libtest/lib540.c b/tests/libtest/lib540.c
index f5d89c41..ac862092 100644
--- a/tests/libtest/lib540.c
+++ b/tests/libtest/lib540.c
@@ -46,7 +46,7 @@
#define NUM_HANDLES 2
-CURL *eh[NUM_HANDLES];
+static CURL *eh[NUM_HANDLES];
static int init(int num, CURLM *cm, const char *url, const char *userpwd,
struct curl_slist *headers)
diff --git a/tests/libtest/lib541.c b/tests/libtest/lib541.c
index 3e9cb3cc..94a26a4b 100644
--- a/tests/libtest/lib541.c
+++ b/tests/libtest/lib541.c
@@ -38,7 +38,6 @@ int test(char *URL)
FILE *hd_src;
int hd;
struct_stat file_info;
- int error;
if(!libtest_arg2) {
fprintf(stderr, "Usage: <url> <file-to-upload>\n");
@@ -47,9 +46,8 @@ int test(char *URL)
hd_src = fopen(libtest_arg2, "rb");
if(NULL == hd_src) {
- error = ERRNO;
fprintf(stderr, "fopen failed with error: %d %s\n",
- error, strerror(error));
+ errno, strerror(errno));
fprintf(stderr, "Error opening file: %s\n", libtest_arg2);
return -2; /* if this happens things are major weird */
}
@@ -58,9 +56,8 @@ int test(char *URL)
hd = fstat(fileno(hd_src), &file_info);
if(hd == -1) {
/* can't open file, bail out */
- error = ERRNO;
fprintf(stderr, "fstat() failed with error: %d %s\n",
- error, strerror(error));
+ errno, strerror(errno));
fprintf(stderr, "ERROR: cannot open file %s\n", libtest_arg2);
fclose(hd_src);
return TEST_ERR_MAJOR_BAD;
diff --git a/tests/libtest/lib552.c b/tests/libtest/lib552.c
index 967e2114..3a93dafa 100644
--- a/tests/libtest/lib552.c
+++ b/tests/libtest/lib552.c
@@ -92,6 +92,7 @@ int my_trace(CURL *handle, curl_infotype type,
switch(type) {
case CURLINFO_TEXT:
fprintf(stderr, "== Info: %s", (char *)data);
+ /* FALLTHROUGH */
default: /* in case a new one is introduced to shock us */
return 0;
@@ -151,7 +152,7 @@ static curlioerr ioctl_callback(CURL *handle, int cmd, void *clientp)
{
(void)clientp;
if(cmd == CURLIOCMD_RESTARTREAD) {
- printf("APPLICATION: recieved a CURLIOCMD_RESTARTREAD request\n");
+ printf("APPLICATION: received a CURLIOCMD_RESTARTREAD request\n");
printf("APPLICATION: ** REWINDING! **\n");
current_offset = 0;
return CURLIOE_OK;
diff --git a/tests/libtest/lib555.c b/tests/libtest/lib555.c
index e84af87e..8156a95e 100644
--- a/tests/libtest/lib555.c
+++ b/tests/libtest/lib555.c
@@ -98,7 +98,7 @@ int test(char *URL)
easy_setopt(curl, CURLOPT_READDATA, &counter);
/* We CANNOT do the POST fine without setting the size (or choose
chunked)! */
- easy_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(UPLOADTHIS));
+ easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(UPLOADTHIS));
easy_setopt(curl, CURLOPT_POST, 1L);
#ifdef CURL_DOES_CONVERSIONS
diff --git a/tests/libtest/lib557.c b/tests/libtest/lib557.c
index 68fdfa2b..4a598f22 100644
--- a/tests/libtest/lib557.c
+++ b/tests/libtest/lib557.c
@@ -26,8 +26,16 @@
*/
#include "test.h"
-#include "memdebug.h"
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h> /* for setlocale() */
+#endif
+
+#include "memdebug.h"
#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
# define MPRNT_SUFFIX_CURL_OFF_T LL
@@ -1617,8 +1625,8 @@ static int test_float_formatting(void)
123456789123456789123456789.2987654);
errors += strlen_check(buf, 325);
- /* 1<<31 turns negative (-2147483648) when used signed */
- curl_msnprintf(buf, sizeof(buf), "%*f", (1<<31), 9.1);
+ /* check negative when used signed */
+ curl_msnprintf(buf, sizeof(buf), "%*f", INT_MIN, 9.1);
errors += string_check(buf, "9.100000");
/* curl_msnprintf() limits a single float output to 325 bytes maximum
@@ -1656,6 +1664,14 @@ int test(char *URL)
int errors = 0;
(void)URL; /* not used */
+#ifdef HAVE_SETLOCALE
+ /*
+ * The test makes assumptions about the numeric locale (specifically,
+ * RADIXCHAR) so set it to a known working (and portable) one.
+ */
+ setlocale(LC_NUMERIC, "C");
+#endif
+
errors += test_weird_arguments();
errors += test_unsigned_short_formatting();
diff --git a/tests/libtest/lib559.c b/tests/libtest/lib559.c
new file mode 100644
index 00000000..8c72dbd0
--- /dev/null
+++ b/tests/libtest/lib559.c
@@ -0,0 +1,56 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "testtrace.h"
+#include "memdebug.h"
+
+int test(char *URL)
+{
+ CURLcode res;
+ CURL *curl;
+
+ if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+ fprintf(stderr, "curl_global_init() failed\n");
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ curl = curl_easy_init();
+ if(!curl) {
+ fprintf(stderr, "curl_easy_init() failed\n");
+ curl_global_cleanup();
+ return TEST_ERR_MAJOR_BAD;
+ }
+
+ test_setopt(curl, CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_HEADER, 1L);
+ test_setopt(curl, CURLOPT_BUFFERSIZE, 1L); /* the smallest! */
+
+ res = curl_easy_perform(curl);
+test_cleanup:
+
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return (int)res;
+}
+
diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c
index 40a78fa8..f19b643f 100644
--- a/tests/libtest/lib571.c
+++ b/tests/libtest/lib571.c
@@ -56,7 +56,7 @@ static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *stream)
int channel = RTP_PKT_CHANNEL(data);
int message_size;
int coded_size = RTP_PKT_LENGTH(data);
- size_t failure = (size * nmemb) ? 0 : 1;
+ size_t failure = (size && nmemb) ? 0 : 1;
int i;
(void)stream;
diff --git a/tests/libtest/lib574.c b/tests/libtest/lib574.c
index a51cda05..f4fb850f 100644
--- a/tests/libtest/lib574.c
+++ b/tests/libtest/lib574.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,8 +23,10 @@
#include "memdebug.h"
-static int new_fnmatch(const char *pattern, const char *string)
+static int new_fnmatch(void *ptr,
+ const char *pattern, const char *string)
{
+ (void)ptr;
(void)pattern;
(void)string;
return CURL_FNMATCHFUNC_MATCH;
diff --git a/tests/libtest/lib578.c b/tests/libtest/lib578.c
index 9603b58d..41b23db3 100644
--- a/tests/libtest/lib578.c
+++ b/tests/libtest/lib578.c
@@ -77,7 +77,7 @@ int test(char *URL)
#endif
/* Set the expected POST size */
- test_setopt(curl, CURLOPT_POSTFIELDSIZE, data_size);
+ test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)data_size);
test_setopt(curl, CURLOPT_POSTFIELDS, data);
/* we want to use our own progress function */
diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c
index eec0455f..f55e5de7 100644
--- a/tests/libtest/lib582.c
+++ b/tests/libtest/lib582.c
@@ -174,8 +174,8 @@ static int getMicroSecondTimeout(struct timeval* timeout)
struct timeval now;
ssize_t result;
now = tutil_tvnow();
- result = (timeout->tv_sec - now.tv_sec) * 1000000 +
- timeout->tv_usec - now.tv_usec;
+ result = (ssize_t)((timeout->tv_sec - now.tv_sec) * 1000000 +
+ timeout->tv_usec - now.tv_usec);
if(result < 0)
result = 0;
@@ -228,7 +228,6 @@ int test(char *URL)
CURL *curl = NULL;
FILE *hd_src = NULL;
int hd;
- int error;
struct_stat file_info;
CURLM *m = NULL;
struct ReadWriteSockets sockets = {{NULL, 0, 0}, {NULL, 0, 0}};
@@ -244,9 +243,8 @@ int test(char *URL)
hd_src = fopen(libtest_arg2, "rb");
if(NULL == hd_src) {
- error = ERRNO;
fprintf(stderr, "fopen() failed with error: %d (%s)\n",
- error, strerror(error));
+ errno, strerror(errno));
fprintf(stderr, "Error opening file: (%s)\n", libtest_arg2);
return TEST_ERR_FOPEN;
}
@@ -255,9 +253,8 @@ int test(char *URL)
hd = fstat(fileno(hd_src), &file_info);
if(hd == -1) {
/* can't open file, bail out */
- error = ERRNO;
fprintf(stderr, "fstat() failed with error: %d (%s)\n",
- error, strerror(error));
+ errno, strerror(errno));
fprintf(stderr, "ERROR: cannot open file (%s)\n", libtest_arg2);
fclose(hd_src);
return TEST_ERR_FSTAT;
@@ -320,7 +317,7 @@ int test(char *URL)
tv.tv_usec = 100000;
}
- select_test(maxFd, &readSet, &writeSet, NULL, &tv);
+ select_test((int)maxFd, &readSet, &writeSet, NULL, &tv);
/* Check the sockets for reading / writing */
checkFdSet(m, &sockets.read, &readSet, CURL_CSELECT_IN, "read");
diff --git a/tests/libtest/lib583.c b/tests/libtest/lib583.c
index 5b11fab2..f0a088b7 100644
--- a/tests/libtest/lib583.c
+++ b/tests/libtest/lib583.c
@@ -35,7 +35,7 @@ int test(char *URL)
int stillRunning;
CURLM *multiHandle = NULL;
CURL *curl = NULL;
- int res = 0;
+ CURLMcode res = CURLM_OK;
global_init(CURL_GLOBAL_ALL);
@@ -65,10 +65,10 @@ int test(char *URL)
fprintf(stderr, "curl_multi_perform() succeeded\n");
fprintf(stderr, "curl_multi_remove_handle()...\n");
- res = (int) curl_multi_remove_handle(multiHandle, curl);
+ res = curl_multi_remove_handle(multiHandle, curl);
if(res)
fprintf(stderr, "curl_multi_remove_handle() failed, "
- "with code %d\n", res);
+ "with code %d\n", (int)res);
else
fprintf(stderr, "curl_multi_remove_handle() succeeded\n");
@@ -80,5 +80,5 @@ test_cleanup:
curl_multi_cleanup(multiHandle);
curl_global_cleanup();
- return res;
+ return (int)res;
}
diff --git a/tests/libtest/lib586.c b/tests/libtest/lib586.c
index a4fc6fee..859ef343 100644
--- a/tests/libtest/lib586.c
+++ b/tests/libtest/lib586.c
@@ -31,7 +31,7 @@ struct Tdata {
};
struct userdata {
- char *text;
+ const char *text;
int counter;
};
@@ -138,7 +138,7 @@ int test(char *URL)
int i;
struct userdata user;
- user.text = (char *)"Pigs in space";
+ user.text = "Pigs in space";
user.counter = 0;
printf("GLOBAL_INIT\n");
diff --git a/tests/libtest/lib591.c b/tests/libtest/lib591.c
index 7d50f894..53ede3fc 100644
--- a/tests/libtest/lib591.c
+++ b/tests/libtest/lib591.c
@@ -44,15 +44,13 @@ int test(char *URL)
int msgs_left;
CURLMsg *msg;
FILE *upload = NULL;
- int error;
start_test_timing();
upload = fopen(libtest_arg3, "rb");
if(!upload) {
- error = ERRNO;
fprintf(stderr, "fopen() failed with error: %d (%s)\n",
- error, strerror(error));
+ errno, strerror(errno));
fprintf(stderr, "Error opening file: (%s)\n", libtest_arg3);
return TEST_ERR_FOPEN;
}
diff --git a/tests/libtest/libauthretry.c b/tests/libtest/libauthretry.c
index 139dab97..e9dc0508 100644
--- a/tests/libtest/libauthretry.c
+++ b/tests/libtest/libauthretry.c
@@ -111,12 +111,10 @@ int test(char *url)
res = send_wrong_password(curl, url, 100, main_auth_scheme);
if(res != CURLE_OK)
goto test_cleanup;
- curl_easy_reset(curl);
res = send_right_password(curl, url, 200, fallback_auth_scheme);
if(res != CURLE_OK)
goto test_cleanup;
- curl_easy_reset(curl);
curl_easy_cleanup(curl);
@@ -131,17 +129,14 @@ int test(char *url)
res = send_wrong_password(curl, url, 300, main_auth_scheme);
if(res != CURLE_OK)
goto test_cleanup;
- curl_easy_reset(curl);
res = send_wrong_password(curl, url, 400, fallback_auth_scheme);
if(res != CURLE_OK)
goto test_cleanup;
- curl_easy_reset(curl);
res = send_right_password(curl, url, 500, fallback_auth_scheme);
if(res != CURLE_OK)
goto test_cleanup;
- curl_easy_reset(curl);
test_cleanup:
diff --git a/tests/libtest/libntlmconnect.c b/tests/libtest/libntlmconnect.c
index 40a837ca..ad20e8b8 100644
--- a/tests/libtest/libntlmconnect.c
+++ b/tests/libtest/libntlmconnect.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2012 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -33,6 +33,7 @@
#define TEST_HANG_TIMEOUT 5 * 1000
#define MAX_EASY_HANDLES 3
+static int counter[MAX_EASY_HANDLES];
static CURL *easy[MAX_EASY_HANDLES];
static curl_socket_t sockets[MAX_EASY_HANDLES];
static int res = 0;
@@ -43,20 +44,10 @@ static size_t callback(char *ptr, size_t size, size_t nmemb, void *data)
curl_socket_t sock;
long longdata;
CURLcode code;
+ const size_t failure = (size && nmemb) ? 0 : 1;
+ (void)ptr;
- const size_t failure = (size * nmemb) ? 0 : 1;
-
- char *output = malloc(size * nmemb + 1);
- if(!output) {
- fprintf(stderr, "output, malloc() failed\n");
- res = TEST_ERR_MAJOR_BAD;
- return failure;
- }
-
- memcpy(output, ptr, size * nmemb);
- output[size * nmemb] = '\0';
- fprintf(stdout, "%s", output);
- free(output);
+ counter[idx] += (int)(size * nmemb);
/* Get socket being used for this easy handle, otherwise CURL_SOCKET_BAD */
code = curl_easy_getinfo(easy[idx], CURLINFO_LASTSOCKET, &longdata);
@@ -100,7 +91,7 @@ int test(char *url)
{
CURLM *multi = NULL;
int running;
- int i, j;
+ int i;
int num_handles = 0;
enum HandleState state = ReadyForNewHandle;
size_t urllen = strlen(url) + 4 + 1;
@@ -182,50 +173,6 @@ int test(char *url)
/* At this point, maxfd is guaranteed to be greater or equal than -1. */
- /* Any socket which is new in fdread is associated with the new handle */
- for(i = 0; i <= maxfd; ++i) {
- bool socket_exists = FALSE;
- curl_socket_t curfd = (curl_socket_t)i;
-
- if(!FD_ISSET(curfd, &fdread)) {
- continue;
- }
-
- /* Check if this socket was already detected for an earlier handle (or
- for this handle, num_handles-1, in the callback */
- for(j = 0; j < num_handles; ++j) {
- if(sockets[j] == curfd) {
- socket_exists = TRUE;
- break;
- }
- }
- if(socket_exists) {
- continue;
- }
-
- if(found_new_socket || state != NeedSocketForNewHandle) {
- fprintf(stderr, "Unexpected new socket\n");
- res = TEST_ERR_MAJOR_BAD;
- goto test_cleanup;
- }
-
- /* Now we know the socket is for the most recent handle, num_handles-1 */
- if(sockets[num_handles-1] != CURL_SOCKET_BAD) {
- /* A socket for this handle was already detected in the callback; if it
- matched socket_exists should be true and we would never get here */
- assert(curfd != sockets[num_handles-1]);
- fprintf(stderr, "Handle %d wrote to socket %d then detected on %d\n",
- num_handles-1, (int)sockets[num_handles-1], (int)curfd);
- res = TEST_ERR_MAJOR_BAD;
- goto test_cleanup;
- }
- else {
- sockets[num_handles-1] = curfd;
- found_new_socket = TRUE;
- /* continue to make sure there's only one new handle */
- }
- }
-
if(state == NeedSocketForNewHandle) {
if(maxfd != -1 && !found_new_socket) {
fprintf(stderr, "Warning: socket did not open immediately for new "
@@ -270,6 +217,7 @@ test_cleanup:
/* proper cleanup sequence - type PB */
for(i = 0; i < MAX_EASY_HANDLES; i++) {
+ printf("Data connection %d: %d\n", i, counter[i]);
curl_multi_remove_handle(multi, easy[i]);
curl_easy_cleanup(easy[i]);
}
diff --git a/tests/libtest/mk-lib1521.pl b/tests/libtest/mk-lib1521.pl
new file mode 100644
index 00000000..e60bce5c
--- /dev/null
+++ b/tests/libtest/mk-lib1521.pl
@@ -0,0 +1,303 @@
+#!/usr/bin/env perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.haxx.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+###########################################################################
+
+# Usage:
+# perl mk-lib1521.pl < ../../include/curl/curl.h > lib1521.c
+
+# minimum and maximum long signed values
+my $minlong = "LONG_MIN";
+my $maxlong = "LONG_MAX";
+# maximum long unsigned value
+my $maxulong = "ULONG_MAX";
+
+print <<HEADER
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \\| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \\___|\\___/|_| \\_\\_____|
+ *
+ * Copyright (C) 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+#include "memdebug.h"
+#include <limits.h>
+
+/* This source code is generated by mk-lib1521.pl ! */
+
+struct data {
+ char *blaha;
+};
+
+#define LO $minlong
+#define HI $maxlong
+#define OFF_LO (curl_off_t) LO
+#define OFF_HI (curl_off_t) $maxulong
+#define OFF_NO (curl_off_t) 0
+
+/* Unexpected error.
+ CURLE_NOT_BUILT_IN - means disabled at build
+ CURLE_UNKNOWN_OPTION - means no such option (anymore?)
+ CURLE_SSL_ENGINE_NOTFOUND - set unkown ssl engine
+ CURLE_UNSUPPORTED_PROTOCOL - set bad HTTP version
+ CURLE_BAD_FUNCTION_ARGUMENT - unsupported value
+ */
+#define UNEX(x) ((x) && \\
+ ((x) != CURLE_NOT_BUILT_IN) && \\
+ ((x) != CURLE_UNKNOWN_OPTION) && \\
+ ((x) != CURLE_SSL_ENGINE_NOTFOUND) && \\
+ ((x) != CURLE_UNSUPPORTED_PROTOCOL) && \\
+ ((x) != CURLE_BAD_FUNCTION_ARGUMENT) )
+
+static size_t writecb(char *buffer, size_t size, size_t nitems,
+ void *outstream)
+{
+ (void)buffer;
+ (void)size;
+ (void)nitems;
+ (void)outstream;
+ return 0;
+}
+
+static size_t readcb(char *buffer,
+ size_t size,
+ size_t nitems,
+ void *instream)
+{
+ (void)buffer;
+ (void)size;
+ (void)nitems;
+ (void)instream;
+ return 0;
+}
+
+static int err(const char *name, CURLcode val, int lineno)
+{
+ printf("CURLOPT_%s returned %d, \\"%s\\" on line %d\\n",
+ name, val, curl_easy_strerror(val), lineno);
+ return (int)val;
+}
+
+static int geterr(const char *name, CURLcode val, int lineno)
+{
+ printf("CURLINFO_%s returned %d, \\"%s\\" on line %d\\n",
+ name, val, curl_easy_strerror(val), lineno);
+ return (int)val;
+}
+
+static curl_progress_callback progresscb;
+static curl_write_callback headercb;
+static curl_debug_callback debugcb;
+static curl_ssl_ctx_callback ssl_ctx_cb;
+static curl_ioctl_callback ioctlcb;
+static curl_sockopt_callback sockoptcb;
+static curl_opensocket_callback opensocketcb;
+static curl_seek_callback seekcb;
+static curl_sshkeycallback ssh_keycb;
+static curl_chunk_bgn_callback chunk_bgn_cb;
+static curl_chunk_end_callback chunk_end_cb;
+static curl_fnmatch_callback fnmatch_cb;
+static curl_closesocket_callback closesocketcb;
+static curl_xferinfo_callback xferinfocb;
+
+int test(char *URL)
+{
+ CURL *curl = NULL;
+ CURL *dep = NULL;
+ CURLSH *share = NULL;
+ char errorbuffer[CURL_ERROR_SIZE];
+ void *conv_from_network_cb = NULL;
+ void *conv_to_network_cb = NULL;
+ void *conv_from_utf8_cb = NULL;
+ void *interleavecb = NULL;
+ char *stringpointerextra=(char *)"moooo";
+ struct curl_slist *slist=NULL;
+ struct curl_httppost *httppost=NULL;
+ FILE *stream = stderr;
+ struct data object;
+ char *charp;
+ long val;
+ curl_off_t oval;
+ double dval;
+ curl_socket_t sockfd;
+ struct curl_certinfo *certinfo;
+ struct curl_tlssessioninfo *tlssession;
+ CURLcode res = CURLE_OK;
+ (void)URL; /* not used */
+ easy_init(dep);
+ easy_init(curl);
+ share = curl_share_init();
+ if(!share) {
+ res = CURLE_OUT_OF_MEMORY;
+ goto test_cleanup;
+ }
+
+HEADER
+ ;
+
+while(<STDIN>) {
+ if($_ =~ /^ CINIT\(([^ ]*), ([^ ]*), (\d*)\)/) {
+ my ($name, $type, $val)=($1, $2, $3);
+ my $w=" ";
+ my $pref = "${w}res = curl_easy_setopt(curl, CURLOPT_$name,";
+ my $i = ' ' x (length($w) + 23);
+ my $check = " if(UNEX(res)) {\n err(\"$name\", res, __LINE__); goto test_cleanup; }\n";
+ if($type eq "STRINGPOINT") {
+ print "${pref} \"string\");\n$check";
+ print "${pref} NULL);\n$check";
+ }
+ elsif($type eq "LONG") {
+ print "${pref} 0L);\n$check";
+ print "${pref} 22L);\n$check";
+ print "${pref} LO);\n$check";
+ print "${pref} HI);\n$check";
+ }
+ elsif($type eq "OBJECTPOINT") {
+ if($name =~ /DEPENDS/) {
+ print "${pref} dep);\n$check";
+ }
+ elsif($name =~ "SHARE") {
+ print "${pref} share);\n$check";
+ }
+ elsif($name eq "ERRORBUFFER") {
+ print "${pref} errorbuffer);\n$check";
+ }
+ elsif(($name eq "POSTFIELDS") ||
+ ($name eq "COPYPOSTFIELDS")) {
+ # set size to zero to avoid it being "illegal"
+ print " (void)curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0);\n";
+ print "${pref} stringpointerextra);\n$check";
+ }
+ elsif(($name eq "HTTPHEADER") ||
+ ($name eq "POSTQUOTE") ||
+ ($name eq "PREQUOTE") ||
+ ($name eq "HTTP200ALIASES") ||
+ ($name eq "TELNETOPTIONS") ||
+ ($name eq "MAIL_RCPT") ||
+ ($name eq "RESOLVE") ||
+ ($name eq "PROXYHEADER") ||
+ ($name eq "QUOTE")) {
+ print "${pref} slist);\n$check";
+ }
+ elsif($name eq "HTTPPOST") {
+ print "${pref} httppost);\n$check";
+ }
+ elsif($name eq "STDERR") {
+ print "${pref} stream);\n$check";
+ }
+ else {
+ print "${pref} &object);\n$check";
+ }
+ print "${pref} NULL);\n$check";
+ }
+ elsif($type eq "FUNCTIONPOINT") {
+ if($name =~ /([^ ]*)FUNCTION/) {
+ my $l=lc($1);
+ print "${pref}\n$i${l}cb);\n$check";
+ }
+ else {
+ print "${pref} &func);\n$check";
+ }
+ print "${pref} NULL);\n$check";
+ }
+ elsif($type eq "OFF_T") {
+ # play conservative to work with 32bit curl_off_t
+ print "${pref} OFF_NO);\n$check";
+ print "${pref} OFF_HI);\n$check";
+ print "${pref} OFF_LO);\n$check";
+ }
+ else {
+ print STDERR "\n---- $type\n";
+ }
+ }
+ elsif($_ =~ /^ CURLINFO_NONE/) {
+ $infomode = 1;
+ }
+ elsif($infomode &&
+ ($_ =~ /^ CURLINFO_([^ ]*) *= *CURLINFO_([^ ]*)/)) {
+ my ($info, $type)=($1, $2);
+ my $c = " res = curl_easy_getinfo(curl, CURLINFO_$info,";
+ my $check = " if(UNEX(res)) {\n geterr(\"$info\", res, __LINE__); goto test_cleanup; }\n";
+ if($type eq "STRING") {
+ print "$c &charp);\n$check";
+ }
+ elsif($type eq "LONG") {
+ print "$c &val);\n$check";
+ }
+ elsif($type eq "OFF_T") {
+ print "$c &oval);\n$check";
+ }
+ elsif($type eq "DOUBLE") {
+ print "$c &dval);\n$check";
+ }
+ elsif($type eq "SLIST") {
+ print "$c &slist);\n$check";
+ print " if(slist)\n curl_slist_free_all(slist);\n";
+ }
+ elsif($type eq "SOCKET") {
+ print "$c &sockfd);\n$check";
+ }
+ elsif($type eq "PTR") {
+ if($info eq "CERTINFO") {
+ print "$c &certinfo);\n$check";
+ }
+ elsif(($info eq "TLS_SESSION") ||
+ ($info eq "TLS_SSL_PTR")) {
+ print "$c &tlssession);\n$check";
+ }
+ else {
+ print STDERR "$info/$type is unsupported\n";
+ }
+ }
+ else {
+ print STDERR "$type is unsupported\n";
+ }
+ }
+}
+
+
+print <<FOOTER
+ curl_easy_setopt(curl, 1, 0);
+ res = CURLE_OK;
+test_cleanup:
+ curl_easy_cleanup(curl);
+ curl_easy_cleanup(dep);
+ curl_share_cleanup(share);
+
+ return (int)res;
+}
+FOOTER
+ ;
diff --git a/tests/libtest/test.h b/tests/libtest/test.h
index 3da03b83..bb1acca0 100644
--- a/tests/libtest/test.h
+++ b/tests/libtest/test.h
@@ -67,7 +67,7 @@ extern void wait_ms(int ms); /* wait this many milliseconds */
extern int test(char *URL); /* the actual test function provided by each
individual libXXX.c file */
-extern char *hexdump(unsigned char *buffer, size_t len);
+extern char *hexdump(const unsigned char *buffer, size_t len);
#ifdef UNITTESTS
extern int unitfail;
diff --git a/tests/libtest/test613.pl b/tests/libtest/test613.pl
index b4caaae0..03d09cb5 100755
--- a/tests/libtest/test613.pl
+++ b/tests/libtest/test613.pl
@@ -30,6 +30,8 @@ if ($ARGV[0] eq "prepare")
binmode FILE;
print FILE "Test file to support curl test suite\n";
close(FILE);
+ # The mtime is specifically chosen to be an even number so that it can be
+ # represented exactly on a FAT filesystem.
utime time, timegm(0,0,12,1,0,100), "plainfile.txt";
chmod 0666, "plainfile.txt";
@@ -37,6 +39,8 @@ if ($ARGV[0] eq "prepare")
binmode FILE;
print FILE "Read-only test file to support curl test suite\n";
close(FILE);
+ # The mtime is specifically chosen to be an even number so that it can be
+ # represented exactly on a FAT filesystem.
utime time, timegm(0,0,12,31,11,100), "rofile.txt";
chmod 0444, "rofile.txt";
diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c
index 5eeeeb65..62641e15 100644
--- a/tests/libtest/testtrace.c
+++ b/tests/libtest/testtrace.c
@@ -113,6 +113,7 @@ int libtest_debug_cb(CURL *handle, curl_infotype type,
switch(type) {
case CURLINFO_TEXT:
fprintf(stderr, "%s== Info: %s", timestr, (char *)data);
+ /* FALLTHROUGH */
default: /* in case a new one is introduced to shock us */
return 0;
diff --git a/tests/libtest/testutil.c b/tests/libtest/testutil.c
index b9c43de0..f3ad0ce5 100644
--- a/tests/libtest/testutil.c
+++ b/tests/libtest/testutil.c
@@ -111,10 +111,11 @@ struct timeval tutil_tvnow(void)
*/
long tutil_tvdiff(struct timeval newer, struct timeval older)
{
- return (newer.tv_sec-older.tv_sec)*1000+
- (newer.tv_usec-older.tv_usec)/1000;
+ return (long)(newer.tv_sec-older.tv_sec)*1000+
+ (long)(newer.tv_usec-older.tv_usec)/1000;
}
+
/*
* Same as tutil_tvdiff but with full usec resolution.
*
@@ -125,13 +126,5 @@ double tutil_tvdiff_secs(struct timeval newer, struct timeval older)
if(newer.tv_sec != older.tv_sec)
return (double)(newer.tv_sec-older.tv_sec)+
(double)(newer.tv_usec-older.tv_usec)/1000000.0;
- else
- return (double)(newer.tv_usec-older.tv_usec)/1000000.0;
-}
-
-/* return the number of seconds in the given input timeval struct */
-long tutil_tvlong(struct timeval t1)
-{
- return t1.tv_sec;
+ return (double)(newer.tv_usec-older.tv_usec)/1000000.0;
}
-
diff --git a/tests/libtest/testutil.h b/tests/libtest/testutil.h
index 0bc5e03b..f2aeae64 100644
--- a/tests/libtest/testutil.h
+++ b/tests/libtest/testutil.h
@@ -40,8 +40,6 @@ long tutil_tvdiff(struct timeval t1, struct timeval t2);
*/
double tutil_tvdiff_secs(struct timeval t1, struct timeval t2);
-long tutil_tvlong(struct timeval t1);
-
#endif /* HEADER_CURL_LIBTEST_TESTUTIL_H */
diff --git a/tests/manpage-scan.pl b/tests/manpage-scan.pl
index f374be99..b6864c85 100644
--- a/tests/manpage-scan.pl
+++ b/tests/manpage-scan.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2016, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -39,8 +39,9 @@
use strict;
use warnings;
-# we may get the dir root pointed out
+# we may get the dir roots pointed out
my $root=$ARGV[0] || ".";
+my $buildroot=$ARGV[1] || ".";
my $syms = "$root/docs/libcurl/symbols-in-versions";
my $curlh = "$root/include/curl/curl.h";
my $errors=0;
@@ -196,7 +197,8 @@ close(R);
#########################################################################
# parse the curl.1 man page, extract all documented command line options
-open(R, "<$root/docs/curl.1") ||
+# The man page may or may not be rebuilt, so check both possible locations
+open(R, "<$buildroot/docs/curl.1") || open(R, "<$root/docs/curl.1") ||
die "no input file";
my @manpage; # store all parsed parameters
while(<R>) {
@@ -230,7 +232,7 @@ my @toolhelp; # store all parsed parameters
while(<R>) {
chomp;
my $l= $_;
- if(/^ \" *(.*)/) {
+ if(/^ \{\" *(.*)/) {
my $str=$1;
my $combo;
if($str =~ /^-(.), --([a-z0-9.-]*)/) {
diff --git a/tests/python_dependencies/impacket/__init__.py b/tests/python_dependencies/impacket/__init__.py
new file mode 100644
index 00000000..92a5d6bb
--- /dev/null
+++ b/tests/python_dependencies/impacket/__init__.py
@@ -0,0 +1,25 @@
+# Copyright (c) 2003-2016 CORE Security Technologies
+#
+# This software is provided under under a slightly modified version
+# of the Apache Software License. See the accompanying LICENSE file
+# for more information.
+#
+# Author: Alberto Solino (@agsolino)
+#
+
+# Set default logging handler to avoid "No handler found" warnings.
+import logging
+try: # Python 2.7+
+ from logging import NullHandler
+except ImportError:
+ class NullHandler(logging.Handler):
+ def emit(self, record):
+ pass
+
+# All modules inside this library MUST use this logger (impacket)
+# It is up to the library consumer to do whatever is wanted
+# with the logger output. By default it is forwarded to the
+# upstream logger
+
+LOG = logging.getLogger(__name__)
+LOG.addHandler(NullHandler())
diff --git a/tests/python_dependencies/impacket/nmb.py b/tests/python_dependencies/impacket/nmb.py
new file mode 100644
index 00000000..dc8777e6
--- /dev/null
+++ b/tests/python_dependencies/impacket/nmb.py
@@ -0,0 +1,980 @@
+# Copyright (c) 2003-2016 CORE Security Technologies
+#
+# This software is provided under under a slightly modified version
+# of the Apache Software License. See the accompanying LICENSE file
+# for more information.
+#
+
+
+# -*- mode: python; tab-width: 4 -*-
+#
+# Copyright (C) 2001 Michael Teo <michaelteo@bigfoot.com>
+# nmb.py - NetBIOS library
+#
+# This software is provided 'as-is', without any express or implied warranty.
+# In no event will the author be held liable for any damages arising from the
+# use of this software.
+#
+# Permission is granted to anyone to use this software for any purpose,
+# including commercial applications, and to alter it and redistribute it
+# freely, subject to the following restrictions:
+#
+# 1. The origin of this software must not be misrepresented; you must not
+# claim that you wrote the original software. If you use this software
+# in a product, an acknowledgment in the product documentation would be
+# appreciated but is not required.
+#
+# 2. Altered source versions must be plainly marked as such, and must not be
+# misrepresented as being the original software.
+#
+# 3. This notice cannot be removed or altered from any source distribution.
+#
+# Altered source done by Alberto Solino (@agsolino)
+
+import socket
+import string
+import re
+import select
+import errno
+from random import randint
+from struct import pack, unpack
+import time
+
+from structure import Structure
+
+CVS_REVISION = '$Revision: 526 $'
+
+# Taken from socket module reference
+INADDR_ANY = '0.0.0.0'
+BROADCAST_ADDR = '<broadcast>'
+
+# Default port for NetBIOS name service
+NETBIOS_NS_PORT = 137
+# Default port for NetBIOS session service
+NETBIOS_SESSION_PORT = 139
+
+# Default port for SMB session service
+SMB_SESSION_PORT = 445
+
+# Owner Node Type Constants
+NODE_B = 0x0000
+NODE_P = 0x2000
+NODE_M = 0x4000
+NODE_RESERVED = 0x6000
+NODE_GROUP = 0x8000
+NODE_UNIQUE = 0x0
+
+# Name Type Constants
+TYPE_UNKNOWN = 0x01
+TYPE_WORKSTATION = 0x00
+TYPE_CLIENT = 0x03
+TYPE_SERVER = 0x20
+TYPE_DOMAIN_MASTER = 0x1B
+TYPE_DOMAIN_CONTROLLER = 0x1C
+TYPE_MASTER_BROWSER = 0x1D
+TYPE_BROWSER = 0x1E
+TYPE_NETDDE = 0x1F
+TYPE_STATUS = 0x21
+
+# Opcodes values
+OPCODE_QUERY = 0
+OPCODE_REGISTRATION = 0x5
+OPCODE_RELEASE = 0x6
+OPCODE_WACK = 0x7
+OPCODE_REFRESH = 0x8
+OPCODE_REQUEST = 0
+OPCODE_RESPONSE = 0x10
+
+# NM_FLAGS
+NM_FLAGS_BROADCAST = 0x1
+NM_FLAGS_UNICAST = 0
+NM_FLAGS_RA = 0x8
+NM_FLAGS_RD = 0x10
+NM_FLAGS_TC = 0x20
+NM_FLAGS_AA = 0x40
+
+# QUESTION_TYPE
+QUESTION_TYPE_NB = 0x20 # NetBIOS general Name Service Resource Record
+QUESTION_TYPE_NBSTAT = 0x21 # NetBIOS NODE STATUS Resource Record
+# QUESTION_CLASS
+QUESTION_CLASS_IN = 0x1 # Internet class
+
+# RR_TYPE Resource Record Type code
+RR_TYPE_A = 0x1 # IP address Resource Record
+RR_TYPE_NS = 0x2 # Name Server Resource Record
+RR_TYPE_NULL = 0xA # NULL Resource Record
+RR_TYPE_NB = 0x20 # NetBIOS general Name Service Resource Record
+RR_TYPE_NBSTAT = 0x21 # NetBIOS NODE STATUS Resource Record
+
+# Resource Record Class
+RR_CLASS_IN = 1 # Internet class
+
+# RCODE values
+RCODE_FMT_ERR = 0x1 # Format Error. Request was invalidly formatted.
+RCODE_SRV_ERR = 0x2 # Server failure. Problem with NBNS, cannot process name.
+RCODE_IMP_ERR = 0x4 # Unsupported request error. Allowable only for challenging NBNS when gets an Update type
+ # registration request.
+RCODE_RFS_ERR = 0x5 # Refused error. For policy reasons server will not register this name from this host.
+RCODE_ACT_ERR = 0x6 # Active error. Name is owned by another node.
+RCODE_CFT_ERR = 0x7 # Name in conflict error. A UNIQUE name is owned by more than one node.
+
+# NAME_FLAGS
+NAME_FLAGS_PRM = 0x0200 # Permanent Name Flag. If one (1) then entry is for the permanent node name. Flag is zero
+ # (0) for all other names.
+NAME_FLAGS_ACT = 0x0400 # Active Name Flag. All entries have this flag set to one (1).
+NAME_FLAG_CNF = 0x0800 # Conflict Flag. If one (1) then name on this node is in conflict.
+NAME_FLAG_DRG = 0x1000 # Deregister Flag. If one (1) then this name is in the process of being deleted.
+
+NAME_TYPES = { TYPE_UNKNOWN: 'Unknown', TYPE_WORKSTATION: 'Workstation', TYPE_CLIENT: 'Client',
+ TYPE_SERVER: 'Server', TYPE_MASTER_BROWSER: 'Master Browser', TYPE_BROWSER: 'Browser Server',
+ TYPE_DOMAIN_MASTER: 'Domain Master' , TYPE_NETDDE: 'NetDDE Server'}
+# NetBIOS Session Types
+NETBIOS_SESSION_MESSAGE = 0x0
+NETBIOS_SESSION_REQUEST = 0x81
+NETBIOS_SESSION_POSITIVE_RESPONSE = 0x82
+NETBIOS_SESSION_NEGATIVE_RESPONSE = 0x83
+NETBIOS_SESSION_RETARGET_RESPONSE = 0x84
+NETBIOS_SESSION_KEEP_ALIVE = 0x85
+
+
+def strerror(errclass, errcode):
+ if errclass == ERRCLASS_OS:
+ return 'OS Error', str(errcode)
+ elif errclass == ERRCLASS_QUERY:
+ return 'Query Error', QUERY_ERRORS.get(errcode, 'Unknown error')
+ elif errclass == ERRCLASS_SESSION:
+ return 'Session Error', SESSION_ERRORS.get(errcode, 'Unknown error')
+ else:
+ return 'Unknown Error Class', 'Unknown Error'
+
+
+
+class NetBIOSError(Exception): pass
+class NetBIOSTimeout(Exception):
+ def __init__(self, message = 'The NETBIOS connection with the remote host timed out.'):
+ Exception.__init__(self, message)
+
+class NBResourceRecord:
+ def __init__(self, data = 0):
+ self._data = data
+ try:
+ if self._data:
+ self.rr_name = (re.split('\x00',data))[0]
+ offset = len(self.rr_name)+1
+ self.rr_type = unpack('>H', self._data[offset:offset+2])[0]
+ self.rr_class = unpack('>H', self._data[offset+2: offset+4])[0]
+ self.ttl = unpack('>L',self._data[offset+4:offset+8])[0]
+ self.rdlength = unpack('>H', self._data[offset+8:offset+10])[0]
+ self.rdata = self._data[offset+10:offset+10+self.rdlength]
+ offset = self.rdlength - 2
+ self.unit_id = data[offset:offset+6]
+ else:
+ self.rr_name = ''
+ self.rr_type = 0
+ self.rr_class = 0
+ self.ttl = 0
+ self.rdlength = 0
+ self.rdata = ''
+ self.unit_id = ''
+ except Exception:
+ raise NetBIOSError( 'Wrong packet format ' )
+
+ def set_rr_name(self, name):
+ self.rr_name = name
+ def set_rr_type(self, name):
+ self.rr_type = name
+ def set_rr_class(self,cl):
+ self.rr_class = cl
+ def set_ttl(self,ttl):
+ self.ttl = ttl
+ def set_rdata(self,rdata):
+ self.rdata = rdata
+ self.rdlength = len(rdata)
+ def get_unit_id(self):
+ return self.unit_id
+ def get_rr_name(self):
+ return self.rr_name
+ def get_rr_class(self):
+ return self.rr_class
+ def get_ttl(self):
+ return self.ttl
+ def get_rdlength(self):
+ return self.rdlength
+ def get_rdata(self):
+ return self.rdata
+ def rawData(self):
+ return self.rr_name + pack('!HHLH',self.rr_type, self.rr_class, self.ttl, self.rdlength) + self.rdata
+
+class NBNodeStatusResponse(NBResourceRecord):
+ def __init__(self, data = 0):
+ NBResourceRecord.__init__(self,data)
+ self.num_names = 0
+ self.node_names = [ ]
+ self.statstics = ''
+ self.mac = '00-00-00-00-00-00'
+ try:
+ if data:
+ self._data = self.get_rdata()
+ self.num_names = unpack('>B',self._data[:1])[0]
+ offset = 1
+ for i in range(0, self.num_names):
+ name = self._data[offset:offset + 15]
+ type,flags = unpack('>BH', self._data[offset + 15: offset + 18])
+ offset += 18
+ self.node_names.append(NBNodeEntry(name, type ,flags))
+ self.set_mac_in_hexa(self.get_unit_id())
+ except Exception:
+ raise NetBIOSError( 'Wrong packet format ' )
+
+ def set_mac_in_hexa(self, data):
+ data_aux = ''
+ for d in data:
+ if data_aux == '':
+ data_aux = '%02x' % ord(d)
+ else:
+ data_aux += '-%02x' % ord(d)
+ self.mac = string.upper(data_aux)
+
+ def get_num_names(self):
+ return self.num_names
+ def get_mac(self):
+ return self.mac
+ def set_num_names(self, num):
+ self.num_names = num
+ def get_node_names(self):
+ return self.node_names
+ def add_node_name(self,node_names):
+ self.node_names.append(node_names)
+ self.num_names += 1
+ def rawData(self):
+ res = pack('!B', self.num_names )
+ for i in range(0, self.num_names):
+ res += self.node_names[i].rawData()
+
+class NBPositiveNameQueryResponse(NBResourceRecord):
+ def __init__(self, data = 0):
+ NBResourceRecord.__init__(self, data)
+ self.addr_entries = [ ]
+ if data:
+ self._data = self.get_rdata()
+ _qn_length, qn_name, qn_scope = decode_name(data)
+ self._netbios_name = string.rstrip(qn_name[:-1]) + qn_scope
+ self._name_type = ord(qn_name[-1])
+ self._nb_flags = unpack('!H', self._data[:2])
+ offset = 2
+ while offset<len(self._data):
+ self.addr_entries.append('%d.%d.%d.%d' % unpack('4B', (self._data[offset:offset+4])))
+ offset += 4
+
+ def get_netbios_name(self):
+ return self._netbios_name
+
+ def get_name_type(self):
+ return self._name_type
+
+ def get_addr_entries(self):
+ return self.addr_entries
+
+class NetBIOSPacket:
+ """ This is a packet as defined in RFC 1002 """
+ def __init__(self, data = 0):
+ self.name_trn_id = 0x0 # Transaction ID for Name Service Transaction.
+ # Requestor places a unique value for each active
+ # transaction. Responder puts NAME_TRN_ID value
+ # from request packet in response packet.
+ self.opcode = 0 # Packet type code
+ self.nm_flags = 0 # Flags for operation
+ self.rcode = 0 # Result codes of request.
+ self.qdcount = 0 # Unsigned 16 bit integer specifying the number of entries in the question section of a Name
+ self.ancount = 0 # Unsigned 16 bit integer specifying the number of
+ # resource records in the answer section of a Name
+ # Service packet.
+ self.nscount = 0 # Unsigned 16 bit integer specifying the number of
+ # resource records in the authority section of a
+ # Name Service packet.
+ self.arcount = 0 # Unsigned 16 bit integer specifying the number of
+ # resource records in the additional records
+ # section of a Name Service packeT.
+ self.questions = ''
+ self.answers = ''
+ if data == 0:
+ self._data = ''
+ else:
+ try:
+ self._data = data
+ self.opcode = ord(data[2]) >> 3
+ self.nm_flags = ((ord(data[2]) & 0x3) << 4) | ((ord(data[3]) & 0xf0) >> 4)
+ self.name_trn_id = unpack('>H', self._data[:2])[0]
+ self.rcode = ord(data[3]) & 0x0f
+ self.qdcount = unpack('>H', self._data[4:6])[0]
+ self.ancount = unpack('>H', self._data[6:8])[0]
+ self.nscount = unpack('>H', self._data[8:10])[0]
+ self.arcount = unpack('>H', self._data[10:12])[0]
+ self.answers = self._data[12:]
+ except Exception:
+ raise NetBIOSError( 'Wrong packet format ' )
+
+ def set_opcode(self, opcode):
+ self.opcode = opcode
+ def set_trn_id(self, trn):
+ self.name_trn_id = trn
+ def set_nm_flags(self, nm_flags):
+ self.nm_flags = nm_flags
+ def set_rcode(self, rcode):
+ self.rcode = rcode
+ def addQuestion(self, question, qtype, qclass):
+ self.qdcount += 1
+ self.questions += question + pack('!HH',qtype,qclass)
+ def get_trn_id(self):
+ return self.name_trn_id
+ def get_rcode(self):
+ return self.rcode
+ def get_nm_flags(self):
+ return self.nm_flags
+ def get_opcode(self):
+ return self.opcode
+ def get_qdcount(self):
+ return self.qdcount
+ def get_ancount(self):
+ return self.ancount
+ def get_nscount(self):
+ return self.nscount
+ def get_arcount(self):
+ return self.arcount
+ def rawData(self):
+ secondWord = self.opcode << 11
+ secondWord |= self.nm_flags << 4
+ secondWord |= self.rcode
+ data = pack('!HHHHHH', self.name_trn_id, secondWord , self.qdcount, self.ancount, self.nscount, self.arcount) + self.questions + self.answers
+ return data
+ def get_answers(self):
+ return self.answers
+
+class NBHostEntry:
+
+ def __init__(self, nbname, nametype, ip):
+ self.__nbname = nbname
+ self.__nametype = nametype
+ self.__ip = ip
+
+ def get_nbname(self):
+ return self.__nbname
+
+ def get_nametype(self):
+ return self.__nametype
+
+ def get_ip(self):
+ return self.__ip
+
+ def __repr__(self):
+ return '<NBHostEntry instance: NBname="' + self.__nbname + '", IP="' + self.__ip + '">'
+
+class NBNodeEntry:
+
+ def __init__(self, nbname, nametype, flags):
+ self.__nbname = string.ljust(nbname,17)
+ self.__nametype = nametype
+ self.__flags = flags
+ self.__isgroup = flags & 0x8000
+ self.__nodetype = flags & 0x6000
+ self.__deleting = flags & 0x1000
+ self.__isconflict = flags & 0x0800
+ self.__isactive = flags & 0x0400
+ self.__ispermanent = flags & 0x0200
+
+ def get_nbname(self):
+ return self.__nbname
+
+ def get_nametype(self):
+ return self.__nametype
+
+ def is_group(self):
+ return self.__isgroup
+
+ def get_nodetype(self):
+ return self.__nodetype
+
+ def is_deleting(self):
+ return self.__deleting
+
+ def is_conflict(self):
+ return self.__isconflict
+
+ def is_active(self):
+ return self.__isactive
+
+ def is_permanent(self):
+ return self.__ispermanent
+
+ def set_nbname(self, name):
+ self.__nbname = string.ljust(name,17)
+
+ def set_nametype(self, type):
+ self.__nametype = type
+
+ def set_flags(self,flags):
+ self.__flags = flags
+
+ def __repr__(self):
+ s = '<NBNodeEntry instance: NBname="' + self.__nbname + '" NameType="' + NAME_TYPES[self.__nametype] + '"'
+ if self.__isactive:
+ s += ' ACTIVE'
+ if self.__isgroup:
+ s += ' GROUP'
+ if self.__isconflict:
+ s += ' CONFLICT'
+ if self.__deleting:
+ s += ' DELETING'
+ return s
+ def rawData(self):
+ return self.__nbname + pack('!BH',self.__nametype, self.__flags)
+
+
+class NetBIOS:
+
+ # Creates a NetBIOS instance without specifying any default NetBIOS domain nameserver.
+ # All queries will be sent through the servport.
+ def __init__(self, servport = NETBIOS_NS_PORT):
+ self.__servport = NETBIOS_NS_PORT
+ self.__nameserver = None
+ self.__broadcastaddr = BROADCAST_ADDR
+ self.mac = '00-00-00-00-00-00'
+
+ def _setup_connection(self, dstaddr):
+ port = randint(10000, 60000)
+ af, socktype, proto, _canonname, _sa = socket.getaddrinfo(dstaddr, port, socket.AF_INET, socket.SOCK_DGRAM)[0]
+ s = socket.socket(af, socktype, proto)
+ has_bind = 1
+ for _i in range(0, 10):
+ # We try to bind to a port for 10 tries
+ try:
+ s.bind(( INADDR_ANY, randint(10000, 60000) ))
+ s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
+ has_bind = 1
+ except socket.error:
+ pass
+ if not has_bind:
+ raise NetBIOSError, ( 'Cannot bind to a good UDP port', ERRCLASS_OS, errno.EAGAIN )
+ self.__sock = s
+
+ # Set the default NetBIOS domain nameserver.
+ def set_nameserver(self, nameserver):
+ self.__nameserver = nameserver
+
+ # Return the default NetBIOS domain nameserver, or None if none is specified.
+ def get_nameserver(self):
+ return self.__nameserver
+
+ # Set the broadcast address to be used for query.
+ def set_broadcastaddr(self, broadcastaddr):
+ self.__broadcastaddr = broadcastaddr
+
+ # Return the broadcast address to be used, or BROADCAST_ADDR if default broadcast address is used.
+ def get_broadcastaddr(self):
+ return self.__broadcastaddr
+
+ # Returns a NBPositiveNameQueryResponse instance containing the host information for nbname.
+ # If a NetBIOS domain nameserver has been specified, it will be used for the query.
+ # Otherwise, the query is broadcasted on the broadcast address.
+ def gethostbyname(self, nbname, qtype = TYPE_WORKSTATION, scope = None, timeout = 1):
+ return self.__queryname(nbname, self.__nameserver, qtype, scope, timeout)
+
+ # Returns a list of NBNodeEntry instances containing node status information for nbname.
+ # If destaddr contains an IP address, then this will become an unicast query on the destaddr.
+ # Raises NetBIOSTimeout if timeout (in secs) is reached.
+ # Raises NetBIOSError for other errors
+ def getnodestatus(self, nbname, destaddr = None, type = TYPE_WORKSTATION, scope = None, timeout = 1):
+ if destaddr:
+ return self.__querynodestatus(nbname, destaddr, type, scope, timeout)
+ else:
+ return self.__querynodestatus(nbname, self.__nameserver, type, scope, timeout)
+
+ def getnetbiosname(self, ip):
+ entries = self.getnodestatus('*',ip)
+ entries = filter(lambda x:x.get_nametype() == TYPE_SERVER, entries)
+ return entries[0].get_nbname().strip()
+
+ def getmacaddress(self):
+ return self.mac
+
+ def __queryname(self, nbname, destaddr, qtype, scope, timeout, retries = 0):
+ self._setup_connection(destaddr)
+ trn_id = randint(1, 32000)
+ p = NetBIOSPacket()
+ p.set_trn_id(trn_id)
+ netbios_name = nbname.upper()
+ qn_label = encode_name(netbios_name, qtype, scope)
+ p.addQuestion(qn_label, QUESTION_TYPE_NB, QUESTION_CLASS_IN)
+ p.set_nm_flags(NM_FLAGS_RD)
+ if not destaddr:
+ p.set_nm_flags(p.get_nm_flags() | NM_FLAGS_BROADCAST)
+ destaddr = self.__broadcastaddr
+ req = p.rawData()
+
+ tries = retries
+ while 1:
+ self.__sock.sendto(req, ( destaddr, self.__servport ))
+ try:
+ ready, _, _ = select.select([ self.__sock.fileno() ], [ ] , [ ], timeout)
+ if not ready:
+ if tries:
+ # Retry again until tries == 0
+ tries -= 1
+ else:
+ raise NetBIOSTimeout
+ else:
+ data, _ = self.__sock.recvfrom(65536, 0)
+
+ res = NetBIOSPacket(data)
+ if res.get_trn_id() == p.get_trn_id():
+ if res.get_rcode():
+ if res.get_rcode() == 0x03:
+ return None
+ else:
+ raise NetBIOSError, ( 'Negative name query response', ERRCLASS_QUERY, res.get_rcode() )
+
+ if res.get_ancount() != 1:
+ raise NetBIOSError( 'Malformed response')
+
+ return NBPositiveNameQueryResponse(res.get_answers())
+ except select.error, ex:
+ if ex[0] != errno.EINTR and ex[0] != errno.EAGAIN:
+ raise NetBIOSError, ( 'Error occurs while waiting for response', ERRCLASS_OS, ex[0] )
+ raise
+
+
+ def __querynodestatus(self, nbname, destaddr, type, scope, timeout):
+ self._setup_connection(destaddr)
+ trn_id = randint(1, 32000)
+ p = NetBIOSPacket()
+ p.set_trn_id(trn_id)
+ netbios_name = string.upper(nbname)
+ qn_label = encode_name(netbios_name, type, scope)
+ p.addQuestion(qn_label, QUESTION_TYPE_NBSTAT, QUESTION_CLASS_IN)
+
+ if not destaddr:
+ p.set_nm_flags(NM_FLAGS_BROADCAST)
+ destaddr = self.__broadcastaddr
+ req = p.rawData()
+ tries = 3
+ while 1:
+ try:
+ self.__sock.sendto(req, 0, ( destaddr, self.__servport ))
+ ready, _, _ = select.select([ self.__sock.fileno() ], [ ] , [ ], timeout)
+ if not ready:
+ if tries:
+ # Retry again until tries == 0
+ tries -= 1
+ else:
+ raise NetBIOSTimeout
+ else:
+ try:
+ data, _ = self.__sock.recvfrom(65536, 0)
+ except Exception, e:
+ raise NetBIOSError, "recvfrom error: %s" % str(e)
+ self.__sock.close()
+ res = NetBIOSPacket(data)
+ if res.get_trn_id() == p.get_trn_id():
+ if res.get_rcode():
+ if res.get_rcode() == 0x03:
+ # I'm just guessing here
+ raise NetBIOSError, "Cannot get data from server"
+ else:
+ raise NetBIOSError, ( 'Negative name query response', ERRCLASS_QUERY, res.get_rcode() )
+ answ = NBNodeStatusResponse(res.get_answers())
+ self.mac = answ.get_mac()
+ return answ.get_node_names()
+ except select.error, ex:
+ if ex[0] != errno.EINTR and ex[0] != errno.EAGAIN:
+ raise NetBIOSError, ( 'Error occurs while waiting for response', ERRCLASS_OS, ex[0] )
+ except socket.error, ex:
+ raise NetBIOSError, 'Connection error: %s' % str(ex)
+
+# Perform first and second level encoding of name as specified in RFC 1001 (Section 4)
+def encode_name(name, type, scope):
+ if name == '*':
+ name += '\0' * 15
+ elif len(name) > 15:
+ name = name[:15] + chr(type)
+ else:
+ name = string.ljust(name, 15) + chr(type)
+
+ encoded_name = chr(len(name) * 2) + re.sub('.', _do_first_level_encoding, name)
+ if scope:
+ encoded_scope = ''
+ for s in string.split(scope, '.'):
+ encoded_scope = encoded_scope + chr(len(s)) + s
+ return encoded_name + encoded_scope + '\0'
+ else:
+ return encoded_name + '\0'
+
+# Internal method for use in encode_name()
+def _do_first_level_encoding(m):
+ s = ord(m.group(0))
+ return string.uppercase[s >> 4] + string.uppercase[s & 0x0f]
+
+def decode_name(name):
+ name_length = ord(name[0])
+ assert name_length == 32
+
+ decoded_name = re.sub('..', _do_first_level_decoding, name[1:33])
+ if name[33] == '\0':
+ return 34, decoded_name, ''
+ else:
+ decoded_domain = ''
+ offset = 34
+ while 1:
+ domain_length = ord(name[offset])
+ if domain_length == 0:
+ break
+ decoded_domain = '.' + name[offset:offset + domain_length]
+ offset += domain_length
+ return offset + 1, decoded_name, decoded_domain
+
+def _do_first_level_decoding(m):
+ s = m.group(0)
+ return chr(((ord(s[0]) - ord('A')) << 4) | (ord(s[1]) - ord('A')))
+
+
+
+class NetBIOSSessionPacket:
+ def __init__(self, data = 0):
+ self.type = 0x0
+ self.flags = 0x0
+ self.length = 0x0
+ if data == 0:
+ self._trailer = ''
+ else:
+ try:
+ self.type = ord(data[0])
+ if self.type == NETBIOS_SESSION_MESSAGE:
+ self.length = ord(data[1]) << 16 | (unpack('!H', data[2:4])[0])
+ else:
+ self.flags = ord(data[1])
+ self.length = unpack('!H', data[2:4])[0]
+
+ self._trailer = data[4:]
+ except:
+ raise NetBIOSError( 'Wrong packet format ' )
+
+ def set_type(self, type):
+ self.type = type
+ def get_type(self):
+ return self.type
+ def rawData(self):
+ if self.type == NETBIOS_SESSION_MESSAGE:
+ data = pack('!BBH',self.type,self.length >> 16,self.length & 0xFFFF) + self._trailer
+ else:
+ data = pack('!BBH',self.type,self.flags,self.length) + self._trailer
+ return data
+ def set_trailer(self,data):
+ self._trailer = data
+ self.length = len(data)
+ def get_length(self):
+ return self.length
+ def get_trailer(self):
+ return self._trailer
+
+class NetBIOSSession:
+ def __init__(self, myname, remote_name, remote_host, remote_type = TYPE_SERVER, sess_port = NETBIOS_SESSION_PORT, timeout = None, local_type = TYPE_WORKSTATION, sock = None):
+ if len(myname) > 15:
+ self.__myname = string.upper(myname[:15])
+ else:
+ self.__myname = string.upper(myname)
+ self.__local_type = local_type
+
+ assert remote_name
+ # if destination port SMB_SESSION_PORT and remote name *SMBSERVER, we're changing it to its IP address
+ # helping solving the client mistake ;)
+ if remote_name == '*SMBSERVER' and sess_port == SMB_SESSION_PORT:
+ remote_name = remote_host
+ # If remote name is *SMBSERVER let's try to query its name.. if can't be guessed, continue and hope for the best
+ if remote_name == '*SMBSERVER':
+ nb = NetBIOS()
+
+ try:
+ res = nb.getnetbiosname(remote_host)
+ except:
+ res = None
+ pass
+
+ if res is not None:
+ remote_name = res
+
+ if len(remote_name) > 15:
+ self.__remote_name = string.upper(remote_name[:15])
+ else:
+ self.__remote_name = string.upper(remote_name)
+ self.__remote_type = remote_type
+
+ self.__remote_host = remote_host
+
+ if sock is not None:
+ # We are acting as a server
+ self._sock = sock
+ else:
+ self._sock = self._setup_connection((remote_host, sess_port))
+
+ if sess_port == NETBIOS_SESSION_PORT:
+ self._request_session(remote_type, local_type, timeout)
+
+ def get_myname(self):
+ return self.__myname
+
+ def get_mytype(self):
+ return self.__local_type
+
+ def get_remote_host(self):
+ return self.__remote_host
+
+ def get_remote_name(self):
+ return self.__remote_name
+
+ def get_remote_type(self):
+ return self.__remote_type
+
+ def close(self):
+ self._sock.close()
+
+ def get_socket(self):
+ return self._sock
+
+class NetBIOSUDPSessionPacket(Structure):
+ TYPE_DIRECT_UNIQUE = 16
+ TYPE_DIRECT_GROUP = 17
+
+ FLAGS_MORE_FRAGMENTS = 1
+ FLAGS_FIRST_FRAGMENT = 2
+ FLAGS_B_NODE = 0
+
+ structure = (
+ ('Type','B=16'), # Direct Unique Datagram
+ ('Flags','B=2'), # FLAGS_FIRST_FRAGMENT
+ ('ID','<H'),
+ ('_SourceIP','>L'),
+ ('SourceIP','"'),
+ ('SourcePort','>H=138'),
+ ('DataLegth','>H-Data'),
+ ('Offset','>H=0'),
+ ('SourceName','z'),
+ ('DestinationName','z'),
+ ('Data',':'),
+ )
+
+ def getData(self):
+ addr = self['SourceIP'].split('.')
+ addr = [int(x) for x in addr]
+ addr = (((addr[0] << 8) + addr[1] << 8) + addr[2] << 8) + addr[3]
+ self['_SourceIP'] = addr
+ return Structure.getData(self)
+
+ def get_trailer(self):
+ return self['Data']
+
+class NetBIOSUDPSession(NetBIOSSession):
+ def _setup_connection(self, peer):
+ af, socktype, proto, canonname, sa = socket.getaddrinfo(peer[0], peer[1], 0, socket.SOCK_DGRAM)[0]
+ sock = socket.socket(af, socktype, proto)
+ sock.connect(sa)
+
+ sock = socket.socket(af, socktype, proto)
+ sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+ sock.bind((INADDR_ANY, 138))
+ self.peer = peer
+ return sock
+
+ def _request_session(self, remote_type, local_type, timeout = None):
+ pass
+
+ def next_id(self):
+ if hasattr(self, '__dgram_id'):
+ answer = self.__dgram_id
+ else:
+ self.__dgram_id = randint(1,65535)
+ answer = self.__dgram_id
+ self.__dgram_id += 1
+ return answer
+
+ def send_packet(self, data):
+ # Yes... I know...
+ self._sock.connect(self.peer)
+
+ p = NetBIOSUDPSessionPacket()
+ p['ID'] = self.next_id()
+ p['SourceIP'] = self._sock.getsockname()[0]
+ p['SourceName'] = encode_name(self.get_myname(), self.get_mytype(), '')[:-1]
+ p['DestinationName'] = encode_name(self.get_remote_name(), self.get_remote_type(), '')[:-1]
+ p['Data'] = data
+
+ self._sock.sendto(str(p), self.peer)
+ self._sock.close()
+
+ self._sock = self._setup_connection(self.peer)
+
+ def recv_packet(self, timeout = None):
+ # The next loop is a workaround for a bigger problem:
+ # When data reaches higher layers, the lower headers are lost,
+ # and with them, for example, the source IP. Hence, SMB users
+ # can't know where packets are comming from... we need a better
+ # solution, right now, we will filter everything except packets
+ # coming from the remote_host specified in __init__()
+
+ while 1:
+ data, peer = self._sock.recvfrom(8192)
+# print "peer: %r self.peer: %r" % (peer, self.peer)
+ if peer == self.peer: break
+
+ return NetBIOSUDPSessionPacket(data)
+
+class NetBIOSTCPSession(NetBIOSSession):
+ def __init__(self, myname, remote_name, remote_host, remote_type = TYPE_SERVER, sess_port = NETBIOS_SESSION_PORT, timeout = None, local_type = TYPE_WORKSTATION, sock = None, select_poll = False):
+ self.__select_poll = select_poll
+ if self.__select_poll:
+ self.read_function = self.polling_read
+ else:
+ self.read_function = self.non_polling_read
+ NetBIOSSession.__init__(self, myname, remote_name, remote_host, remote_type = remote_type, sess_port = sess_port, timeout = timeout, local_type = local_type, sock=sock)
+
+
+ def _setup_connection(self, peer):
+ try:
+ af, socktype, proto, canonname, sa = socket.getaddrinfo(peer[0], peer[1], 0, socket.SOCK_STREAM)[0]
+ sock = socket.socket(af, socktype, proto)
+ sock.connect(sa)
+ except socket.error, e:
+ raise socket.error("Connection error (%s:%s)" % (peer[0], peer[1]), e)
+ return sock
+
+ def send_packet(self, data):
+ p = NetBIOSSessionPacket()
+ p.set_type(NETBIOS_SESSION_MESSAGE)
+ p.set_trailer(data)
+ self._sock.send(p.rawData())
+
+ def recv_packet(self, timeout = None):
+ data = self.__read(timeout)
+ return NetBIOSSessionPacket(data)
+
+ def _request_session(self, remote_type, local_type, timeout = None):
+ p = NetBIOSSessionPacket()
+ remote_name = encode_name(self.get_remote_name(), remote_type, '')
+ myname = encode_name(self.get_myname(), local_type, '')
+ p.set_type(NETBIOS_SESSION_REQUEST)
+ p.set_trailer(remote_name + myname)
+
+ self._sock.send(p.rawData())
+ while 1:
+ p = self.recv_packet(timeout)
+ if p.get_type() == NETBIOS_SESSION_NEGATIVE_RESPONSE:
+ raise NetBIOSError, ( 'Cannot request session', ERRCLASS_SESSION, ord(p.get_trailer()[0]) )
+ elif p.get_type() == NETBIOS_SESSION_POSITIVE_RESPONSE:
+ break
+ else:
+ # Ignore all other messages, most probably keepalive messages
+ pass
+
+ def polling_read(self, read_length, timeout):
+ data = ''
+ if timeout is None:
+ timeout = 3600
+
+ time_left = timeout
+ CHUNK_TIME = 0.025
+ bytes_left = read_length
+
+ while bytes_left > 0:
+ try:
+ ready, _, _ = select.select([self._sock.fileno() ], [ ], [ ], 0)
+
+ if not ready:
+ if time_left <= 0:
+ raise NetBIOSTimeout
+ else:
+ time.sleep(CHUNK_TIME)
+ time_left -= CHUNK_TIME
+ continue
+
+ received = self._sock.recv(bytes_left)
+ if len(received) == 0:
+ raise NetBIOSError, ( 'Error while reading from remote', ERRCLASS_OS, None)
+
+ data = data + received
+ bytes_left = read_length - len(data)
+ except select.error, ex:
+ if ex[0] != errno.EINTR and ex[0] != errno.EAGAIN:
+ raise NetBIOSError, ( 'Error occurs while reading from remote', ERRCLASS_OS, ex[0] )
+
+ return data
+
+ def non_polling_read(self, read_length, timeout):
+ data = ''
+ bytes_left = read_length
+
+ while bytes_left > 0:
+ try:
+ ready, _, _ = select.select([self._sock.fileno() ], [ ], [ ], timeout)
+
+ if not ready:
+ raise NetBIOSTimeout
+
+ received = self._sock.recv(bytes_left)
+ if len(received) == 0:
+ raise NetBIOSError, ( 'Error while reading from remote', ERRCLASS_OS, None)
+
+ data = data + received
+ bytes_left = read_length - len(data)
+ except select.error, ex:
+ if ex[0] != errno.EINTR and ex[0] != errno.EAGAIN:
+ raise NetBIOSError, ( 'Error occurs while reading from remote', ERRCLASS_OS, ex[0] )
+
+ return data
+
+ def __read(self, timeout = None):
+ data = self.read_function(4, timeout)
+ type, flags, length = unpack('>ccH', data)
+ if ord(type) == NETBIOS_SESSION_MESSAGE:
+ length |= ord(flags) << 16
+ else:
+ if ord(flags) & 0x01:
+ length |= 0x10000
+ data2 = self.read_function(length, timeout)
+
+ return data + data2
+
+ERRCLASS_QUERY = 0x00
+ERRCLASS_SESSION = 0xf0
+ERRCLASS_OS = 0xff
+
+QUERY_ERRORS = { 0x01: 'Request format error. Please file a bug report.',
+ 0x02: 'Internal server error',
+ 0x03: 'Name does not exist',
+ 0x04: 'Unsupported request',
+ 0x05: 'Request refused'
+ }
+
+SESSION_ERRORS = { 0x80: 'Not listening on called name',
+ 0x81: 'Not listening for calling name',
+ 0x82: 'Called name not present',
+ 0x83: 'Sufficient resources',
+ 0x8f: 'Unspecified error'
+ }
+
+def main():
+ def get_netbios_host_by_name(name):
+ n = NetBIOS()
+ n.set_broadcastaddr('255.255.255.255') # To avoid use "<broadcast>" in socket
+ for qtype in (TYPE_WORKSTATION, TYPE_CLIENT, TYPE_SERVER, TYPE_DOMAIN_MASTER, TYPE_DOMAIN_CONTROLLER):
+ try:
+ addrs = n.gethostbyname(name, qtype = qtype).get_addr_entries()
+ except NetBIOSTimeout:
+ continue
+ else:
+ return addrs
+ raise Exception("Host not found")
+
+
+ n = get_netbios_host_by_name("some-host")
+ print n
+
+if __name__ == '__main__':
+ main()
diff --git a/tests/python_dependencies/impacket/nt_errors.py b/tests/python_dependencies/impacket/nt_errors.py
new file mode 100644
index 00000000..cd7ef80a
--- /dev/null
+++ b/tests/python_dependencies/impacket/nt_errors.py
@@ -0,0 +1,3586 @@
+# Copyright (c) 2003-2016 CORE Security Technologies)
+#
+# This software is provided under under a slightly modified version
+# of the Apache Software License. See the accompanying LICENSE file
+# for more information.
+#
+# Author: Alberto Solino (@agsolino)
+#
+# Description:
+# NT STATUS Errors from [MS-ERREF]. Ideally all the files
+# should grab the error codes from here (big ToDo)
+#
+
+ERROR_MESSAGES = {
+ 0x00000000: ("STATUS_SUCCESS","The operation completed successfully."),
+ 0x00000001: ("STATUS_WAIT_1","The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state."),
+ 0x00000002: ("STATUS_WAIT_2","The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state."),
+ 0x00000003: ("STATUS_WAIT_3","The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state."),
+ 0x0000003F: ("STATUS_WAIT_63","The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state."),
+ 0x00000080: ("STATUS_ABANDONED","The caller attempted to wait for a mutex that has been abandoned."),
+ 0x00000080: ("STATUS_ABANDONED_WAIT_0","The caller attempted to wait for a mutex that has been abandoned."),
+ 0x000000BF: ("STATUS_ABANDONED_WAIT_63","The caller attempted to wait for a mutex that has been abandoned."),
+ 0x000000C0: ("STATUS_USER_APC","A user-mode APC was delivered before the given Interval expired."),
+ 0x00000101: ("STATUS_ALERTED","The delay completed because the thread was alerted."),
+ 0x00000102: ("STATUS_TIMEOUT","The given Timeout interval expired."),
+ 0x00000103: ("STATUS_PENDING","The operation that was requested is pending completion."),
+ 0x00000104: ("STATUS_REPARSE","A reparse should be performed by the Object Manager because the name of the file resulted in a symbolic link."),
+ 0x00000105: ("STATUS_MORE_ENTRIES","Returned by enumeration APIs to indicate more information is available to successive calls."),
+ 0x00000106: ("STATUS_NOT_ALL_ASSIGNED","Indicates not all privileges or groups that are referenced are assigned to the caller. This allows, for example, all privileges to be disabled without having to know exactly which privileges are assigned."),
+ 0x00000107: ("STATUS_SOME_NOT_MAPPED","Some of the information to be translated has not been translated."),
+ 0x00000108: ("STATUS_OPLOCK_BREAK_IN_PROGRESS","An open/create operation completed while an opportunistic lock (oplock) break is underway."),
+ 0x00000109: ("STATUS_VOLUME_MOUNTED","A new volume has been mounted by a file system."),
+ 0x0000010A: ("STATUS_RXACT_COMMITTED","This success level status indicates that the transaction state already exists for the registry subtree but that a transaction commit was previously aborted. The commit has now been completed."),
+ 0x0000010B: ("STATUS_NOTIFY_CLEANUP","Indicates that a notify change request has been completed due to closing the handle that made the notify change request."),
+ 0x0000010C: ("STATUS_NOTIFY_ENUM_DIR","Indicates that a notify change request is being completed and that the information is not being returned in the caller's buffer. The caller now needs to enumerate the files to find the changes."),
+ 0x0000010D: ("STATUS_NO_QUOTAS_FOR_ACCOUNT","{No Quotas} No system quota limits are specifically set for this account."),
+ 0x0000010E: ("STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED","{Connect Failure on Primary Transport} An attempt was made to connect to the remote server %hs on the primary transport, but the connection failed. The computer WAS able to connect on a secondary transport."),
+ 0x00000110: ("STATUS_PAGE_FAULT_TRANSITION","The page fault was a transition fault."),
+ 0x00000111: ("STATUS_PAGE_FAULT_DEMAND_ZERO","The page fault was a demand zero fault."),
+ 0x00000112: ("STATUS_PAGE_FAULT_COPY_ON_WRITE","The page fault was a demand zero fault."),
+ 0x00000113: ("STATUS_PAGE_FAULT_GUARD_PAGE","The page fault was a demand zero fault."),
+ 0x00000114: ("STATUS_PAGE_FAULT_PAGING_FILE","The page fault was satisfied by reading from a secondary storage device."),
+ 0x00000115: ("STATUS_CACHE_PAGE_LOCKED","The cached page was locked during operation."),
+ 0x00000116: ("STATUS_CRASH_DUMP","The crash dump exists in a paging file."),
+ 0x00000117: ("STATUS_BUFFER_ALL_ZEROS","The specified buffer contains all zeros."),
+ 0x00000118: ("STATUS_REPARSE_OBJECT","A reparse should be performed by the Object Manager because the name of the file resulted in a symbolic link."),
+ 0x00000119: ("STATUS_RESOURCE_REQUIREMENTS_CHANGED","The device has succeeded a query-stop and its resource requirements have changed."),
+ 0x00000120: ("STATUS_TRANSLATION_COMPLETE","The translator has translated these resources into the global space and no additional translations should be performed."),
+ 0x00000121: ("STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY","The directory service evaluated group memberships locally, because it was unable to contact a global catalog server."),
+ 0x00000122: ("STATUS_NOTHING_TO_TERMINATE","A process being terminated has no threads to terminate."),
+ 0x00000123: ("STATUS_PROCESS_NOT_IN_JOB","The specified process is not part of a job."),
+ 0x00000124: ("STATUS_PROCESS_IN_JOB","The specified process is part of a job."),
+ 0x00000125: ("STATUS_VOLSNAP_HIBERNATE_READY","{Volume Shadow Copy Service} The system is now ready for hibernation."),
+ 0x00000126: ("STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY","A file system or file system filter driver has successfully completed an FsFilter operation."),
+ 0x00000127: ("STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED","The specified interrupt vector was already connected."),
+ 0x00000128: ("STATUS_INTERRUPT_STILL_CONNECTED","The specified interrupt vector is still connected."),
+ 0x00000129: ("STATUS_PROCESS_CLONED","The current process is a cloned process."),
+ 0x0000012A: ("STATUS_FILE_LOCKED_WITH_ONLY_READERS","The file was locked and all users of the file can only read."),
+ 0x0000012B: ("STATUS_FILE_LOCKED_WITH_WRITERS","The file was locked and at least one user of the file can write."),
+ 0x00000202: ("STATUS_RESOURCEMANAGER_READ_ONLY","The specified ResourceManager made no changes or updates to the resource under this transaction."),
+ 0x00000367: ("STATUS_WAIT_FOR_OPLOCK","An operation is blocked and waiting for an oplock."),
+ 0x00010001: ("DBG_EXCEPTION_HANDLED","Debugger handled the exception."),
+ 0x00010002: ("DBG_CONTINUE","The debugger continued."),
+ 0x001C0001: ("STATUS_FLT_IO_COMPLETE","The IO was completed by a filter."),
+ 0xC0000467: ("STATUS_FILE_NOT_AVAILABLE","The file is temporarily unavailable."),
+ 0xC0000721: ("STATUS_CALLBACK_RETURNED_THREAD_AFFINITY","A threadpool worker thread entered a callback at thread affinity %p and exited at affinity %p. This is unexpected, indicating that the callback missed restoring the priority."),
+ 0x40000000: ("STATUS_OBJECT_NAME_EXISTS","{Object Exists} An attempt was made to create an object but the object name already exists."),
+ 0x40000001: ("STATUS_THREAD_WAS_SUSPENDED","{Thread Suspended} A thread termination occurred while the thread was suspended. The thread resumed, and termination proceeded."),
+ 0x40000002: ("STATUS_WORKING_SET_LIMIT_RANGE","{Working Set Range Error} An attempt was made to set the working set minimum or maximum to values that are outside the allowable range."),
+ 0x40000003: ("STATUS_IMAGE_NOT_AT_BASE","{Image Relocated} An image file could not be mapped at the address that is specified in the image file. Local fixes must be performed on this image."),
+ 0x40000004: ("STATUS_RXACT_STATE_CREATED","This informational level status indicates that a specified registry subtree transaction state did not yet exist and had to be created."),
+ 0x40000005: ("STATUS_SEGMENT_NOTIFICATION","{Segment Load} A virtual DOS machine (VDM) is loading, unloading, or moving an MS-DOS or Win16 program segment image. An exception is raised so that a debugger can load, unload, or track symbols and breakpoints within these 16-bit segments."),
+ 0x40000006: ("STATUS_LOCAL_USER_SESSION_KEY","{Local Session Key} A user session key was requested for a local remote procedure call (RPC) connection. The session key that is returned is a constant value and not unique to this connection."),
+ 0x40000007: ("STATUS_BAD_CURRENT_DIRECTORY","{Invalid Current Directory} The process cannot switch to the startup current directory %hs. Select OK to set the current directory to %hs, or select CANCEL to exit."),
+ 0x40000008: ("STATUS_SERIAL_MORE_WRITES","{Serial IOCTL Complete} A serial I/O operation was completed by another write to a serial port. (The IOCTL_SERIAL_XOFF_COUNTER reached zero.)"),
+ 0x40000009: ("STATUS_REGISTRY_RECOVERED","{Registry Recovery} One of the files that contains the system registry data had to be recovered by using a log or alternate copy. The recovery was successful."),
+ 0x4000000A: ("STATUS_FT_READ_RECOVERY_FROM_BACKUP","{Redundant Read} To satisfy a read request, the Windows NT fault-tolerant file system successfully read the requested data from a redundant copy. This was done because the file system encountered a failure on a member of the fault-tolerant volume but was unable to reassign the failing area of the device."),
+ 0x4000000B: ("STATUS_FT_WRITE_RECOVERY","{Redundant Write} To satisfy a write request, the Windows NT fault-tolerant file system successfully wrote a redundant copy of the information. This was done because the file system encountered a failure on a member of the fault-tolerant volume but was unable to reassign the failing area of the device."),
+ 0x4000000C: ("STATUS_SERIAL_COUNTER_TIMEOUT","{Serial IOCTL Timeout} A serial I/O operation completed because the time-out period expired. (The IOCTL_SERIAL_XOFF_COUNTER had not reached zero.)"),
+ 0x4000000D: ("STATUS_NULL_LM_PASSWORD","{Password Too Complex} The Windows password is too complex to be converted to a LAN Manager password. The LAN Manager password that returned is a NULL string."),
+ 0x4000000E: ("STATUS_IMAGE_MACHINE_TYPE_MISMATCH","{Machine Type Mismatch} The image file %hs is valid but is for a machine type other than the current machine. Select OK to continue, or CANCEL to fail the DLL load."),
+ 0x4000000F: ("STATUS_RECEIVE_PARTIAL","{Partial Data Received} The network transport returned partial data to its client. The remaining data will be sent later."),
+ 0x40000010: ("STATUS_RECEIVE_EXPEDITED","{Expedited Data Received} The network transport returned data to its client that was marked as expedited by the remote system."),
+ 0x40000011: ("STATUS_RECEIVE_PARTIAL_EXPEDITED","{Partial Expedited Data Received} The network transport returned partial data to its client and this data was marked as expedited by the remote system. The remaining data will be sent later."),
+ 0x40000012: ("STATUS_EVENT_DONE","{TDI Event Done} The TDI indication has completed successfully."),
+ 0x40000013: ("STATUS_EVENT_PENDING","{TDI Event Pending} The TDI indication has entered the pending state."),
+ 0x40000014: ("STATUS_CHECKING_FILE_SYSTEM","Checking file system on %wZ."),
+ 0x40000015: ("STATUS_FATAL_APP_EXIT","{Fatal Application Exit} %hs"),
+ 0x40000016: ("STATUS_PREDEFINED_HANDLE","The specified registry key is referenced by a predefined handle."),
+ 0x40000017: ("STATUS_WAS_UNLOCKED","{Page Unlocked} The page protection of a locked page was changed to 'No Access' and the page was unlocked from memory and from the process."),
+ 0x40000018: ("STATUS_SERVICE_NOTIFICATION","%hs"),
+ 0x40000019: ("STATUS_WAS_LOCKED","{Page Locked} One of the pages to lock was already locked."),
+ 0x4000001A: ("STATUS_LOG_HARD_ERROR","Application popup: %1 : %2"),
+ 0x4000001B: ("STATUS_ALREADY_WIN32","A Win32 process already exists."),
+ 0x4000001C: ("STATUS_WX86_UNSIMULATE","An exception status code that is used by the Win32 x86 emulation subsystem."),
+ 0x4000001D: ("STATUS_WX86_CONTINUE","An exception status code that is used by the Win32 x86 emulation subsystem."),
+ 0x4000001E: ("STATUS_WX86_SINGLE_STEP","An exception status code that is used by the Win32 x86 emulation subsystem."),
+ 0x4000001F: ("STATUS_WX86_BREAKPOINT","An exception status code that is used by the Win32 x86 emulation subsystem."),
+ 0x40000020: ("STATUS_WX86_EXCEPTION_CONTINUE","An exception status code that is used by the Win32 x86 emulation subsystem."),
+ 0x40000021: ("STATUS_WX86_EXCEPTION_LASTCHANCE","An exception status code that is used by the Win32 x86 emulation subsystem."),
+ 0x40000022: ("STATUS_WX86_EXCEPTION_CHAIN","An exception status code that is used by the Win32 x86 emulation subsystem."),
+ 0x40000023: ("STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE","{Machine Type Mismatch} The image file %hs is valid but is for a machine type other than the current machine."),
+ 0x40000024: ("STATUS_NO_YIELD_PERFORMED","A yield execution was performed and no thread was available to run."),
+ 0x40000025: ("STATUS_TIMER_RESUME_IGNORED","The resume flag to a timer API was ignored."),
+ 0x40000026: ("STATUS_ARBITRATION_UNHANDLED","The arbiter has deferred arbitration of these resources to its parent."),
+ 0x40000027: ("STATUS_CARDBUS_NOT_SUPPORTED","The device has detected a CardBus card in its slot."),
+ 0x40000028: ("STATUS_WX86_CREATEWX86TIB","An exception status code that is used by the Win32 x86 emulation subsystem."),
+ 0x40000029: ("STATUS_MP_PROCESSOR_MISMATCH","The CPUs in this multiprocessor system are not all the same revision level. To use all processors, the operating system restricts itself to the features of the least capable processor in the system. If problems occur with this system, contact the CPU manufacturer to see if this mix of processors is supported."),
+ 0x4000002A: ("STATUS_HIBERNATED","The system was put into hibernation."),
+ 0x4000002B: ("STATUS_RESUME_HIBERNATION","The system was resumed from hibernation."),
+ 0x4000002C: ("STATUS_FIRMWARE_UPDATED","Windows has detected that the system firmware (BIOS) was updated [previous firmware date = %2, current firmware date %3]."),
+ 0x4000002D: ("STATUS_DRIVERS_LEAKING_LOCKED_PAGES","A device driver is leaking locked I/O pages and is causing system degradation. The system has automatically enabled the tracking code to try and catch the culprit."),
+ 0x4000002E: ("STATUS_MESSAGE_RETRIEVED","The ALPC message being canceled has already been retrieved from the queue on the other side."),
+ 0x4000002F: ("STATUS_SYSTEM_POWERSTATE_TRANSITION","The system power state is transitioning from %2 to %3."),
+ 0x40000030: ("STATUS_ALPC_CHECK_COMPLETION_LIST","The receive operation was successful. Check the ALPC completion list for the received message."),
+ 0x40000031: ("STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION","The system power state is transitioning from %2 to %3 but could enter %4."),
+ 0x40000032: ("STATUS_ACCESS_AUDIT_BY_POLICY","Access to %1 is monitored by policy rule %2."),
+ 0x40000033: ("STATUS_ABANDON_HIBERFILE","A valid hibernation file has been invalidated and should be abandoned."),
+ 0x40000034: ("STATUS_BIZRULES_NOT_ENABLED","Business rule scripts are disabled for the calling application."),
+ 0x40000294: ("STATUS_WAKE_SYSTEM","The system has awoken."),
+ 0x40000370: ("STATUS_DS_SHUTTING_DOWN","The directory service is shutting down."),
+ 0x40010001: ("DBG_REPLY_LATER","Debugger will reply later."),
+ 0x40010002: ("DBG_UNABLE_TO_PROVIDE_HANDLE","Debugger cannot provide a handle."),
+ 0x40010003: ("DBG_TERMINATE_THREAD","Debugger terminated the thread."),
+ 0x40010004: ("DBG_TERMINATE_PROCESS","Debugger terminated the process."),
+ 0x40010005: ("DBG_CONTROL_C","Debugger obtained control of C."),
+ 0x40010006: ("DBG_PRINTEXCEPTION_C","Debugger printed an exception on control C."),
+ 0x40010007: ("DBG_RIPEXCEPTION","Debugger received a RIP exception."),
+ 0x40010008: ("DBG_CONTROL_BREAK","Debugger received a control break."),
+ 0x40010009: ("DBG_COMMAND_EXCEPTION","Debugger command communication exception."),
+ 0x40020056: ("RPC_NT_UUID_LOCAL_ONLY","A UUID that is valid only on this computer has been allocated."),
+ 0x400200AF: ("RPC_NT_SEND_INCOMPLETE","Some data remains to be sent in the request buffer."),
+ 0x400A0004: ("STATUS_CTX_CDM_CONNECT","The Client Drive Mapping Service has connected on Terminal Connection."),
+ 0x400A0005: ("STATUS_CTX_CDM_DISCONNECT","The Client Drive Mapping Service has disconnected on Terminal Connection."),
+ 0x4015000D: ("STATUS_SXS_RELEASE_ACTIVATION_CONTEXT","A kernel mode component is releasing a reference on an activation context."),
+ 0x40190034: ("STATUS_RECOVERY_NOT_NEEDED","The transactional resource manager is already consistent. Recovery is not needed."),
+ 0x40190035: ("STATUS_RM_ALREADY_STARTED","The transactional resource manager has already been started."),
+ 0x401A000C: ("STATUS_LOG_NO_RESTART","The log service encountered a log stream with no restart area."),
+ 0x401B00EC: ("STATUS_VIDEO_DRIVER_DEBUG_REPORT_REQUEST","{Display Driver Recovered From Failure} The %hs display driver has detected a failure and recovered from it. Some graphical operations may have failed. The next time you restart the machine, a dialog box appears, giving you an opportunity to upload data about this failure to Microsoft."),
+ 0x401E000A: ("STATUS_GRAPHICS_PARTIAL_DATA_POPULATED","The specified buffer is not big enough to contain the entire requested dataset. Partial data is populated up to the size of the buffer. The caller needs to provide a buffer of the size as specified in the partially populated buffer's content (interface specific)."),
+ 0x401E0117: ("STATUS_GRAPHICS_DRIVER_MISMATCH","The kernel driver detected a version mismatch between it and the user mode driver."),
+ 0x401E0307: ("STATUS_GRAPHICS_MODE_NOT_PINNED","No mode is pinned on the specified VidPN source/target."),
+ 0x401E031E: ("STATUS_GRAPHICS_NO_PREFERRED_MODE","The specified mode set does not specify a preference for one of its modes."),
+ 0x401E034B: ("STATUS_GRAPHICS_DATASET_IS_EMPTY","The specified dataset (for example, mode set, frequency range set, descriptor set, or topology) is empty."),
+ 0x401E034C: ("STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET","The specified dataset (for example, mode set, frequency range set, descriptor set, or topology) does not contain any more elements."),
+ 0x401E0351: ("STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED","The specified content transformation is not pinned on the specified VidPN present path."),
+ 0x401E042F: ("STATUS_GRAPHICS_UNKNOWN_CHILD_STATUS","The child device presence was not reliably detected."),
+ 0x401E0437: ("STATUS_GRAPHICS_LEADLINK_START_DEFERRED","Starting the lead adapter in a linked configuration has been temporarily deferred."),
+ 0x401E0439: ("STATUS_GRAPHICS_POLLING_TOO_FREQUENTLY","The display adapter is being polled for children too frequently at the same polling level."),
+ 0x401E043A: ("STATUS_GRAPHICS_START_DEFERRED","Starting the adapter has been temporarily deferred."),
+ 0x40230001: ("STATUS_NDIS_INDICATION_REQUIRED","The request will be completed later by an NDIS status indication."),
+ 0x80000001: ("STATUS_GUARD_PAGE_VIOLATION","{EXCEPTION} Guard Page Exception A page of memory that marks the end of a data structure, such as a stack or an array, has been accessed."),
+ 0x80000002: ("STATUS_DATATYPE_MISALIGNMENT","{EXCEPTION} Alignment Fault A data type misalignment was detected in a load or store instruction."),
+ 0x80000003: ("STATUS_BREAKPOINT","{EXCEPTION} Breakpoint A breakpoint has been reached."),
+ 0x80000004: ("STATUS_SINGLE_STEP","{EXCEPTION} Single Step A single step or trace operation has just been completed."),
+ 0x80000005: ("STATUS_BUFFER_OVERFLOW","{Buffer Overflow} The data was too large to fit into the specified buffer."),
+ 0x80000006: ("STATUS_NO_MORE_FILES","{No More Files} No more files were found which match the file specification."),
+ 0x80000007: ("STATUS_WAKE_SYSTEM_DEBUGGER","{Kernel Debugger Awakened} The system debugger was awakened by an interrupt."),
+ 0x8000000A: ("STATUS_HANDLES_CLOSED","{Handles Closed} Handles to objects have been automatically closed because of the requested operation."),
+ 0x8000000B: ("STATUS_NO_INHERITANCE","{Non-Inheritable ACL} An access control list (ACL) contains no components that can be inherited."),
+ 0x8000000C: ("STATUS_GUID_SUBSTITUTION_MADE","{GUID Substitution} During the translation of a globally unique identifier (GUID) to a Windows security ID (SID), no administratively defined GUID prefix was found. A substitute prefix was used, which will not compromise system security. However, this may provide a more restrictive access than intended."),
+ 0x8000000D: ("STATUS_PARTIAL_COPY","Because of protection conflicts, not all the requested bytes could be copied."),
+ 0x8000000E: ("STATUS_DEVICE_PAPER_EMPTY","{Out of Paper} The printer is out of paper."),
+ 0x8000000F: ("STATUS_DEVICE_POWERED_OFF","{Device Power Is Off} The printer power has been turned off."),
+ 0x80000010: ("STATUS_DEVICE_OFF_LINE","{Device Offline} The printer has been taken offline."),
+ 0x80000011: ("STATUS_DEVICE_BUSY","{Device Busy} The device is currently busy."),
+ 0x80000012: ("STATUS_NO_MORE_EAS","{No More EAs} No more extended attributes (EAs) were found for the file."),
+ 0x80000013: ("STATUS_INVALID_EA_NAME","{Illegal EA} The specified extended attribute (EA) name contains at least one illegal character."),
+ 0x80000014: ("STATUS_EA_LIST_INCONSISTENT","{Inconsistent EA List} The extended attribute (EA) list is inconsistent."),
+ 0x80000015: ("STATUS_INVALID_EA_FLAG","{Invalid EA Flag} An invalid extended attribute (EA) flag was set."),
+ 0x80000016: ("STATUS_VERIFY_REQUIRED","{Verifying Disk} The media has changed and a verify operation is in progress; therefore, no reads or writes may be performed to the device, except those that are used in the verify operation."),
+ 0x80000017: ("STATUS_EXTRANEOUS_INFORMATION","{Too Much Information} The specified access control list (ACL) contained more information than was expected."),
+ 0x80000018: ("STATUS_RXACT_COMMIT_NECESSARY","This warning level status indicates that the transaction state already exists for the registry subtree, but that a transaction commit was previously aborted. The commit has NOT been completed but has not been rolled back either; therefore, it may still be committed, if needed."),
+ 0x8000001A: ("STATUS_NO_MORE_ENTRIES","{No More Entries} No more entries are available from an enumeration operation."),
+ 0x8000001B: ("STATUS_FILEMARK_DETECTED","{Filemark Found} A filemark was detected."),
+ 0x8000001C: ("STATUS_MEDIA_CHANGED","{Media Changed} The media may have changed."),
+ 0x8000001D: ("STATUS_BUS_RESET","{I/O Bus Reset} An I/O bus reset was detected."),
+ 0x8000001E: ("STATUS_END_OF_MEDIA","{End of Media} The end of the media was encountered."),
+ 0x8000001F: ("STATUS_BEGINNING_OF_MEDIA","The beginning of a tape or partition has been detected."),
+ 0x80000020: ("STATUS_MEDIA_CHECK","{Media Changed} The media may have changed."),
+ 0x80000021: ("STATUS_SETMARK_DETECTED","A tape access reached a set mark."),
+ 0x80000022: ("STATUS_NO_DATA_DETECTED","During a tape access, the end of the data written is reached."),
+ 0x80000023: ("STATUS_REDIRECTOR_HAS_OPEN_HANDLES","The redirector is in use and cannot be unloaded."),
+ 0x80000024: ("STATUS_SERVER_HAS_OPEN_HANDLES","The server is in use and cannot be unloaded."),
+ 0x80000025: ("STATUS_ALREADY_DISCONNECTED","The specified connection has already been disconnected."),
+ 0x80000026: ("STATUS_LONGJUMP","A long jump has been executed."),
+ 0x80000027: ("STATUS_CLEANER_CARTRIDGE_INSTALLED","A cleaner cartridge is present in the tape library."),
+ 0x80000028: ("STATUS_PLUGPLAY_QUERY_VETOED","The Plug and Play query operation was not successful."),
+ 0x80000029: ("STATUS_UNWIND_CONSOLIDATE","A frame consolidation has been executed."),
+ 0x8000002A: ("STATUS_REGISTRY_HIVE_RECOVERED","{Registry Hive Recovered} The registry hive (file): %hs was corrupted and it has been recovered. Some data might have been lost."),
+ 0x8000002B: ("STATUS_DLL_MIGHT_BE_INSECURE","The application is attempting to run executable code from the module %hs. This may be insecure. An alternative, %hs, is available. Should the application use the secure module %hs?"),
+ 0x8000002C: ("STATUS_DLL_MIGHT_BE_INCOMPATIBLE","The application is loading executable code from the module %hs. This is secure but may be incompatible with previous releases of the operating system. An alternative, %hs, is available. Should the application use the secure module %hs?"),
+ 0x8000002D: ("STATUS_STOPPED_ON_SYMLINK","The create operation stopped after reaching a symbolic link."),
+ 0x80000288: ("STATUS_DEVICE_REQUIRES_CLEANING","The device has indicated that cleaning is necessary."),
+ 0x80000289: ("STATUS_DEVICE_DOOR_OPEN","The device has indicated that its door is open. Further operations require it closed and secured."),
+ 0x80000803: ("STATUS_DATA_LOST_REPAIR","Windows discovered a corruption in the file %hs. This file has now been repaired. Check if any data in the file was lost because of the corruption."),
+ 0x80010001: ("DBG_EXCEPTION_NOT_HANDLED","Debugger did not handle the exception."),
+ 0x80130001: ("STATUS_CLUSTER_NODE_ALREADY_UP","The cluster node is already up."),
+ 0x80130002: ("STATUS_CLUSTER_NODE_ALREADY_DOWN","The cluster node is already down."),
+ 0x80130003: ("STATUS_CLUSTER_NETWORK_ALREADY_ONLINE","The cluster network is already online."),
+ 0x80130004: ("STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE","The cluster network is already offline."),
+ 0x80130005: ("STATUS_CLUSTER_NODE_ALREADY_MEMBER","The cluster node is already a member of the cluster."),
+ 0x80190009: ("STATUS_COULD_NOT_RESIZE_LOG","The log could not be set to the requested size."),
+ 0x80190029: ("STATUS_NO_TXF_METADATA","There is no transaction metadata on the file."),
+ 0x80190031: ("STATUS_CANT_RECOVER_WITH_HANDLE_OPEN","The file cannot be recovered because there is a handle still open on it."),
+ 0x80190041: ("STATUS_TXF_METADATA_ALREADY_PRESENT","Transaction metadata is already present on this file and cannot be superseded."),
+ 0x80190042: ("STATUS_TRANSACTION_SCOPE_CALLBACKS_NOT_SET","A transaction scope could not be entered because the scope handler has not been initialized."),
+ 0x801B00EB: ("STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED","{Display Driver Stopped Responding and recovered} The %hs display driver has stopped working normally. The recovery had been performed."),
+ 0x801C0001: ("STATUS_FLT_BUFFER_TOO_SMALL","{Buffer too small} The buffer is too small to contain the entry. No information has been written to the buffer."),
+ 0x80210001: ("STATUS_FVE_PARTIAL_METADATA","Volume metadata read or write is incomplete."),
+ 0x80210002: ("STATUS_FVE_TRANSIENT_STATE","BitLocker encryption keys were ignored because the volume was in a transient state."),
+ 0xC0000001: ("STATUS_UNSUCCESSFUL","{Operation Failed} The requested operation was unsuccessful."),
+ 0xC0000002: ("STATUS_NOT_IMPLEMENTED","{Not Implemented} The requested operation is not implemented."),
+ 0xC0000003: ("STATUS_INVALID_INFO_CLASS","{Invalid Parameter} The specified information class is not a valid information class for the specified object."),
+ 0xC0000004: ("STATUS_INFO_LENGTH_MISMATCH","The specified information record length does not match the length that is required for the specified information class."),
+ 0xC0000005: ("STATUS_ACCESS_VIOLATION","The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s."),
+ 0xC0000006: ("STATUS_IN_PAGE_ERROR","The instruction at 0x%08lx referenced memory at 0x%08lx. The required data was not placed into memory because of an I/O error status of 0x%08lx."),
+ 0xC0000007: ("STATUS_PAGEFILE_QUOTA","The page file quota for the process has been exhausted."),
+ 0xC0000008: ("STATUS_INVALID_HANDLE","An invalid HANDLE was specified."),
+ 0xC0000009: ("STATUS_BAD_INITIAL_STACK","An invalid initial stack was specified in a call to NtCreateThread."),
+ 0xC000000A: ("STATUS_BAD_INITIAL_PC","An invalid initial start address was specified in a call to NtCreateThread."),
+ 0xC000000B: ("STATUS_INVALID_CID","An invalid client ID was specified."),
+ 0xC000000C: ("STATUS_TIMER_NOT_CANCELED","An attempt was made to cancel or set a timer that has an associated APC and the specified thread is not the thread that originally set the timer with an associated APC routine."),
+ 0xC000000D: ("STATUS_INVALID_PARAMETER","An invalid parameter was passed to a service or function."),
+ 0xC000000E: ("STATUS_NO_SUCH_DEVICE","A device that does not exist was specified."),
+ 0xC000000F: ("STATUS_NO_SUCH_FILE","{File Not Found} The file %hs does not exist."),
+ 0xC0000010: ("STATUS_INVALID_DEVICE_REQUEST","The specified request is not a valid operation for the target device."),
+ 0xC0000011: ("STATUS_END_OF_FILE","The end-of-file marker has been reached. There is no valid data in the file beyond this marker."),
+ 0xC0000012: ("STATUS_WRONG_VOLUME","{Wrong Volume} The wrong volume is in the drive. Insert volume %hs into drive %hs."),
+ 0xC0000013: ("STATUS_NO_MEDIA_IN_DEVICE","{No Disk} There is no disk in the drive. Insert a disk into drive %hs."),
+ 0xC0000014: ("STATUS_UNRECOGNIZED_MEDIA","{Unknown Disk Format} The disk in drive %hs is not formatted properly. Check the disk, and reformat it, if needed."),
+ 0xC0000015: ("STATUS_NONEXISTENT_SECTOR","{Sector Not Found} The specified sector does not exist."),
+ 0xC0000016: ("STATUS_MORE_PROCESSING_REQUIRED","{Still Busy} The specified I/O request packet (IRP) cannot be disposed of because the I/O operation is not complete."),
+ 0xC0000017: ("STATUS_NO_MEMORY","{Not Enough Quota} Not enough virtual memory or paging file quota is available to complete the specified operation."),
+ 0xC0000018: ("STATUS_CONFLICTING_ADDRESSES","{Conflicting Address Range} The specified address range conflicts with the address space."),
+ 0xC0000019: ("STATUS_NOT_MAPPED_VIEW","The address range to unmap is not a mapped view."),
+ 0xC000001A: ("STATUS_UNABLE_TO_FREE_VM","The virtual memory cannot be freed."),
+ 0xC000001B: ("STATUS_UNABLE_TO_DELETE_SECTION","The specified section cannot be deleted."),
+ 0xC000001C: ("STATUS_INVALID_SYSTEM_SERVICE","An invalid system service was specified in a system service call."),
+ 0xC000001D: ("STATUS_ILLEGAL_INSTRUCTION","{EXCEPTION} Illegal Instruction An attempt was made to execute an illegal instruction."),
+ 0xC000001E: ("STATUS_INVALID_LOCK_SEQUENCE","{Invalid Lock Sequence} An attempt was made to execute an invalid lock sequence."),
+ 0xC000001F: ("STATUS_INVALID_VIEW_SIZE","{Invalid Mapping} An attempt was made to create a view for a section that is bigger than the section."),
+ 0xC0000020: ("STATUS_INVALID_FILE_FOR_SECTION","{Bad File} The attributes of the specified mapping file for a section of memory cannot be read."),
+ 0xC0000021: ("STATUS_ALREADY_COMMITTED","{Already Committed} The specified address range is already committed."),
+ 0xC0000022: ("STATUS_ACCESS_DENIED","{Access Denied} A process has requested access to an object but has not been granted those access rights."),
+ 0xC0000023: ("STATUS_BUFFER_TOO_SMALL","{Buffer Too Small} The buffer is too small to contain the entry. No information has been written to the buffer."),
+ 0xC0000024: ("STATUS_OBJECT_TYPE_MISMATCH","{Wrong Type} There is a mismatch between the type of object that is required by the requested operation and the type of object that is specified in the request."),
+ 0xC0000025: ("STATUS_NONCONTINUABLE_EXCEPTION","{EXCEPTION} Cannot Continue Windows cannot continue from this exception."),
+ 0xC0000026: ("STATUS_INVALID_DISPOSITION","An invalid exception disposition was returned by an exception handler."),
+ 0xC0000027: ("STATUS_UNWIND","Unwind exception code."),
+ 0xC0000028: ("STATUS_BAD_STACK","An invalid or unaligned stack was encountered during an unwind operation."),
+ 0xC0000029: ("STATUS_INVALID_UNWIND_TARGET","An invalid unwind target was encountered during an unwind operation."),
+ 0xC000002A: ("STATUS_NOT_LOCKED","An attempt was made to unlock a page of memory that was not locked."),
+ 0xC000002B: ("STATUS_PARITY_ERROR","A device parity error on an I/O operation."),
+ 0xC000002C: ("STATUS_UNABLE_TO_DECOMMIT_VM","An attempt was made to decommit uncommitted virtual memory."),
+ 0xC000002D: ("STATUS_NOT_COMMITTED","An attempt was made to change the attributes on memory that has not been committed."),
+ 0xC000002E: ("STATUS_INVALID_PORT_ATTRIBUTES","Invalid object attributes specified to NtCreatePort or invalid port attributes specified to NtConnectPort."),
+ 0xC000002F: ("STATUS_PORT_MESSAGE_TOO_LONG","The length of the message that was passed to NtRequestPort or NtRequestWaitReplyPort is longer than the maximum message that is allowed by the port."),
+ 0xC0000030: ("STATUS_INVALID_PARAMETER_MIX","An invalid combination of parameters was specified."),
+ 0xC0000031: ("STATUS_INVALID_QUOTA_LOWER","An attempt was made to lower a quota limit below the current usage."),
+ 0xC0000032: ("STATUS_DISK_CORRUPT_ERROR","{Corrupt Disk} The file system structure on the disk is corrupt and unusable. Run the Chkdsk utility on the volume %hs."),
+ 0xC0000033: ("STATUS_OBJECT_NAME_INVALID","The object name is invalid."),
+ 0xC0000034: ("STATUS_OBJECT_NAME_NOT_FOUND","The object name is not found."),
+ 0xC0000035: ("STATUS_OBJECT_NAME_COLLISION","The object name already exists."),
+ 0xC0000037: ("STATUS_PORT_DISCONNECTED","An attempt was made to send a message to a disconnected communication port."),
+ 0xC0000038: ("STATUS_DEVICE_ALREADY_ATTACHED","An attempt was made to attach to a device that was already attached to another device."),
+ 0xC0000039: ("STATUS_OBJECT_PATH_INVALID","The object path component was not a directory object."),
+ 0xC000003A: ("STATUS_OBJECT_PATH_NOT_FOUND","{Path Not Found} The path %hs does not exist."),
+ 0xC000003B: ("STATUS_OBJECT_PATH_SYNTAX_BAD","The object path component was not a directory object."),
+ 0xC000003C: ("STATUS_DATA_OVERRUN","{Data Overrun} A data overrun error occurred."),
+ 0xC000003D: ("STATUS_DATA_LATE_ERROR","{Data Late} A data late error occurred."),
+ 0xC000003E: ("STATUS_DATA_ERROR","{Data Error} An error occurred in reading or writing data."),
+ 0xC000003F: ("STATUS_CRC_ERROR","{Bad CRC} A cyclic redundancy check (CRC) checksum error occurred."),
+ 0xC0000040: ("STATUS_SECTION_TOO_BIG","{Section Too Large} The specified section is too big to map the file."),
+ 0xC0000041: ("STATUS_PORT_CONNECTION_REFUSED","The NtConnectPort request is refused."),
+ 0xC0000042: ("STATUS_INVALID_PORT_HANDLE","The type of port handle is invalid for the operation that is requested."),
+ 0xC0000043: ("STATUS_SHARING_VIOLATION","A file cannot be opened because the share access flags are incompatible."),
+ 0xC0000044: ("STATUS_QUOTA_EXCEEDED","Insufficient quota exists to complete the operation."),
+ 0xC0000045: ("STATUS_INVALID_PAGE_PROTECTION","The specified page protection was not valid."),
+ 0xC0000046: ("STATUS_MUTANT_NOT_OWNED","An attempt to release a mutant object was made by a thread that was not the owner of the mutant object."),
+ 0xC0000047: ("STATUS_SEMAPHORE_LIMIT_EXCEEDED","An attempt was made to release a semaphore such that its maximum count would have been exceeded."),
+ 0xC0000048: ("STATUS_PORT_ALREADY_SET","An attempt was made to set the DebugPort or ExceptionPort of a process, but a port already exists in the process, or an attempt was made to set the CompletionPort of a file but a port was already set in the file, or an attempt was made to set the associated completion port of an ALPC port but it is already set."),
+ 0xC0000049: ("STATUS_SECTION_NOT_IMAGE","An attempt was made to query image information on a section that does not map an image."),
+ 0xC000004A: ("STATUS_SUSPEND_COUNT_EXCEEDED","An attempt was made to suspend a thread whose suspend count was at its maximum."),
+ 0xC000004B: ("STATUS_THREAD_IS_TERMINATING","An attempt was made to suspend a thread that has begun termination."),
+ 0xC000004C: ("STATUS_BAD_WORKING_SET_LIMIT","An attempt was made to set the working set limit to an invalid value (for example, the minimum greater than maximum)."),
+ 0xC000004D: ("STATUS_INCOMPATIBLE_FILE_MAP","A section was created to map a file that is not compatible with an already existing section that maps the same file."),
+ 0xC000004E: ("STATUS_SECTION_PROTECTION","A view to a section specifies a protection that is incompatible with the protection of the initial view."),
+ 0xC000004F: ("STATUS_EAS_NOT_SUPPORTED","An operation involving EAs failed because the file system does not support EAs."),
+ 0xC0000050: ("STATUS_EA_TOO_LARGE","An EA operation failed because the EA set is too large."),
+ 0xC0000051: ("STATUS_NONEXISTENT_EA_ENTRY","An EA operation failed because the name or EA index is invalid."),
+ 0xC0000052: ("STATUS_NO_EAS_ON_FILE","The file for which EAs were requested has no EAs."),
+ 0xC0000053: ("STATUS_EA_CORRUPT_ERROR","The EA is corrupt and cannot be read."),
+ 0xC0000054: ("STATUS_FILE_LOCK_CONFLICT","A requested read/write cannot be granted due to a conflicting file lock."),
+ 0xC0000055: ("STATUS_LOCK_NOT_GRANTED","A requested file lock cannot be granted due to other existing locks."),
+ 0xC0000056: ("STATUS_DELETE_PENDING","A non-close operation has been requested of a file object that has a delete pending."),
+ 0xC0000057: ("STATUS_CTL_FILE_NOT_SUPPORTED","An attempt was made to set the control attribute on a file. This attribute is not supported in the destination file system."),
+ 0xC0000058: ("STATUS_UNKNOWN_REVISION","Indicates a revision number that was encountered or specified is not one that is known by the service. It may be a more recent revision than the service is aware of."),
+ 0xC0000059: ("STATUS_REVISION_MISMATCH","Indicates that two revision levels are incompatible."),
+ 0xC000005A: ("STATUS_INVALID_OWNER","Indicates a particular security ID may not be assigned as the owner of an object."),
+ 0xC000005B: ("STATUS_INVALID_PRIMARY_GROUP","Indicates a particular security ID may not be assigned as the primary group of an object."),
+ 0xC000005C: ("STATUS_NO_IMPERSONATION_TOKEN","An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client."),
+ 0xC000005D: ("STATUS_CANT_DISABLE_MANDATORY","A mandatory group may not be disabled."),
+ 0xC000005E: ("STATUS_NO_LOGON_SERVERS","No logon servers are currently available to service the logon request."),
+ 0xC000005F: ("STATUS_NO_SUCH_LOGON_SESSION","A specified logon session does not exist. It may already have been terminated."),
+ 0xC0000060: ("STATUS_NO_SUCH_PRIVILEGE","A specified privilege does not exist."),
+ 0xC0000061: ("STATUS_PRIVILEGE_NOT_HELD","A required privilege is not held by the client."),
+ 0xC0000062: ("STATUS_INVALID_ACCOUNT_NAME","The name provided is not a properly formed account name."),
+ 0xC0000063: ("STATUS_USER_EXISTS","The specified account already exists."),
+ 0xC0000064: ("STATUS_NO_SUCH_USER","The specified account does not exist."),
+ 0xC0000065: ("STATUS_GROUP_EXISTS","The specified group already exists."),
+ 0xC0000066: ("STATUS_NO_SUCH_GROUP","The specified group does not exist."),
+ 0xC0000067: ("STATUS_MEMBER_IN_GROUP","The specified user account is already in the specified group account. Also used to indicate a group cannot be deleted because it contains a member."),
+ 0xC0000068: ("STATUS_MEMBER_NOT_IN_GROUP","The specified user account is not a member of the specified group account."),
+ 0xC0000069: ("STATUS_LAST_ADMIN","Indicates the requested operation would disable or delete the last remaining administration account. This is not allowed to prevent creating a situation in which the system cannot be administrated."),
+ 0xC000006A: ("STATUS_WRONG_PASSWORD","When trying to update a password, this return status indicates that the value provided as the current password is not correct."),
+ 0xC000006B: ("STATUS_ILL_FORMED_PASSWORD","When trying to update a password, this return status indicates that the value provided for the new password contains values that are not allowed in passwords."),
+ 0xC000006C: ("STATUS_PASSWORD_RESTRICTION","When trying to update a password, this status indicates that some password update rule has been violated. For example, the password may not meet length criteria."),
+ 0xC000006D: ("STATUS_LOGON_FAILURE","The attempted logon is invalid. This is either due to a bad username or authentication information."),
+ 0xC000006E: ("STATUS_ACCOUNT_RESTRICTION","Indicates a referenced user name and authentication information are valid, but some user account restriction has prevented successful authentication (such as time-of-day restrictions)."),
+ 0xC000006F: ("STATUS_INVALID_LOGON_HOURS","The user account has time restrictions and may not be logged onto at this time."),
+ 0xC0000070: ("STATUS_INVALID_WORKSTATION","The user account is restricted so that it may not be used to log on from the source workstation."),
+ 0xC0000071: ("STATUS_PASSWORD_EXPIRED","The user account password has expired."),
+ 0xC0000072: ("STATUS_ACCOUNT_DISABLED","The referenced account is currently disabled and may not be logged on to."),
+ 0xC0000073: ("STATUS_NONE_MAPPED","None of the information to be translated has been translated."),
+ 0xC0000074: ("STATUS_TOO_MANY_LUIDS_REQUESTED","The number of LUIDs requested may not be allocated with a single allocation."),
+ 0xC0000075: ("STATUS_LUIDS_EXHAUSTED","Indicates there are no more LUIDs to allocate."),
+ 0xC0000076: ("STATUS_INVALID_SUB_AUTHORITY","Indicates the sub-authority value is invalid for the particular use."),
+ 0xC0000077: ("STATUS_INVALID_ACL","Indicates the ACL structure is not valid."),
+ 0xC0000078: ("STATUS_INVALID_SID","Indicates the SID structure is not valid."),
+ 0xC0000079: ("STATUS_INVALID_SECURITY_DESCR","Indicates the SECURITY_DESCRIPTOR structure is not valid."),
+ 0xC000007A: ("STATUS_PROCEDURE_NOT_FOUND","Indicates the specified procedure address cannot be found in the DLL."),
+ 0xC000007B: ("STATUS_INVALID_IMAGE_FORMAT","{Bad Image} %hs is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support."),
+ 0xC000007C: ("STATUS_NO_TOKEN","An attempt was made to reference a token that does not exist. This is typically done by referencing the token that is associated with a thread when the thread is not impersonating a client."),
+ 0xC000007D: ("STATUS_BAD_INHERITANCE_ACL","Indicates that an attempt to build either an inherited ACL or ACE was not successful. This can be caused by a number of things. One of the more probable causes is the replacement of a CreatorId with a SID that did not fit into the ACE or ACL."),
+ 0xC000007E: ("STATUS_RANGE_NOT_LOCKED","The range specified in NtUnlockFile was not locked."),
+ 0xC000007F: ("STATUS_DISK_FULL","An operation failed because the disk was full."),
+ 0xC0000080: ("STATUS_SERVER_DISABLED","The GUID allocation server is disabled at the moment."),
+ 0xC0000081: ("STATUS_SERVER_NOT_DISABLED","The GUID allocation server is enabled at the moment."),
+ 0xC0000082: ("STATUS_TOO_MANY_GUIDS_REQUESTED","Too many GUIDs were requested from the allocation server at once."),
+ 0xC0000083: ("STATUS_GUIDS_EXHAUSTED","The GUIDs could not be allocated because the Authority Agent was exhausted."),
+ 0xC0000084: ("STATUS_INVALID_ID_AUTHORITY","The value provided was an invalid value for an identifier authority."),
+ 0xC0000085: ("STATUS_AGENTS_EXHAUSTED","No more authority agent values are available for the particular identifier authority value."),
+ 0xC0000086: ("STATUS_INVALID_VOLUME_LABEL","An invalid volume label has been specified."),
+ 0xC0000087: ("STATUS_SECTION_NOT_EXTENDED","A mapped section could not be extended."),
+ 0xC0000088: ("STATUS_NOT_MAPPED_DATA","Specified section to flush does not map a data file."),
+ 0xC0000089: ("STATUS_RESOURCE_DATA_NOT_FOUND","Indicates the specified image file did not contain a resource section."),
+ 0xC000008A: ("STATUS_RESOURCE_TYPE_NOT_FOUND","Indicates the specified resource type cannot be found in the image file."),
+ 0xC000008B: ("STATUS_RESOURCE_NAME_NOT_FOUND","Indicates the specified resource name cannot be found in the image file."),
+ 0xC000008C: ("STATUS_ARRAY_BOUNDS_EXCEEDED","{EXCEPTION} Array bounds exceeded."),
+ 0xC000008D: ("STATUS_FLOAT_DENORMAL_OPERAND","{EXCEPTION} Floating-point denormal operand."),
+ 0xC000008E: ("STATUS_FLOAT_DIVIDE_BY_ZERO","{EXCEPTION} Floating-point division by zero."),
+ 0xC000008F: ("STATUS_FLOAT_INEXACT_RESULT","{EXCEPTION} Floating-point inexact result."),
+ 0xC0000090: ("STATUS_FLOAT_INVALID_OPERATION","{EXCEPTION} Floating-point invalid operation."),
+ 0xC0000091: ("STATUS_FLOAT_OVERFLOW","{EXCEPTION} Floating-point overflow."),
+ 0xC0000092: ("STATUS_FLOAT_STACK_CHECK","{EXCEPTION} Floating-point stack check."),
+ 0xC0000093: ("STATUS_FLOAT_UNDERFLOW","{EXCEPTION} Floating-point underflow."),
+ 0xC0000094: ("STATUS_INTEGER_DIVIDE_BY_ZERO","{EXCEPTION} Integer division by zero."),
+ 0xC0000095: ("STATUS_INTEGER_OVERFLOW","{EXCEPTION} Integer overflow."),
+ 0xC0000096: ("STATUS_PRIVILEGED_INSTRUCTION","{EXCEPTION} Privileged instruction."),
+ 0xC0000097: ("STATUS_TOO_MANY_PAGING_FILES","An attempt was made to install more paging files than the system supports."),
+ 0xC0000098: ("STATUS_FILE_INVALID","The volume for a file has been externally altered such that the opened file is no longer valid."),
+ 0xC0000099: ("STATUS_ALLOTTED_SPACE_EXCEEDED","When a block of memory is allotted for future updates, such as the memory allocated to hold discretionary access control and primary group information, successive updates may exceed the amount of memory originally allotted. Because a quota may already have been charged to several processes that have handles to the object, it is not reasonable to alter the size of the allocated memory. Instead, a request that requires more memory than has been allotted must fail and the STATUS_ALLOTTED_SPACE_EXCEEDED error returned."),
+ 0xC000009A: ("STATUS_INSUFFICIENT_RESOURCES","Insufficient system resources exist to complete the API."),
+ 0xC000009B: ("STATUS_DFS_EXIT_PATH_FOUND","An attempt has been made to open a DFS exit path control file."),
+ 0xC000009C: ("STATUS_DEVICE_DATA_ERROR","There are bad blocks (sectors) on the hard disk."),
+ 0xC000009D: ("STATUS_DEVICE_NOT_CONNECTED","There is bad cabling, non-termination, or the controller is not able to obtain access to the hard disk."),
+ 0xC000009F: ("STATUS_FREE_VM_NOT_AT_BASE","Virtual memory cannot be freed because the base address is not the base of the region and a region size of zero was specified."),
+ 0xC00000A0: ("STATUS_MEMORY_NOT_ALLOCATED","An attempt was made to free virtual memory that is not allocated."),
+ 0xC00000A1: ("STATUS_WORKING_SET_QUOTA","The working set is not big enough to allow the requested pages to be locked."),
+ 0xC00000A2: ("STATUS_MEDIA_WRITE_PROTECTED","{Write Protect Error} The disk cannot be written to because it is write-protected. Remove the write protection from the volume %hs in drive %hs."),
+ 0xC00000A3: ("STATUS_DEVICE_NOT_READY","{Drive Not Ready} The drive is not ready for use; its door may be open. Check drive %hs and make sure that a disk is inserted and that the drive door is closed."),
+ 0xC00000A4: ("STATUS_INVALID_GROUP_ATTRIBUTES","The specified attributes are invalid or are incompatible with the attributes for the group as a whole."),
+ 0xC00000A5: ("STATUS_BAD_IMPERSONATION_LEVEL","A specified impersonation level is invalid. Also used to indicate that a required impersonation level was not provided."),
+ 0xC00000A6: ("STATUS_CANT_OPEN_ANONYMOUS","An attempt was made to open an anonymous-level token. Anonymous tokens may not be opened."),
+ 0xC00000A7: ("STATUS_BAD_VALIDATION_CLASS","The validation information class requested was invalid."),
+ 0xC00000A8: ("STATUS_BAD_TOKEN_TYPE","The type of a token object is inappropriate for its attempted use."),
+ 0xC00000A9: ("STATUS_BAD_MASTER_BOOT_RECORD","The type of a token object is inappropriate for its attempted use."),
+ 0xC00000AA: ("STATUS_INSTRUCTION_MISALIGNMENT","An attempt was made to execute an instruction at an unaligned address and the host system does not support unaligned instruction references."),
+ 0xC00000AB: ("STATUS_INSTANCE_NOT_AVAILABLE","The maximum named pipe instance count has been reached."),
+ 0xC00000AC: ("STATUS_PIPE_NOT_AVAILABLE","An instance of a named pipe cannot be found in the listening state."),
+ 0xC00000AD: ("STATUS_INVALID_PIPE_STATE","The named pipe is not in the connected or closing state."),
+ 0xC00000AE: ("STATUS_PIPE_BUSY","The specified pipe is set to complete operations and there are current I/O operations queued so that it cannot be changed to queue operations."),
+ 0xC00000AF: ("STATUS_ILLEGAL_FUNCTION","The specified handle is not open to the server end of the named pipe."),
+ 0xC00000B0: ("STATUS_PIPE_DISCONNECTED","The specified named pipe is in the disconnected state."),
+ 0xC00000B1: ("STATUS_PIPE_CLOSING","The specified named pipe is in the closing state."),
+ 0xC00000B2: ("STATUS_PIPE_CONNECTED","The specified named pipe is in the connected state."),
+ 0xC00000B3: ("STATUS_PIPE_LISTENING","The specified named pipe is in the listening state."),
+ 0xC00000B4: ("STATUS_INVALID_READ_MODE","The specified named pipe is not in message mode."),
+ 0xC00000B5: ("STATUS_IO_TIMEOUT","{Device Timeout} The specified I/O operation on %hs was not completed before the time-out period expired."),
+ 0xC00000B6: ("STATUS_FILE_FORCED_CLOSED","The specified file has been closed by another process."),
+ 0xC00000B7: ("STATUS_PROFILING_NOT_STARTED","Profiling is not started."),
+ 0xC00000B8: ("STATUS_PROFILING_NOT_STOPPED","Profiling is not stopped."),
+ 0xC00000B9: ("STATUS_COULD_NOT_INTERPRET","The passed ACL did not contain the minimum required information."),
+ 0xC00000BA: ("STATUS_FILE_IS_A_DIRECTORY","The file that was specified as a target is a directory, and the caller specified that it could be anything but a directory."),
+ 0xC00000BB: ("STATUS_NOT_SUPPORTED","The request is not supported."),
+ 0xC00000BC: ("STATUS_REMOTE_NOT_LISTENING","This remote computer is not listening."),
+ 0xC00000BD: ("STATUS_DUPLICATE_NAME","A duplicate name exists on the network."),
+ 0xC00000BE: ("STATUS_BAD_NETWORK_PATH","The network path cannot be located."),
+ 0xC00000BF: ("STATUS_NETWORK_BUSY","The network is busy."),
+ 0xC00000C0: ("STATUS_DEVICE_DOES_NOT_EXIST","This device does not exist."),
+ 0xC00000C1: ("STATUS_TOO_MANY_COMMANDS","The network BIOS command limit has been reached."),
+ 0xC00000C2: ("STATUS_ADAPTER_HARDWARE_ERROR","An I/O adapter hardware error has occurred."),
+ 0xC00000C3: ("STATUS_INVALID_NETWORK_RESPONSE","The network responded incorrectly."),
+ 0xC00000C4: ("STATUS_UNEXPECTED_NETWORK_ERROR","An unexpected network error occurred."),
+ 0xC00000C5: ("STATUS_BAD_REMOTE_ADAPTER","The remote adapter is not compatible."),
+ 0xC00000C6: ("STATUS_PRINT_QUEUE_FULL","The print queue is full."),
+ 0xC00000C7: ("STATUS_NO_SPOOL_SPACE","Space to store the file that is waiting to be printed is not available on the server."),
+ 0xC00000C8: ("STATUS_PRINT_CANCELLED","The requested print file has been canceled."),
+ 0xC00000C9: ("STATUS_NETWORK_NAME_DELETED","The network name was deleted."),
+ 0xC00000CA: ("STATUS_NETWORK_ACCESS_DENIED","Network access is denied."),
+ 0xC00000CB: ("STATUS_BAD_DEVICE_TYPE","{Incorrect Network Resource Type} The specified device type (LPT, for example) conflicts with the actual device type on the remote resource."),
+ 0xC00000CC: ("STATUS_BAD_NETWORK_NAME","{Network Name Not Found} The specified share name cannot be found on the remote server."),
+ 0xC00000CD: ("STATUS_TOO_MANY_NAMES","The name limit for the network adapter card of the local computer was exceeded."),
+ 0xC00000CE: ("STATUS_TOO_MANY_SESSIONS","The network BIOS session limit was exceeded."),
+ 0xC00000CF: ("STATUS_SHARING_PAUSED","File sharing has been temporarily paused."),
+ 0xC00000D0: ("STATUS_REQUEST_NOT_ACCEPTED","No more connections can be made to this remote computer at this time because the computer has already accepted the maximum number of connections."),
+ 0xC00000D1: ("STATUS_REDIRECTOR_PAUSED","Print or disk redirection is temporarily paused."),
+ 0xC00000D2: ("STATUS_NET_WRITE_FAULT","A network data fault occurred."),
+ 0xC00000D3: ("STATUS_PROFILING_AT_LIMIT","The number of active profiling objects is at the maximum and no more may be started."),
+ 0xC00000D4: ("STATUS_NOT_SAME_DEVICE","{Incorrect Volume} The destination file of a rename request is located on a different device than the source of the rename request."),
+ 0xC00000D5: ("STATUS_FILE_RENAMED","The specified file has been renamed and thus cannot be modified."),
+ 0xC00000D6: ("STATUS_VIRTUAL_CIRCUIT_CLOSED","{Network Request Timeout} The session with a remote server has been disconnected because the time-out interval for a request has expired."),
+ 0xC00000D7: ("STATUS_NO_SECURITY_ON_OBJECT","Indicates an attempt was made to operate on the security of an object that does not have security associated with it."),
+ 0xC00000D8: ("STATUS_CANT_WAIT","Used to indicate that an operation cannot continue without blocking for I/O."),
+ 0xC00000D9: ("STATUS_PIPE_EMPTY","Used to indicate that a read operation was done on an empty pipe."),
+ 0xC00000DA: ("STATUS_CANT_ACCESS_DOMAIN_INFO","Configuration information could not be read from the domain controller, either because the machine is unavailable or access has been denied."),
+ 0xC00000DB: ("STATUS_CANT_TERMINATE_SELF","Indicates that a thread attempted to terminate itself by default (called NtTerminateThread with NULL) and it was the last thread in the current process."),
+ 0xC00000DC: ("STATUS_INVALID_SERVER_STATE","Indicates the Sam Server was in the wrong state to perform the desired operation."),
+ 0xC00000DD: ("STATUS_INVALID_DOMAIN_STATE","Indicates the domain was in the wrong state to perform the desired operation."),
+ 0xC00000DE: ("STATUS_INVALID_DOMAIN_ROLE","This operation is only allowed for the primary domain controller of the domain."),
+ 0xC00000DF: ("STATUS_NO_SUCH_DOMAIN","The specified domain did not exist."),
+ 0xC00000E0: ("STATUS_DOMAIN_EXISTS","The specified domain already exists."),
+ 0xC00000E1: ("STATUS_DOMAIN_LIMIT_EXCEEDED","An attempt was made to exceed the limit on the number of domains per server for this release."),
+ 0xC00000E2: ("STATUS_OPLOCK_NOT_GRANTED","An error status returned when the opportunistic lock (oplock) request is denied."),
+ 0xC00000E3: ("STATUS_INVALID_OPLOCK_PROTOCOL","An error status returned when an invalid opportunistic lock (oplock) acknowledgment is received by a file system."),
+ 0xC00000E4: ("STATUS_INTERNAL_DB_CORRUPTION","This error indicates that the requested operation cannot be completed due to a catastrophic media failure or an on-disk data structure corruption."),
+ 0xC00000E5: ("STATUS_INTERNAL_ERROR","An internal error occurred."),
+ 0xC00000E6: ("STATUS_GENERIC_NOT_MAPPED","Indicates generic access types were contained in an access mask which should already be mapped to non-generic access types."),
+ 0xC00000E7: ("STATUS_BAD_DESCRIPTOR_FORMAT","Indicates a security descriptor is not in the necessary format (absolute or self-relative)."),
+ 0xC00000E8: ("STATUS_INVALID_USER_BUFFER","An access to a user buffer failed at an expected point in time. This code is defined because the caller does not want to accept STATUS_ACCESS_VIOLATION in its filter."),
+ 0xC00000E9: ("STATUS_UNEXPECTED_IO_ERROR","If an I/O error that is not defined in the standard FsRtl filter is returned, it is converted to the following error, which is guaranteed to be in the filter. In this case, information is lost; however, the filter correctly handles the exception."),
+ 0xC00000EA: ("STATUS_UNEXPECTED_MM_CREATE_ERR","If an MM error that is not defined in the standard FsRtl filter is returned, it is converted to one of the following errors, which are guaranteed to be in the filter. In this case, information is lost; however, the filter correctly handles the exception."),
+ 0xC00000EB: ("STATUS_UNEXPECTED_MM_MAP_ERROR","If an MM error that is not defined in the standard FsRtl filter is returned, it is converted to one of the following errors, which are guaranteed to be in the filter. In this case, information is lost; however, the filter correctly handles the exception."),
+ 0xC00000EC: ("STATUS_UNEXPECTED_MM_EXTEND_ERR","If an MM error that is not defined in the standard FsRtl filter is returned, it is converted to one of the following errors, which are guaranteed to be in the filter. In this case, information is lost; however, the filter correctly handles the exception."),
+ 0xC00000ED: ("STATUS_NOT_LOGON_PROCESS","The requested action is restricted for use by logon processes only. The calling process has not registered as a logon process."),
+ 0xC00000EE: ("STATUS_LOGON_SESSION_EXISTS","An attempt has been made to start a new session manager or LSA logon session by using an ID that is already in use."),
+ 0xC00000EF: ("STATUS_INVALID_PARAMETER_1","An invalid parameter was passed to a service or function as the first argument."),
+ 0xC00000F0: ("STATUS_INVALID_PARAMETER_2","An invalid parameter was passed to a service or function as the second argument."),
+ 0xC00000F1: ("STATUS_INVALID_PARAMETER_3","An invalid parameter was passed to a service or function as the third argument."),
+ 0xC00000F2: ("STATUS_INVALID_PARAMETER_4","An invalid parameter was passed to a service or function as the fourth argument."),
+ 0xC00000F3: ("STATUS_INVALID_PARAMETER_5","An invalid parameter was passed to a service or function as the fifth argument."),
+ 0xC00000F4: ("STATUS_INVALID_PARAMETER_6","An invalid parameter was passed to a service or function as the sixth argument."),
+ 0xC00000F5: ("STATUS_INVALID_PARAMETER_7","An invalid parameter was passed to a service or function as the seventh argument."),
+ 0xC00000F6: ("STATUS_INVALID_PARAMETER_8","An invalid parameter was passed to a service or function as the eighth argument."),
+ 0xC00000F7: ("STATUS_INVALID_PARAMETER_9","An invalid parameter was passed to a service or function as the ninth argument."),
+ 0xC00000F8: ("STATUS_INVALID_PARAMETER_10","An invalid parameter was passed to a service or function as the tenth argument."),
+ 0xC00000F9: ("STATUS_INVALID_PARAMETER_11","An invalid parameter was passed to a service or function as the eleventh argument."),
+ 0xC00000FA: ("STATUS_INVALID_PARAMETER_12","An invalid parameter was passed to a service or function as the twelfth argument."),
+ 0xC00000FB: ("STATUS_REDIRECTOR_NOT_STARTED","An attempt was made to access a network file, but the network software was not yet started."),
+ 0xC00000FC: ("STATUS_REDIRECTOR_STARTED","An attempt was made to start the redirector, but the redirector has already been started."),
+ 0xC00000FD: ("STATUS_STACK_OVERFLOW","A new guard page for the stack cannot be created."),
+ 0xC00000FE: ("STATUS_NO_SUCH_PACKAGE","A specified authentication package is unknown."),
+ 0xC00000FF: ("STATUS_BAD_FUNCTION_TABLE","A malformed function table was encountered during an unwind operation."),
+ 0xC0000100: ("STATUS_VARIABLE_NOT_FOUND","Indicates the specified environment variable name was not found in the specified environment block."),
+ 0xC0000101: ("STATUS_DIRECTORY_NOT_EMPTY","Indicates that the directory trying to be deleted is not empty."),
+ 0xC0000102: ("STATUS_FILE_CORRUPT_ERROR","{Corrupt File} The file or directory %hs is corrupt and unreadable. Run the Chkdsk utility."),
+ 0xC0000103: ("STATUS_NOT_A_DIRECTORY","A requested opened file is not a directory."),
+ 0xC0000104: ("STATUS_BAD_LOGON_SESSION_STATE","The logon session is not in a state that is consistent with the requested operation."),
+ 0xC0000105: ("STATUS_LOGON_SESSION_COLLISION","An internal LSA error has occurred. An authentication package has requested the creation of a logon session but the ID of an already existing logon session has been specified."),
+ 0xC0000106: ("STATUS_NAME_TOO_LONG","A specified name string is too long for its intended use."),
+ 0xC0000107: ("STATUS_FILES_OPEN","The user attempted to force close the files on a redirected drive, but there were opened files on the drive, and the user did not specify a sufficient level of force."),
+ 0xC0000108: ("STATUS_CONNECTION_IN_USE","The user attempted to force close the files on a redirected drive, but there were opened directories on the drive, and the user did not specify a sufficient level of force."),
+ 0xC0000109: ("STATUS_MESSAGE_NOT_FOUND","RtlFindMessage could not locate the requested message ID in the message table resource."),
+ 0xC000010A: ("STATUS_PROCESS_IS_TERMINATING","An attempt was made to duplicate an object handle into or out of an exiting process."),
+ 0xC000010B: ("STATUS_INVALID_LOGON_TYPE","Indicates an invalid value has been provided for the LogonType requested."),
+ 0xC000010C: ("STATUS_NO_GUID_TRANSLATION","Indicates that an attempt was made to assign protection to a file system file or directory and one of the SIDs in the security descriptor could not be translated into a GUID that could be stored by the file system. This causes the protection attempt to fail, which may cause a file creation attempt to fail."),
+ 0xC000010D: ("STATUS_CANNOT_IMPERSONATE","Indicates that an attempt has been made to impersonate via a named pipe that has not yet been read from."),
+ 0xC000010E: ("STATUS_IMAGE_ALREADY_LOADED","Indicates that the specified image is already loaded."),
+ 0xC0000117: ("STATUS_NO_LDT","Indicates that an attempt was made to change the size of the LDT for a process that has no LDT."),
+ 0xC0000118: ("STATUS_INVALID_LDT_SIZE","Indicates that an attempt was made to grow an LDT by setting its size, or that the size was not an even number of selectors."),
+ 0xC0000119: ("STATUS_INVALID_LDT_OFFSET","Indicates that the starting value for the LDT information was not an integral multiple of the selector size."),
+ 0xC000011A: ("STATUS_INVALID_LDT_DESCRIPTOR","Indicates that the user supplied an invalid descriptor when trying to set up LDT descriptors."),
+ 0xC000011B: ("STATUS_INVALID_IMAGE_NE_FORMAT","The specified image file did not have the correct format. It appears to be NE format."),
+ 0xC000011C: ("STATUS_RXACT_INVALID_STATE","Indicates that the transaction state of a registry subtree is incompatible with the requested operation. For example, a request has been made to start a new transaction with one already in progress, or a request has been made to apply a transaction when one is not currently in progress."),
+ 0xC000011D: ("STATUS_RXACT_COMMIT_FAILURE","Indicates an error has occurred during a registry transaction commit. The database has been left in an unknown, but probably inconsistent, state. The state of the registry transaction is left as COMMITTING."),
+ 0xC000011E: ("STATUS_MAPPED_FILE_SIZE_ZERO","An attempt was made to map a file of size zero with the maximum size specified as zero."),
+ 0xC000011F: ("STATUS_TOO_MANY_OPENED_FILES","Too many files are opened on a remote server. This error should only be returned by the Windows redirector on a remote drive."),
+ 0xC0000120: ("STATUS_CANCELLED","The I/O request was canceled."),
+ 0xC0000121: ("STATUS_CANNOT_DELETE","An attempt has been made to remove a file or directory that cannot be deleted."),
+ 0xC0000122: ("STATUS_INVALID_COMPUTER_NAME","Indicates a name that was specified as a remote computer name is syntactically invalid."),
+ 0xC0000123: ("STATUS_FILE_DELETED","An I/O request other than close was performed on a file after it was deleted, which can only happen to a request that did not complete before the last handle was closed via NtClose."),
+ 0xC0000124: ("STATUS_SPECIAL_ACCOUNT","Indicates an operation that is incompatible with built-in accounts has been attempted on a built-in (special) SAM account. For example, built-in accounts cannot be deleted."),
+ 0xC0000125: ("STATUS_SPECIAL_GROUP","The operation requested may not be performed on the specified group because it is a built-in special group."),
+ 0xC0000126: ("STATUS_SPECIAL_USER","The operation requested may not be performed on the specified user because it is a built-in special user."),
+ 0xC0000127: ("STATUS_MEMBERS_PRIMARY_GROUP","Indicates a member cannot be removed from a group because the group is currently the member's primary group."),
+ 0xC0000128: ("STATUS_FILE_CLOSED","An I/O request other than close and several other special case operations was attempted using a file object that had already been closed."),
+ 0xC0000129: ("STATUS_TOO_MANY_THREADS","Indicates a process has too many threads to perform the requested action. For example, assignment of a primary token may only be performed when a process has zero or one threads."),
+ 0xC000012A: ("STATUS_THREAD_NOT_IN_PROCESS","An attempt was made to operate on a thread within a specific process, but the specified thread is not in the specified process."),
+ 0xC000012B: ("STATUS_TOKEN_ALREADY_IN_USE","An attempt was made to establish a token for use as a primary token but the token is already in use. A token can only be the primary token of one process at a time."),
+ 0xC000012C: ("STATUS_PAGEFILE_QUOTA_EXCEEDED","The page file quota was exceeded."),
+ 0xC000012D: ("STATUS_COMMITMENT_LIMIT","{Out of Virtual Memory} Your system is low on virtual memory. To ensure that Windows runs correctly, increase the size of your virtual memory paging file. For more information, see Help."),
+ 0xC000012E: ("STATUS_INVALID_IMAGE_LE_FORMAT","The specified image file did not have the correct format: it appears to be LE format."),
+ 0xC000012F: ("STATUS_INVALID_IMAGE_NOT_MZ","The specified image file did not have the correct format: it did not have an initial MZ."),
+ 0xC0000130: ("STATUS_INVALID_IMAGE_PROTECT","The specified image file did not have the correct format: it did not have a proper e_lfarlc in the MZ header."),
+ 0xC0000131: ("STATUS_INVALID_IMAGE_WIN_16","The specified image file did not have the correct format: it appears to be a 16-bit Windows image."),
+ 0xC0000132: ("STATUS_LOGON_SERVER_CONFLICT","The Netlogon service cannot start because another Netlogon service running in the domain conflicts with the specified role."),
+ 0xC0000133: ("STATUS_TIME_DIFFERENCE_AT_DC","The time at the primary domain controller is different from the time at the backup domain controller or member server by too large an amount."),
+ 0xC0000134: ("STATUS_SYNCHRONIZATION_REQUIRED","The SAM database on a Windows Server is significantly out of synchronization with the copy on the domain controller. A complete synchronization is required."),
+ 0xC0000135: ("STATUS_DLL_NOT_FOUND","{Unable To Locate Component} This application has failed to start because %hs was not found. Reinstalling the application may fix this problem."),
+ 0xC0000136: ("STATUS_OPEN_FAILED","The NtCreateFile API failed. This error should never be returned to an application; it is a place holder for the Windows LAN Manager Redirector to use in its internal error-mapping routines."),
+ 0xC0000137: ("STATUS_IO_PRIVILEGE_FAILED","{Privilege Failed} The I/O permissions for the process could not be changed."),
+ 0xC0000138: ("STATUS_ORDINAL_NOT_FOUND","{Ordinal Not Found} The ordinal %ld could not be located in the dynamic link library %hs."),
+ 0xC0000139: ("STATUS_ENTRYPOINT_NOT_FOUND","{Entry Point Not Found} The procedure entry point %hs could not be located in the dynamic link library %hs."),
+ 0xC000013A: ("STATUS_CONTROL_C_EXIT","{Application Exit by CTRL+C} The application terminated as a result of a CTRL+C."),
+ 0xC000013B: ("STATUS_LOCAL_DISCONNECT","{Virtual Circuit Closed} The network transport on your computer has closed a network connection. There may or may not be I/O requests outstanding."),
+ 0xC000013C: ("STATUS_REMOTE_DISCONNECT","{Virtual Circuit Closed} The network transport on a remote computer has closed a network connection. There may or may not be I/O requests outstanding."),
+ 0xC000013D: ("STATUS_REMOTE_RESOURCES","{Insufficient Resources on Remote Computer} The remote computer has insufficient resources to complete the network request. For example, the remote computer may not have enough available memory to carry out the request at this time."),
+ 0xC000013E: ("STATUS_LINK_FAILED","{Virtual Circuit Closed} An existing connection (virtual circuit) has been broken at the remote computer. There is probably something wrong with the network software protocol or the network hardware on the remote computer."),
+ 0xC000013F: ("STATUS_LINK_TIMEOUT","{Virtual Circuit Closed} The network transport on your computer has closed a network connection because it had to wait too long for a response from the remote computer."),
+ 0xC0000140: ("STATUS_INVALID_CONNECTION","The connection handle that was given to the transport was invalid."),
+ 0xC0000141: ("STATUS_INVALID_ADDRESS","The address handle that was given to the transport was invalid."),
+ 0xC0000142: ("STATUS_DLL_INIT_FAILED","{DLL Initialization Failed} Initialization of the dynamic link library %hs failed. The process is terminating abnormally."),
+ 0xC0000143: ("STATUS_MISSING_SYSTEMFILE","{Missing System File} The required system file %hs is bad or missing."),
+ 0xC0000144: ("STATUS_UNHANDLED_EXCEPTION","{Application Error} The exception %s (0x%08lx) occurred in the application at location 0x%08lx."),
+ 0xC0000145: ("STATUS_APP_INIT_FAILURE","{Application Error} The application failed to initialize properly (0x%lx). Click OK to terminate the application."),
+ 0xC0000146: ("STATUS_PAGEFILE_CREATE_FAILED","{Unable to Create Paging File} The creation of the paging file %hs failed (%lx). The requested size was %ld."),
+ 0xC0000147: ("STATUS_NO_PAGEFILE","{No Paging File Specified} No paging file was specified in the system configuration."),
+ 0xC0000148: ("STATUS_INVALID_LEVEL","{Incorrect System Call Level} An invalid level was passed into the specified system call."),
+ 0xC0000149: ("STATUS_WRONG_PASSWORD_CORE","{Incorrect Password to LAN Manager Server} You specified an incorrect password to a LAN Manager 2.x or MS-NET server."),
+ 0xC000014A: ("STATUS_ILLEGAL_FLOAT_CONTEXT","{EXCEPTION} A real-mode application issued a floating-point instruction and floating-point hardware is not present."),
+ 0xC000014B: ("STATUS_PIPE_BROKEN","The pipe operation has failed because the other end of the pipe has been closed."),
+ 0xC000014C: ("STATUS_REGISTRY_CORRUPT","{The Registry Is Corrupt} The structure of one of the files that contains registry data is corrupt; the image of the file in memory is corrupt; or the file could not be recovered because the alternate copy or log was absent or corrupt."),
+ 0xC000014D: ("STATUS_REGISTRY_IO_FAILED","An I/O operation initiated by the Registry failed and cannot be recovered. The registry could not read in, write out, or flush one of the files that contain the system's image of the registry."),
+ 0xC000014E: ("STATUS_NO_EVENT_PAIR","An event pair synchronization operation was performed using the thread-specific client/server event pair object, but no event pair object was associated with the thread."),
+ 0xC000014F: ("STATUS_UNRECOGNIZED_VOLUME","The volume does not contain a recognized file system. Be sure that all required file system drivers are loaded and that the volume is not corrupt."),
+ 0xC0000150: ("STATUS_SERIAL_NO_DEVICE_INITED","No serial device was successfully initialized. The serial driver will unload."),
+ 0xC0000151: ("STATUS_NO_SUCH_ALIAS","The specified local group does not exist."),
+ 0xC0000152: ("STATUS_MEMBER_NOT_IN_ALIAS","The specified account name is not a member of the group."),
+ 0xC0000153: ("STATUS_MEMBER_IN_ALIAS","The specified account name is already a member of the group."),
+ 0xC0000154: ("STATUS_ALIAS_EXISTS","The specified local group already exists."),
+ 0xC0000155: ("STATUS_LOGON_NOT_GRANTED","A requested type of logon (for example, interactive, network, and service) is not granted by the local security policy of the target system. Ask the system administrator to grant the necessary form of logon."),
+ 0xC0000156: ("STATUS_TOO_MANY_SECRETS","The maximum number of secrets that may be stored in a single system was exceeded. The length and number of secrets is limited to satisfy U.S. State Department export restrictions."),
+ 0xC0000157: ("STATUS_SECRET_TOO_LONG","The length of a secret exceeds the maximum allowable length. The length and number of secrets is limited to satisfy U.S. State Department export restrictions."),
+ 0xC0000158: ("STATUS_INTERNAL_DB_ERROR","The local security authority (LSA) database contains an internal inconsistency."),
+ 0xC0000159: ("STATUS_FULLSCREEN_MODE","The requested operation cannot be performed in full-screen mode."),
+ 0xC000015A: ("STATUS_TOO_MANY_CONTEXT_IDS","During a logon attempt, the user's security context accumulated too many security IDs. This is a very unusual situation. Remove the user from some global or local groups to reduce the number of security IDs to incorporate into the security context."),
+ 0xC000015B: ("STATUS_LOGON_TYPE_NOT_GRANTED","A user has requested a type of logon (for example, interactive or network) that has not been granted. An administrator has control over who may logon interactively and through the network."),
+ 0xC000015C: ("STATUS_NOT_REGISTRY_FILE","The system has attempted to load or restore a file into the registry, and the specified file is not in the format of a registry file."),
+ 0xC000015D: ("STATUS_NT_CROSS_ENCRYPTION_REQUIRED","An attempt was made to change a user password in the security account manager without providing the necessary Windows cross-encrypted password."),
+ 0xC000015E: ("STATUS_DOMAIN_CTRLR_CONFIG_ERROR","A Windows Server has an incorrect configuration."),
+ 0xC000015F: ("STATUS_FT_MISSING_MEMBER","An attempt was made to explicitly access the secondary copy of information via a device control to the fault tolerance driver and the secondary copy is not present in the system."),
+ 0xC0000160: ("STATUS_ILL_FORMED_SERVICE_ENTRY","A configuration registry node that represents a driver service entry was ill-formed and did not contain the required value entries."),
+ 0xC0000161: ("STATUS_ILLEGAL_CHARACTER","An illegal character was encountered. For a multibyte character set, this includes a lead byte without a succeeding trail byte. For the Unicode character set this includes the characters 0xFFFF and 0xFFFE."),
+ 0xC0000162: ("STATUS_UNMAPPABLE_CHARACTER","No mapping for the Unicode character exists in the target multibyte code page."),
+ 0xC0000163: ("STATUS_UNDEFINED_CHARACTER","The Unicode character is not defined in the Unicode character set that is installed on the system."),
+ 0xC0000164: ("STATUS_FLOPPY_VOLUME","The paging file cannot be created on a floppy disk."),
+ 0xC0000165: ("STATUS_FLOPPY_ID_MARK_NOT_FOUND","{Floppy Disk Error} While accessing a floppy disk, an ID address mark was not found."),
+ 0xC0000166: ("STATUS_FLOPPY_WRONG_CYLINDER","{Floppy Disk Error} While accessing a floppy disk, the track address from the sector ID field was found to be different from the track address that is maintained by the controller."),
+ 0xC0000167: ("STATUS_FLOPPY_UNKNOWN_ERROR","{Floppy Disk Error} The floppy disk controller reported an error that is not recognized by the floppy disk driver."),
+ 0xC0000168: ("STATUS_FLOPPY_BAD_REGISTERS","{Floppy Disk Error} While accessing a floppy-disk, the controller returned inconsistent results via its registers."),
+ 0xC0000169: ("STATUS_DISK_RECALIBRATE_FAILED","{Hard Disk Error} While accessing the hard disk, a recalibrate operation failed, even after retries."),
+ 0xC000016A: ("STATUS_DISK_OPERATION_FAILED","{Hard Disk Error} While accessing the hard disk, a disk operation failed even after retries."),
+ 0xC000016B: ("STATUS_DISK_RESET_FAILED","{Hard Disk Error} While accessing the hard disk, a disk controller reset was needed, but even that failed."),
+ 0xC000016C: ("STATUS_SHARED_IRQ_BUSY","An attempt was made to open a device that was sharing an interrupt request (IRQ) with other devices. At least one other device that uses that IRQ was already opened. Two concurrent opens of devices that share an IRQ and only work via interrupts is not supported for the particular bus type that the devices use."),
+ 0xC000016D: ("STATUS_FT_ORPHANING","{FT Orphaning} A disk that is part of a fault-tolerant volume can no longer be accessed."),
+ 0xC000016E: ("STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT","The basic input/output system (BIOS) failed to connect a system interrupt to the device or bus for which the device is connected."),
+ 0xC0000172: ("STATUS_PARTITION_FAILURE","The tape could not be partitioned."),
+ 0xC0000173: ("STATUS_INVALID_BLOCK_LENGTH","When accessing a new tape of a multi-volume partition, the current blocksize is incorrect."),
+ 0xC0000174: ("STATUS_DEVICE_NOT_PARTITIONED","The tape partition information could not be found when loading a tape."),
+ 0xC0000175: ("STATUS_UNABLE_TO_LOCK_MEDIA","An attempt to lock the eject media mechanism failed."),
+ 0xC0000176: ("STATUS_UNABLE_TO_UNLOAD_MEDIA","An attempt to unload media failed."),
+ 0xC0000177: ("STATUS_EOM_OVERFLOW","The physical end of tape was detected."),
+ 0xC0000178: ("STATUS_NO_MEDIA","{No Media} There is no media in the drive. Insert media into drive %hs."),
+ 0xC000017A: ("STATUS_NO_SUCH_MEMBER","A member could not be added to or removed from the local group because the member does not exist."),
+ 0xC000017B: ("STATUS_INVALID_MEMBER","A new member could not be added to a local group because the member has the wrong account type."),
+ 0xC000017C: ("STATUS_KEY_DELETED","An illegal operation was attempted on a registry key that has been marked for deletion."),
+ 0xC000017D: ("STATUS_NO_LOG_SPACE","The system could not allocate the required space in a registry log."),
+ 0xC000017E: ("STATUS_TOO_MANY_SIDS","Too many SIDs have been specified."),
+ 0xC000017F: ("STATUS_LM_CROSS_ENCRYPTION_REQUIRED","An attempt was made to change a user password in the security account manager without providing the necessary LM cross-encrypted password."),
+ 0xC0000180: ("STATUS_KEY_HAS_CHILDREN","An attempt was made to create a symbolic link in a registry key that already has subkeys or values."),
+ 0xC0000181: ("STATUS_CHILD_MUST_BE_VOLATILE","An attempt was made to create a stable subkey under a volatile parent key."),
+ 0xC0000182: ("STATUS_DEVICE_CONFIGURATION_ERROR","The I/O device is configured incorrectly or the configuration parameters to the driver are incorrect."),
+ 0xC0000183: ("STATUS_DRIVER_INTERNAL_ERROR","An error was detected between two drivers or within an I/O driver."),
+ 0xC0000184: ("STATUS_INVALID_DEVICE_STATE","The device is not in a valid state to perform this request."),
+ 0xC0000185: ("STATUS_IO_DEVICE_ERROR","The I/O device reported an I/O error."),
+ 0xC0000186: ("STATUS_DEVICE_PROTOCOL_ERROR","A protocol error was detected between the driver and the device."),
+ 0xC0000187: ("STATUS_BACKUP_CONTROLLER","This operation is only allowed for the primary domain controller of the domain."),
+ 0xC0000188: ("STATUS_LOG_FILE_FULL","The log file space is insufficient to support this operation."),
+ 0xC0000189: ("STATUS_TOO_LATE","A write operation was attempted to a volume after it was dismounted."),
+ 0xC000018A: ("STATUS_NO_TRUST_LSA_SECRET","The workstation does not have a trust secret for the primary domain in the local LSA database."),
+ 0xC000018B: ("STATUS_NO_TRUST_SAM_ACCOUNT","The SAM database on the Windows Server does not have a computer account for this workstation trust relationship."),
+ 0xC000018C: ("STATUS_TRUSTED_DOMAIN_FAILURE","The logon request failed because the trust relationship between the primary domain and the trusted domain failed."),
+ 0xC000018D: ("STATUS_TRUSTED_RELATIONSHIP_FAILURE","The logon request failed because the trust relationship between this workstation and the primary domain failed."),
+ 0xC000018E: ("STATUS_EVENTLOG_FILE_CORRUPT","The Eventlog log file is corrupt."),
+ 0xC000018F: ("STATUS_EVENTLOG_CANT_START","No Eventlog log file could be opened. The Eventlog service did not start."),
+ 0xC0000190: ("STATUS_TRUST_FAILURE","The network logon failed. This may be because the validation authority cannot be reached."),
+ 0xC0000191: ("STATUS_MUTANT_LIMIT_EXCEEDED","An attempt was made to acquire a mutant such that its maximum count would have been exceeded."),
+ 0xC0000192: ("STATUS_NETLOGON_NOT_STARTED","An attempt was made to logon, but the NetLogon service was not started."),
+ 0xC0000193: ("STATUS_ACCOUNT_EXPIRED","The user account has expired."),
+ 0xC0000194: ("STATUS_POSSIBLE_DEADLOCK","{EXCEPTION} Possible deadlock condition."),
+ 0xC0000195: ("STATUS_NETWORK_CREDENTIAL_CONFLICT","Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again."),
+ 0xC0000196: ("STATUS_REMOTE_SESSION_LIMIT","An attempt was made to establish a session to a network server, but there are already too many sessions established to that server."),
+ 0xC0000197: ("STATUS_EVENTLOG_FILE_CHANGED","The log file has changed between reads."),
+ 0xC0000198: ("STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT","The account used is an interdomain trust account. Use your global user account or local user account to access this server."),
+ 0xC0000199: ("STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT","The account used is a computer account. Use your global user account or local user account to access this server."),
+ 0xC000019A: ("STATUS_NOLOGON_SERVER_TRUST_ACCOUNT","The account used is a server trust account. Use your global user account or local user account to access this server."),
+ 0xC000019B: ("STATUS_DOMAIN_TRUST_INCONSISTENT","The name or SID of the specified domain is inconsistent with the trust information for that domain."),
+ 0xC000019C: ("STATUS_FS_DRIVER_REQUIRED","A volume has been accessed for which a file system driver is required that has not yet been loaded."),
+ 0xC000019D: ("STATUS_IMAGE_ALREADY_LOADED_AS_DLL","Indicates that the specified image is already loaded as a DLL."),
+ 0xC000019E: ("STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING","Short name settings may not be changed on this volume due to the global registry setting."),
+ 0xC000019F: ("STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME","Short names are not enabled on this volume."),
+ 0xC00001A0: ("STATUS_SECURITY_STREAM_IS_INCONSISTENT","The security stream for the given volume is in an inconsistent state. Please run CHKDSK on the volume."),
+ 0xC00001A1: ("STATUS_INVALID_LOCK_RANGE","A requested file lock operation cannot be processed due to an invalid byte range."),
+ 0xC00001A2: ("STATUS_INVALID_ACE_CONDITION","The specified access control entry (ACE) contains an invalid condition."),
+ 0xC00001A3: ("STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT","The subsystem needed to support the image type is not present."),
+ 0xC00001A4: ("STATUS_NOTIFICATION_GUID_ALREADY_DEFINED","The specified file already has a notification GUID associated with it."),
+ 0xC0000201: ("STATUS_NETWORK_OPEN_RESTRICTION","A remote open failed because the network open restrictions were not satisfied."),
+ 0xC0000202: ("STATUS_NO_USER_SESSION_KEY","There is no user session key for the specified logon session."),
+ 0xC0000203: ("STATUS_USER_SESSION_DELETED","The remote user session has been deleted."),
+ 0xC0000204: ("STATUS_RESOURCE_LANG_NOT_FOUND","Indicates the specified resource language ID cannot be found in the image file."),
+ 0xC0000205: ("STATUS_INSUFF_SERVER_RESOURCES","Insufficient server resources exist to complete the request."),
+ 0xC0000206: ("STATUS_INVALID_BUFFER_SIZE","The size of the buffer is invalid for the specified operation."),
+ 0xC0000207: ("STATUS_INVALID_ADDRESS_COMPONENT","The transport rejected the specified network address as invalid."),
+ 0xC0000208: ("STATUS_INVALID_ADDRESS_WILDCARD","The transport rejected the specified network address due to invalid use of a wildcard."),
+ 0xC0000209: ("STATUS_TOO_MANY_ADDRESSES","The transport address could not be opened because all the available addresses are in use."),
+ 0xC000020A: ("STATUS_ADDRESS_ALREADY_EXISTS","The transport address could not be opened because it already exists."),
+ 0xC000020B: ("STATUS_ADDRESS_CLOSED","The transport address is now closed."),
+ 0xC000020C: ("STATUS_CONNECTION_DISCONNECTED","The transport connection is now disconnected."),
+ 0xC000020D: ("STATUS_CONNECTION_RESET","The transport connection has been reset."),
+ 0xC000020E: ("STATUS_TOO_MANY_NODES","The transport cannot dynamically acquire any more nodes."),
+ 0xC000020F: ("STATUS_TRANSACTION_ABORTED","The transport aborted a pending transaction."),
+ 0xC0000210: ("STATUS_TRANSACTION_TIMED_OUT","The transport timed out a request that is waiting for a response."),
+ 0xC0000211: ("STATUS_TRANSACTION_NO_RELEASE","The transport did not receive a release for a pending response."),
+ 0xC0000212: ("STATUS_TRANSACTION_NO_MATCH","The transport did not find a transaction that matches the specific token."),
+ 0xC0000213: ("STATUS_TRANSACTION_RESPONDED","The transport had previously responded to a transaction request."),
+ 0xC0000214: ("STATUS_TRANSACTION_INVALID_ID","The transport does not recognize the specified transaction request ID."),
+ 0xC0000215: ("STATUS_TRANSACTION_INVALID_TYPE","The transport does not recognize the specified transaction request type."),
+ 0xC0000216: ("STATUS_NOT_SERVER_SESSION","The transport can only process the specified request on the server side of a session."),
+ 0xC0000217: ("STATUS_NOT_CLIENT_SESSION","The transport can only process the specified request on the client side of a session."),
+ 0xC0000218: ("STATUS_CANNOT_LOAD_REGISTRY_FILE","{Registry File Failure} The registry cannot load the hive (file): %hs or its log or alternate. It is corrupt, absent, or not writable."),
+ 0xC0000219: ("STATUS_DEBUG_ATTACH_FAILED","{Unexpected Failure in DebugActiveProcess} An unexpected failure occurred while processing a DebugActiveProcess API request. You may choose OK to terminate the process, or Cancel to ignore the error."),
+ 0xC000021A: ("STATUS_SYSTEM_PROCESS_TERMINATED","{Fatal System Error} The %hs system process terminated unexpectedly with a status of 0x%08x (0x%08x 0x%08x). The system has been shut down."),
+ 0xC000021B: ("STATUS_DATA_NOT_ACCEPTED","{Data Not Accepted} The TDI client could not handle the data received during an indication."),
+ 0xC000021C: ("STATUS_NO_BROWSER_SERVERS_FOUND","{Unable to Retrieve Browser Server List} The list of servers for this workgroup is not currently available."),
+ 0xC000021D: ("STATUS_VDM_HARD_ERROR","NTVDM encountered a hard error."),
+ 0xC000021E: ("STATUS_DRIVER_CANCEL_TIMEOUT","{Cancel Timeout} The driver %hs failed to complete a canceled I/O request in the allotted time."),
+ 0xC000021F: ("STATUS_REPLY_MESSAGE_MISMATCH","{Reply Message Mismatch} An attempt was made to reply to an LPC message, but the thread specified by the client ID in the message was not waiting on that message."),
+ 0xC0000220: ("STATUS_MAPPED_ALIGNMENT","{Mapped View Alignment Incorrect} An attempt was made to map a view of a file, but either the specified base address or the offset into the file were not aligned on the proper allocation granularity."),
+ 0xC0000221: ("STATUS_IMAGE_CHECKSUM_MISMATCH","{Bad Image Checksum} The image %hs is possibly corrupt. The header checksum does not match the computed checksum."),
+ 0xC0000222: ("STATUS_LOST_WRITEBEHIND_DATA","{Delayed Write Failed} Windows was unable to save all the data for the file %hs. The data has been lost. This error may be caused by a failure of your computer hardware or network connection. Try to save this file elsewhere."),
+ 0xC0000223: ("STATUS_CLIENT_SERVER_PARAMETERS_INVALID","The parameters passed to the server in the client/server shared memory window were invalid. Too much data may have been put in the shared memory window."),
+ 0xC0000224: ("STATUS_PASSWORD_MUST_CHANGE","The user password must be changed before logging on the first time."),
+ 0xC0000225: ("STATUS_NOT_FOUND","The object was not found."),
+ 0xC0000226: ("STATUS_NOT_TINY_STREAM","The stream is not a tiny stream."),
+ 0xC0000227: ("STATUS_RECOVERY_FAILURE","A transaction recovery failed."),
+ 0xC0000228: ("STATUS_STACK_OVERFLOW_READ","The request must be handled by the stack overflow code."),
+ 0xC0000229: ("STATUS_FAIL_CHECK","A consistency check failed."),
+ 0xC000022A: ("STATUS_DUPLICATE_OBJECTID","The attempt to insert the ID in the index failed because the ID is already in the index."),
+ 0xC000022B: ("STATUS_OBJECTID_EXISTS","The attempt to set the object ID failed because the object already has an ID."),
+ 0xC000022C: ("STATUS_CONVERT_TO_LARGE","Internal OFS status codes indicating how an allocation operation is handled. Either it is retried after the containing oNode is moved or the extent stream is converted to a large stream."),
+ 0xC000022D: ("STATUS_RETRY","The request needs to be retried."),
+ 0xC000022E: ("STATUS_FOUND_OUT_OF_SCOPE","The attempt to find the object found an object on the volume that matches by ID; however, it is out of the scope of the handle that is used for the operation."),
+ 0xC000022F: ("STATUS_ALLOCATE_BUCKET","The bucket array must be grown. Retry the transaction after doing so."),
+ 0xC0000230: ("STATUS_PROPSET_NOT_FOUND","The specified property set does not exist on the object."),
+ 0xC0000231: ("STATUS_MARSHALL_OVERFLOW","The user/kernel marshaling buffer has overflowed."),
+ 0xC0000232: ("STATUS_INVALID_VARIANT","The supplied variant structure contains invalid data."),
+ 0xC0000233: ("STATUS_DOMAIN_CONTROLLER_NOT_FOUND","A domain controller for this domain was not found."),
+ 0xC0000234: ("STATUS_ACCOUNT_LOCKED_OUT","The user account has been automatically locked because too many invalid logon attempts or password change attempts have been requested."),
+ 0xC0000235: ("STATUS_HANDLE_NOT_CLOSABLE","NtClose was called on a handle that was protected from close via NtSetInformationObject."),
+ 0xC0000236: ("STATUS_CONNECTION_REFUSED","The transport-connection attempt was refused by the remote system."),
+ 0xC0000237: ("STATUS_GRACEFUL_DISCONNECT","The transport connection was gracefully closed."),
+ 0xC0000238: ("STATUS_ADDRESS_ALREADY_ASSOCIATED","The transport endpoint already has an address associated with it."),
+ 0xC0000239: ("STATUS_ADDRESS_NOT_ASSOCIATED","An address has not yet been associated with the transport endpoint."),
+ 0xC000023A: ("STATUS_CONNECTION_INVALID","An operation was attempted on a nonexistent transport connection."),
+ 0xC000023B: ("STATUS_CONNECTION_ACTIVE","An invalid operation was attempted on an active transport connection."),
+ 0xC000023C: ("STATUS_NETWORK_UNREACHABLE","The remote network is not reachable by the transport."),
+ 0xC000023D: ("STATUS_HOST_UNREACHABLE","The remote system is not reachable by the transport."),
+ 0xC000023E: ("STATUS_PROTOCOL_UNREACHABLE","The remote system does not support the transport protocol."),
+ 0xC000023F: ("STATUS_PORT_UNREACHABLE","No service is operating at the destination port of the transport on the remote system."),
+ 0xC0000240: ("STATUS_REQUEST_ABORTED","The request was aborted."),
+ 0xC0000241: ("STATUS_CONNECTION_ABORTED","The transport connection was aborted by the local system."),
+ 0xC0000242: ("STATUS_BAD_COMPRESSION_BUFFER","The specified buffer contains ill-formed data."),
+ 0xC0000243: ("STATUS_USER_MAPPED_FILE","The requested operation cannot be performed on a file with a user mapped section open."),
+ 0xC0000244: ("STATUS_AUDIT_FAILED","{Audit Failed} An attempt to generate a security audit failed."),
+ 0xC0000245: ("STATUS_TIMER_RESOLUTION_NOT_SET","The timer resolution was not previously set by the current process."),
+ 0xC0000246: ("STATUS_CONNECTION_COUNT_LIMIT","A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached."),
+ 0xC0000247: ("STATUS_LOGIN_TIME_RESTRICTION","Attempting to log on during an unauthorized time of day for this account."),
+ 0xC0000248: ("STATUS_LOGIN_WKSTA_RESTRICTION","The account is not authorized to log on from this station."),
+ 0xC0000249: ("STATUS_IMAGE_MP_UP_MISMATCH","{UP/MP Image Mismatch} The image %hs has been modified for use on a uniprocessor system, but you are running it on a multiprocessor machine. Reinstall the image file."),
+ 0xC0000250: ("STATUS_INSUFFICIENT_LOGON_INFO","There is insufficient account information to log you on."),
+ 0xC0000251: ("STATUS_BAD_DLL_ENTRYPOINT","{Invalid DLL Entrypoint} The dynamic link library %hs is not written correctly. The stack pointer has been left in an inconsistent state. The entry point should be declared as WINAPI or STDCALL. Select YES to fail the DLL load. Select NO to continue execution. Selecting NO may cause the application to operate incorrectly."),
+ 0xC0000252: ("STATUS_BAD_SERVICE_ENTRYPOINT","{Invalid Service Callback Entrypoint} The %hs service is not written correctly. The stack pointer has been left in an inconsistent state. The callback entry point should be declared as WINAPI or STDCALL. Selecting OK will cause the service to continue operation. However, the service process may operate incorrectly."),
+ 0xC0000253: ("STATUS_LPC_REPLY_LOST","The server received the messages but did not send a reply."),
+ 0xC0000254: ("STATUS_IP_ADDRESS_CONFLICT1","There is an IP address conflict with another system on the network."),
+ 0xC0000255: ("STATUS_IP_ADDRESS_CONFLICT2","There is an IP address conflict with another system on the network."),
+ 0xC0000256: ("STATUS_REGISTRY_QUOTA_LIMIT","{Low On Registry Space} The system has reached the maximum size that is allowed for the system part of the registry. Additional storage requests will be ignored."),
+ 0xC0000257: ("STATUS_PATH_NOT_COVERED","The contacted server does not support the indicated part of the DFS namespace."),
+ 0xC0000258: ("STATUS_NO_CALLBACK_ACTIVE","A callback return system service cannot be executed when no callback is active."),
+ 0xC0000259: ("STATUS_LICENSE_QUOTA_EXCEEDED","The service being accessed is licensed for a particular number of connections. No more connections can be made to the service at this time because the service has already accepted the maximum number of connections."),
+ 0xC000025A: ("STATUS_PWD_TOO_SHORT","The password provided is too short to meet the policy of your user account. Choose a longer password."),
+ 0xC000025B: ("STATUS_PWD_TOO_RECENT","The policy of your user account does not allow you to change passwords too frequently. This is done to prevent users from changing back to a familiar, but potentially discovered, password. If you feel your password has been compromised, contact your administrator immediately to have a new one assigned."),
+ 0xC000025C: ("STATUS_PWD_HISTORY_CONFLICT","You have attempted to change your password to one that you have used in the past. The policy of your user account does not allow this. Select a password that you have not previously used."),
+ 0xC000025E: ("STATUS_PLUGPLAY_NO_DEVICE","You have attempted to load a legacy device driver while its device instance had been disabled."),
+ 0xC000025F: ("STATUS_UNSUPPORTED_COMPRESSION","The specified compression format is unsupported."),
+ 0xC0000260: ("STATUS_INVALID_HW_PROFILE","The specified hardware profile configuration is invalid."),
+ 0xC0000261: ("STATUS_INVALID_PLUGPLAY_DEVICE_PATH","The specified Plug and Play registry device path is invalid."),
+ 0xC0000262: ("STATUS_DRIVER_ORDINAL_NOT_FOUND","{Driver Entry Point Not Found} The %hs device driver could not locate the ordinal %ld in driver %hs."),
+ 0xC0000263: ("STATUS_DRIVER_ENTRYPOINT_NOT_FOUND","{Driver Entry Point Not Found} The %hs device driver could not locate the entry point %hs in driver %hs."),
+ 0xC0000264: ("STATUS_RESOURCE_NOT_OWNED","{Application Error} The application attempted to release a resource it did not own. Click OK to terminate the application."),
+ 0xC0000265: ("STATUS_TOO_MANY_LINKS","An attempt was made to create more links on a file than the file system supports."),
+ 0xC0000266: ("STATUS_QUOTA_LIST_INCONSISTENT","The specified quota list is internally inconsistent with its descriptor."),
+ 0xC0000267: ("STATUS_FILE_IS_OFFLINE","The specified file has been relocated to offline storage."),
+ 0xC0000268: ("STATUS_EVALUATION_EXPIRATION","{Windows Evaluation Notification} The evaluation period for this installation of Windows has expired. This system will shutdown in 1 hour. To restore access to this installation of Windows, upgrade this installation by using a licensed distribution of this product."),
+ 0xC0000269: ("STATUS_ILLEGAL_DLL_RELOCATION","{Illegal System DLL Relocation} The system DLL %hs was relocated in memory. The application will not run properly. The relocation occurred because the DLL %hs occupied an address range that is reserved for Windows system DLLs. The vendor supplying the DLL should be contacted for a new DLL."),
+ 0xC000026A: ("STATUS_LICENSE_VIOLATION","{License Violation} The system has detected tampering with your registered product type. This is a violation of your software license. Tampering with the product type is not permitted."),
+ 0xC000026B: ("STATUS_DLL_INIT_FAILED_LOGOFF","{DLL Initialization Failed} The application failed to initialize because the window station is shutting down."),
+ 0xC000026C: ("STATUS_DRIVER_UNABLE_TO_LOAD","{Unable to Load Device Driver} %hs device driver could not be loaded. Error Status was 0x%x."),
+ 0xC000026D: ("STATUS_DFS_UNAVAILABLE","DFS is unavailable on the contacted server."),
+ 0xC000026E: ("STATUS_VOLUME_DISMOUNTED","An operation was attempted to a volume after it was dismounted."),
+ 0xC000026F: ("STATUS_WX86_INTERNAL_ERROR","An internal error occurred in the Win32 x86 emulation subsystem."),
+ 0xC0000270: ("STATUS_WX86_FLOAT_STACK_CHECK","Win32 x86 emulation subsystem floating-point stack check."),
+ 0xC0000271: ("STATUS_VALIDATE_CONTINUE","The validation process needs to continue on to the next step."),
+ 0xC0000272: ("STATUS_NO_MATCH","There was no match for the specified key in the index."),
+ 0xC0000273: ("STATUS_NO_MORE_MATCHES","There are no more matches for the current index enumeration."),
+ 0xC0000275: ("STATUS_NOT_A_REPARSE_POINT","The NTFS file or directory is not a reparse point."),
+ 0xC0000276: ("STATUS_IO_REPARSE_TAG_INVALID","The Windows I/O reparse tag passed for the NTFS reparse point is invalid."),
+ 0xC0000277: ("STATUS_IO_REPARSE_TAG_MISMATCH","The Windows I/O reparse tag does not match the one that is in the NTFS reparse point."),
+ 0xC0000278: ("STATUS_IO_REPARSE_DATA_INVALID","The user data passed for the NTFS reparse point is invalid."),
+ 0xC0000279: ("STATUS_IO_REPARSE_TAG_NOT_HANDLED","The layered file system driver for this I/O tag did not handle it when needed."),
+ 0xC0000280: ("STATUS_REPARSE_POINT_NOT_RESOLVED","The NTFS symbolic link could not be resolved even though the initial file name is valid."),
+ 0xC0000281: ("STATUS_DIRECTORY_IS_A_REPARSE_POINT","The NTFS directory is a reparse point."),
+ 0xC0000282: ("STATUS_RANGE_LIST_CONFLICT","The range could not be added to the range list because of a conflict."),
+ 0xC0000283: ("STATUS_SOURCE_ELEMENT_EMPTY","The specified medium changer source element contains no media."),
+ 0xC0000284: ("STATUS_DESTINATION_ELEMENT_FULL","The specified medium changer destination element already contains media."),
+ 0xC0000285: ("STATUS_ILLEGAL_ELEMENT_ADDRESS","The specified medium changer element does not exist."),
+ 0xC0000286: ("STATUS_MAGAZINE_NOT_PRESENT","The specified element is contained in a magazine that is no longer present."),
+ 0xC0000287: ("STATUS_REINITIALIZATION_NEEDED","The device requires re-initialization due to hardware errors."),
+ 0xC000028A: ("STATUS_ENCRYPTION_FAILED","The file encryption attempt failed."),
+ 0xC000028B: ("STATUS_DECRYPTION_FAILED","The file decryption attempt failed."),
+ 0xC000028C: ("STATUS_RANGE_NOT_FOUND","The specified range could not be found in the range list."),
+ 0xC000028D: ("STATUS_NO_RECOVERY_POLICY","There is no encryption recovery policy configured for this system."),
+ 0xC000028E: ("STATUS_NO_EFS","The required encryption driver is not loaded for this system."),
+ 0xC000028F: ("STATUS_WRONG_EFS","The file was encrypted with a different encryption driver than is currently loaded."),
+ 0xC0000290: ("STATUS_NO_USER_KEYS","There are no EFS keys defined for the user."),
+ 0xC0000291: ("STATUS_FILE_NOT_ENCRYPTED","The specified file is not encrypted."),
+ 0xC0000292: ("STATUS_NOT_EXPORT_FORMAT","The specified file is not in the defined EFS export format."),
+ 0xC0000293: ("STATUS_FILE_ENCRYPTED","The specified file is encrypted and the user does not have the ability to decrypt it."),
+ 0xC0000295: ("STATUS_WMI_GUID_NOT_FOUND","The GUID passed was not recognized as valid by a WMI data provider."),
+ 0xC0000296: ("STATUS_WMI_INSTANCE_NOT_FOUND","The instance name passed was not recognized as valid by a WMI data provider."),
+ 0xC0000297: ("STATUS_WMI_ITEMID_NOT_FOUND","The data item ID passed was not recognized as valid by a WMI data provider."),
+ 0xC0000298: ("STATUS_WMI_TRY_AGAIN","The WMI request could not be completed and should be retried."),
+ 0xC0000299: ("STATUS_SHARED_POLICY","The policy object is shared and can only be modified at the root."),
+ 0xC000029A: ("STATUS_POLICY_OBJECT_NOT_FOUND","The policy object does not exist when it should."),
+ 0xC000029B: ("STATUS_POLICY_ONLY_IN_DS","The requested policy information only lives in the Ds."),
+ 0xC000029C: ("STATUS_VOLUME_NOT_UPGRADED","The volume must be upgraded to enable this feature."),
+ 0xC000029D: ("STATUS_REMOTE_STORAGE_NOT_ACTIVE","The remote storage service is not operational at this time."),
+ 0xC000029E: ("STATUS_REMOTE_STORAGE_MEDIA_ERROR","The remote storage service encountered a media error."),
+ 0xC000029F: ("STATUS_NO_TRACKING_SERVICE","The tracking (workstation) service is not running."),
+ 0xC00002A0: ("STATUS_SERVER_SID_MISMATCH","The server process is running under a SID that is different from the SID that is required by client."),
+ 0xC00002A1: ("STATUS_DS_NO_ATTRIBUTE_OR_VALUE","The specified directory service attribute or value does not exist."),
+ 0xC00002A2: ("STATUS_DS_INVALID_ATTRIBUTE_SYNTAX","The attribute syntax specified to the directory service is invalid."),
+ 0xC00002A3: ("STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED","The attribute type specified to the directory service is not defined."),
+ 0xC00002A4: ("STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS","The specified directory service attribute or value already exists."),
+ 0xC00002A5: ("STATUS_DS_BUSY","The directory service is busy."),
+ 0xC00002A6: ("STATUS_DS_UNAVAILABLE","The directory service is unavailable."),
+ 0xC00002A7: ("STATUS_DS_NO_RIDS_ALLOCATED","The directory service was unable to allocate a relative identifier."),
+ 0xC00002A8: ("STATUS_DS_NO_MORE_RIDS","The directory service has exhausted the pool of relative identifiers."),
+ 0xC00002A9: ("STATUS_DS_INCORRECT_ROLE_OWNER","The requested operation could not be performed because the directory service is not the master for that type of operation."),
+ 0xC00002AA: ("STATUS_DS_RIDMGR_INIT_ERROR","The directory service was unable to initialize the subsystem that allocates relative identifiers."),
+ 0xC00002AB: ("STATUS_DS_OBJ_CLASS_VIOLATION","The requested operation did not satisfy one or more constraints that are associated with the class of the object."),
+ 0xC00002AC: ("STATUS_DS_CANT_ON_NON_LEAF","The directory service can perform the requested operation only on a leaf object."),
+ 0xC00002AD: ("STATUS_DS_CANT_ON_RDN","The directory service cannot perform the requested operation on the Relatively Defined Name (RDN) attribute of an object."),
+ 0xC00002AE: ("STATUS_DS_CANT_MOD_OBJ_CLASS","The directory service detected an attempt to modify the object class of an object."),
+ 0xC00002AF: ("STATUS_DS_CROSS_DOM_MOVE_FAILED","An error occurred while performing a cross domain move operation."),
+ 0xC00002B0: ("STATUS_DS_GC_NOT_AVAILABLE","Unable to contact the global catalog server."),
+ 0xC00002B1: ("STATUS_DIRECTORY_SERVICE_REQUIRED","The requested operation requires a directory service, and none was available."),
+ 0xC00002B2: ("STATUS_REPARSE_ATTRIBUTE_CONFLICT","The reparse attribute cannot be set because it is incompatible with an existing attribute."),
+ 0xC00002B3: ("STATUS_CANT_ENABLE_DENY_ONLY","A group marked \"use for deny only\" cannot be enabled."),
+ 0xC00002B4: ("STATUS_FLOAT_MULTIPLE_FAULTS","{EXCEPTION} Multiple floating-point faults."),
+ 0xC00002B5: ("STATUS_FLOAT_MULTIPLE_TRAPS","{EXCEPTION} Multiple floating-point traps."),
+ 0xC00002B6: ("STATUS_DEVICE_REMOVED","The device has been removed."),
+ 0xC00002B7: ("STATUS_JOURNAL_DELETE_IN_PROGRESS","The volume change journal is being deleted."),
+ 0xC00002B8: ("STATUS_JOURNAL_NOT_ACTIVE","The volume change journal is not active."),
+ 0xC00002B9: ("STATUS_NOINTERFACE","The requested interface is not supported."),
+ 0xC00002C1: ("STATUS_DS_ADMIN_LIMIT_EXCEEDED","A directory service resource limit has been exceeded."),
+ 0xC00002C2: ("STATUS_DRIVER_FAILED_SLEEP","{System Standby Failed} The driver %hs does not support standby mode. Updating this driver may allow the system to go to standby mode."),
+ 0xC00002C3: ("STATUS_MUTUAL_AUTHENTICATION_FAILED","Mutual Authentication failed. The server password is out of date at the domain controller."),
+ 0xC00002C4: ("STATUS_CORRUPT_SYSTEM_FILE","The system file %1 has become corrupt and has been replaced."),
+ 0xC00002C5: ("STATUS_DATATYPE_MISALIGNMENT_ERROR","{EXCEPTION} Alignment Error A data type misalignment error was detected in a load or store instruction."),
+ 0xC00002C6: ("STATUS_WMI_READ_ONLY","The WMI data item or data block is read-only."),
+ 0xC00002C7: ("STATUS_WMI_SET_FAILURE","The WMI data item or data block could not be changed."),
+ 0xC00002C8: ("STATUS_COMMITMENT_MINIMUM","{Virtual Memory Minimum Too Low} Your system is low on virtual memory. Windows is increasing the size of your virtual memory paging file. During this process, memory requests for some applications may be denied. For more information, see Help."),
+ 0xC00002C9: ("STATUS_REG_NAT_CONSUMPTION","{EXCEPTION} Register NaT consumption faults. A NaT value is consumed on a non-speculative instruction."),
+ 0xC00002CA: ("STATUS_TRANSPORT_FULL","The transport element of the medium changer contains media, which is causing the operation to fail."),
+ 0xC00002CB: ("STATUS_DS_SAM_INIT_FAILURE","Security Accounts Manager initialization failed because of the following error: %hs Error Status: 0x%x. Click OK to shut down this system and restart in Directory Services Restore Mode. Check the event log for more detailed information."),
+ 0xC00002CC: ("STATUS_ONLY_IF_CONNECTED","This operation is supported only when you are connected to the server."),
+ 0xC00002CD: ("STATUS_DS_SENSITIVE_GROUP_VIOLATION","Only an administrator can modify the membership list of an administrative group."),
+ 0xC00002CE: ("STATUS_PNP_RESTART_ENUMERATION","A device was removed so enumeration must be restarted."),
+ 0xC00002CF: ("STATUS_JOURNAL_ENTRY_DELETED","The journal entry has been deleted from the journal."),
+ 0xC00002D0: ("STATUS_DS_CANT_MOD_PRIMARYGROUPID","Cannot change the primary group ID of a domain controller account."),
+ 0xC00002D1: ("STATUS_SYSTEM_IMAGE_BAD_SIGNATURE","{Fatal System Error} The system image %s is not properly signed. The file has been replaced with the signed file. The system has been shut down."),
+ 0xC00002D2: ("STATUS_PNP_REBOOT_REQUIRED","The device will not start without a reboot."),
+ 0xC00002D3: ("STATUS_POWER_STATE_INVALID","The power state of the current device cannot support this request."),
+ 0xC00002D4: ("STATUS_DS_INVALID_GROUP_TYPE","The specified group type is invalid."),
+ 0xC00002D5: ("STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN","In a mixed domain, no nesting of a global group if the group is security enabled."),
+ 0xC00002D6: ("STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN","In a mixed domain, cannot nest local groups with other local groups, if the group is security enabled."),
+ 0xC00002D7: ("STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER","A global group cannot have a local group as a member."),
+ 0xC00002D8: ("STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER","A global group cannot have a universal group as a member."),
+ 0xC00002D9: ("STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER","A universal group cannot have a local group as a member."),
+ 0xC00002DA: ("STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER","A global group cannot have a cross-domain member."),
+ 0xC00002DB: ("STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER","A local group cannot have another cross-domain local group as a member."),
+ 0xC00002DC: ("STATUS_DS_HAVE_PRIMARY_MEMBERS","Cannot change to a security-disabled group because primary members are in this group."),
+ 0xC00002DD: ("STATUS_WMI_NOT_SUPPORTED","The WMI operation is not supported by the data block or method."),
+ 0xC00002DE: ("STATUS_INSUFFICIENT_POWER","There is not enough power to complete the requested operation."),
+ 0xC00002DF: ("STATUS_SAM_NEED_BOOTKEY_PASSWORD","The Security Accounts Manager needs to get the boot password."),
+ 0xC00002E0: ("STATUS_SAM_NEED_BOOTKEY_FLOPPY","The Security Accounts Manager needs to get the boot key from the floppy disk."),
+ 0xC00002E1: ("STATUS_DS_CANT_START","The directory service cannot start."),
+ 0xC00002E2: ("STATUS_DS_INIT_FAILURE","The directory service could not start because of the following error: %hs Error Status: 0x%x. Click OK to shut down this system and restart in Directory Services Restore Mode. Check the event log for more detailed information."),
+ 0xC00002E3: ("STATUS_SAM_INIT_FAILURE","The Security Accounts Manager initialization failed because of the following error: %hs Error Status: 0x%x. Click OK to shut down this system and restart in Safe Mode. Check the event log for more detailed information."),
+ 0xC00002E4: ("STATUS_DS_GC_REQUIRED","The requested operation can be performed only on a global catalog server."),
+ 0xC00002E5: ("STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY","A local group can only be a member of other local groups in the same domain."),
+ 0xC00002E6: ("STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS","Foreign security principals cannot be members of universal groups."),
+ 0xC00002E7: ("STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED","Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased."),
+ 0xC00002E9: ("STATUS_CURRENT_DOMAIN_NOT_ALLOWED","This operation cannot be performed on the current domain."),
+ 0xC00002EA: ("STATUS_CANNOT_MAKE","The directory or file cannot be created."),
+ 0xC00002EB: ("STATUS_SYSTEM_SHUTDOWN","The system is in the process of shutting down."),
+ 0xC00002EC: ("STATUS_DS_INIT_FAILURE_CONSOLE","Directory Services could not start because of the following error: %hs Error Status: 0x%x. Click OK to shut down the system. You can use the recovery console to diagnose the system further."),
+ 0xC00002ED: ("STATUS_DS_SAM_INIT_FAILURE_CONSOLE","Security Accounts Manager initialization failed because of the following error: %hs Error Status: 0x%x. Click OK to shut down the system. You can use the recovery console to diagnose the system further."),
+ 0xC00002EE: ("STATUS_UNFINISHED_CONTEXT_DELETED","A security context was deleted before the context was completed. This is considered a logon failure."),
+ 0xC00002EF: ("STATUS_NO_TGT_REPLY","The client is trying to negotiate a context and the server requires user-to-user but did not send a TGT reply."),
+ 0xC00002F0: ("STATUS_OBJECTID_NOT_FOUND","An object ID was not found in the file."),
+ 0xC00002F1: ("STATUS_NO_IP_ADDRESSES","Unable to accomplish the requested task because the local machine does not have any IP addresses."),
+ 0xC00002F2: ("STATUS_WRONG_CREDENTIAL_HANDLE","The supplied credential handle does not match the credential that is associated with the security context."),
+ 0xC00002F3: ("STATUS_CRYPTO_SYSTEM_INVALID","The crypto system or checksum function is invalid because a required function is unavailable."),
+ 0xC00002F4: ("STATUS_MAX_REFERRALS_EXCEEDED","The number of maximum ticket referrals has been exceeded."),
+ 0xC00002F5: ("STATUS_MUST_BE_KDC","The local machine must be a Kerberos KDC (domain controller) and it is not."),
+ 0xC00002F6: ("STATUS_STRONG_CRYPTO_NOT_SUPPORTED","The other end of the security negotiation requires strong crypto but it is not supported on the local machine."),
+ 0xC00002F7: ("STATUS_TOO_MANY_PRINCIPALS","The KDC reply contained more than one principal name."),
+ 0xC00002F8: ("STATUS_NO_PA_DATA","Expected to find PA data for a hint of what etype to use, but it was not found."),
+ 0xC00002F9: ("STATUS_PKINIT_NAME_MISMATCH","The client certificate does not contain a valid UPN, or does not match the client name in the logon request. Contact your administrator."),
+ 0xC00002FA: ("STATUS_SMARTCARD_LOGON_REQUIRED","Smart card logon is required and was not used."),
+ 0xC00002FB: ("STATUS_KDC_INVALID_REQUEST","An invalid request was sent to the KDC."),
+ 0xC00002FC: ("STATUS_KDC_UNABLE_TO_REFER","The KDC was unable to generate a referral for the service requested."),
+ 0xC00002FD: ("STATUS_KDC_UNKNOWN_ETYPE","The encryption type requested is not supported by the KDC."),
+ 0xC00002FE: ("STATUS_SHUTDOWN_IN_PROGRESS","A system shutdown is in progress."),
+ 0xC00002FF: ("STATUS_SERVER_SHUTDOWN_IN_PROGRESS","The server machine is shutting down."),
+ 0xC0000300: ("STATUS_NOT_SUPPORTED_ON_SBS","This operation is not supported on a computer running Windows Server 2003 for Small Business Server."),
+ 0xC0000301: ("STATUS_WMI_GUID_DISCONNECTED","The WMI GUID is no longer available."),
+ 0xC0000302: ("STATUS_WMI_ALREADY_DISABLED","Collection or events for the WMI GUID is already disabled."),
+ 0xC0000303: ("STATUS_WMI_ALREADY_ENABLED","Collection or events for the WMI GUID is already enabled."),
+ 0xC0000304: ("STATUS_MFT_TOO_FRAGMENTED","The master file table on the volume is too fragmented to complete this operation."),
+ 0xC0000305: ("STATUS_COPY_PROTECTION_FAILURE","Copy protection failure."),
+ 0xC0000306: ("STATUS_CSS_AUTHENTICATION_FAILURE","Copy protection error-DVD CSS Authentication failed."),
+ 0xC0000307: ("STATUS_CSS_KEY_NOT_PRESENT","Copy protection error-The specified sector does not contain a valid key."),
+ 0xC0000308: ("STATUS_CSS_KEY_NOT_ESTABLISHED","Copy protection error-DVD session key not established."),
+ 0xC0000309: ("STATUS_CSS_SCRAMBLED_SECTOR","Copy protection error-The read failed because the sector is encrypted."),
+ 0xC000030A: ("STATUS_CSS_REGION_MISMATCH","Copy protection error-The region of the specified DVD does not correspond to the region setting of the drive."),
+ 0xC000030B: ("STATUS_CSS_RESETS_EXHAUSTED","Copy protection error-The region setting of the drive may be permanent."),
+ 0xC0000320: ("STATUS_PKINIT_FAILURE","The Kerberos protocol encountered an error while validating the KDC certificate during smart card logon. There is more information in the system event log."),
+ 0xC0000321: ("STATUS_SMARTCARD_SUBSYSTEM_FAILURE","The Kerberos protocol encountered an error while attempting to use the smart card subsystem."),
+ 0xC0000322: ("STATUS_NO_KERB_KEY","The target server does not have acceptable Kerberos credentials."),
+ 0xC0000350: ("STATUS_HOST_DOWN","The transport determined that the remote system is down."),
+ 0xC0000351: ("STATUS_UNSUPPORTED_PREAUTH","An unsupported pre-authentication mechanism was presented to the Kerberos package."),
+ 0xC0000352: ("STATUS_EFS_ALG_BLOB_TOO_BIG","The encryption algorithm that is used on the source file needs a bigger key buffer than the one that is used on the destination file."),
+ 0xC0000353: ("STATUS_PORT_NOT_SET","An attempt to remove a processes DebugPort was made, but a port was not already associated with the process."),
+ 0xC0000354: ("STATUS_DEBUGGER_INACTIVE","An attempt to do an operation on a debug port failed because the port is in the process of being deleted."),
+ 0xC0000355: ("STATUS_DS_VERSION_CHECK_FAILURE","This version of Windows is not compatible with the behavior version of the directory forest, domain, or domain controller."),
+ 0xC0000356: ("STATUS_AUDITING_DISABLED","The specified event is currently not being audited."),
+ 0xC0000357: ("STATUS_PRENT4_MACHINE_ACCOUNT","The machine account was created prior to Windows NT 4.0. The account needs to be recreated."),
+ 0xC0000358: ("STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER","An account group cannot have a universal group as a member."),
+ 0xC0000359: ("STATUS_INVALID_IMAGE_WIN_32","The specified image file did not have the correct format; it appears to be a 32-bit Windows image."),
+ 0xC000035A: ("STATUS_INVALID_IMAGE_WIN_64","The specified image file did not have the correct format; it appears to be a 64-bit Windows image."),
+ 0xC000035B: ("STATUS_BAD_BINDINGS","The client's supplied SSPI channel bindings were incorrect."),
+ 0xC000035C: ("STATUS_NETWORK_SESSION_EXPIRED","The client session has expired; so the client must re-authenticate to continue accessing the remote resources."),
+ 0xC000035D: ("STATUS_APPHELP_BLOCK","The AppHelp dialog box canceled; thus preventing the application from starting."),
+ 0xC000035E: ("STATUS_ALL_SIDS_FILTERED","The SID filtering operation removed all SIDs."),
+ 0xC000035F: ("STATUS_NOT_SAFE_MODE_DRIVER","The driver was not loaded because the system is starting in safe mode."),
+ 0xC0000361: ("STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT","Access to %1 has been restricted by your Administrator by the default software restriction policy level."),
+ 0xC0000362: ("STATUS_ACCESS_DISABLED_BY_POLICY_PATH","Access to %1 has been restricted by your Administrator by location with policy rule %2 placed on path %3."),
+ 0xC0000363: ("STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER","Access to %1 has been restricted by your Administrator by software publisher policy."),
+ 0xC0000364: ("STATUS_ACCESS_DISABLED_BY_POLICY_OTHER","Access to %1 has been restricted by your Administrator by policy rule %2."),
+ 0xC0000365: ("STATUS_FAILED_DRIVER_ENTRY","The driver was not loaded because it failed its initialization call."),
+ 0xC0000366: ("STATUS_DEVICE_ENUMERATION_ERROR","The device encountered an error while applying power or reading the device configuration. This may be caused by a failure of your hardware or by a poor connection."),
+ 0xC0000368: ("STATUS_MOUNT_POINT_NOT_RESOLVED","The create operation failed because the name contained at least one mount point that resolves to a volume to which the specified device object is not attached."),
+ 0xC0000369: ("STATUS_INVALID_DEVICE_OBJECT_PARAMETER","The device object parameter is either not a valid device object or is not attached to the volume that is specified by the file name."),
+ 0xC000036A: ("STATUS_MCA_OCCURED","A machine check error has occurred. Check the system event log for additional information."),
+ 0xC000036B: ("STATUS_DRIVER_BLOCKED_CRITICAL","Driver %2 has been blocked from loading."),
+ 0xC000036C: ("STATUS_DRIVER_BLOCKED","Driver %2 has been blocked from loading."),
+ 0xC000036D: ("STATUS_DRIVER_DATABASE_ERROR","There was error [%2] processing the driver database."),
+ 0xC000036E: ("STATUS_SYSTEM_HIVE_TOO_LARGE","System hive size has exceeded its limit."),
+ 0xC000036F: ("STATUS_INVALID_IMPORT_OF_NON_DLL","A dynamic link library (DLL) referenced a module that was neither a DLL nor the process's executable image."),
+ 0xC0000371: ("STATUS_NO_SECRETS","The local account store does not contain secret material for the specified account."),
+ 0xC0000372: ("STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY","Access to %1 has been restricted by your Administrator by policy rule %2."),
+ 0xC0000373: ("STATUS_FAILED_STACK_SWITCH","The system was not able to allocate enough memory to perform a stack switch."),
+ 0xC0000374: ("STATUS_HEAP_CORRUPTION","A heap has been corrupted."),
+ 0xC0000380: ("STATUS_SMARTCARD_WRONG_PIN","An incorrect PIN was presented to the smart card."),
+ 0xC0000381: ("STATUS_SMARTCARD_CARD_BLOCKED","The smart card is blocked."),
+ 0xC0000382: ("STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED","No PIN was presented to the smart card."),
+ 0xC0000383: ("STATUS_SMARTCARD_NO_CARD","No smart card is available."),
+ 0xC0000384: ("STATUS_SMARTCARD_NO_KEY_CONTAINER","The requested key container does not exist on the smart card."),
+ 0xC0000385: ("STATUS_SMARTCARD_NO_CERTIFICATE","The requested certificate does not exist on the smart card."),
+ 0xC0000386: ("STATUS_SMARTCARD_NO_KEYSET","The requested keyset does not exist."),
+ 0xC0000387: ("STATUS_SMARTCARD_IO_ERROR","A communication error with the smart card has been detected."),
+ 0xC0000388: ("STATUS_DOWNGRADE_DETECTED","The system detected a possible attempt to compromise security. Ensure that you can contact the server that authenticated you."),
+ 0xC0000389: ("STATUS_SMARTCARD_CERT_REVOKED","The smart card certificate used for authentication has been revoked. Contact your system administrator. There may be additional information in the event log."),
+ 0xC000038A: ("STATUS_ISSUING_CA_UNTRUSTED","An untrusted certificate authority was detected while processing the smart card certificate that is used for authentication. Contact your system administrator."),
+ 0xC000038B: ("STATUS_REVOCATION_OFFLINE_C","The revocation status of the smart card certificate that is used for authentication could not be determined. Contact your system administrator."),
+ 0xC000038C: ("STATUS_PKINIT_CLIENT_FAILURE","The smart card certificate used for authentication was not trusted. Contact your system administrator."),
+ 0xC000038D: ("STATUS_SMARTCARD_CERT_EXPIRED","The smart card certificate used for authentication has expired. Contact your system administrator."),
+ 0xC000038E: ("STATUS_DRIVER_FAILED_PRIOR_UNLOAD","The driver could not be loaded because a previous version of the driver is still in memory."),
+ 0xC000038F: ("STATUS_SMARTCARD_SILENT_CONTEXT","The smart card provider could not perform the action because the context was acquired as silent."),
+ 0xC0000401: ("STATUS_PER_USER_TRUST_QUOTA_EXCEEDED","The delegated trust creation quota of the current user has been exceeded."),
+ 0xC0000402: ("STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED","The total delegated trust creation quota has been exceeded."),
+ 0xC0000403: ("STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED","The delegated trust deletion quota of the current user has been exceeded."),
+ 0xC0000404: ("STATUS_DS_NAME_NOT_UNIQUE","The requested name already exists as a unique identifier."),
+ 0xC0000405: ("STATUS_DS_DUPLICATE_ID_FOUND","The requested object has a non-unique identifier and cannot be retrieved."),
+ 0xC0000406: ("STATUS_DS_GROUP_CONVERSION_ERROR","The group cannot be converted due to attribute restrictions on the requested group type."),
+ 0xC0000407: ("STATUS_VOLSNAP_PREPARE_HIBERNATE","{Volume Shadow Copy Service} Wait while the Volume Shadow Copy Service prepares volume %hs for hibernation."),
+ 0xC0000408: ("STATUS_USER2USER_REQUIRED","Kerberos sub-protocol User2User is required."),
+ 0xC0000409: ("STATUS_STACK_BUFFER_OVERRUN","The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application."),
+ 0xC000040A: ("STATUS_NO_S4U_PROT_SUPPORT","The Kerberos subsystem encountered an error. A service for user protocol request was made against a domain controller which does not support service for user."),
+ 0xC000040B: ("STATUS_CROSSREALM_DELEGATION_FAILURE","An attempt was made by this server to make a Kerberos constrained delegation request for a target that is outside the server realm. This action is not supported and the resulting error indicates a misconfiguration on the allowed-to-delegate-to list for this server. Contact your administrator."),
+ 0xC000040C: ("STATUS_REVOCATION_OFFLINE_KDC","The revocation status of the domain controller certificate used for smart card authentication could not be determined. There is additional information in the system event log. Contact your system administrator."),
+ 0xC000040D: ("STATUS_ISSUING_CA_UNTRUSTED_KDC","An untrusted certificate authority was detected while processing the domain controller certificate used for authentication. There is additional information in the system event log. Contact your system administrator."),
+ 0xC000040E: ("STATUS_KDC_CERT_EXPIRED","The domain controller certificate used for smart card logon has expired. Contact your system administrator with the contents of your system event log."),
+ 0xC000040F: ("STATUS_KDC_CERT_REVOKED","The domain controller certificate used for smart card logon has been revoked. Contact your system administrator with the contents of your system event log."),
+ 0xC0000410: ("STATUS_PARAMETER_QUOTA_EXCEEDED","Data present in one of the parameters is more than the function can operate on."),
+ 0xC0000411: ("STATUS_HIBERNATION_FAILURE","The system has failed to hibernate (The error code is %hs). Hibernation will be disabled until the system is restarted."),
+ 0xC0000412: ("STATUS_DELAY_LOAD_FAILED","An attempt to delay-load a .dll or get a function address in a delay-loaded .dll failed."),
+ 0xC0000413: ("STATUS_AUTHENTICATION_FIREWALL_FAILED","Logon Failure: The machine you are logging onto is protected by an authentication firewall. The specified account is not allowed to authenticate to the machine."),
+ 0xC0000414: ("STATUS_VDM_DISALLOWED","%hs is a 16-bit application. You do not have permissions to execute 16-bit applications. Check your permissions with your system administrator."),
+ 0xC0000415: ("STATUS_HUNG_DISPLAY_DRIVER_THREAD","{Display Driver Stopped Responding} The %hs display driver has stopped working normally. Save your work and reboot the system to restore full display functionality. The next time you reboot the machine a dialog will be displayed giving you a chance to report this failure to Microsoft."),
+ 0xC0000416: ("STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE","The Desktop heap encountered an error while allocating session memory. There is more information in the system event log."),
+ 0xC0000417: ("STATUS_INVALID_CRUNTIME_PARAMETER","An invalid parameter was passed to a C runtime function."),
+ 0xC0000418: ("STATUS_NTLM_BLOCKED","The authentication failed because NTLM was blocked."),
+ 0xC0000419: ("STATUS_DS_SRC_SID_EXISTS_IN_FOREST","The source object's SID already exists in destination forest."),
+ 0xC000041A: ("STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST","The domain name of the trusted domain already exists in the forest."),
+ 0xC000041B: ("STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST","The flat name of the trusted domain already exists in the forest."),
+ 0xC000041C: ("STATUS_INVALID_USER_PRINCIPAL_NAME","The User Principal Name (UPN) is invalid."),
+ 0xC0000420: ("STATUS_ASSERTION_FAILURE","There has been an assertion failure."),
+ 0xC0000421: ("STATUS_VERIFIER_STOP","Application verifier has found an error in the current process."),
+ 0xC0000423: ("STATUS_CALLBACK_POP_STACK","A user mode unwind is in progress."),
+ 0xC0000424: ("STATUS_INCOMPATIBLE_DRIVER_BLOCKED","%2 has been blocked from loading due to incompatibility with this system. Contact your software vendor for a compatible version of the driver."),
+ 0xC0000425: ("STATUS_HIVE_UNLOADED","Illegal operation attempted on a registry key which has already been unloaded."),
+ 0xC0000426: ("STATUS_COMPRESSION_DISABLED","Compression is disabled for this volume."),
+ 0xC0000427: ("STATUS_FILE_SYSTEM_LIMITATION","The requested operation could not be completed due to a file system limitation."),
+ 0xC0000428: ("STATUS_INVALID_IMAGE_HASH","The hash for image %hs cannot be found in the system catalogs. The image is likely corrupt or the victim of tampering."),
+ 0xC0000429: ("STATUS_NOT_CAPABLE","The implementation is not capable of performing the request."),
+ 0xC000042A: ("STATUS_REQUEST_OUT_OF_SEQUENCE","The requested operation is out of order with respect to other operations."),
+ 0xC000042B: ("STATUS_IMPLEMENTATION_LIMIT","An operation attempted to exceed an implementation-defined limit."),
+ 0xC000042C: ("STATUS_ELEVATION_REQUIRED","The requested operation requires elevation."),
+ 0xC000042D: ("STATUS_NO_SECURITY_CONTEXT","The required security context does not exist."),
+ 0xC000042E: ("STATUS_PKU2U_CERT_FAILURE","The PKU2U protocol encountered an error while attempting to utilize the associated certificates."),
+ 0xC0000432: ("STATUS_BEYOND_VDL","The operation was attempted beyond the valid data length of the file."),
+ 0xC0000433: ("STATUS_ENCOUNTERED_WRITE_IN_PROGRESS","The attempted write operation encountered a write already in progress for some portion of the range."),
+ 0xC0000434: ("STATUS_PTE_CHANGED","The page fault mappings changed in the middle of processing a fault so the operation must be retried."),
+ 0xC0000435: ("STATUS_PURGE_FAILED","The attempt to purge this file from memory failed to purge some or all the data from memory."),
+ 0xC0000440: ("STATUS_CRED_REQUIRES_CONFIRMATION","The requested credential requires confirmation."),
+ 0xC0000441: ("STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE","The remote server sent an invalid response for a file being opened with Client Side Encryption."),
+ 0xC0000442: ("STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER","Client Side Encryption is not supported by the remote server even though it claims to support it."),
+ 0xC0000443: ("STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE","File is encrypted and should be opened in Client Side Encryption mode."),
+ 0xC0000444: ("STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE","A new encrypted file is being created and a $EFS needs to be provided."),
+ 0xC0000445: ("STATUS_CS_ENCRYPTION_FILE_NOT_CSE","The SMB client requested a CSE FSCTL on a non-CSE file."),
+ 0xC0000446: ("STATUS_INVALID_LABEL","Indicates a particular Security ID may not be assigned as the label of an object."),
+ 0xC0000450: ("STATUS_DRIVER_PROCESS_TERMINATED","The process hosting the driver for this device has terminated."),
+ 0xC0000451: ("STATUS_AMBIGUOUS_SYSTEM_DEVICE","The requested system device cannot be identified due to multiple indistinguishable devices potentially matching the identification criteria."),
+ 0xC0000452: ("STATUS_SYSTEM_DEVICE_NOT_FOUND","The requested system device cannot be found."),
+ 0xC0000453: ("STATUS_RESTART_BOOT_APPLICATION","This boot application must be restarted."),
+ 0xC0000454: ("STATUS_INSUFFICIENT_NVRAM_RESOURCES","Insufficient NVRAM resources exist to complete the API. A reboot might be required."),
+ 0xC0000500: ("STATUS_INVALID_TASK_NAME","The specified task name is invalid."),
+ 0xC0000501: ("STATUS_INVALID_TASK_INDEX","The specified task index is invalid."),
+ 0xC0000502: ("STATUS_THREAD_ALREADY_IN_TASK","The specified thread is already joining a task."),
+ 0xC0000503: ("STATUS_CALLBACK_BYPASS","A callback has requested to bypass native code."),
+ 0xC0000602: ("STATUS_FAIL_FAST_EXCEPTION","A fail fast exception occurred. Exception handlers will not be invoked and the process will be terminated immediately."),
+ 0xC0000603: ("STATUS_IMAGE_CERT_REVOKED","Windows cannot verify the digital signature for this file. The signing certificate for this file has been revoked."),
+ 0xC0000700: ("STATUS_PORT_CLOSED","The ALPC port is closed."),
+ 0xC0000701: ("STATUS_MESSAGE_LOST","The ALPC message requested is no longer available."),
+ 0xC0000702: ("STATUS_INVALID_MESSAGE","The ALPC message supplied is invalid."),
+ 0xC0000703: ("STATUS_REQUEST_CANCELED","The ALPC message has been canceled."),
+ 0xC0000704: ("STATUS_RECURSIVE_DISPATCH","Invalid recursive dispatch attempt."),
+ 0xC0000705: ("STATUS_LPC_RECEIVE_BUFFER_EXPECTED","No receive buffer has been supplied in a synchronous request."),
+ 0xC0000706: ("STATUS_LPC_INVALID_CONNECTION_USAGE","The connection port is used in an invalid context."),
+ 0xC0000707: ("STATUS_LPC_REQUESTS_NOT_ALLOWED","The ALPC port does not accept new request messages."),
+ 0xC0000708: ("STATUS_RESOURCE_IN_USE","The resource requested is already in use."),
+ 0xC0000709: ("STATUS_HARDWARE_MEMORY_ERROR","The hardware has reported an uncorrectable memory error."),
+ 0xC000070A: ("STATUS_THREADPOOL_HANDLE_EXCEPTION","Status 0x%08x was returned, waiting on handle 0x%x for wait 0x%p, in waiter 0x%p."),
+ 0xC000070B: ("STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED","After a callback to 0x%p(0x%p), a completion call to Set event(0x%p) failed with status 0x%08x."),
+ 0xC000070C: ("STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED","After a callback to 0x%p(0x%p), a completion call to ReleaseSemaphore(0x%p, %d) failed with status 0x%08x."),
+ 0xC000070D: ("STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED","After a callback to 0x%p(0x%p), a completion call to ReleaseMutex(%p) failed with status 0x%08x."),
+ 0xC000070E: ("STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED","After a callback to 0x%p(0x%p), a completion call to FreeLibrary(%p) failed with status 0x%08x."),
+ 0xC000070F: ("STATUS_THREADPOOL_RELEASED_DURING_OPERATION","The thread pool 0x%p was released while a thread was posting a callback to 0x%p(0x%p) to it."),
+ 0xC0000710: ("STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING","A thread pool worker thread is impersonating a client, after a callback to 0x%p(0x%p). This is unexpected, indicating that the callback is missing a call to revert the impersonation."),
+ 0xC0000711: ("STATUS_APC_RETURNED_WHILE_IMPERSONATING","A thread pool worker thread is impersonating a client, after executing an APC. This is unexpected, indicating that the APC is missing a call to revert the impersonation."),
+ 0xC0000712: ("STATUS_PROCESS_IS_PROTECTED","Either the target process, or the target thread's containing process, is a protected process."),
+ 0xC0000713: ("STATUS_MCA_EXCEPTION","A thread is getting dispatched with MCA EXCEPTION because of MCA."),
+ 0xC0000714: ("STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE","The client certificate account mapping is not unique."),
+ 0xC0000715: ("STATUS_SYMLINK_CLASS_DISABLED","The symbolic link cannot be followed because its type is disabled."),
+ 0xC0000716: ("STATUS_INVALID_IDN_NORMALIZATION","Indicates that the specified string is not valid for IDN normalization."),
+ 0xC0000717: ("STATUS_NO_UNICODE_TRANSLATION","No mapping for the Unicode character exists in the target multi-byte code page."),
+ 0xC0000718: ("STATUS_ALREADY_REGISTERED","The provided callback is already registered."),
+ 0xC0000719: ("STATUS_CONTEXT_MISMATCH","The provided context did not match the target."),
+ 0xC000071A: ("STATUS_PORT_ALREADY_HAS_COMPLETION_LIST","The specified port already has a completion list."),
+ 0xC000071B: ("STATUS_CALLBACK_RETURNED_THREAD_PRIORITY","A threadpool worker thread entered a callback at thread base priority 0x%x and exited at priority 0x%x. This is unexpected, indicating that the callback missed restoring the priority."),
+ 0xC000071C: ("STATUS_INVALID_THREAD","An invalid thread, handle %p, is specified for this operation. Possibly, a threadpool worker thread was specified."),
+ 0xC000071D: ("STATUS_CALLBACK_RETURNED_TRANSACTION","A threadpool worker thread entered a callback, which left transaction state. This is unexpected, indicating that the callback missed clearing the transaction."),
+ 0xC000071E: ("STATUS_CALLBACK_RETURNED_LDR_LOCK","A threadpool worker thread entered a callback, which left the loader lock held. This is unexpected, indicating that the callback missed releasing the lock."),
+ 0xC000071F: ("STATUS_CALLBACK_RETURNED_LANG","A threadpool worker thread entered a callback, which left with preferred languages set. This is unexpected, indicating that the callback missed clearing them."),
+ 0xC0000720: ("STATUS_CALLBACK_RETURNED_PRI_BACK","A threadpool worker thread entered a callback, which left with background priorities set. This is unexpected, indicating that the callback missed restoring the original priorities."),
+ 0xC0000800: ("STATUS_DISK_REPAIR_DISABLED","The attempted operation required self healing to be enabled."),
+ 0xC0000801: ("STATUS_DS_DOMAIN_RENAME_IN_PROGRESS","The directory service cannot perform the requested operation because a domain rename operation is in progress."),
+ 0xC0000802: ("STATUS_DISK_QUOTA_EXCEEDED","An operation failed because the storage quota was exceeded."),
+ 0xC0000804: ("STATUS_CONTENT_BLOCKED","An operation failed because the content was blocked."),
+ 0xC0000805: ("STATUS_BAD_CLUSTERS","The operation could not be completed due to bad clusters on disk."),
+ 0xC0000806: ("STATUS_VOLUME_DIRTY","The operation could not be completed because the volume is dirty. Please run the Chkdsk utility and try again."),
+ 0xC0000901: ("STATUS_FILE_CHECKED_OUT","This file is checked out or locked for editing by another user."),
+ 0xC0000902: ("STATUS_CHECKOUT_REQUIRED","The file must be checked out before saving changes."),
+ 0xC0000903: ("STATUS_BAD_FILE_TYPE","The file type being saved or retrieved has been blocked."),
+ 0xC0000904: ("STATUS_FILE_TOO_LARGE","The file size exceeds the limit allowed and cannot be saved."),
+ 0xC0000905: ("STATUS_FORMS_AUTH_REQUIRED","Access Denied. Before opening files in this location, you must first browse to the e.g. site and select the option to log on automatically."),
+ 0xC0000906: ("STATUS_VIRUS_INFECTED","The operation did not complete successfully because the file contains a virus."),
+ 0xC0000907: ("STATUS_VIRUS_DELETED","This file contains a virus and cannot be opened. Due to the nature of this virus, the file has been removed from this location."),
+ 0xC0000908: ("STATUS_BAD_MCFG_TABLE","The resources required for this device conflict with the MCFG table."),
+ 0xC0000909: ("STATUS_CANNOT_BREAK_OPLOCK","The operation did not complete successfully because it would cause an oplock to be broken. The caller has requested that existing oplocks not be broken."),
+ 0xC0009898: ("STATUS_WOW_ASSERTION","WOW Assertion Error."),
+ 0xC000A000: ("STATUS_INVALID_SIGNATURE","The cryptographic signature is invalid."),
+ 0xC000A001: ("STATUS_HMAC_NOT_SUPPORTED","The cryptographic provider does not support HMAC."),
+ 0xC000A010: ("STATUS_IPSEC_QUEUE_OVERFLOW","The IPsec queue overflowed."),
+ 0xC000A011: ("STATUS_ND_QUEUE_OVERFLOW","The neighbor discovery queue overflowed."),
+ 0xC000A012: ("STATUS_HOPLIMIT_EXCEEDED","An Internet Control Message Protocol (ICMP) hop limit exceeded error was received."),
+ 0xC000A013: ("STATUS_PROTOCOL_NOT_SUPPORTED","The protocol is not installed on the local machine."),
+ 0xC000A080: ("STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED","{Delayed Write Failed} Windows was unable to save all the data for the file %hs; the data has been lost. This error may be caused by network connectivity issues. Try to save this file elsewhere."),
+ 0xC000A081: ("STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR","{Delayed Write Failed} Windows was unable to save all the data for the file %hs; the data has been lost. This error was returned by the server on which the file exists. Try to save this file elsewhere."),
+ 0xC000A082: ("STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR","{Delayed Write Failed} Windows was unable to save all the data for the file %hs; the data has been lost. This error may be caused if the device has been removed or the media is write-protected."),
+ 0xC000A083: ("STATUS_XML_PARSE_ERROR","Windows was unable to parse the requested XML data."),
+ 0xC000A084: ("STATUS_XMLDSIG_ERROR","An error was encountered while processing an XML digital signature."),
+ 0xC000A085: ("STATUS_WRONG_COMPARTMENT","This indicates that the caller made the connection request in the wrong routing compartment."),
+ 0xC000A086: ("STATUS_AUTHIP_FAILURE","This indicates that there was an AuthIP failure when attempting to connect to the remote host."),
+ 0xC000A087: ("STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS","OID mapped groups cannot have members."),
+ 0xC000A088: ("STATUS_DS_OID_NOT_FOUND","The specified OID cannot be found."),
+ 0xC000A100: ("STATUS_HASH_NOT_SUPPORTED","Hash generation for the specified version and hash type is not enabled on server."),
+ 0xC000A101: ("STATUS_HASH_NOT_PRESENT","The hash requests is not present or not up to date with the current file contents."),
+ 0xC0010001: ("DBG_NO_STATE_CHANGE","The debugger did not perform a state change."),
+ 0xC0010002: ("DBG_APP_NOT_IDLE","The debugger found that the application is not idle."),
+ 0xC0020001: ("RPC_NT_INVALID_STRING_BINDING","The string binding is invalid."),
+ 0xC0020002: ("RPC_NT_WRONG_KIND_OF_BINDING","The binding handle is not the correct type."),
+ 0xC0020003: ("RPC_NT_INVALID_BINDING","The binding handle is invalid."),
+ 0xC0020004: ("RPC_NT_PROTSEQ_NOT_SUPPORTED","The RPC protocol sequence is not supported."),
+ 0xC0020005: ("RPC_NT_INVALID_RPC_PROTSEQ","The RPC protocol sequence is invalid."),
+ 0xC0020006: ("RPC_NT_INVALID_STRING_UUID","The string UUID is invalid."),
+ 0xC0020007: ("RPC_NT_INVALID_ENDPOINT_FORMAT","The endpoint format is invalid."),
+ 0xC0020008: ("RPC_NT_INVALID_NET_ADDR","The network address is invalid."),
+ 0xC0020009: ("RPC_NT_NO_ENDPOINT_FOUND","No endpoint was found."),
+ 0xC002000A: ("RPC_NT_INVALID_TIMEOUT","The time-out value is invalid."),
+ 0xC002000B: ("RPC_NT_OBJECT_NOT_FOUND","The object UUID was not found."),
+ 0xC002000C: ("RPC_NT_ALREADY_REGISTERED","The object UUID has already been registered."),
+ 0xC002000D: ("RPC_NT_TYPE_ALREADY_REGISTERED","The type UUID has already been registered."),
+ 0xC002000E: ("RPC_NT_ALREADY_LISTENING","The RPC server is already listening."),
+ 0xC002000F: ("RPC_NT_NO_PROTSEQS_REGISTERED","No protocol sequences have been registered."),
+ 0xC0020010: ("RPC_NT_NOT_LISTENING","The RPC server is not listening."),
+ 0xC0020011: ("RPC_NT_UNKNOWN_MGR_TYPE","The manager type is unknown."),
+ 0xC0020012: ("RPC_NT_UNKNOWN_IF","The interface is unknown."),
+ 0xC0020013: ("RPC_NT_NO_BINDINGS","There are no bindings."),
+ 0xC0020014: ("RPC_NT_NO_PROTSEQS","There are no protocol sequences."),
+ 0xC0020015: ("RPC_NT_CANT_CREATE_ENDPOINT","The endpoint cannot be created."),
+ 0xC0020016: ("RPC_NT_OUT_OF_RESOURCES","Insufficient resources are available to complete this operation."),
+ 0xC0020017: ("RPC_NT_SERVER_UNAVAILABLE","The RPC server is unavailable."),
+ 0xC0020018: ("RPC_NT_SERVER_TOO_BUSY","The RPC server is too busy to complete this operation."),
+ 0xC0020019: ("RPC_NT_INVALID_NETWORK_OPTIONS","The network options are invalid."),
+ 0xC002001A: ("RPC_NT_NO_CALL_ACTIVE","No RPCs are active on this thread."),
+ 0xC002001B: ("RPC_NT_CALL_FAILED","The RPC failed."),
+ 0xC002001C: ("RPC_NT_CALL_FAILED_DNE","The RPC failed and did not execute."),
+ 0xC002001D: ("RPC_NT_PROTOCOL_ERROR","An RPC protocol error occurred."),
+ 0xC002001F: ("RPC_NT_UNSUPPORTED_TRANS_SYN","The RPC server does not support the transfer syntax."),
+ 0xC0020021: ("RPC_NT_UNSUPPORTED_TYPE","The type UUID is not supported."),
+ 0xC0020022: ("RPC_NT_INVALID_TAG","The tag is invalid."),
+ 0xC0020023: ("RPC_NT_INVALID_BOUND","The array bounds are invalid."),
+ 0xC0020024: ("RPC_NT_NO_ENTRY_NAME","The binding does not contain an entry name."),
+ 0xC0020025: ("RPC_NT_INVALID_NAME_SYNTAX","The name syntax is invalid."),
+ 0xC0020026: ("RPC_NT_UNSUPPORTED_NAME_SYNTAX","The name syntax is not supported."),
+ 0xC0020028: ("RPC_NT_UUID_NO_ADDRESS","No network address is available to construct a UUID."),
+ 0xC0020029: ("RPC_NT_DUPLICATE_ENDPOINT","The endpoint is a duplicate."),
+ 0xC002002A: ("RPC_NT_UNKNOWN_AUTHN_TYPE","The authentication type is unknown."),
+ 0xC002002B: ("RPC_NT_MAX_CALLS_TOO_SMALL","The maximum number of calls is too small."),
+ 0xC002002C: ("RPC_NT_STRING_TOO_LONG","The string is too long."),
+ 0xC002002D: ("RPC_NT_PROTSEQ_NOT_FOUND","The RPC protocol sequence was not found."),
+ 0xC002002E: ("RPC_NT_PROCNUM_OUT_OF_RANGE","The procedure number is out of range."),
+ 0xC002002F: ("RPC_NT_BINDING_HAS_NO_AUTH","The binding does not contain any authentication information."),
+ 0xC0020030: ("RPC_NT_UNKNOWN_AUTHN_SERVICE","The authentication service is unknown."),
+ 0xC0020031: ("RPC_NT_UNKNOWN_AUTHN_LEVEL","The authentication level is unknown."),
+ 0xC0020032: ("RPC_NT_INVALID_AUTH_IDENTITY","The security context is invalid."),
+ 0xC0020033: ("RPC_NT_UNKNOWN_AUTHZ_SERVICE","The authorization service is unknown."),
+ 0xC0020034: ("EPT_NT_INVALID_ENTRY","The entry is invalid."),
+ 0xC0020035: ("EPT_NT_CANT_PERFORM_OP","The operation cannot be performed."),
+ 0xC0020036: ("EPT_NT_NOT_REGISTERED","No more endpoints are available from the endpoint mapper."),
+ 0xC0020037: ("RPC_NT_NOTHING_TO_EXPORT","No interfaces have been exported."),
+ 0xC0020038: ("RPC_NT_INCOMPLETE_NAME","The entry name is incomplete."),
+ 0xC0020039: ("RPC_NT_INVALID_VERS_OPTION","The version option is invalid."),
+ 0xC002003A: ("RPC_NT_NO_MORE_MEMBERS","There are no more members."),
+ 0xC002003B: ("RPC_NT_NOT_ALL_OBJS_UNEXPORTED","There is nothing to unexport."),
+ 0xC002003C: ("RPC_NT_INTERFACE_NOT_FOUND","The interface was not found."),
+ 0xC002003D: ("RPC_NT_ENTRY_ALREADY_EXISTS","The entry already exists."),
+ 0xC002003E: ("RPC_NT_ENTRY_NOT_FOUND","The entry was not found."),
+ 0xC002003F: ("RPC_NT_NAME_SERVICE_UNAVAILABLE","The name service is unavailable."),
+ 0xC0020040: ("RPC_NT_INVALID_NAF_ID","The network address family is invalid."),
+ 0xC0020041: ("RPC_NT_CANNOT_SUPPORT","The requested operation is not supported."),
+ 0xC0020042: ("RPC_NT_NO_CONTEXT_AVAILABLE","No security context is available to allow impersonation."),
+ 0xC0020043: ("RPC_NT_INTERNAL_ERROR","An internal error occurred in the RPC."),
+ 0xC0020044: ("RPC_NT_ZERO_DIVIDE","The RPC server attempted to divide an integer by zero."),
+ 0xC0020045: ("RPC_NT_ADDRESS_ERROR","An addressing error occurred in the RPC server."),
+ 0xC0020046: ("RPC_NT_FP_DIV_ZERO","A floating point operation at the RPC server caused a divide by zero."),
+ 0xC0020047: ("RPC_NT_FP_UNDERFLOW","A floating point underflow occurred at the RPC server."),
+ 0xC0020048: ("RPC_NT_FP_OVERFLOW","A floating point overflow occurred at the RPC server."),
+ 0xC0020049: ("RPC_NT_CALL_IN_PROGRESS","An RPC is already in progress for this thread."),
+ 0xC002004A: ("RPC_NT_NO_MORE_BINDINGS","There are no more bindings."),
+ 0xC002004B: ("RPC_NT_GROUP_MEMBER_NOT_FOUND","The group member was not found."),
+ 0xC002004C: ("EPT_NT_CANT_CREATE","The endpoint mapper database entry could not be created."),
+ 0xC002004D: ("RPC_NT_INVALID_OBJECT","The object UUID is the nil UUID."),
+ 0xC002004F: ("RPC_NT_NO_INTERFACES","No interfaces have been registered."),
+ 0xC0020050: ("RPC_NT_CALL_CANCELLED","The RPC was canceled."),
+ 0xC0020051: ("RPC_NT_BINDING_INCOMPLETE","The binding handle does not contain all the required information."),
+ 0xC0020052: ("RPC_NT_COMM_FAILURE","A communications failure occurred during an RPC."),
+ 0xC0020053: ("RPC_NT_UNSUPPORTED_AUTHN_LEVEL","The requested authentication level is not supported."),
+ 0xC0020054: ("RPC_NT_NO_PRINC_NAME","No principal name was registered."),
+ 0xC0020055: ("RPC_NT_NOT_RPC_ERROR","The error specified is not a valid Windows RPC error code."),
+ 0xC0020057: ("RPC_NT_SEC_PKG_ERROR","A security package-specific error occurred."),
+ 0xC0020058: ("RPC_NT_NOT_CANCELLED","The thread was not canceled."),
+ 0xC0020062: ("RPC_NT_INVALID_ASYNC_HANDLE","Invalid asynchronous RPC handle."),
+ 0xC0020063: ("RPC_NT_INVALID_ASYNC_CALL","Invalid asynchronous RPC call handle for this operation."),
+ 0xC0020064: ("RPC_NT_PROXY_ACCESS_DENIED","Access to the HTTP proxy is denied."),
+ 0xC0030001: ("RPC_NT_NO_MORE_ENTRIES","The list of RPC servers available for auto-handle binding has been exhausted."),
+ 0xC0030002: ("RPC_NT_SS_CHAR_TRANS_OPEN_FAIL","The file designated by DCERPCCHARTRANS cannot be opened."),
+ 0xC0030003: ("RPC_NT_SS_CHAR_TRANS_SHORT_FILE","The file containing the character translation table has fewer than 512 bytes."),
+ 0xC0030004: ("RPC_NT_SS_IN_NULL_CONTEXT","A null context handle is passed as an [in] parameter."),
+ 0xC0030005: ("RPC_NT_SS_CONTEXT_MISMATCH","The context handle does not match any known context handles."),
+ 0xC0030006: ("RPC_NT_SS_CONTEXT_DAMAGED","The context handle changed during a call."),
+ 0xC0030007: ("RPC_NT_SS_HANDLES_MISMATCH","The binding handles passed to an RPC do not match."),
+ 0xC0030008: ("RPC_NT_SS_CANNOT_GET_CALL_HANDLE","The stub is unable to get the call handle."),
+ 0xC0030009: ("RPC_NT_NULL_REF_POINTER","A null reference pointer was passed to the stub."),
+ 0xC003000A: ("RPC_NT_ENUM_VALUE_OUT_OF_RANGE","The enumeration value is out of range."),
+ 0xC003000B: ("RPC_NT_BYTE_COUNT_TOO_SMALL","The byte count is too small."),
+ 0xC003000C: ("RPC_NT_BAD_STUB_DATA","The stub received bad data."),
+ 0xC0030059: ("RPC_NT_INVALID_ES_ACTION","Invalid operation on the encoding/decoding handle."),
+ 0xC003005A: ("RPC_NT_WRONG_ES_VERSION","Incompatible version of the serializing package."),
+ 0xC003005B: ("RPC_NT_WRONG_STUB_VERSION","Incompatible version of the RPC stub."),
+ 0xC003005C: ("RPC_NT_INVALID_PIPE_OBJECT","The RPC pipe object is invalid or corrupt."),
+ 0xC003005D: ("RPC_NT_INVALID_PIPE_OPERATION","An invalid operation was attempted on an RPC pipe object."),
+ 0xC003005E: ("RPC_NT_WRONG_PIPE_VERSION","Unsupported RPC pipe version."),
+ 0xC003005F: ("RPC_NT_PIPE_CLOSED","The RPC pipe object has already been closed."),
+ 0xC0030060: ("RPC_NT_PIPE_DISCIPLINE_ERROR","The RPC call completed before all pipes were processed."),
+ 0xC0030061: ("RPC_NT_PIPE_EMPTY","No more data is available from the RPC pipe."),
+ 0xC0040035: ("STATUS_PNP_BAD_MPS_TABLE","A device is missing in the system BIOS MPS table. This device will not be used. Contact your system vendor for a system BIOS update."),
+ 0xC0040036: ("STATUS_PNP_TRANSLATION_FAILED","A translator failed to translate resources."),
+ 0xC0040037: ("STATUS_PNP_IRQ_TRANSLATION_FAILED","An IRQ translator failed to translate resources."),
+ 0xC0040038: ("STATUS_PNP_INVALID_ID","Driver %2 returned an invalid ID for a child device (%3)."),
+ 0xC0040039: ("STATUS_IO_REISSUE_AS_CACHED","Reissue the given operation as a cached I/O operation"),
+ 0xC00A0001: ("STATUS_CTX_WINSTATION_NAME_INVALID","Session name %1 is invalid."),
+ 0xC00A0002: ("STATUS_CTX_INVALID_PD","The protocol driver %1 is invalid."),
+ 0xC00A0003: ("STATUS_CTX_PD_NOT_FOUND","The protocol driver %1 was not found in the system path."),
+ 0xC00A0006: ("STATUS_CTX_CLOSE_PENDING","A close operation is pending on the terminal connection."),
+ 0xC00A0007: ("STATUS_CTX_NO_OUTBUF","No free output buffers are available."),
+ 0xC00A0008: ("STATUS_CTX_MODEM_INF_NOT_FOUND","The MODEM.INF file was not found."),
+ 0xC00A0009: ("STATUS_CTX_INVALID_MODEMNAME","The modem (%1) was not found in the MODEM.INF file."),
+ 0xC00A000A: ("STATUS_CTX_RESPONSE_ERROR","The modem did not accept the command sent to it. Verify that the configured modem name matches the attached modem."),
+ 0xC00A000B: ("STATUS_CTX_MODEM_RESPONSE_TIMEOUT","The modem did not respond to the command sent to it. Verify that the modem cable is properly attached and the modem is turned on."),
+ 0xC00A000C: ("STATUS_CTX_MODEM_RESPONSE_NO_CARRIER","Carrier detection has failed or the carrier has been dropped due to disconnection."),
+ 0xC00A000D: ("STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE","A dial tone was not detected within the required time. Verify that the phone cable is properly attached and functional."),
+ 0xC00A000E: ("STATUS_CTX_MODEM_RESPONSE_BUSY","A busy signal was detected at a remote site on callback."),
+ 0xC00A000F: ("STATUS_CTX_MODEM_RESPONSE_VOICE","A voice was detected at a remote site on callback."),
+ 0xC00A0010: ("STATUS_CTX_TD_ERROR","Transport driver error."),
+ 0xC00A0012: ("STATUS_CTX_LICENSE_CLIENT_INVALID","The client you are using is not licensed to use this system. Your logon request is denied."),
+ 0xC00A0013: ("STATUS_CTX_LICENSE_NOT_AVAILABLE","The system has reached its licensed logon limit. Try again later."),
+ 0xC00A0014: ("STATUS_CTX_LICENSE_EXPIRED","The system license has expired. Your logon request is denied."),
+ 0xC00A0015: ("STATUS_CTX_WINSTATION_NOT_FOUND","The specified session cannot be found."),
+ 0xC00A0016: ("STATUS_CTX_WINSTATION_NAME_COLLISION","The specified session name is already in use."),
+ 0xC00A0017: ("STATUS_CTX_WINSTATION_BUSY","The requested operation cannot be completed because the terminal connection is currently processing a connect, disconnect, reset, or delete operation."),
+ 0xC00A0018: ("STATUS_CTX_BAD_VIDEO_MODE","An attempt has been made to connect to a session whose video mode is not supported by the current client."),
+ 0xC00A0022: ("STATUS_CTX_GRAPHICS_INVALID","The application attempted to enable DOS graphics mode. DOS graphics mode is not supported."),
+ 0xC00A0024: ("STATUS_CTX_NOT_CONSOLE","The requested operation can be performed only on the system console. This is most often the result of a driver or system DLL requiring direct console access."),
+ 0xC00A0026: ("STATUS_CTX_CLIENT_QUERY_TIMEOUT","The client failed to respond to the server connect message."),
+ 0xC00A0027: ("STATUS_CTX_CONSOLE_DISCONNECT","Disconnecting the console session is not supported."),
+ 0xC00A0028: ("STATUS_CTX_CONSOLE_CONNECT","Reconnecting a disconnected session to the console is not supported."),
+ 0xC00A002A: ("STATUS_CTX_SHADOW_DENIED","The request to control another session remotely was denied."),
+ 0xC00A002B: ("STATUS_CTX_WINSTATION_ACCESS_DENIED","A process has requested access to a session, but has not been granted those access rights."),
+ 0xC00A002E: ("STATUS_CTX_INVALID_WD","The terminal connection driver %1 is invalid."),
+ 0xC00A002F: ("STATUS_CTX_WD_NOT_FOUND","The terminal connection driver %1 was not found in the system path."),
+ 0xC00A0030: ("STATUS_CTX_SHADOW_INVALID","The requested session cannot be controlled remotely. You cannot control your own session, a session that is trying to control your session, a session that has no user logged on, or other sessions from the console."),
+ 0xC00A0031: ("STATUS_CTX_SHADOW_DISABLED","The requested session is not configured to allow remote control."),
+ 0xC00A0032: ("STATUS_RDP_PROTOCOL_ERROR","The RDP protocol component %2 detected an error in the protocol stream and has disconnected the client."),
+ 0xC00A0033: ("STATUS_CTX_CLIENT_LICENSE_NOT_SET","Your request to connect to this terminal server has been rejected. Your terminal server client license number has not been entered for this copy of the terminal client. Contact your system administrator for help in entering a valid, unique license number for this terminal server client. Click OK to continue."),
+ 0xC00A0034: ("STATUS_CTX_CLIENT_LICENSE_IN_USE","Your request to connect to this terminal server has been rejected. Your terminal server client license number is currently being used by another user. Contact your system administrator to obtain a new copy of the terminal server client with a valid, unique license number. Click OK to continue."),
+ 0xC00A0035: ("STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE","The remote control of the console was terminated because the display mode was changed. Changing the display mode in a remote control session is not supported."),
+ 0xC00A0036: ("STATUS_CTX_SHADOW_NOT_RUNNING","Remote control could not be terminated because the specified session is not currently being remotely controlled."),
+ 0xC00A0037: ("STATUS_CTX_LOGON_DISABLED","Your interactive logon privilege has been disabled. Contact your system administrator."),
+ 0xC00A0038: ("STATUS_CTX_SECURITY_LAYER_ERROR","The terminal server security layer detected an error in the protocol stream and has disconnected the client."),
+ 0xC00A0039: ("STATUS_TS_INCOMPATIBLE_SESSIONS","The target session is incompatible with the current session."),
+ 0xC00B0001: ("STATUS_MUI_FILE_NOT_FOUND","The resource loader failed to find an MUI file."),
+ 0xC00B0002: ("STATUS_MUI_INVALID_FILE","The resource loader failed to load an MUI file because the file failed to pass validation."),
+ 0xC00B0003: ("STATUS_MUI_INVALID_RC_CONFIG","The RC manifest is corrupted with garbage data, is an unsupported version, or is missing a required item."),
+ 0xC00B0004: ("STATUS_MUI_INVALID_LOCALE_NAME","The RC manifest has an invalid culture name."),
+ 0xC00B0005: ("STATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME","The RC manifest has and invalid ultimate fallback name."),
+ 0xC00B0006: ("STATUS_MUI_FILE_NOT_LOADED","The resource loader cache does not have a loaded MUI entry."),
+ 0xC00B0007: ("STATUS_RESOURCE_ENUM_USER_STOP","The user stopped resource enumeration."),
+ 0xC0130001: ("STATUS_CLUSTER_INVALID_NODE","The cluster node is not valid."),
+ 0xC0130002: ("STATUS_CLUSTER_NODE_EXISTS","The cluster node already exists."),
+ 0xC0130003: ("STATUS_CLUSTER_JOIN_IN_PROGRESS","A node is in the process of joining the cluster."),
+ 0xC0130004: ("STATUS_CLUSTER_NODE_NOT_FOUND","The cluster node was not found."),
+ 0xC0130005: ("STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND","The cluster local node information was not found."),
+ 0xC0130006: ("STATUS_CLUSTER_NETWORK_EXISTS","The cluster network already exists."),
+ 0xC0130007: ("STATUS_CLUSTER_NETWORK_NOT_FOUND","The cluster network was not found."),
+ 0xC0130008: ("STATUS_CLUSTER_NETINTERFACE_EXISTS","The cluster network interface already exists."),
+ 0xC0130009: ("STATUS_CLUSTER_NETINTERFACE_NOT_FOUND","The cluster network interface was not found."),
+ 0xC013000A: ("STATUS_CLUSTER_INVALID_REQUEST","The cluster request is not valid for this object."),
+ 0xC013000B: ("STATUS_CLUSTER_INVALID_NETWORK_PROVIDER","The cluster network provider is not valid."),
+ 0xC013000C: ("STATUS_CLUSTER_NODE_DOWN","The cluster node is down."),
+ 0xC013000D: ("STATUS_CLUSTER_NODE_UNREACHABLE","The cluster node is not reachable."),
+ 0xC013000E: ("STATUS_CLUSTER_NODE_NOT_MEMBER","The cluster node is not a member of the cluster."),
+ 0xC013000F: ("STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS","A cluster join operation is not in progress."),
+ 0xC0130010: ("STATUS_CLUSTER_INVALID_NETWORK","The cluster network is not valid."),
+ 0xC0130011: ("STATUS_CLUSTER_NO_NET_ADAPTERS","No network adapters are available."),
+ 0xC0130012: ("STATUS_CLUSTER_NODE_UP","The cluster node is up."),
+ 0xC0130013: ("STATUS_CLUSTER_NODE_PAUSED","The cluster node is paused."),
+ 0xC0130014: ("STATUS_CLUSTER_NODE_NOT_PAUSED","The cluster node is not paused."),
+ 0xC0130015: ("STATUS_CLUSTER_NO_SECURITY_CONTEXT","No cluster security context is available."),
+ 0xC0130016: ("STATUS_CLUSTER_NETWORK_NOT_INTERNAL","The cluster network is not configured for internal cluster communication."),
+ 0xC0130017: ("STATUS_CLUSTER_POISONED","The cluster node has been poisoned."),
+ 0xC0140001: ("STATUS_ACPI_INVALID_OPCODE","An attempt was made to run an invalid AML opcode."),
+ 0xC0140002: ("STATUS_ACPI_STACK_OVERFLOW","The AML interpreter stack has overflowed."),
+ 0xC0140003: ("STATUS_ACPI_ASSERT_FAILED","An inconsistent state has occurred."),
+ 0xC0140004: ("STATUS_ACPI_INVALID_INDEX","An attempt was made to access an array outside its bounds."),
+ 0xC0140005: ("STATUS_ACPI_INVALID_ARGUMENT","A required argument was not specified."),
+ 0xC0140006: ("STATUS_ACPI_FATAL","A fatal error has occurred."),
+ 0xC0140007: ("STATUS_ACPI_INVALID_SUPERNAME","An invalid SuperName was specified."),
+ 0xC0140008: ("STATUS_ACPI_INVALID_ARGTYPE","An argument with an incorrect type was specified."),
+ 0xC0140009: ("STATUS_ACPI_INVALID_OBJTYPE","An object with an incorrect type was specified."),
+ 0xC014000A: ("STATUS_ACPI_INVALID_TARGETTYPE","A target with an incorrect type was specified."),
+ 0xC014000B: ("STATUS_ACPI_INCORRECT_ARGUMENT_COUNT","An incorrect number of arguments was specified."),
+ 0xC014000C: ("STATUS_ACPI_ADDRESS_NOT_MAPPED","An address failed to translate."),
+ 0xC014000D: ("STATUS_ACPI_INVALID_EVENTTYPE","An incorrect event type was specified."),
+ 0xC014000E: ("STATUS_ACPI_HANDLER_COLLISION","A handler for the target already exists."),
+ 0xC014000F: ("STATUS_ACPI_INVALID_DATA","Invalid data for the target was specified."),
+ 0xC0140010: ("STATUS_ACPI_INVALID_REGION","An invalid region for the target was specified."),
+ 0xC0140011: ("STATUS_ACPI_INVALID_ACCESS_SIZE","An attempt was made to access a field outside the defined range."),
+ 0xC0140012: ("STATUS_ACPI_ACQUIRE_GLOBAL_LOCK","The global system lock could not be acquired."),
+ 0xC0140013: ("STATUS_ACPI_ALREADY_INITIALIZED","An attempt was made to reinitialize the ACPI subsystem."),
+ 0xC0140014: ("STATUS_ACPI_NOT_INITIALIZED","The ACPI subsystem has not been initialized."),
+ 0xC0140015: ("STATUS_ACPI_INVALID_MUTEX_LEVEL","An incorrect mutex was specified."),
+ 0xC0140016: ("STATUS_ACPI_MUTEX_NOT_OWNED","The mutex is not currently owned."),
+ 0xC0140017: ("STATUS_ACPI_MUTEX_NOT_OWNER","An attempt was made to access the mutex by a process that was not the owner."),
+ 0xC0140018: ("STATUS_ACPI_RS_ACCESS","An error occurred during an access to region space."),
+ 0xC0140019: ("STATUS_ACPI_INVALID_TABLE","An attempt was made to use an incorrect table."),
+ 0xC0140020: ("STATUS_ACPI_REG_HANDLER_FAILED","The registration of an ACPI event failed."),
+ 0xC0140021: ("STATUS_ACPI_POWER_REQUEST_FAILED","An ACPI power object failed to transition state."),
+ 0xC0150001: ("STATUS_SXS_SECTION_NOT_FOUND","The requested section is not present in the activation context."),
+ 0xC0150002: ("STATUS_SXS_CANT_GEN_ACTCTX","Windows was unble to process the application binding information. Refer to the system event log for further information."),
+ 0xC0150003: ("STATUS_SXS_INVALID_ACTCTXDATA_FORMAT","The application binding data format is invalid."),
+ 0xC0150004: ("STATUS_SXS_ASSEMBLY_NOT_FOUND","The referenced assembly is not installed on the system."),
+ 0xC0150005: ("STATUS_SXS_MANIFEST_FORMAT_ERROR","The manifest file does not begin with the required tag and format information."),
+ 0xC0150006: ("STATUS_SXS_MANIFEST_PARSE_ERROR","The manifest file contains one or more syntax errors."),
+ 0xC0150007: ("STATUS_SXS_ACTIVATION_CONTEXT_DISABLED","The application attempted to activate a disabled activation context."),
+ 0xC0150008: ("STATUS_SXS_KEY_NOT_FOUND","The requested lookup key was not found in any active activation context."),
+ 0xC0150009: ("STATUS_SXS_VERSION_CONFLICT","A component version required by the application conflicts with another component version that is already active."),
+ 0xC015000A: ("STATUS_SXS_WRONG_SECTION_TYPE","The type requested activation context section does not match the query API used."),
+ 0xC015000B: ("STATUS_SXS_THREAD_QUERIES_DISABLED","Lack of system resources has required isolated activation to be disabled for the current thread of execution."),
+ 0xC015000C: ("STATUS_SXS_ASSEMBLY_MISSING","The referenced assembly could not be found."),
+ 0xC015000E: ("STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET","An attempt to set the process default activation context failed because the process default activation context was already set."),
+ 0xC015000F: ("STATUS_SXS_EARLY_DEACTIVATION","The activation context being deactivated is not the most recently activated one."),
+ 0xC0150010: ("STATUS_SXS_INVALID_DEACTIVATION","The activation context being deactivated is not active for the current thread of execution."),
+ 0xC0150011: ("STATUS_SXS_MULTIPLE_DEACTIVATION","The activation context being deactivated has already been deactivated."),
+ 0xC0150012: ("STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY","The activation context of the system default assembly could not be generated."),
+ 0xC0150013: ("STATUS_SXS_PROCESS_TERMINATION_REQUESTED","A component used by the isolation facility has requested that the process be terminated."),
+ 0xC0150014: ("STATUS_SXS_CORRUPT_ACTIVATION_STACK","The activation context activation stack for the running thread of execution is corrupt."),
+ 0xC0150015: ("STATUS_SXS_CORRUPTION","The application isolation metadata for this process or thread has become corrupt."),
+ 0xC0150016: ("STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE","The value of an attribute in an identity is not within the legal range."),
+ 0xC0150017: ("STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME","The name of an attribute in an identity is not within the legal range."),
+ 0xC0150018: ("STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE","An identity contains two definitions for the same attribute."),
+ 0xC0150019: ("STATUS_SXS_IDENTITY_PARSE_ERROR","The identity string is malformed. This may be due to a trailing comma, more than two unnamed attributes, a missing attribute name, or a missing attribute value."),
+ 0xC015001A: ("STATUS_SXS_COMPONENT_STORE_CORRUPT","The component store has become corrupted."),
+ 0xC015001B: ("STATUS_SXS_FILE_HASH_MISMATCH","A component's file does not match the verification information present in the component manifest."),
+ 0xC015001C: ("STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT","The identities of the manifests are identical, but their contents are different."),
+ 0xC015001D: ("STATUS_SXS_IDENTITIES_DIFFERENT","The component identities are different."),
+ 0xC015001E: ("STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT","The assembly is not a deployment."),
+ 0xC015001F: ("STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY","The file is not a part of the assembly."),
+ 0xC0150020: ("STATUS_ADVANCED_INSTALLER_FAILED","An advanced installer failed during setup or servicing."),
+ 0xC0150021: ("STATUS_XML_ENCODING_MISMATCH","The character encoding in the XML declaration did not match the encoding used in the document."),
+ 0xC0150022: ("STATUS_SXS_MANIFEST_TOO_BIG","The size of the manifest exceeds the maximum allowed."),
+ 0xC0150023: ("STATUS_SXS_SETTING_NOT_REGISTERED","The setting is not registered."),
+ 0xC0150024: ("STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE","One or more required transaction members are not present."),
+ 0xC0150025: ("STATUS_SMI_PRIMITIVE_INSTALLER_FAILED","The SMI primitive installer failed during setup or servicing."),
+ 0xC0150026: ("STATUS_GENERIC_COMMAND_FAILED","A generic command executable returned a result that indicates failure."),
+ 0xC0150027: ("STATUS_SXS_FILE_HASH_MISSING","A component is missing file verification information in its manifest."),
+ 0xC0190001: ("STATUS_TRANSACTIONAL_CONFLICT","The function attempted to use a name that is reserved for use by another transaction."),
+ 0xC0190002: ("STATUS_INVALID_TRANSACTION","The transaction handle associated with this operation is invalid."),
+ 0xC0190003: ("STATUS_TRANSACTION_NOT_ACTIVE","The requested operation was made in the context of a transaction that is no longer active."),
+ 0xC0190004: ("STATUS_TM_INITIALIZATION_FAILED","The transaction manager was unable to be successfully initialized. Transacted operations are not supported."),
+ 0xC0190005: ("STATUS_RM_NOT_ACTIVE","Transaction support within the specified file system resource manager was not started or was shut down due to an error."),
+ 0xC0190006: ("STATUS_RM_METADATA_CORRUPT","The metadata of the resource manager has been corrupted. The resource manager will not function."),
+ 0xC0190007: ("STATUS_TRANSACTION_NOT_JOINED","The resource manager attempted to prepare a transaction that it has not successfully joined."),
+ 0xC0190008: ("STATUS_DIRECTORY_NOT_RM","The specified directory does not contain a file system resource manager."),
+ 0xC019000A: ("STATUS_TRANSACTIONS_UNSUPPORTED_REMOTE","The remote server or share does not support transacted file operations."),
+ 0xC019000B: ("STATUS_LOG_RESIZE_INVALID_SIZE","The requested log size for the file system resource manager is invalid."),
+ 0xC019000C: ("STATUS_REMOTE_FILE_VERSION_MISMATCH","The remote server sent mismatching version number or Fid for a file opened with transactions."),
+ 0xC019000F: ("STATUS_CRM_PROTOCOL_ALREADY_EXISTS","The resource manager tried to register a protocol that already exists."),
+ 0xC0190010: ("STATUS_TRANSACTION_PROPAGATION_FAILED","The attempt to propagate the transaction failed."),
+ 0xC0190011: ("STATUS_CRM_PROTOCOL_NOT_FOUND","The requested propagation protocol was not registered as a CRM."),
+ 0xC0190012: ("STATUS_TRANSACTION_SUPERIOR_EXISTS","The transaction object already has a superior enlistment, and the caller attempted an operation that would have created a new superior. Only a single superior enlistment is allowed."),
+ 0xC0190013: ("STATUS_TRANSACTION_REQUEST_NOT_VALID","The requested operation is not valid on the transaction object in its current state."),
+ 0xC0190014: ("STATUS_TRANSACTION_NOT_REQUESTED","The caller has called a response API, but the response is not expected because the transaction manager did not issue the corresponding request to the caller."),
+ 0xC0190015: ("STATUS_TRANSACTION_ALREADY_ABORTED","It is too late to perform the requested operation, because the transaction has already been aborted."),
+ 0xC0190016: ("STATUS_TRANSACTION_ALREADY_COMMITTED","It is too late to perform the requested operation, because the transaction has already been committed."),
+ 0xC0190017: ("STATUS_TRANSACTION_INVALID_MARSHALL_BUFFER","The buffer passed in to NtPushTransaction or NtPullTransaction is not in a valid format."),
+ 0xC0190018: ("STATUS_CURRENT_TRANSACTION_NOT_VALID","The current transaction context associated with the thread is not a valid handle to a transaction object."),
+ 0xC0190019: ("STATUS_LOG_GROWTH_FAILED","An attempt to create space in the transactional resource manager's log failed. The failure status has been recorded in the event log."),
+ 0xC0190021: ("STATUS_OBJECT_NO_LONGER_EXISTS","The object (file, stream, or link) that corresponds to the handle has been deleted by a transaction savepoint rollback."),
+ 0xC0190022: ("STATUS_STREAM_MINIVERSION_NOT_FOUND","The specified file miniversion was not found for this transacted file open."),
+ 0xC0190023: ("STATUS_STREAM_MINIVERSION_NOT_VALID","The specified file miniversion was found but has been invalidated. The most likely cause is a transaction savepoint rollback."),
+ 0xC0190024: ("STATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION","A miniversion may be opened only in the context of the transaction that created it."),
+ 0xC0190025: ("STATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT","It is not possible to open a miniversion with modify access."),
+ 0xC0190026: ("STATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS","It is not possible to create any more miniversions for this stream."),
+ 0xC0190028: ("STATUS_HANDLE_NO_LONGER_VALID","The handle has been invalidated by a transaction. The most likely cause is the presence of memory mapping on a file or an open handle when the transaction ended or rolled back to savepoint."),
+ 0xC0190030: ("STATUS_LOG_CORRUPTION_DETECTED","The log data is corrupt."),
+ 0xC0190032: ("STATUS_RM_DISCONNECTED","The transaction outcome is unavailable because the resource manager responsible for it is disconnected."),
+ 0xC0190033: ("STATUS_ENLISTMENT_NOT_SUPERIOR","The request was rejected because the enlistment in question is not a superior enlistment."),
+ 0xC0190036: ("STATUS_FILE_IDENTITY_NOT_PERSISTENT","The file cannot be opened in a transaction because its identity depends on the outcome of an unresolved transaction."),
+ 0xC0190037: ("STATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY","The operation cannot be performed because another transaction is depending on this property not changing."),
+ 0xC0190038: ("STATUS_CANT_CROSS_RM_BOUNDARY","The operation would involve a single file with two transactional resource managers and is, therefore, not allowed."),
+ 0xC0190039: ("STATUS_TXF_DIR_NOT_EMPTY","The $Txf directory must be empty for this operation to succeed."),
+ 0xC019003A: ("STATUS_INDOUBT_TRANSACTIONS_EXIST","The operation would leave a transactional resource manager in an inconsistent state and is therefore not allowed."),
+ 0xC019003B: ("STATUS_TM_VOLATILE","The operation could not be completed because the transaction manager does not have a log."),
+ 0xC019003C: ("STATUS_ROLLBACK_TIMER_EXPIRED","A rollback could not be scheduled because a previously scheduled rollback has already executed or been queued for execution."),
+ 0xC019003D: ("STATUS_TXF_ATTRIBUTE_CORRUPT","The transactional metadata attribute on the file or directory %hs is corrupt and unreadable."),
+ 0xC019003E: ("STATUS_EFS_NOT_ALLOWED_IN_TRANSACTION","The encryption operation could not be completed because a transaction is active."),
+ 0xC019003F: ("STATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED","This object is not allowed to be opened in a transaction."),
+ 0xC0190040: ("STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE","Memory mapping (creating a mapped section) a remote file under a transaction is not supported."),
+ 0xC0190043: ("STATUS_TRANSACTION_REQUIRED_PROMOTION","Promotion was required to allow the resource manager to enlist, but the transaction was set to disallow it."),
+ 0xC0190044: ("STATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION","This file is open for modification in an unresolved transaction and may be opened for execute only by a transacted reader."),
+ 0xC0190045: ("STATUS_TRANSACTIONS_NOT_FROZEN","The request to thaw frozen transactions was ignored because transactions were not previously frozen."),
+ 0xC0190046: ("STATUS_TRANSACTION_FREEZE_IN_PROGRESS","Transactions cannot be frozen because a freeze is already in progress."),
+ 0xC0190047: ("STATUS_NOT_SNAPSHOT_VOLUME","The target volume is not a snapshot volume. This operation is valid only on a volume mounted as a snapshot."),
+ 0xC0190048: ("STATUS_NO_SAVEPOINT_WITH_OPEN_FILES","The savepoint operation failed because files are open on the transaction, which is not permitted."),
+ 0xC0190049: ("STATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION","The sparse operation could not be completed because a transaction is active on the file."),
+ 0xC019004A: ("STATUS_TM_IDENTITY_MISMATCH","The call to create a transaction manager object failed because the Tm Identity that is stored in the log file does not match the Tm Identity that was passed in as an argument."),
+ 0xC019004B: ("STATUS_FLOATED_SECTION","I/O was attempted on a section object that has been floated as a result of a transaction ending. There is no valid data."),
+ 0xC019004C: ("STATUS_CANNOT_ACCEPT_TRANSACTED_WORK","The transactional resource manager cannot currently accept transacted work due to a transient condition, such as low resources."),
+ 0xC019004D: ("STATUS_CANNOT_ABORT_TRANSACTIONS","The transactional resource manager had too many transactions outstanding that could not be aborted. The transactional resource manager has been shut down."),
+ 0xC019004E: ("STATUS_TRANSACTION_NOT_FOUND","The specified transaction was unable to be opened because it was not found."),
+ 0xC019004F: ("STATUS_RESOURCEMANAGER_NOT_FOUND","The specified resource manager was unable to be opened because it was not found."),
+ 0xC0190050: ("STATUS_ENLISTMENT_NOT_FOUND","The specified enlistment was unable to be opened because it was not found."),
+ 0xC0190051: ("STATUS_TRANSACTIONMANAGER_NOT_FOUND","The specified transaction manager was unable to be opened because it was not found."),
+ 0xC0190052: ("STATUS_TRANSACTIONMANAGER_NOT_ONLINE","The specified resource manager was unable to create an enlistment because its associated transaction manager is not online."),
+ 0xC0190053: ("STATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION","The specified transaction manager was unable to create the objects contained in its log file in the Ob namespace. Therefore, the transaction manager was unable to recover."),
+ 0xC0190054: ("STATUS_TRANSACTION_NOT_ROOT","The call to create a superior enlistment on this transaction object could not be completed because the transaction object specified for the enlistment is a subordinate branch of the transaction. Only the root of the transaction can be enlisted as a superior."),
+ 0xC0190055: ("STATUS_TRANSACTION_OBJECT_EXPIRED","Because the associated transaction manager or resource manager has been closed, the handle is no longer valid."),
+ 0xC0190056: ("STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION","The compression operation could not be completed because a transaction is active on the file."),
+ 0xC0190057: ("STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED","The specified operation could not be performed on this superior enlistment because the enlistment was not created with the corresponding completion response in the NotificationMask."),
+ 0xC0190058: ("STATUS_TRANSACTION_RECORD_TOO_LONG","The specified operation could not be performed because the record to be logged was too long. This can occur because either there are too many enlistments on this transaction or the combined RecoveryInformation being logged on behalf of those enlistments is too long."),
+ 0xC0190059: ("STATUS_NO_LINK_TRACKING_IN_TRANSACTION","The link-tracking operation could not be completed because a transaction is active."),
+ 0xC019005A: ("STATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION","This operation cannot be performed in a transaction."),
+ 0xC019005B: ("STATUS_TRANSACTION_INTEGRITY_VIOLATED","The kernel transaction manager had to abort or forget the transaction because it blocked forward progress."),
+ 0xC0190060: ("STATUS_EXPIRED_HANDLE","The handle is no longer properly associated with its transaction. It may have been opened in a transactional resource manager that was subsequently forced to restart. Please close the handle and open a new one."),
+ 0xC0190061: ("STATUS_TRANSACTION_NOT_ENLISTED","The specified operation could not be performed because the resource manager is not enlisted in the transaction."),
+ 0xC01A0001: ("STATUS_LOG_SECTOR_INVALID","The log service found an invalid log sector."),
+ 0xC01A0002: ("STATUS_LOG_SECTOR_PARITY_INVALID","The log service encountered a log sector with invalid block parity."),
+ 0xC01A0003: ("STATUS_LOG_SECTOR_REMAPPED","The log service encountered a remapped log sector."),
+ 0xC01A0004: ("STATUS_LOG_BLOCK_INCOMPLETE","The log service encountered a partial or incomplete log block."),
+ 0xC01A0005: ("STATUS_LOG_INVALID_RANGE","The log service encountered an attempt to access data outside the active log range."),
+ 0xC01A0006: ("STATUS_LOG_BLOCKS_EXHAUSTED","The log service user-log marshaling buffers are exhausted."),
+ 0xC01A0007: ("STATUS_LOG_READ_CONTEXT_INVALID","The log service encountered an attempt to read from a marshaling area with an invalid read context."),
+ 0xC01A0008: ("STATUS_LOG_RESTART_INVALID","The log service encountered an invalid log restart area."),
+ 0xC01A0009: ("STATUS_LOG_BLOCK_VERSION","The log service encountered an invalid log block version."),
+ 0xC01A000A: ("STATUS_LOG_BLOCK_INVALID","The log service encountered an invalid log block."),
+ 0xC01A000B: ("STATUS_LOG_READ_MODE_INVALID","The log service encountered an attempt to read the log with an invalid read mode."),
+ 0xC01A000D: ("STATUS_LOG_METADATA_CORRUPT","The log service encountered a corrupted metadata file."),
+ 0xC01A000E: ("STATUS_LOG_METADATA_INVALID","The log service encountered a metadata file that could not be created by the log file system."),
+ 0xC01A000F: ("STATUS_LOG_METADATA_INCONSISTENT","The log service encountered a metadata file with inconsistent data."),
+ 0xC01A0010: ("STATUS_LOG_RESERVATION_INVALID","The log service encountered an attempt to erroneously allocate or dispose reservation space."),
+ 0xC01A0011: ("STATUS_LOG_CANT_DELETE","The log service cannot delete the log file or the file system container."),
+ 0xC01A0012: ("STATUS_LOG_CONTAINER_LIMIT_EXCEEDED","The log service has reached the maximum allowable containers allocated to a log file."),
+ 0xC01A0013: ("STATUS_LOG_START_OF_LOG","The log service has attempted to read or write backward past the start of the log."),
+ 0xC01A0014: ("STATUS_LOG_POLICY_ALREADY_INSTALLED","The log policy could not be installed because a policy of the same type is already present."),
+ 0xC01A0015: ("STATUS_LOG_POLICY_NOT_INSTALLED","The log policy in question was not installed at the time of the request."),
+ 0xC01A0016: ("STATUS_LOG_POLICY_INVALID","The installed set of policies on the log is invalid."),
+ 0xC01A0017: ("STATUS_LOG_POLICY_CONFLICT","A policy on the log in question prevented the operation from completing."),
+ 0xC01A0018: ("STATUS_LOG_PINNED_ARCHIVE_TAIL","The log space cannot be reclaimed because the log is pinned by the archive tail."),
+ 0xC01A0019: ("STATUS_LOG_RECORD_NONEXISTENT","The log record is not a record in the log file."),
+ 0xC01A001A: ("STATUS_LOG_RECORDS_RESERVED_INVALID","The number of reserved log records or the adjustment of the number of reserved log records is invalid."),
+ 0xC01A001B: ("STATUS_LOG_SPACE_RESERVED_INVALID","The reserved log space or the adjustment of the log space is invalid."),
+ 0xC01A001C: ("STATUS_LOG_TAIL_INVALID","A new or existing archive tail or the base of the active log is invalid."),
+ 0xC01A001D: ("STATUS_LOG_FULL","The log space is exhausted."),
+ 0xC01A001E: ("STATUS_LOG_MULTIPLEXED","The log is multiplexed; no direct writes to the physical log are allowed."),
+ 0xC01A001F: ("STATUS_LOG_DEDICATED","The operation failed because the log is dedicated."),
+ 0xC01A0020: ("STATUS_LOG_ARCHIVE_NOT_IN_PROGRESS","The operation requires an archive context."),
+ 0xC01A0021: ("STATUS_LOG_ARCHIVE_IN_PROGRESS","Log archival is in progress."),
+ 0xC01A0022: ("STATUS_LOG_EPHEMERAL","The operation requires a nonephemeral log, but the log is ephemeral."),
+ 0xC01A0023: ("STATUS_LOG_NOT_ENOUGH_CONTAINERS","The log must have at least two containers before it can be read from or written to."),
+ 0xC01A0024: ("STATUS_LOG_CLIENT_ALREADY_REGISTERED","A log client has already registered on the stream."),
+ 0xC01A0025: ("STATUS_LOG_CLIENT_NOT_REGISTERED","A log client has not been registered on the stream."),
+ 0xC01A0026: ("STATUS_LOG_FULL_HANDLER_IN_PROGRESS","A request has already been made to handle the log full condition."),
+ 0xC01A0027: ("STATUS_LOG_CONTAINER_READ_FAILED","The log service encountered an error when attempting to read from a log container."),
+ 0xC01A0028: ("STATUS_LOG_CONTAINER_WRITE_FAILED","The log service encountered an error when attempting to write to a log container."),
+ 0xC01A0029: ("STATUS_LOG_CONTAINER_OPEN_FAILED","The log service encountered an error when attempting to open a log container."),
+ 0xC01A002A: ("STATUS_LOG_CONTAINER_STATE_INVALID","The log service encountered an invalid container state when attempting a requested action."),
+ 0xC01A002B: ("STATUS_LOG_STATE_INVALID","The log service is not in the correct state to perform a requested action."),
+ 0xC01A002C: ("STATUS_LOG_PINNED","The log space cannot be reclaimed because the log is pinned."),
+ 0xC01A002D: ("STATUS_LOG_METADATA_FLUSH_FAILED","The log metadata flush failed."),
+ 0xC01A002E: ("STATUS_LOG_INCONSISTENT_SECURITY","Security on the log and its containers is inconsistent."),
+ 0xC01A002F: ("STATUS_LOG_APPENDED_FLUSH_FAILED","Records were appended to the log or reservation changes were made, but the log could not be flushed."),
+ 0xC01A0030: ("STATUS_LOG_PINNED_RESERVATION","The log is pinned due to reservation consuming most of the log space. Free some reserved records to make space available."),
+ 0xC01B00EA: ("STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD","{Display Driver Stopped Responding} The %hs display driver has stopped working normally. Save your work and reboot the system to restore full display functionality. The next time you reboot the computer, a dialog box will allow you to upload data about this failure to Microsoft."),
+ 0xC01C0001: ("STATUS_FLT_NO_HANDLER_DEFINED","A handler was not defined by the filter for this operation."),
+ 0xC01C0002: ("STATUS_FLT_CONTEXT_ALREADY_DEFINED","A context is already defined for this object."),
+ 0xC01C0003: ("STATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST","Asynchronous requests are not valid for this operation."),
+ 0xC01C0004: ("STATUS_FLT_DISALLOW_FAST_IO","This is an internal error code used by the filter manager to determine if a fast I/O operation should be forced down the input/output request packet (IRP) path. Minifilters should never return this value."),
+ 0xC01C0005: ("STATUS_FLT_INVALID_NAME_REQUEST","An invalid name request was made. The name requested cannot be retrieved at this time."),
+ 0xC01C0006: ("STATUS_FLT_NOT_SAFE_TO_POST_OPERATION","Posting this operation to a worker thread for further processing is not safe at this time because it could lead to a system deadlock."),
+ 0xC01C0007: ("STATUS_FLT_NOT_INITIALIZED","The Filter Manager was not initialized when a filter tried to register. Make sure that the Filter Manager is loaded as a driver."),
+ 0xC01C0008: ("STATUS_FLT_FILTER_NOT_READY","The filter is not ready for attachment to volumes because it has not finished initializing (FltStartFiltering has not been called)."),
+ 0xC01C0009: ("STATUS_FLT_POST_OPERATION_CLEANUP","The filter must clean up any operation-specific context at this time because it is being removed from the system before the operation is completed by the lower drivers."),
+ 0xC01C000A: ("STATUS_FLT_INTERNAL_ERROR","The Filter Manager had an internal error from which it cannot recover; therefore, the operation has failed. This is usually the result of a filter returning an invalid value from a pre-operation callback."),
+ 0xC01C000B: ("STATUS_FLT_DELETING_OBJECT","The object specified for this action is in the process of being deleted; therefore, the action requested cannot be completed at this time."),
+ 0xC01C000C: ("STATUS_FLT_MUST_BE_NONPAGED_POOL","A nonpaged pool must be used for this type of context."),
+ 0xC01C000D: ("STATUS_FLT_DUPLICATE_ENTRY","A duplicate handler definition has been provided for an operation."),
+ 0xC01C000E: ("STATUS_FLT_CBDQ_DISABLED","The callback data queue has been disabled."),
+ 0xC01C000F: ("STATUS_FLT_DO_NOT_ATTACH","Do not attach the filter to the volume at this time."),
+ 0xC01C0010: ("STATUS_FLT_DO_NOT_DETACH","Do not detach the filter from the volume at this time."),
+ 0xC01C0011: ("STATUS_FLT_INSTANCE_ALTITUDE_COLLISION","An instance already exists at this altitude on the volume specified."),
+ 0xC01C0012: ("STATUS_FLT_INSTANCE_NAME_COLLISION","An instance already exists with this name on the volume specified."),
+ 0xC01C0013: ("STATUS_FLT_FILTER_NOT_FOUND","The system could not find the filter specified."),
+ 0xC01C0014: ("STATUS_FLT_VOLUME_NOT_FOUND","The system could not find the volume specified."),
+ 0xC01C0015: ("STATUS_FLT_INSTANCE_NOT_FOUND","The system could not find the instance specified."),
+ 0xC01C0016: ("STATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND","No registered context allocation definition was found for the given request."),
+ 0xC01C0017: ("STATUS_FLT_INVALID_CONTEXT_REGISTRATION","An invalid parameter was specified during context registration."),
+ 0xC01C0018: ("STATUS_FLT_NAME_CACHE_MISS","The name requested was not found in the Filter Manager name cache and could not be retrieved from the file system."),
+ 0xC01C0019: ("STATUS_FLT_NO_DEVICE_OBJECT","The requested device object does not exist for the given volume."),
+ 0xC01C001A: ("STATUS_FLT_VOLUME_ALREADY_MOUNTED","The specified volume is already mounted."),
+ 0xC01C001B: ("STATUS_FLT_ALREADY_ENLISTED","The specified transaction context is already enlisted in a transaction."),
+ 0xC01C001C: ("STATUS_FLT_CONTEXT_ALREADY_LINKED","The specified context is already attached to another object."),
+ 0xC01C0020: ("STATUS_FLT_NO_WAITER_FOR_REPLY","No waiter is present for the filter's reply to this message."),
+ 0xC01D0001: ("STATUS_MONITOR_NO_DESCRIPTOR","A monitor descriptor could not be obtained."),
+ 0xC01D0002: ("STATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT","This release does not support the format of the obtained monitor descriptor."),
+ 0xC01D0003: ("STATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM","The checksum of the obtained monitor descriptor is invalid."),
+ 0xC01D0004: ("STATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK","The monitor descriptor contains an invalid standard timing block."),
+ 0xC01D0005: ("STATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED","WMI data-block registration failed for one of the MSMonitorClass WMI subclasses."),
+ 0xC01D0006: ("STATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK","The provided monitor descriptor block is either corrupted or does not contain the monitor's detailed serial number."),
+ 0xC01D0007: ("STATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK","The provided monitor descriptor block is either corrupted or does not contain the monitor's user-friendly name."),
+ 0xC01D0008: ("STATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA","There is no monitor descriptor data at the specified (offset or size) region."),
+ 0xC01D0009: ("STATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK","The monitor descriptor contains an invalid detailed timing block."),
+ 0xC01D000A: ("STATUS_MONITOR_INVALID_MANUFACTURE_DATE","Monitor descriptor contains invalid manufacture date."),
+ 0xC01E0000: ("STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER","Exclusive mode ownership is needed to create an unmanaged primary allocation."),
+ 0xC01E0001: ("STATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER","The driver needs more DMA buffer space to complete the requested operation."),
+ 0xC01E0002: ("STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER","The specified display adapter handle is invalid."),
+ 0xC01E0003: ("STATUS_GRAPHICS_ADAPTER_WAS_RESET","The specified display adapter and all of its state have been reset."),
+ 0xC01E0004: ("STATUS_GRAPHICS_INVALID_DRIVER_MODEL","The driver stack does not match the expected driver model."),
+ 0xC01E0005: ("STATUS_GRAPHICS_PRESENT_MODE_CHANGED","Present happened but ended up into the changed desktop mode."),
+ 0xC01E0006: ("STATUS_GRAPHICS_PRESENT_OCCLUDED","Nothing to present due to desktop occlusion."),
+ 0xC01E0007: ("STATUS_GRAPHICS_PRESENT_DENIED","Not able to present due to denial of desktop access."),
+ 0xC01E0008: ("STATUS_GRAPHICS_CANNOTCOLORCONVERT","Not able to present with color conversion."),
+ 0xC01E000B: ("STATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED","Present redirection is disabled (desktop windowing management subsystem is off)."),
+ 0xC01E000C: ("STATUS_GRAPHICS_PRESENT_UNOCCLUDED","Previous exclusive VidPn source owner has released its ownership"),
+ 0xC01E0100: ("STATUS_GRAPHICS_NO_VIDEO_MEMORY","Not enough video memory is available to complete the operation."),
+ 0xC01E0101: ("STATUS_GRAPHICS_CANT_LOCK_MEMORY","Could not probe and lock the underlying memory of an allocation."),
+ 0xC01E0102: ("STATUS_GRAPHICS_ALLOCATION_BUSY","The allocation is currently busy."),
+ 0xC01E0103: ("STATUS_GRAPHICS_TOO_MANY_REFERENCES","An object being referenced has already reached the maximum reference count and cannot be referenced further."),
+ 0xC01E0104: ("STATUS_GRAPHICS_TRY_AGAIN_LATER","A problem could not be solved due to an existing condition. Try again later."),
+ 0xC01E0105: ("STATUS_GRAPHICS_TRY_AGAIN_NOW","A problem could not be solved due to an existing condition. Try again now."),
+ 0xC01E0106: ("STATUS_GRAPHICS_ALLOCATION_INVALID","The allocation is invalid."),
+ 0xC01E0107: ("STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE","No more unswizzling apertures are currently available."),
+ 0xC01E0108: ("STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED","The current allocation cannot be unswizzled by an aperture."),
+ 0xC01E0109: ("STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION","The request failed because a pinned allocation cannot be evicted."),
+ 0xC01E0110: ("STATUS_GRAPHICS_INVALID_ALLOCATION_USAGE","The allocation cannot be used from its current segment location for the specified operation."),
+ 0xC01E0111: ("STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION","A locked allocation cannot be used in the current command buffer."),
+ 0xC01E0112: ("STATUS_GRAPHICS_ALLOCATION_CLOSED","The allocation being referenced has been closed permanently."),
+ 0xC01E0113: ("STATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE","An invalid allocation instance is being referenced."),
+ 0xC01E0114: ("STATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE","An invalid allocation handle is being referenced."),
+ 0xC01E0115: ("STATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE","The allocation being referenced does not belong to the current device."),
+ 0xC01E0116: ("STATUS_GRAPHICS_ALLOCATION_CONTENT_LOST","The specified allocation lost its content."),
+ 0xC01E0200: ("STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE","A GPU exception was detected on the given device. The device cannot be scheduled."),
+ 0xC01E0300: ("STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY","The specified VidPN topology is invalid."),
+ 0xC01E0301: ("STATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED","The specified VidPN topology is valid but is not supported by this model of the display adapter."),
+ 0xC01E0302: ("STATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED","The specified VidPN topology is valid but is not currently supported by the display adapter due to allocation of its resources."),
+ 0xC01E0303: ("STATUS_GRAPHICS_INVALID_VIDPN","The specified VidPN handle is invalid."),
+ 0xC01E0304: ("STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE","The specified video present source is invalid."),
+ 0xC01E0305: ("STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET","The specified video present target is invalid."),
+ 0xC01E0306: ("STATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED","The specified VidPN modality is not supported (for example, at least two of the pinned modes are not co-functional)."),
+ 0xC01E0308: ("STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET","The specified VidPN source mode set is invalid."),
+ 0xC01E0309: ("STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET","The specified VidPN target mode set is invalid."),
+ 0xC01E030A: ("STATUS_GRAPHICS_INVALID_FREQUENCY","The specified video signal frequency is invalid."),
+ 0xC01E030B: ("STATUS_GRAPHICS_INVALID_ACTIVE_REGION","The specified video signal active region is invalid."),
+ 0xC01E030C: ("STATUS_GRAPHICS_INVALID_TOTAL_REGION","The specified video signal total region is invalid."),
+ 0xC01E0310: ("STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE","The specified video present source mode is invalid."),
+ 0xC01E0311: ("STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE","The specified video present target mode is invalid."),
+ 0xC01E0312: ("STATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET","The pinned mode must remain in the set on the VidPN's co-functional modality enumeration."),
+ 0xC01E0313: ("STATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY","The specified video present path is already in the VidPN's topology."),
+ 0xC01E0314: ("STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET","The specified mode is already in the mode set."),
+ 0xC01E0315: ("STATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET","The specified video present source set is invalid."),
+ 0xC01E0316: ("STATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET","The specified video present target set is invalid."),
+ 0xC01E0317: ("STATUS_GRAPHICS_SOURCE_ALREADY_IN_SET","The specified video present source is already in the video present source set."),
+ 0xC01E0318: ("STATUS_GRAPHICS_TARGET_ALREADY_IN_SET","The specified video present target is already in the video present target set."),
+ 0xC01E0319: ("STATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH","The specified VidPN present path is invalid."),
+ 0xC01E031A: ("STATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY","The miniport has no recommendation for augmenting the specified VidPN's topology."),
+ 0xC01E031B: ("STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET","The specified monitor frequency range set is invalid."),
+ 0xC01E031C: ("STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE","The specified monitor frequency range is invalid."),
+ 0xC01E031D: ("STATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET","The specified frequency range is not in the specified monitor frequency range set."),
+ 0xC01E031F: ("STATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET","The specified frequency range is already in the specified monitor frequency range set."),
+ 0xC01E0320: ("STATUS_GRAPHICS_STALE_MODESET","The specified mode set is stale. Reacquire the new mode set."),
+ 0xC01E0321: ("STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET","The specified monitor source mode set is invalid."),
+ 0xC01E0322: ("STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE","The specified monitor source mode is invalid."),
+ 0xC01E0323: ("STATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN","The miniport does not have a recommendation regarding the request to provide a functional VidPN given the current display adapter configuration."),
+ 0xC01E0324: ("STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE","The ID of the specified mode is being used by another mode in the set."),
+ 0xC01E0325: ("STATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION","The system failed to determine a mode that is supported by both the display adapter and the monitor connected to it."),
+ 0xC01E0326: ("STATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES","The number of video present targets must be greater than or equal to the number of video present sources."),
+ 0xC01E0327: ("STATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY","The specified present path is not in the VidPN's topology."),
+ 0xC01E0328: ("STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE","The display adapter must have at least one video present source."),
+ 0xC01E0329: ("STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET","The display adapter must have at least one video present target."),
+ 0xC01E032A: ("STATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET","The specified monitor descriptor set is invalid."),
+ 0xC01E032B: ("STATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR","The specified monitor descriptor is invalid."),
+ 0xC01E032C: ("STATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET","The specified descriptor is not in the specified monitor descriptor set."),
+ 0xC01E032D: ("STATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET","The specified descriptor is already in the specified monitor descriptor set."),
+ 0xC01E032E: ("STATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE","The ID of the specified monitor descriptor is being used by another descriptor in the set."),
+ 0xC01E032F: ("STATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE","The specified video present target subset type is invalid."),
+ 0xC01E0330: ("STATUS_GRAPHICS_RESOURCES_NOT_RELATED","Two or more of the specified resources are not related to each other, as defined by the interface semantics."),
+ 0xC01E0331: ("STATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE","The ID of the specified video present source is being used by another source in the set."),
+ 0xC01E0332: ("STATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE","The ID of the specified video present target is being used by another target in the set."),
+ 0xC01E0333: ("STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET","The specified VidPN source cannot be used because there is no available VidPN target to connect it to."),
+ 0xC01E0334: ("STATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER","The newly arrived monitor could not be associated with a display adapter."),
+ 0xC01E0335: ("STATUS_GRAPHICS_NO_VIDPNMGR","The particular display adapter does not have an associated VidPN manager."),
+ 0xC01E0336: ("STATUS_GRAPHICS_NO_ACTIVE_VIDPN","The VidPN manager of the particular display adapter does not have an active VidPN."),
+ 0xC01E0337: ("STATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY","The specified VidPN topology is stale; obtain the new topology."),
+ 0xC01E0338: ("STATUS_GRAPHICS_MONITOR_NOT_CONNECTED","No monitor is connected on the specified video present target."),
+ 0xC01E0339: ("STATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY","The specified source is not part of the specified VidPN's topology."),
+ 0xC01E033A: ("STATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE","The specified primary surface size is invalid."),
+ 0xC01E033B: ("STATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE","The specified visible region size is invalid."),
+ 0xC01E033C: ("STATUS_GRAPHICS_INVALID_STRIDE","The specified stride is invalid."),
+ 0xC01E033D: ("STATUS_GRAPHICS_INVALID_PIXELFORMAT","The specified pixel format is invalid."),
+ 0xC01E033E: ("STATUS_GRAPHICS_INVALID_COLORBASIS","The specified color basis is invalid."),
+ 0xC01E033F: ("STATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE","The specified pixel value access mode is invalid."),
+ 0xC01E0340: ("STATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY","The specified target is not part of the specified VidPN's topology."),
+ 0xC01E0341: ("STATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT","Failed to acquire the display mode management interface."),
+ 0xC01E0342: ("STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE","The specified VidPN source is already owned by a DMM client and cannot be used until that client releases it."),
+ 0xC01E0343: ("STATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN","The specified VidPN is active and cannot be accessed."),
+ 0xC01E0344: ("STATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL","The specified VidPN's present path importance ordinal is invalid."),
+ 0xC01E0345: ("STATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION","The specified VidPN's present path content geometry transformation is invalid."),
+ 0xC01E0346: ("STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED","The specified content geometry transformation is not supported on the respective VidPN present path."),
+ 0xC01E0347: ("STATUS_GRAPHICS_INVALID_GAMMA_RAMP","The specified gamma ramp is invalid."),
+ 0xC01E0348: ("STATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED","The specified gamma ramp is not supported on the respective VidPN present path."),
+ 0xC01E0349: ("STATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED","Multisampling is not supported on the respective VidPN present path."),
+ 0xC01E034A: ("STATUS_GRAPHICS_MODE_NOT_IN_MODESET","The specified mode is not in the specified mode set."),
+ 0xC01E034D: ("STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON","The specified VidPN topology recommendation reason is invalid."),
+ 0xC01E034E: ("STATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE","The specified VidPN present path content type is invalid."),
+ 0xC01E034F: ("STATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE","The specified VidPN present path copy protection type is invalid."),
+ 0xC01E0350: ("STATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS","Only one unassigned mode set can exist at any one time for a particular VidPN source or target."),
+ 0xC01E0352: ("STATUS_GRAPHICS_INVALID_SCANLINE_ORDERING","The specified scan line ordering type is invalid."),
+ 0xC01E0353: ("STATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED","The topology changes are not allowed for the specified VidPN."),
+ 0xC01E0354: ("STATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS","All available importance ordinals are being used in the specified topology."),
+ 0xC01E0355: ("STATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT","The specified primary surface has a different private-format attribute than the current primary surface."),
+ 0xC01E0356: ("STATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM","The specified mode-pruning algorithm is invalid."),
+ 0xC01E0357: ("STATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN","The specified monitor-capability origin is invalid."),
+ 0xC01E0358: ("STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT","The specified monitor-frequency range constraint is invalid."),
+ 0xC01E0359: ("STATUS_GRAPHICS_MAX_NUM_PATHS_REACHED","The maximum supported number of present paths has been reached."),
+ 0xC01E035A: ("STATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION","The miniport requested that augmentation be canceled for the specified source of the specified VidPN's topology."),
+ 0xC01E035B: ("STATUS_GRAPHICS_INVALID_CLIENT_TYPE","The specified client type was not recognized."),
+ 0xC01E035C: ("STATUS_GRAPHICS_CLIENTVIDPN_NOT_SET","The client VidPN is not set on this adapter (for example, no user mode-initiated mode changes have taken place on this adapter)."),
+ 0xC01E0400: ("STATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED","The specified display adapter child device already has an external device connected to it."),
+ 0xC01E0401: ("STATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED","The display adapter child device does not support reporting a descriptor."),
+ 0xC01E0430: ("STATUS_GRAPHICS_NOT_A_LINKED_ADAPTER","The display adapter is not linked to any other adapters."),
+ 0xC01E0431: ("STATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED","The lead adapter in a linked configuration was not enumerated yet."),
+ 0xC01E0432: ("STATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED","Some chain adapters in a linked configuration have not yet been enumerated."),
+ 0xC01E0433: ("STATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY","The chain of linked adapters is not ready to start because of an unknown failure."),
+ 0xC01E0434: ("STATUS_GRAPHICS_CHAINLINKS_NOT_STARTED","An attempt was made to start a lead link display adapter when the chain links had not yet started."),
+ 0xC01E0435: ("STATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON","An attempt was made to turn on a lead link display adapter when the chain links were turned off."),
+ 0xC01E0436: ("STATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE","The adapter link was found in an inconsistent state. Not all adapters are in an expected PNP/power state."),
+ 0xC01E0438: ("STATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER","The driver trying to start is not the same as the driver for the posted display adapter."),
+ 0xC01E043B: ("STATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED","An operation is being attempted that requires the display adapter to be in a quiescent state."),
+ 0xC01E0500: ("STATUS_GRAPHICS_OPM_NOT_SUPPORTED","The driver does not support OPM."),
+ 0xC01E0501: ("STATUS_GRAPHICS_COPP_NOT_SUPPORTED","The driver does not support COPP."),
+ 0xC01E0502: ("STATUS_GRAPHICS_UAB_NOT_SUPPORTED","The driver does not support UAB."),
+ 0xC01E0503: ("STATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS","The specified encrypted parameters are invalid."),
+ 0xC01E0504: ("STATUS_GRAPHICS_OPM_PARAMETER_ARRAY_TOO_SMALL","An array passed to a function cannot hold all of the data that the function wants to put in it."),
+ 0xC01E0505: ("STATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST","The GDI display device passed to this function does not have any active protected outputs."),
+ 0xC01E0506: ("STATUS_GRAPHICS_PVP_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME","The PVP cannot find an actual GDI display device that corresponds to the passed-in GDI display device name."),
+ 0xC01E0507: ("STATUS_GRAPHICS_PVP_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP","This function failed because the GDI display device passed to it was not attached to the Windows desktop."),
+ 0xC01E0508: ("STATUS_GRAPHICS_PVP_MIRRORING_DEVICES_NOT_SUPPORTED","The PVP does not support mirroring display devices because they do not have any protected outputs."),
+ 0xC01E050A: ("STATUS_GRAPHICS_OPM_INVALID_POINTER","The function failed because an invalid pointer parameter was passed to it. A pointer parameter is invalid if it is null, is not correctly aligned, or it points to an invalid address or a kernel mode address."),
+ 0xC01E050B: ("STATUS_GRAPHICS_OPM_INTERNAL_ERROR","An internal error caused an operation to fail."),
+ 0xC01E050C: ("STATUS_GRAPHICS_OPM_INVALID_HANDLE","The function failed because the caller passed in an invalid OPM user-mode handle."),
+ 0xC01E050D: ("STATUS_GRAPHICS_PVP_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE","This function failed because the GDI device passed to it did not have any monitors associated with it."),
+ 0xC01E050E: ("STATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH","A certificate could not be returned because the certificate buffer passed to the function was too small."),
+ 0xC01E050F: ("STATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED","DxgkDdiOpmCreateProtectedOutput() could not create a protected output because the video present yarget is in spanning mode."),
+ 0xC01E0510: ("STATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED","DxgkDdiOpmCreateProtectedOutput() could not create a protected output because the video present target is in theater mode."),
+ 0xC01E0511: ("STATUS_GRAPHICS_PVP_HFS_FAILED","The function call failed because the display adapter's hardware functionality scan (HFS) failed to validate the graphics hardware."),
+ 0xC01E0512: ("STATUS_GRAPHICS_OPM_INVALID_SRM","The HDCP SRM passed to this function did not comply with section 5 of the HDCP 1.1 specification."),
+ 0xC01E0513: ("STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP","The protected output cannot enable the HDCP system because it does not support it."),
+ 0xC01E0514: ("STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP","The protected output cannot enable analog copy protection because it does not support it."),
+ 0xC01E0515: ("STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA","The protected output cannot enable the CGMS-A protection technology because it does not support it."),
+ 0xC01E0516: ("STATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET","DxgkDdiOPMGetInformation() cannot return the version of the SRM being used because the application never successfully passed an SRM to the protected output."),
+ 0xC01E0517: ("STATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH","DxgkDdiOPMConfigureProtectedOutput() cannot enable the specified output protection technology because the output's screen resolution is too high."),
+ 0xC01E0518: ("STATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE","DxgkDdiOPMConfigureProtectedOutput() cannot enable HDCP because other physical outputs are using the display adapter's HDCP hardware."),
+ 0xC01E051A: ("STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS","The operating system asynchronously destroyed this OPM-protected output because the operating system state changed. This error typically occurs because the monitor PDO associated with this protected output was removed or stopped, the protected output's session became a nonconsole session, or the protected output's desktop became inactive."),
+ 0xC01E051B: ("STATUS_GRAPHICS_OPM_SESSION_TYPE_CHANGE_IN_PROGRESS","OPM functions cannot be called when a session is changing its type. Three types of sessions currently exist: console, disconnected, and remote (RDP or ICA)."),
+ 0xC01E051C: ("STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS","The DxgkDdiOPMGetCOPPCompatibleInformation, DxgkDdiOPMGetInformation, or DxgkDdiOPMConfigureProtectedOutput function failed. This error is returned only if a protected output has OPM semantics. DxgkDdiOPMGetCOPPCompatibleInformation always returns this error if a protected output has OPM semantics. DxgkDdiOPMGetInformation returns this error code if the caller requested COPP-specific information. DxgkDdiOPMConfigureProtectedOutput returns this error when the caller tries to use a COPP-specific command."),
+ 0xC01E051D: ("STATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST","The DxgkDdiOPMGetInformation and DxgkDdiOPMGetCOPPCompatibleInformation functions return this error code if the passed-in sequence number is not the expected sequence number or the passed-in OMAC value is invalid."),
+ 0xC01E051E: ("STATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR","The function failed because an unexpected error occurred inside a display driver."),
+ 0xC01E051F: ("STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS","The DxgkDdiOPMGetCOPPCompatibleInformation, DxgkDdiOPMGetInformation, or DxgkDdiOPMConfigureProtectedOutput function failed. This error is returned only if a protected output has COPP semantics. DxgkDdiOPMGetCOPPCompatibleInformation returns this error code if the caller requested OPM-specific information. DxgkDdiOPMGetInformation always returns this error if a protected output has COPP semantics. DxgkDdiOPMConfigureProtectedOutput returns this error when the caller tries to use an OPM-specific command."),
+ 0xC01E0520: ("STATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED","The DxgkDdiOPMGetCOPPCompatibleInformation and DxgkDdiOPMConfigureProtectedOutput functions return this error if the display driver does not support the DXGKMDT_OPM_GET_ACP_AND_CGMSA_SIGNALING and DXGKMDT_OPM_SET_ACP_AND_CGMSA_SIGNALING GUIDs."),
+ 0xC01E0521: ("STATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST","The DxgkDdiOPMConfigureProtectedOutput function returns this error code if the passed-in sequence number is not the expected sequence number or the passed-in OMAC value is invalid."),
+ 0xC01E0580: ("STATUS_GRAPHICS_I2C_NOT_SUPPORTED","The monitor connected to the specified video output does not have an I2C bus."),
+ 0xC01E0581: ("STATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST","No device on the I2C bus has the specified address."),
+ 0xC01E0582: ("STATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA","An error occurred while transmitting data to the device on the I2C bus."),
+ 0xC01E0583: ("STATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA","An error occurred while receiving data from the device on the I2C bus."),
+ 0xC01E0584: ("STATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED","The monitor does not support the specified VCP code."),
+ 0xC01E0585: ("STATUS_GRAPHICS_DDCCI_INVALID_DATA","The data received from the monitor is invalid."),
+ 0xC01E0586: ("STATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE","A function call failed because a monitor returned an invalid timing status byte when the operating system used the DDC/CI get timing report and timing message command to get a timing report from a monitor."),
+ 0xC01E0587: ("STATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING","A monitor returned a DDC/CI capabilities string that did not comply with the ACCESS.bus 3.0, DDC/CI 1.1, or MCCS 2 Revision 1 specification."),
+ 0xC01E0588: ("STATUS_GRAPHICS_MCA_INTERNAL_ERROR","An internal error caused an operation to fail."),
+ 0xC01E0589: ("STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND","An operation failed because a DDC/CI message had an invalid value in its command field."),
+ 0xC01E058A: ("STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH","This error occurred because a DDC/CI message had an invalid value in its length field."),
+ 0xC01E058B: ("STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM","This error occurred because the value in a DDC/CI message's checksum field did not match the message's computed checksum value. This error implies that the data was corrupted while it was being transmitted from a monitor to a computer."),
+ 0xC01E058C: ("STATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE","This function failed because an invalid monitor handle was passed to it."),
+ 0xC01E058D: ("STATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS","The operating system asynchronously destroyed the monitor that corresponds to this handle because the operating system's state changed. This error typically occurs because the monitor PDO associated with this handle was removed or stopped, or a display mode change occurred. A display mode change occurs when Windows sends a WM_DISPLAYCHANGE message to applications."),
+ 0xC01E05E0: ("STATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED","This function can be used only if a program is running in the local console session. It cannot be used if a program is running on a remote desktop session or on a terminal server session."),
+ 0xC01E05E1: ("STATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME","This function cannot find an actual GDI display device that corresponds to the specified GDI display device name."),
+ 0xC01E05E2: ("STATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP","The function failed because the specified GDI display device was not attached to the Windows desktop."),
+ 0xC01E05E3: ("STATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED","This function does not support GDI mirroring display devices because GDI mirroring display devices do not have any physical monitors associated with them."),
+ 0xC01E05E4: ("STATUS_GRAPHICS_INVALID_POINTER","The function failed because an invalid pointer parameter was passed to it. A pointer parameter is invalid if it is null, is not correctly aligned, or points to an invalid address or to a kernel mode address."),
+ 0xC01E05E5: ("STATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE","This function failed because the GDI device passed to it did not have a monitor associated with it."),
+ 0xC01E05E6: ("STATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL","An array passed to the function cannot hold all of the data that the function must copy into the array."),
+ 0xC01E05E7: ("STATUS_GRAPHICS_INTERNAL_ERROR","An internal error caused an operation to fail."),
+ 0xC01E05E8: ("STATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS","The function failed because the current session is changing its type. This function cannot be called when the current session is changing its type. Three types of sessions currently exist: console, disconnected, and remote (RDP or ICA)."),
+ 0xC0210000: ("STATUS_FVE_LOCKED_VOLUME","The volume must be unlocked before it can be used."),
+ 0xC0210001: ("STATUS_FVE_NOT_ENCRYPTED","The volume is fully decrypted and no key is available."),
+ 0xC0210002: ("STATUS_FVE_BAD_INFORMATION","The control block for the encrypted volume is not valid."),
+ 0xC0210003: ("STATUS_FVE_TOO_SMALL","Not enough free space remains on the volume to allow encryption."),
+ 0xC0210004: ("STATUS_FVE_FAILED_WRONG_FS","The partition cannot be encrypted because the file system is not supported."),
+ 0xC0210005: ("STATUS_FVE_FAILED_BAD_FS","The file system is inconsistent. Run the Check Disk utility."),
+ 0xC0210006: ("STATUS_FVE_FS_NOT_EXTENDED","The file system does not extend to the end of the volume."),
+ 0xC0210007: ("STATUS_FVE_FS_MOUNTED","This operation cannot be performed while a file system is mounted on the volume."),
+ 0xC0210008: ("STATUS_FVE_NO_LICENSE","BitLocker Drive Encryption is not included with this version of Windows."),
+ 0xC0210009: ("STATUS_FVE_ACTION_NOT_ALLOWED","The requested action was denied by the FVE control engine."),
+ 0xC021000A: ("STATUS_FVE_BAD_DATA","The data supplied is malformed."),
+ 0xC021000B: ("STATUS_FVE_VOLUME_NOT_BOUND","The volume is not bound to the system."),
+ 0xC021000C: ("STATUS_FVE_NOT_DATA_VOLUME","The volume specified is not a data volume."),
+ 0xC021000D: ("STATUS_FVE_CONV_READ_ERROR","A read operation failed while converting the volume."),
+ 0xC021000E: ("STATUS_FVE_CONV_WRITE_ERROR","A write operation failed while converting the volume."),
+ 0xC021000F: ("STATUS_FVE_OVERLAPPED_UPDATE","The control block for the encrypted volume was updated by another thread. Try again."),
+ 0xC0210010: ("STATUS_FVE_FAILED_SECTOR_SIZE","The volume encryption algorithm cannot be used on this sector size."),
+ 0xC0210011: ("STATUS_FVE_FAILED_AUTHENTICATION","BitLocker recovery authentication failed."),
+ 0xC0210012: ("STATUS_FVE_NOT_OS_VOLUME","The volume specified is not the boot operating system volume."),
+ 0xC0210013: ("STATUS_FVE_KEYFILE_NOT_FOUND","The BitLocker startup key or recovery password could not be read from external media."),
+ 0xC0210014: ("STATUS_FVE_KEYFILE_INVALID","The BitLocker startup key or recovery password file is corrupt or invalid."),
+ 0xC0210015: ("STATUS_FVE_KEYFILE_NO_VMK","The BitLocker encryption key could not be obtained from the startup key or the recovery password."),
+ 0xC0210016: ("STATUS_FVE_TPM_DISABLED","The TPM is disabled."),
+ 0xC0210017: ("STATUS_FVE_TPM_SRK_AUTH_NOT_ZERO","The authorization data for the SRK of the TPM is not zero."),
+ 0xC0210018: ("STATUS_FVE_TPM_INVALID_PCR","The system boot information changed or the TPM locked out access to BitLocker encryption keys until the computer is restarted."),
+ 0xC0210019: ("STATUS_FVE_TPM_NO_VMK","The BitLocker encryption key could not be obtained from the TPM."),
+ 0xC021001A: ("STATUS_FVE_PIN_INVALID","The BitLocker encryption key could not be obtained from the TPM and PIN."),
+ 0xC021001B: ("STATUS_FVE_AUTH_INVALID_APPLICATION","A boot application hash does not match the hash computed when BitLocker was turned on."),
+ 0xC021001C: ("STATUS_FVE_AUTH_INVALID_CONFIG","The Boot Configuration Data (BCD) settings are not supported or have changed because BitLocker was enabled."),
+ 0xC021001D: ("STATUS_FVE_DEBUGGER_ENABLED","Boot debugging is enabled. Run Windows Boot Configuration Data Store Editor (bcdedit.exe) to turn it off."),
+ 0xC021001E: ("STATUS_FVE_DRY_RUN_FAILED","The BitLocker encryption key could not be obtained."),
+ 0xC021001F: ("STATUS_FVE_BAD_METADATA_POINTER","The metadata disk region pointer is incorrect."),
+ 0xC0210020: ("STATUS_FVE_OLD_METADATA_COPY","The backup copy of the metadata is out of date."),
+ 0xC0210021: ("STATUS_FVE_REBOOT_REQUIRED","No action was taken because a system restart is required."),
+ 0xC0210022: ("STATUS_FVE_RAW_ACCESS","No action was taken because BitLocker Drive Encryption is in RAW access mode."),
+ 0xC0210023: ("STATUS_FVE_RAW_BLOCKED","BitLocker Drive Encryption cannot enter RAW access mode for this volume."),
+ 0xC0210026: ("STATUS_FVE_NO_FEATURE_LICENSE","This feature of BitLocker Drive Encryption is not included with this version of Windows."),
+ 0xC0210027: ("STATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED","Group policy does not permit turning off BitLocker Drive Encryption on roaming data volumes."),
+ 0xC0210028: ("STATUS_FVE_CONV_RECOVERY_FAILED","Bitlocker Drive Encryption failed to recover from aborted conversion. This could be due to either all conversion logs being corrupted or the media being write-protected."),
+ 0xC0210029: ("STATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG","The requested virtualization size is too big."),
+ 0xC0210030: ("STATUS_FVE_VOLUME_TOO_SMALL","The drive is too small to be protected using BitLocker Drive Encryption."),
+ 0xC0220001: ("STATUS_FWP_CALLOUT_NOT_FOUND","The callout does not exist."),
+ 0xC0220002: ("STATUS_FWP_CONDITION_NOT_FOUND","The filter condition does not exist."),
+ 0xC0220003: ("STATUS_FWP_FILTER_NOT_FOUND","The filter does not exist."),
+ 0xC0220004: ("STATUS_FWP_LAYER_NOT_FOUND","The layer does not exist."),
+ 0xC0220005: ("STATUS_FWP_PROVIDER_NOT_FOUND","The provider does not exist."),
+ 0xC0220006: ("STATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND","The provider context does not exist."),
+ 0xC0220007: ("STATUS_FWP_SUBLAYER_NOT_FOUND","The sublayer does not exist."),
+ 0xC0220008: ("STATUS_FWP_NOT_FOUND","The object does not exist."),
+ 0xC0220009: ("STATUS_FWP_ALREADY_EXISTS","An object with that GUID or LUID already exists."),
+ 0xC022000A: ("STATUS_FWP_IN_USE","The object is referenced by other objects and cannot be deleted."),
+ 0xC022000B: ("STATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS","The call is not allowed from within a dynamic session."),
+ 0xC022000C: ("STATUS_FWP_WRONG_SESSION","The call was made from the wrong session and cannot be completed."),
+ 0xC022000D: ("STATUS_FWP_NO_TXN_IN_PROGRESS","The call must be made from within an explicit transaction."),
+ 0xC022000E: ("STATUS_FWP_TXN_IN_PROGRESS","The call is not allowed from within an explicit transaction."),
+ 0xC022000F: ("STATUS_FWP_TXN_ABORTED","The explicit transaction has been forcibly canceled."),
+ 0xC0220010: ("STATUS_FWP_SESSION_ABORTED","The session has been canceled."),
+ 0xC0220011: ("STATUS_FWP_INCOMPATIBLE_TXN","The call is not allowed from within a read-only transaction."),
+ 0xC0220012: ("STATUS_FWP_TIMEOUT","The call timed out while waiting to acquire the transaction lock."),
+ 0xC0220013: ("STATUS_FWP_NET_EVENTS_DISABLED","The collection of network diagnostic events is disabled."),
+ 0xC0220014: ("STATUS_FWP_INCOMPATIBLE_LAYER","The operation is not supported by the specified layer."),
+ 0xC0220015: ("STATUS_FWP_KM_CLIENTS_ONLY","The call is allowed for kernel-mode callers only."),
+ 0xC0220016: ("STATUS_FWP_LIFETIME_MISMATCH","The call tried to associate two objects with incompatible lifetimes."),
+ 0xC0220017: ("STATUS_FWP_BUILTIN_OBJECT","The object is built-in and cannot be deleted."),
+ 0xC0220018: ("STATUS_FWP_TOO_MANY_BOOTTIME_FILTERS","The maximum number of boot-time filters has been reached."),
+ 0xC0220018: ("STATUS_FWP_TOO_MANY_CALLOUTS","The maximum number of callouts has been reached."),
+ 0xC0220019: ("STATUS_FWP_NOTIFICATION_DROPPED","A notification could not be delivered because a message queue has reached maximum capacity."),
+ 0xC022001A: ("STATUS_FWP_TRAFFIC_MISMATCH","The traffic parameters do not match those for the security association context."),
+ 0xC022001B: ("STATUS_FWP_INCOMPATIBLE_SA_STATE","The call is not allowed for the current security association state."),
+ 0xC022001C: ("STATUS_FWP_NULL_POINTER","A required pointer is null."),
+ 0xC022001D: ("STATUS_FWP_INVALID_ENUMERATOR","An enumerator is not valid."),
+ 0xC022001E: ("STATUS_FWP_INVALID_FLAGS","The flags field contains an invalid value."),
+ 0xC022001F: ("STATUS_FWP_INVALID_NET_MASK","A network mask is not valid."),
+ 0xC0220020: ("STATUS_FWP_INVALID_RANGE","An FWP_RANGE is not valid."),
+ 0xC0220021: ("STATUS_FWP_INVALID_INTERVAL","The time interval is not valid."),
+ 0xC0220022: ("STATUS_FWP_ZERO_LENGTH_ARRAY","An array that must contain at least one element has a zero length."),
+ 0xC0220023: ("STATUS_FWP_NULL_DISPLAY_NAME","The displayData.name field cannot be null."),
+ 0xC0220024: ("STATUS_FWP_INVALID_ACTION_TYPE","The action type is not one of the allowed action types for a filter."),
+ 0xC0220025: ("STATUS_FWP_INVALID_WEIGHT","The filter weight is not valid."),
+ 0xC0220026: ("STATUS_FWP_MATCH_TYPE_MISMATCH","A filter condition contains a match type that is not compatible with the operands."),
+ 0xC0220027: ("STATUS_FWP_TYPE_MISMATCH","An FWP_VALUE or FWPM_CONDITION_VALUE is of the wrong type."),
+ 0xC0220028: ("STATUS_FWP_OUT_OF_BOUNDS","An integer value is outside the allowed range."),
+ 0xC0220029: ("STATUS_FWP_RESERVED","A reserved field is nonzero."),
+ 0xC022002A: ("STATUS_FWP_DUPLICATE_CONDITION","A filter cannot contain multiple conditions operating on a single field."),
+ 0xC022002B: ("STATUS_FWP_DUPLICATE_KEYMOD","A policy cannot contain the same keying module more than once."),
+ 0xC022002C: ("STATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER","The action type is not compatible with the layer."),
+ 0xC022002D: ("STATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER","The action type is not compatible with the sublayer."),
+ 0xC022002E: ("STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER","The raw context or the provider context is not compatible with the layer."),
+ 0xC022002F: ("STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT","The raw context or the provider context is not compatible with the callout."),
+ 0xC0220030: ("STATUS_FWP_INCOMPATIBLE_AUTH_METHOD","The authentication method is not compatible with the policy type."),
+ 0xC0220031: ("STATUS_FWP_INCOMPATIBLE_DH_GROUP","The Diffie-Hellman group is not compatible with the policy type."),
+ 0xC0220032: ("STATUS_FWP_EM_NOT_SUPPORTED","An IKE policy cannot contain an Extended Mode policy."),
+ 0xC0220033: ("STATUS_FWP_NEVER_MATCH","The enumeration template or subscription will never match any objects."),
+ 0xC0220034: ("STATUS_FWP_PROVIDER_CONTEXT_MISMATCH","The provider context is of the wrong type."),
+ 0xC0220035: ("STATUS_FWP_INVALID_PARAMETER","The parameter is incorrect."),
+ 0xC0220036: ("STATUS_FWP_TOO_MANY_SUBLAYERS","The maximum number of sublayers has been reached."),
+ 0xC0220037: ("STATUS_FWP_CALLOUT_NOTIFICATION_FAILED","The notification function for a callout returned an error."),
+ 0xC0220038: ("STATUS_FWP_INCOMPATIBLE_AUTH_CONFIG","The IPsec authentication configuration is not compatible with the authentication type."),
+ 0xC0220039: ("STATUS_FWP_INCOMPATIBLE_CIPHER_CONFIG","The IPsec cipher configuration is not compatible with the cipher type."),
+ 0xC022003C: ("STATUS_FWP_DUPLICATE_AUTH_METHOD","A policy cannot contain the same auth method more than once."),
+ 0xC0220100: ("STATUS_FWP_TCPIP_NOT_READY","The TCP/IP stack is not ready."),
+ 0xC0220101: ("STATUS_FWP_INJECT_HANDLE_CLOSING","The injection handle is being closed by another thread."),
+ 0xC0220102: ("STATUS_FWP_INJECT_HANDLE_STALE","The injection handle is stale."),
+ 0xC0220103: ("STATUS_FWP_CANNOT_PEND","The classify cannot be pended."),
+ 0xC0230002: ("STATUS_NDIS_CLOSING","The binding to the network interface is being closed."),
+ 0xC0230004: ("STATUS_NDIS_BAD_VERSION","An invalid version was specified."),
+ 0xC0230005: ("STATUS_NDIS_BAD_CHARACTERISTICS","An invalid characteristics table was used."),
+ 0xC0230006: ("STATUS_NDIS_ADAPTER_NOT_FOUND","Failed to find the network interface or the network interface is not ready."),
+ 0xC0230007: ("STATUS_NDIS_OPEN_FAILED","Failed to open the network interface."),
+ 0xC0230008: ("STATUS_NDIS_DEVICE_FAILED","The network interface has encountered an internal unrecoverable failure."),
+ 0xC0230009: ("STATUS_NDIS_MULTICAST_FULL","The multicast list on the network interface is full."),
+ 0xC023000A: ("STATUS_NDIS_MULTICAST_EXISTS","An attempt was made to add a duplicate multicast address to the list."),
+ 0xC023000B: ("STATUS_NDIS_MULTICAST_NOT_FOUND","At attempt was made to remove a multicast address that was never added."),
+ 0xC023000C: ("STATUS_NDIS_REQUEST_ABORTED","The network interface aborted the request."),
+ 0xC023000D: ("STATUS_NDIS_RESET_IN_PROGRESS","The network interface cannot process the request because it is being reset."),
+ 0xC023000F: ("STATUS_NDIS_INVALID_PACKET","An attempt was made to send an invalid packet on a network interface."),
+ 0xC0230010: ("STATUS_NDIS_INVALID_DEVICE_REQUEST","The specified request is not a valid operation for the target device."),
+ 0xC0230011: ("STATUS_NDIS_ADAPTER_NOT_READY","The network interface is not ready to complete this operation."),
+ 0xC0230014: ("STATUS_NDIS_INVALID_LENGTH","The length of the buffer submitted for this operation is not valid."),
+ 0xC0230015: ("STATUS_NDIS_INVALID_DATA","The data used for this operation is not valid."),
+ 0xC0230016: ("STATUS_NDIS_BUFFER_TOO_SHORT","The length of the submitted buffer for this operation is too small."),
+ 0xC0230017: ("STATUS_NDIS_INVALID_OID","The network interface does not support this object identifier."),
+ 0xC0230018: ("STATUS_NDIS_ADAPTER_REMOVED","The network interface has been removed."),
+ 0xC0230019: ("STATUS_NDIS_UNSUPPORTED_MEDIA","The network interface does not support this media type."),
+ 0xC023001A: ("STATUS_NDIS_GROUP_ADDRESS_IN_USE","An attempt was made to remove a token ring group address that is in use by other components."),
+ 0xC023001B: ("STATUS_NDIS_FILE_NOT_FOUND","An attempt was made to map a file that cannot be found."),
+ 0xC023001C: ("STATUS_NDIS_ERROR_READING_FILE","An error occurred while NDIS tried to map the file."),
+ 0xC023001D: ("STATUS_NDIS_ALREADY_MAPPED","An attempt was made to map a file that is already mapped."),
+ 0xC023001E: ("STATUS_NDIS_RESOURCE_CONFLICT","An attempt to allocate a hardware resource failed because the resource is used by another component."),
+ 0xC023001F: ("STATUS_NDIS_MEDIA_DISCONNECTED","The I/O operation failed because the network media is disconnected or the wireless access point is out of range."),
+ 0xC0230022: ("STATUS_NDIS_INVALID_ADDRESS","The network address used in the request is invalid."),
+ 0xC023002A: ("STATUS_NDIS_PAUSED","The offload operation on the network interface has been paused."),
+ 0xC023002B: ("STATUS_NDIS_INTERFACE_NOT_FOUND","The network interface was not found."),
+ 0xC023002C: ("STATUS_NDIS_UNSUPPORTED_REVISION","The revision number specified in the structure is not supported."),
+ 0xC023002D: ("STATUS_NDIS_INVALID_PORT","The specified port does not exist on this network interface."),
+ 0xC023002E: ("STATUS_NDIS_INVALID_PORT_STATE","The current state of the specified port on this network interface does not support the requested operation."),
+ 0xC023002F: ("STATUS_NDIS_LOW_POWER_STATE","The miniport adapter is in a lower power state."),
+ 0xC02300BB: ("STATUS_NDIS_NOT_SUPPORTED","The network interface does not support this request."),
+ 0xC023100F: ("STATUS_NDIS_OFFLOAD_POLICY","The TCP connection is not offloadable because of a local policy setting."),
+ 0xC0231012: ("STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED","The TCP connection is not offloadable by the Chimney offload target."),
+ 0xC0231013: ("STATUS_NDIS_OFFLOAD_PATH_REJECTED","The IP Path object is not in an offloadable state."),
+ 0xC0232000: ("STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED","The wireless LAN interface is in auto-configuration mode and does not support the requested parameter change operation."),
+ 0xC0232001: ("STATUS_NDIS_DOT11_MEDIA_IN_USE","The wireless LAN interface is busy and cannot perform the requested operation."),
+ 0xC0232002: ("STATUS_NDIS_DOT11_POWER_STATE_INVALID","The wireless LAN interface is power down and does not support the requested operation."),
+ 0xC0232003: ("STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL","The list of wake on LAN patterns is full."),
+ 0xC0232004: ("STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL","The list of low power protocol offloads is full."),
+ 0xC0360001: ("STATUS_IPSEC_BAD_SPI","The SPI in the packet does not match a valid IPsec SA."),
+ 0xC0360002: ("STATUS_IPSEC_SA_LIFETIME_EXPIRED","The packet was received on an IPsec SA whose lifetime has expired."),
+ 0xC0360003: ("STATUS_IPSEC_WRONG_SA","The packet was received on an IPsec SA that does not match the packet characteristics."),
+ 0xC0360004: ("STATUS_IPSEC_REPLAY_CHECK_FAILED","The packet sequence number replay check failed."),
+ 0xC0360005: ("STATUS_IPSEC_INVALID_PACKET","The IPsec header and/or trailer in the packet is invalid."),
+ 0xC0360006: ("STATUS_IPSEC_INTEGRITY_CHECK_FAILED","The IPsec integrity check failed."),
+ 0xC0360007: ("STATUS_IPSEC_CLEAR_TEXT_DROP","IPsec dropped a clear text packet."),
+ 0xC0360008: ("STATUS_IPSEC_AUTH_FIREWALL_DROP","IPsec dropped an incoming ESP packet in authenticated firewall mode. This drop is benign."),
+ 0xC0360009: ("STATUS_IPSEC_THROTTLE_DROP","IPsec dropped a packet due to DOS throttle."),
+ 0xC0368000: ("STATUS_IPSEC_DOSP_BLOCK","IPsec Dos Protection matched an explicit block rule."),
+ 0xC0368001: ("STATUS_IPSEC_DOSP_RECEIVED_MULTICAST","IPsec Dos Protection received an IPsec specific multicast packet which is not allowed."),
+ 0xC0368002: ("STATUS_IPSEC_DOSP_INVALID_PACKET","IPsec Dos Protection received an incorrectly formatted packet."),
+ 0xC0368003: ("STATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED","IPsec Dos Protection failed to lookup state."),
+ 0xC0368004: ("STATUS_IPSEC_DOSP_MAX_ENTRIES","IPsec Dos Protection failed to create state because there are already maximum number of entries allowed by policy."),
+ 0xC0368005: ("STATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED","IPsec Dos Protection received an IPsec negotiation packet for a keying module which is not allowed by policy."),
+ 0xC0368006: ("STATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES","IPsec Dos Protection failed to create per internal IP ratelimit queue because there is already maximum number of queues allowed by policy."),
+ 0xC038005B: ("STATUS_VOLMGR_MIRROR_NOT_SUPPORTED","The system does not support mirrored volumes."),
+ 0xC038005C: ("STATUS_VOLMGR_RAID5_NOT_SUPPORTED","The system does not support RAID-5 volumes."),
+ 0xC03A0014: ("STATUS_VIRTDISK_PROVIDER_NOT_FOUND","A virtual disk support provider for the specified file was not found."),
+ 0xC03A0015: ("STATUS_VIRTDISK_NOT_VIRTUAL_DISK","The specified disk is not a virtual disk."),
+ 0xC03A0016: ("STATUS_VHD_PARENT_VHD_ACCESS_DENIED","The chain of virtual hard disks is inaccessible. The process has not been granted access rights to the parent virtual hard disk for the differencing disk."),
+ 0xC03A0017: ("STATUS_VHD_CHILD_PARENT_SIZE_MISMATCH","The chain of virtual hard disks is corrupted. There is a mismatch in the virtual sizes of the parent virtual hard disk and differencing disk."),
+ 0xC03A0018: ("STATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED","The chain of virtual hard disks is corrupted. A differencing disk is indicated in its own parent chain."),
+ 0xC03A0019: ("STATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT","The chain of virtual hard disks is inaccessible. There was an error opening a virtual hard disk further up the chain."),
+}
+
+# Error Codes
+
+STATUS_SUCCESS = 0x00000000
+STATUS_WAIT_1 = 0x00000001
+STATUS_WAIT_2 = 0x00000002
+STATUS_WAIT_3 = 0x00000003
+STATUS_WAIT_63 = 0x0000003F
+STATUS_ABANDONED = 0x00000080
+STATUS_ABANDONED_WAIT_0 = 0x00000080
+STATUS_ABANDONED_WAIT_63 = 0x000000BF
+STATUS_USER_APC = 0x000000C0
+STATUS_ALERTED = 0x00000101
+STATUS_TIMEOUT = 0x00000102
+STATUS_PENDING = 0x00000103
+STATUS_REPARSE = 0x00000104
+STATUS_MORE_ENTRIES = 0x00000105
+STATUS_NOT_ALL_ASSIGNED = 0x00000106
+STATUS_SOME_NOT_MAPPED = 0x00000107
+STATUS_OPLOCK_BREAK_IN_PROGRESS = 0x00000108
+STATUS_VOLUME_MOUNTED = 0x00000109
+STATUS_RXACT_COMMITTED = 0x0000010A
+STATUS_NOTIFY_CLEANUP = 0x0000010B
+STATUS_NOTIFY_ENUM_DIR = 0x0000010C
+STATUS_NO_QUOTAS_FOR_ACCOUNT = 0x0000010D
+STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED = 0x0000010E
+STATUS_PAGE_FAULT_TRANSITION = 0x00000110
+STATUS_PAGE_FAULT_DEMAND_ZERO = 0x00000111
+STATUS_PAGE_FAULT_COPY_ON_WRITE = 0x00000112
+STATUS_PAGE_FAULT_GUARD_PAGE = 0x00000113
+STATUS_PAGE_FAULT_PAGING_FILE = 0x00000114
+STATUS_CACHE_PAGE_LOCKED = 0x00000115
+STATUS_CRASH_DUMP = 0x00000116
+STATUS_BUFFER_ALL_ZEROS = 0x00000117
+STATUS_REPARSE_OBJECT = 0x00000118
+STATUS_RESOURCE_REQUIREMENTS_CHANGED = 0x00000119
+STATUS_TRANSLATION_COMPLETE = 0x00000120
+STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY = 0x00000121
+STATUS_NOTHING_TO_TERMINATE = 0x00000122
+STATUS_PROCESS_NOT_IN_JOB = 0x00000123
+STATUS_PROCESS_IN_JOB = 0x00000124
+STATUS_VOLSNAP_HIBERNATE_READY = 0x00000125
+STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY = 0x00000126
+STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED = 0x00000127
+STATUS_INTERRUPT_STILL_CONNECTED = 0x00000128
+STATUS_PROCESS_CLONED = 0x00000129
+STATUS_FILE_LOCKED_WITH_ONLY_READERS = 0x0000012A
+STATUS_FILE_LOCKED_WITH_WRITERS = 0x0000012B
+STATUS_RESOURCEMANAGER_READ_ONLY = 0x00000202
+STATUS_WAIT_FOR_OPLOCK = 0x00000367
+DBG_EXCEPTION_HANDLED = 0x00010001
+DBG_CONTINUE = 0x00010002
+STATUS_FLT_IO_COMPLETE = 0x001C0001
+STATUS_FILE_NOT_AVAILABLE = 0xC0000467
+STATUS_CALLBACK_RETURNED_THREAD_AFFINITY = 0xC0000721
+STATUS_OBJECT_NAME_EXISTS = 0x40000000
+STATUS_THREAD_WAS_SUSPENDED = 0x40000001
+STATUS_WORKING_SET_LIMIT_RANGE = 0x40000002
+STATUS_IMAGE_NOT_AT_BASE = 0x40000003
+STATUS_RXACT_STATE_CREATED = 0x40000004
+STATUS_SEGMENT_NOTIFICATION = 0x40000005
+STATUS_LOCAL_USER_SESSION_KEY = 0x40000006
+STATUS_BAD_CURRENT_DIRECTORY = 0x40000007
+STATUS_SERIAL_MORE_WRITES = 0x40000008
+STATUS_REGISTRY_RECOVERED = 0x40000009
+STATUS_FT_READ_RECOVERY_FROM_BACKUP = 0x4000000A
+STATUS_FT_WRITE_RECOVERY = 0x4000000B
+STATUS_SERIAL_COUNTER_TIMEOUT = 0x4000000C
+STATUS_NULL_LM_PASSWORD = 0x4000000D
+STATUS_IMAGE_MACHINE_TYPE_MISMATCH = 0x4000000E
+STATUS_RECEIVE_PARTIAL = 0x4000000F
+STATUS_RECEIVE_EXPEDITED = 0x40000010
+STATUS_RECEIVE_PARTIAL_EXPEDITED = 0x40000011
+STATUS_EVENT_DONE = 0x40000012
+STATUS_EVENT_PENDING = 0x40000013
+STATUS_CHECKING_FILE_SYSTEM = 0x40000014
+STATUS_FATAL_APP_EXIT = 0x40000015
+STATUS_PREDEFINED_HANDLE = 0x40000016
+STATUS_WAS_UNLOCKED = 0x40000017
+STATUS_SERVICE_NOTIFICATION = 0x40000018
+STATUS_WAS_LOCKED = 0x40000019
+STATUS_LOG_HARD_ERROR = 0x4000001A
+STATUS_ALREADY_WIN32 = 0x4000001B
+STATUS_WX86_UNSIMULATE = 0x4000001C
+STATUS_WX86_CONTINUE = 0x4000001D
+STATUS_WX86_SINGLE_STEP = 0x4000001E
+STATUS_WX86_BREAKPOINT = 0x4000001F
+STATUS_WX86_EXCEPTION_CONTINUE = 0x40000020
+STATUS_WX86_EXCEPTION_LASTCHANCE = 0x40000021
+STATUS_WX86_EXCEPTION_CHAIN = 0x40000022
+STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE = 0x40000023
+STATUS_NO_YIELD_PERFORMED = 0x40000024
+STATUS_TIMER_RESUME_IGNORED = 0x40000025
+STATUS_ARBITRATION_UNHANDLED = 0x40000026
+STATUS_CARDBUS_NOT_SUPPORTED = 0x40000027
+STATUS_WX86_CREATEWX86TIB = 0x40000028
+STATUS_MP_PROCESSOR_MISMATCH = 0x40000029
+STATUS_HIBERNATED = 0x4000002A
+STATUS_RESUME_HIBERNATION = 0x4000002B
+STATUS_FIRMWARE_UPDATED = 0x4000002C
+STATUS_DRIVERS_LEAKING_LOCKED_PAGES = 0x4000002D
+STATUS_MESSAGE_RETRIEVED = 0x4000002E
+STATUS_SYSTEM_POWERSTATE_TRANSITION = 0x4000002F
+STATUS_ALPC_CHECK_COMPLETION_LIST = 0x40000030
+STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION = 0x40000031
+STATUS_ACCESS_AUDIT_BY_POLICY = 0x40000032
+STATUS_ABANDON_HIBERFILE = 0x40000033
+STATUS_BIZRULES_NOT_ENABLED = 0x40000034
+STATUS_WAKE_SYSTEM = 0x40000294
+STATUS_DS_SHUTTING_DOWN = 0x40000370
+DBG_REPLY_LATER = 0x40010001
+DBG_UNABLE_TO_PROVIDE_HANDLE = 0x40010002
+DBG_TERMINATE_THREAD = 0x40010003
+DBG_TERMINATE_PROCESS = 0x40010004
+DBG_CONTROL_C = 0x40010005
+DBG_PRINTEXCEPTION_C = 0x40010006
+DBG_RIPEXCEPTION = 0x40010007
+DBG_CONTROL_BREAK = 0x40010008
+DBG_COMMAND_EXCEPTION = 0x40010009
+RPC_NT_UUID_LOCAL_ONLY = 0x40020056
+RPC_NT_SEND_INCOMPLETE = 0x400200AF
+STATUS_CTX_CDM_CONNECT = 0x400A0004
+STATUS_CTX_CDM_DISCONNECT = 0x400A0005
+STATUS_SXS_RELEASE_ACTIVATION_CONTEXT = 0x4015000D
+STATUS_RECOVERY_NOT_NEEDED = 0x40190034
+STATUS_RM_ALREADY_STARTED = 0x40190035
+STATUS_LOG_NO_RESTART = 0x401A000C
+STATUS_VIDEO_DRIVER_DEBUG_REPORT_REQUEST = 0x401B00EC
+STATUS_GRAPHICS_PARTIAL_DATA_POPULATED = 0x401E000A
+STATUS_GRAPHICS_DRIVER_MISMATCH = 0x401E0117
+STATUS_GRAPHICS_MODE_NOT_PINNED = 0x401E0307
+STATUS_GRAPHICS_NO_PREFERRED_MODE = 0x401E031E
+STATUS_GRAPHICS_DATASET_IS_EMPTY = 0x401E034B
+STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET = 0x401E034C
+STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED = 0x401E0351
+STATUS_GRAPHICS_UNKNOWN_CHILD_STATUS = 0x401E042F
+STATUS_GRAPHICS_LEADLINK_START_DEFERRED = 0x401E0437
+STATUS_GRAPHICS_POLLING_TOO_FREQUENTLY = 0x401E0439
+STATUS_GRAPHICS_START_DEFERRED = 0x401E043A
+STATUS_NDIS_INDICATION_REQUIRED = 0x40230001
+STATUS_GUARD_PAGE_VIOLATION = 0x80000001
+STATUS_DATATYPE_MISALIGNMENT = 0x80000002
+STATUS_BREAKPOINT = 0x80000003
+STATUS_SINGLE_STEP = 0x80000004
+STATUS_BUFFER_OVERFLOW = 0x80000005
+STATUS_NO_MORE_FILES = 0x80000006
+STATUS_WAKE_SYSTEM_DEBUGGER = 0x80000007
+STATUS_HANDLES_CLOSED = 0x8000000A
+STATUS_NO_INHERITANCE = 0x8000000B
+STATUS_GUID_SUBSTITUTION_MADE = 0x8000000C
+STATUS_PARTIAL_COPY = 0x8000000D
+STATUS_DEVICE_PAPER_EMPTY = 0x8000000E
+STATUS_DEVICE_POWERED_OFF = 0x8000000F
+STATUS_DEVICE_OFF_LINE = 0x80000010
+STATUS_DEVICE_BUSY = 0x80000011
+STATUS_NO_MORE_EAS = 0x80000012
+STATUS_INVALID_EA_NAME = 0x80000013
+STATUS_EA_LIST_INCONSISTENT = 0x80000014
+STATUS_INVALID_EA_FLAG = 0x80000015
+STATUS_VERIFY_REQUIRED = 0x80000016
+STATUS_EXTRANEOUS_INFORMATION = 0x80000017
+STATUS_RXACT_COMMIT_NECESSARY = 0x80000018
+STATUS_NO_MORE_ENTRIES = 0x8000001A
+STATUS_FILEMARK_DETECTED = 0x8000001B
+STATUS_MEDIA_CHANGED = 0x8000001C
+STATUS_BUS_RESET = 0x8000001D
+STATUS_END_OF_MEDIA = 0x8000001E
+STATUS_BEGINNING_OF_MEDIA = 0x8000001F
+STATUS_MEDIA_CHECK = 0x80000020
+STATUS_SETMARK_DETECTED = 0x80000021
+STATUS_NO_DATA_DETECTED = 0x80000022
+STATUS_REDIRECTOR_HAS_OPEN_HANDLES = 0x80000023
+STATUS_SERVER_HAS_OPEN_HANDLES = 0x80000024
+STATUS_ALREADY_DISCONNECTED = 0x80000025
+STATUS_LONGJUMP = 0x80000026
+STATUS_CLEANER_CARTRIDGE_INSTALLED = 0x80000027
+STATUS_PLUGPLAY_QUERY_VETOED = 0x80000028
+STATUS_UNWIND_CONSOLIDATE = 0x80000029
+STATUS_REGISTRY_HIVE_RECOVERED = 0x8000002A
+STATUS_DLL_MIGHT_BE_INSECURE = 0x8000002B
+STATUS_DLL_MIGHT_BE_INCOMPATIBLE = 0x8000002C
+STATUS_STOPPED_ON_SYMLINK = 0x8000002D
+STATUS_DEVICE_REQUIRES_CLEANING = 0x80000288
+STATUS_DEVICE_DOOR_OPEN = 0x80000289
+STATUS_DATA_LOST_REPAIR = 0x80000803
+DBG_EXCEPTION_NOT_HANDLED = 0x80010001
+STATUS_CLUSTER_NODE_ALREADY_UP = 0x80130001
+STATUS_CLUSTER_NODE_ALREADY_DOWN = 0x80130002
+STATUS_CLUSTER_NETWORK_ALREADY_ONLINE = 0x80130003
+STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE = 0x80130004
+STATUS_CLUSTER_NODE_ALREADY_MEMBER = 0x80130005
+STATUS_COULD_NOT_RESIZE_LOG = 0x80190009
+STATUS_NO_TXF_METADATA = 0x80190029
+STATUS_CANT_RECOVER_WITH_HANDLE_OPEN = 0x80190031
+STATUS_TXF_METADATA_ALREADY_PRESENT = 0x80190041
+STATUS_TRANSACTION_SCOPE_CALLBACKS_NOT_SET = 0x80190042
+STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED = 0x801B00EB
+STATUS_FLT_BUFFER_TOO_SMALL = 0x801C0001
+STATUS_FVE_PARTIAL_METADATA = 0x80210001
+STATUS_FVE_TRANSIENT_STATE = 0x80210002
+STATUS_UNSUCCESSFUL = 0xC0000001
+STATUS_NOT_IMPLEMENTED = 0xC0000002
+STATUS_INVALID_INFO_CLASS = 0xC0000003
+STATUS_INFO_LENGTH_MISMATCH = 0xC0000004
+STATUS_ACCESS_VIOLATION = 0xC0000005
+STATUS_IN_PAGE_ERROR = 0xC0000006
+STATUS_PAGEFILE_QUOTA = 0xC0000007
+STATUS_INVALID_HANDLE = 0xC0000008
+STATUS_BAD_INITIAL_STACK = 0xC0000009
+STATUS_BAD_INITIAL_PC = 0xC000000A
+STATUS_INVALID_CID = 0xC000000B
+STATUS_TIMER_NOT_CANCELED = 0xC000000C
+STATUS_INVALID_PARAMETER = 0xC000000D
+STATUS_NO_SUCH_DEVICE = 0xC000000E
+STATUS_NO_SUCH_FILE = 0xC000000F
+STATUS_INVALID_DEVICE_REQUEST = 0xC0000010
+STATUS_END_OF_FILE = 0xC0000011
+STATUS_WRONG_VOLUME = 0xC0000012
+STATUS_NO_MEDIA_IN_DEVICE = 0xC0000013
+STATUS_UNRECOGNIZED_MEDIA = 0xC0000014
+STATUS_NONEXISTENT_SECTOR = 0xC0000015
+STATUS_MORE_PROCESSING_REQUIRED = 0xC0000016
+STATUS_NO_MEMORY = 0xC0000017
+STATUS_CONFLICTING_ADDRESSES = 0xC0000018
+STATUS_NOT_MAPPED_VIEW = 0xC0000019
+STATUS_UNABLE_TO_FREE_VM = 0xC000001A
+STATUS_UNABLE_TO_DELETE_SECTION = 0xC000001B
+STATUS_INVALID_SYSTEM_SERVICE = 0xC000001C
+STATUS_ILLEGAL_INSTRUCTION = 0xC000001D
+STATUS_INVALID_LOCK_SEQUENCE = 0xC000001E
+STATUS_INVALID_VIEW_SIZE = 0xC000001F
+STATUS_INVALID_FILE_FOR_SECTION = 0xC0000020
+STATUS_ALREADY_COMMITTED = 0xC0000021
+STATUS_ACCESS_DENIED = 0xC0000022
+STATUS_BUFFER_TOO_SMALL = 0xC0000023
+STATUS_OBJECT_TYPE_MISMATCH = 0xC0000024
+STATUS_NONCONTINUABLE_EXCEPTION = 0xC0000025
+STATUS_INVALID_DISPOSITION = 0xC0000026
+STATUS_UNWIND = 0xC0000027
+STATUS_BAD_STACK = 0xC0000028
+STATUS_INVALID_UNWIND_TARGET = 0xC0000029
+STATUS_NOT_LOCKED = 0xC000002A
+STATUS_PARITY_ERROR = 0xC000002B
+STATUS_UNABLE_TO_DECOMMIT_VM = 0xC000002C
+STATUS_NOT_COMMITTED = 0xC000002D
+STATUS_INVALID_PORT_ATTRIBUTES = 0xC000002E
+STATUS_PORT_MESSAGE_TOO_LONG = 0xC000002F
+STATUS_INVALID_PARAMETER_MIX = 0xC0000030
+STATUS_INVALID_QUOTA_LOWER = 0xC0000031
+STATUS_DISK_CORRUPT_ERROR = 0xC0000032
+STATUS_OBJECT_NAME_INVALID = 0xC0000033
+STATUS_OBJECT_NAME_NOT_FOUND = 0xC0000034
+STATUS_OBJECT_NAME_COLLISION = 0xC0000035
+STATUS_PORT_DISCONNECTED = 0xC0000037
+STATUS_DEVICE_ALREADY_ATTACHED = 0xC0000038
+STATUS_OBJECT_PATH_INVALID = 0xC0000039
+STATUS_OBJECT_PATH_NOT_FOUND = 0xC000003A
+STATUS_OBJECT_PATH_SYNTAX_BAD = 0xC000003B
+STATUS_DATA_OVERRUN = 0xC000003C
+STATUS_DATA_LATE_ERROR = 0xC000003D
+STATUS_DATA_ERROR = 0xC000003E
+STATUS_CRC_ERROR = 0xC000003F
+STATUS_SECTION_TOO_BIG = 0xC0000040
+STATUS_PORT_CONNECTION_REFUSED = 0xC0000041
+STATUS_INVALID_PORT_HANDLE = 0xC0000042
+STATUS_SHARING_VIOLATION = 0xC0000043
+STATUS_QUOTA_EXCEEDED = 0xC0000044
+STATUS_INVALID_PAGE_PROTECTION = 0xC0000045
+STATUS_MUTANT_NOT_OWNED = 0xC0000046
+STATUS_SEMAPHORE_LIMIT_EXCEEDED = 0xC0000047
+STATUS_PORT_ALREADY_SET = 0xC0000048
+STATUS_SECTION_NOT_IMAGE = 0xC0000049
+STATUS_SUSPEND_COUNT_EXCEEDED = 0xC000004A
+STATUS_THREAD_IS_TERMINATING = 0xC000004B
+STATUS_BAD_WORKING_SET_LIMIT = 0xC000004C
+STATUS_INCOMPATIBLE_FILE_MAP = 0xC000004D
+STATUS_SECTION_PROTECTION = 0xC000004E
+STATUS_EAS_NOT_SUPPORTED = 0xC000004F
+STATUS_EA_TOO_LARGE = 0xC0000050
+STATUS_NONEXISTENT_EA_ENTRY = 0xC0000051
+STATUS_NO_EAS_ON_FILE = 0xC0000052
+STATUS_EA_CORRUPT_ERROR = 0xC0000053
+STATUS_FILE_LOCK_CONFLICT = 0xC0000054
+STATUS_LOCK_NOT_GRANTED = 0xC0000055
+STATUS_DELETE_PENDING = 0xC0000056
+STATUS_CTL_FILE_NOT_SUPPORTED = 0xC0000057
+STATUS_UNKNOWN_REVISION = 0xC0000058
+STATUS_REVISION_MISMATCH = 0xC0000059
+STATUS_INVALID_OWNER = 0xC000005A
+STATUS_INVALID_PRIMARY_GROUP = 0xC000005B
+STATUS_NO_IMPERSONATION_TOKEN = 0xC000005C
+STATUS_CANT_DISABLE_MANDATORY = 0xC000005D
+STATUS_NO_LOGON_SERVERS = 0xC000005E
+STATUS_NO_SUCH_LOGON_SESSION = 0xC000005F
+STATUS_NO_SUCH_PRIVILEGE = 0xC0000060
+STATUS_PRIVILEGE_NOT_HELD = 0xC0000061
+STATUS_INVALID_ACCOUNT_NAME = 0xC0000062
+STATUS_USER_EXISTS = 0xC0000063
+STATUS_NO_SUCH_USER = 0xC0000064
+STATUS_GROUP_EXISTS = 0xC0000065
+STATUS_NO_SUCH_GROUP = 0xC0000066
+STATUS_MEMBER_IN_GROUP = 0xC0000067
+STATUS_MEMBER_NOT_IN_GROUP = 0xC0000068
+STATUS_LAST_ADMIN = 0xC0000069
+STATUS_WRONG_PASSWORD = 0xC000006A
+STATUS_ILL_FORMED_PASSWORD = 0xC000006B
+STATUS_PASSWORD_RESTRICTION = 0xC000006C
+STATUS_LOGON_FAILURE = 0xC000006D
+STATUS_ACCOUNT_RESTRICTION = 0xC000006E
+STATUS_INVALID_LOGON_HOURS = 0xC000006F
+STATUS_INVALID_WORKSTATION = 0xC0000070
+STATUS_PASSWORD_EXPIRED = 0xC0000071
+STATUS_ACCOUNT_DISABLED = 0xC0000072
+STATUS_NONE_MAPPED = 0xC0000073
+STATUS_TOO_MANY_LUIDS_REQUESTED = 0xC0000074
+STATUS_LUIDS_EXHAUSTED = 0xC0000075
+STATUS_INVALID_SUB_AUTHORITY = 0xC0000076
+STATUS_INVALID_ACL = 0xC0000077
+STATUS_INVALID_SID = 0xC0000078
+STATUS_INVALID_SECURITY_DESCR = 0xC0000079
+STATUS_PROCEDURE_NOT_FOUND = 0xC000007A
+STATUS_INVALID_IMAGE_FORMAT = 0xC000007B
+STATUS_NO_TOKEN = 0xC000007C
+STATUS_BAD_INHERITANCE_ACL = 0xC000007D
+STATUS_RANGE_NOT_LOCKED = 0xC000007E
+STATUS_DISK_FULL = 0xC000007F
+STATUS_SERVER_DISABLED = 0xC0000080
+STATUS_SERVER_NOT_DISABLED = 0xC0000081
+STATUS_TOO_MANY_GUIDS_REQUESTED = 0xC0000082
+STATUS_GUIDS_EXHAUSTED = 0xC0000083
+STATUS_INVALID_ID_AUTHORITY = 0xC0000084
+STATUS_AGENTS_EXHAUSTED = 0xC0000085
+STATUS_INVALID_VOLUME_LABEL = 0xC0000086
+STATUS_SECTION_NOT_EXTENDED = 0xC0000087
+STATUS_NOT_MAPPED_DATA = 0xC0000088
+STATUS_RESOURCE_DATA_NOT_FOUND = 0xC0000089
+STATUS_RESOURCE_TYPE_NOT_FOUND = 0xC000008A
+STATUS_RESOURCE_NAME_NOT_FOUND = 0xC000008B
+STATUS_ARRAY_BOUNDS_EXCEEDED = 0xC000008C
+STATUS_FLOAT_DENORMAL_OPERAND = 0xC000008D
+STATUS_FLOAT_DIVIDE_BY_ZERO = 0xC000008E
+STATUS_FLOAT_INEXACT_RESULT = 0xC000008F
+STATUS_FLOAT_INVALID_OPERATION = 0xC0000090
+STATUS_FLOAT_OVERFLOW = 0xC0000091
+STATUS_FLOAT_STACK_CHECK = 0xC0000092
+STATUS_FLOAT_UNDERFLOW = 0xC0000093
+STATUS_INTEGER_DIVIDE_BY_ZERO = 0xC0000094
+STATUS_INTEGER_OVERFLOW = 0xC0000095
+STATUS_PRIVILEGED_INSTRUCTION = 0xC0000096
+STATUS_TOO_MANY_PAGING_FILES = 0xC0000097
+STATUS_FILE_INVALID = 0xC0000098
+STATUS_ALLOTTED_SPACE_EXCEEDED = 0xC0000099
+STATUS_INSUFFICIENT_RESOURCES = 0xC000009A
+STATUS_DFS_EXIT_PATH_FOUND = 0xC000009B
+STATUS_DEVICE_DATA_ERROR = 0xC000009C
+STATUS_DEVICE_NOT_CONNECTED = 0xC000009D
+STATUS_FREE_VM_NOT_AT_BASE = 0xC000009F
+STATUS_MEMORY_NOT_ALLOCATED = 0xC00000A0
+STATUS_WORKING_SET_QUOTA = 0xC00000A1
+STATUS_MEDIA_WRITE_PROTECTED = 0xC00000A2
+STATUS_DEVICE_NOT_READY = 0xC00000A3
+STATUS_INVALID_GROUP_ATTRIBUTES = 0xC00000A4
+STATUS_BAD_IMPERSONATION_LEVEL = 0xC00000A5
+STATUS_CANT_OPEN_ANONYMOUS = 0xC00000A6
+STATUS_BAD_VALIDATION_CLASS = 0xC00000A7
+STATUS_BAD_TOKEN_TYPE = 0xC00000A8
+STATUS_BAD_MASTER_BOOT_RECORD = 0xC00000A9
+STATUS_INSTRUCTION_MISALIGNMENT = 0xC00000AA
+STATUS_INSTANCE_NOT_AVAILABLE = 0xC00000AB
+STATUS_PIPE_NOT_AVAILABLE = 0xC00000AC
+STATUS_INVALID_PIPE_STATE = 0xC00000AD
+STATUS_PIPE_BUSY = 0xC00000AE
+STATUS_ILLEGAL_FUNCTION = 0xC00000AF
+STATUS_PIPE_DISCONNECTED = 0xC00000B0
+STATUS_PIPE_CLOSING = 0xC00000B1
+STATUS_PIPE_CONNECTED = 0xC00000B2
+STATUS_PIPE_LISTENING = 0xC00000B3
+STATUS_INVALID_READ_MODE = 0xC00000B4
+STATUS_IO_TIMEOUT = 0xC00000B5
+STATUS_FILE_FORCED_CLOSED = 0xC00000B6
+STATUS_PROFILING_NOT_STARTED = 0xC00000B7
+STATUS_PROFILING_NOT_STOPPED = 0xC00000B8
+STATUS_COULD_NOT_INTERPRET = 0xC00000B9
+STATUS_FILE_IS_A_DIRECTORY = 0xC00000BA
+STATUS_NOT_SUPPORTED = 0xC00000BB
+STATUS_REMOTE_NOT_LISTENING = 0xC00000BC
+STATUS_DUPLICATE_NAME = 0xC00000BD
+STATUS_BAD_NETWORK_PATH = 0xC00000BE
+STATUS_NETWORK_BUSY = 0xC00000BF
+STATUS_DEVICE_DOES_NOT_EXIST = 0xC00000C0
+STATUS_TOO_MANY_COMMANDS = 0xC00000C1
+STATUS_ADAPTER_HARDWARE_ERROR = 0xC00000C2
+STATUS_INVALID_NETWORK_RESPONSE = 0xC00000C3
+STATUS_UNEXPECTED_NETWORK_ERROR = 0xC00000C4
+STATUS_BAD_REMOTE_ADAPTER = 0xC00000C5
+STATUS_PRINT_QUEUE_FULL = 0xC00000C6
+STATUS_NO_SPOOL_SPACE = 0xC00000C7
+STATUS_PRINT_CANCELLED = 0xC00000C8
+STATUS_NETWORK_NAME_DELETED = 0xC00000C9
+STATUS_NETWORK_ACCESS_DENIED = 0xC00000CA
+STATUS_BAD_DEVICE_TYPE = 0xC00000CB
+STATUS_BAD_NETWORK_NAME = 0xC00000CC
+STATUS_TOO_MANY_NAMES = 0xC00000CD
+STATUS_TOO_MANY_SESSIONS = 0xC00000CE
+STATUS_SHARING_PAUSED = 0xC00000CF
+STATUS_REQUEST_NOT_ACCEPTED = 0xC00000D0
+STATUS_REDIRECTOR_PAUSED = 0xC00000D1
+STATUS_NET_WRITE_FAULT = 0xC00000D2
+STATUS_PROFILING_AT_LIMIT = 0xC00000D3
+STATUS_NOT_SAME_DEVICE = 0xC00000D4
+STATUS_FILE_RENAMED = 0xC00000D5
+STATUS_VIRTUAL_CIRCUIT_CLOSED = 0xC00000D6
+STATUS_NO_SECURITY_ON_OBJECT = 0xC00000D7
+STATUS_CANT_WAIT = 0xC00000D8
+STATUS_PIPE_EMPTY = 0xC00000D9
+STATUS_CANT_ACCESS_DOMAIN_INFO = 0xC00000DA
+STATUS_CANT_TERMINATE_SELF = 0xC00000DB
+STATUS_INVALID_SERVER_STATE = 0xC00000DC
+STATUS_INVALID_DOMAIN_STATE = 0xC00000DD
+STATUS_INVALID_DOMAIN_ROLE = 0xC00000DE
+STATUS_NO_SUCH_DOMAIN = 0xC00000DF
+STATUS_DOMAIN_EXISTS = 0xC00000E0
+STATUS_DOMAIN_LIMIT_EXCEEDED = 0xC00000E1
+STATUS_OPLOCK_NOT_GRANTED = 0xC00000E2
+STATUS_INVALID_OPLOCK_PROTOCOL = 0xC00000E3
+STATUS_INTERNAL_DB_CORRUPTION = 0xC00000E4
+STATUS_INTERNAL_ERROR = 0xC00000E5
+STATUS_GENERIC_NOT_MAPPED = 0xC00000E6
+STATUS_BAD_DESCRIPTOR_FORMAT = 0xC00000E7
+STATUS_INVALID_USER_BUFFER = 0xC00000E8
+STATUS_UNEXPECTED_IO_ERROR = 0xC00000E9
+STATUS_UNEXPECTED_MM_CREATE_ERR = 0xC00000EA
+STATUS_UNEXPECTED_MM_MAP_ERROR = 0xC00000EB
+STATUS_UNEXPECTED_MM_EXTEND_ERR = 0xC00000EC
+STATUS_NOT_LOGON_PROCESS = 0xC00000ED
+STATUS_LOGON_SESSION_EXISTS = 0xC00000EE
+STATUS_INVALID_PARAMETER_1 = 0xC00000EF
+STATUS_INVALID_PARAMETER_2 = 0xC00000F0
+STATUS_INVALID_PARAMETER_3 = 0xC00000F1
+STATUS_INVALID_PARAMETER_4 = 0xC00000F2
+STATUS_INVALID_PARAMETER_5 = 0xC00000F3
+STATUS_INVALID_PARAMETER_6 = 0xC00000F4
+STATUS_INVALID_PARAMETER_7 = 0xC00000F5
+STATUS_INVALID_PARAMETER_8 = 0xC00000F6
+STATUS_INVALID_PARAMETER_9 = 0xC00000F7
+STATUS_INVALID_PARAMETER_10 = 0xC00000F8
+STATUS_INVALID_PARAMETER_11 = 0xC00000F9
+STATUS_INVALID_PARAMETER_12 = 0xC00000FA
+STATUS_REDIRECTOR_NOT_STARTED = 0xC00000FB
+STATUS_REDIRECTOR_STARTED = 0xC00000FC
+STATUS_STACK_OVERFLOW = 0xC00000FD
+STATUS_NO_SUCH_PACKAGE = 0xC00000FE
+STATUS_BAD_FUNCTION_TABLE = 0xC00000FF
+STATUS_VARIABLE_NOT_FOUND = 0xC0000100
+STATUS_DIRECTORY_NOT_EMPTY = 0xC0000101
+STATUS_FILE_CORRUPT_ERROR = 0xC0000102
+STATUS_NOT_A_DIRECTORY = 0xC0000103
+STATUS_BAD_LOGON_SESSION_STATE = 0xC0000104
+STATUS_LOGON_SESSION_COLLISION = 0xC0000105
+STATUS_NAME_TOO_LONG = 0xC0000106
+STATUS_FILES_OPEN = 0xC0000107
+STATUS_CONNECTION_IN_USE = 0xC0000108
+STATUS_MESSAGE_NOT_FOUND = 0xC0000109
+STATUS_PROCESS_IS_TERMINATING = 0xC000010A
+STATUS_INVALID_LOGON_TYPE = 0xC000010B
+STATUS_NO_GUID_TRANSLATION = 0xC000010C
+STATUS_CANNOT_IMPERSONATE = 0xC000010D
+STATUS_IMAGE_ALREADY_LOADED = 0xC000010E
+STATUS_NO_LDT = 0xC0000117
+STATUS_INVALID_LDT_SIZE = 0xC0000118
+STATUS_INVALID_LDT_OFFSET = 0xC0000119
+STATUS_INVALID_LDT_DESCRIPTOR = 0xC000011A
+STATUS_INVALID_IMAGE_NE_FORMAT = 0xC000011B
+STATUS_RXACT_INVALID_STATE = 0xC000011C
+STATUS_RXACT_COMMIT_FAILURE = 0xC000011D
+STATUS_MAPPED_FILE_SIZE_ZERO = 0xC000011E
+STATUS_TOO_MANY_OPENED_FILES = 0xC000011F
+STATUS_CANCELLED = 0xC0000120
+STATUS_CANNOT_DELETE = 0xC0000121
+STATUS_INVALID_COMPUTER_NAME = 0xC0000122
+STATUS_FILE_DELETED = 0xC0000123
+STATUS_SPECIAL_ACCOUNT = 0xC0000124
+STATUS_SPECIAL_GROUP = 0xC0000125
+STATUS_SPECIAL_USER = 0xC0000126
+STATUS_MEMBERS_PRIMARY_GROUP = 0xC0000127
+STATUS_FILE_CLOSED = 0xC0000128
+STATUS_TOO_MANY_THREADS = 0xC0000129
+STATUS_THREAD_NOT_IN_PROCESS = 0xC000012A
+STATUS_TOKEN_ALREADY_IN_USE = 0xC000012B
+STATUS_PAGEFILE_QUOTA_EXCEEDED = 0xC000012C
+STATUS_COMMITMENT_LIMIT = 0xC000012D
+STATUS_INVALID_IMAGE_LE_FORMAT = 0xC000012E
+STATUS_INVALID_IMAGE_NOT_MZ = 0xC000012F
+STATUS_INVALID_IMAGE_PROTECT = 0xC0000130
+STATUS_INVALID_IMAGE_WIN_16 = 0xC0000131
+STATUS_LOGON_SERVER_CONFLICT = 0xC0000132
+STATUS_TIME_DIFFERENCE_AT_DC = 0xC0000133
+STATUS_SYNCHRONIZATION_REQUIRED = 0xC0000134
+STATUS_DLL_NOT_FOUND = 0xC0000135
+STATUS_OPEN_FAILED = 0xC0000136
+STATUS_IO_PRIVILEGE_FAILED = 0xC0000137
+STATUS_ORDINAL_NOT_FOUND = 0xC0000138
+STATUS_ENTRYPOINT_NOT_FOUND = 0xC0000139
+STATUS_CONTROL_C_EXIT = 0xC000013A
+STATUS_LOCAL_DISCONNECT = 0xC000013B
+STATUS_REMOTE_DISCONNECT = 0xC000013C
+STATUS_REMOTE_RESOURCES = 0xC000013D
+STATUS_LINK_FAILED = 0xC000013E
+STATUS_LINK_TIMEOUT = 0xC000013F
+STATUS_INVALID_CONNECTION = 0xC0000140
+STATUS_INVALID_ADDRESS = 0xC0000141
+STATUS_DLL_INIT_FAILED = 0xC0000142
+STATUS_MISSING_SYSTEMFILE = 0xC0000143
+STATUS_UNHANDLED_EXCEPTION = 0xC0000144
+STATUS_APP_INIT_FAILURE = 0xC0000145
+STATUS_PAGEFILE_CREATE_FAILED = 0xC0000146
+STATUS_NO_PAGEFILE = 0xC0000147
+STATUS_INVALID_LEVEL = 0xC0000148
+STATUS_WRONG_PASSWORD_CORE = 0xC0000149
+STATUS_ILLEGAL_FLOAT_CONTEXT = 0xC000014A
+STATUS_PIPE_BROKEN = 0xC000014B
+STATUS_REGISTRY_CORRUPT = 0xC000014C
+STATUS_REGISTRY_IO_FAILED = 0xC000014D
+STATUS_NO_EVENT_PAIR = 0xC000014E
+STATUS_UNRECOGNIZED_VOLUME = 0xC000014F
+STATUS_SERIAL_NO_DEVICE_INITED = 0xC0000150
+STATUS_NO_SUCH_ALIAS = 0xC0000151
+STATUS_MEMBER_NOT_IN_ALIAS = 0xC0000152
+STATUS_MEMBER_IN_ALIAS = 0xC0000153
+STATUS_ALIAS_EXISTS = 0xC0000154
+STATUS_LOGON_NOT_GRANTED = 0xC0000155
+STATUS_TOO_MANY_SECRETS = 0xC0000156
+STATUS_SECRET_TOO_LONG = 0xC0000157
+STATUS_INTERNAL_DB_ERROR = 0xC0000158
+STATUS_FULLSCREEN_MODE = 0xC0000159
+STATUS_TOO_MANY_CONTEXT_IDS = 0xC000015A
+STATUS_LOGON_TYPE_NOT_GRANTED = 0xC000015B
+STATUS_NOT_REGISTRY_FILE = 0xC000015C
+STATUS_NT_CROSS_ENCRYPTION_REQUIRED = 0xC000015D
+STATUS_DOMAIN_CTRLR_CONFIG_ERROR = 0xC000015E
+STATUS_FT_MISSING_MEMBER = 0xC000015F
+STATUS_ILL_FORMED_SERVICE_ENTRY = 0xC0000160
+STATUS_ILLEGAL_CHARACTER = 0xC0000161
+STATUS_UNMAPPABLE_CHARACTER = 0xC0000162
+STATUS_UNDEFINED_CHARACTER = 0xC0000163
+STATUS_FLOPPY_VOLUME = 0xC0000164
+STATUS_FLOPPY_ID_MARK_NOT_FOUND = 0xC0000165
+STATUS_FLOPPY_WRONG_CYLINDER = 0xC0000166
+STATUS_FLOPPY_UNKNOWN_ERROR = 0xC0000167
+STATUS_FLOPPY_BAD_REGISTERS = 0xC0000168
+STATUS_DISK_RECALIBRATE_FAILED = 0xC0000169
+STATUS_DISK_OPERATION_FAILED = 0xC000016A
+STATUS_DISK_RESET_FAILED = 0xC000016B
+STATUS_SHARED_IRQ_BUSY = 0xC000016C
+STATUS_FT_ORPHANING = 0xC000016D
+STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT = 0xC000016E
+STATUS_PARTITION_FAILURE = 0xC0000172
+STATUS_INVALID_BLOCK_LENGTH = 0xC0000173
+STATUS_DEVICE_NOT_PARTITIONED = 0xC0000174
+STATUS_UNABLE_TO_LOCK_MEDIA = 0xC0000175
+STATUS_UNABLE_TO_UNLOAD_MEDIA = 0xC0000176
+STATUS_EOM_OVERFLOW = 0xC0000177
+STATUS_NO_MEDIA = 0xC0000178
+STATUS_NO_SUCH_MEMBER = 0xC000017A
+STATUS_INVALID_MEMBER = 0xC000017B
+STATUS_KEY_DELETED = 0xC000017C
+STATUS_NO_LOG_SPACE = 0xC000017D
+STATUS_TOO_MANY_SIDS = 0xC000017E
+STATUS_LM_CROSS_ENCRYPTION_REQUIRED = 0xC000017F
+STATUS_KEY_HAS_CHILDREN = 0xC0000180
+STATUS_CHILD_MUST_BE_VOLATILE = 0xC0000181
+STATUS_DEVICE_CONFIGURATION_ERROR = 0xC0000182
+STATUS_DRIVER_INTERNAL_ERROR = 0xC0000183
+STATUS_INVALID_DEVICE_STATE = 0xC0000184
+STATUS_IO_DEVICE_ERROR = 0xC0000185
+STATUS_DEVICE_PROTOCOL_ERROR = 0xC0000186
+STATUS_BACKUP_CONTROLLER = 0xC0000187
+STATUS_LOG_FILE_FULL = 0xC0000188
+STATUS_TOO_LATE = 0xC0000189
+STATUS_NO_TRUST_LSA_SECRET = 0xC000018A
+STATUS_NO_TRUST_SAM_ACCOUNT = 0xC000018B
+STATUS_TRUSTED_DOMAIN_FAILURE = 0xC000018C
+STATUS_TRUSTED_RELATIONSHIP_FAILURE = 0xC000018D
+STATUS_EVENTLOG_FILE_CORRUPT = 0xC000018E
+STATUS_EVENTLOG_CANT_START = 0xC000018F
+STATUS_TRUST_FAILURE = 0xC0000190
+STATUS_MUTANT_LIMIT_EXCEEDED = 0xC0000191
+STATUS_NETLOGON_NOT_STARTED = 0xC0000192
+STATUS_ACCOUNT_EXPIRED = 0xC0000193
+STATUS_POSSIBLE_DEADLOCK = 0xC0000194
+STATUS_NETWORK_CREDENTIAL_CONFLICT = 0xC0000195
+STATUS_REMOTE_SESSION_LIMIT = 0xC0000196
+STATUS_EVENTLOG_FILE_CHANGED = 0xC0000197
+STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 0xC0000198
+STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT = 0xC0000199
+STATUS_NOLOGON_SERVER_TRUST_ACCOUNT = 0xC000019A
+STATUS_DOMAIN_TRUST_INCONSISTENT = 0xC000019B
+STATUS_FS_DRIVER_REQUIRED = 0xC000019C
+STATUS_IMAGE_ALREADY_LOADED_AS_DLL = 0xC000019D
+STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING = 0xC000019E
+STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME = 0xC000019F
+STATUS_SECURITY_STREAM_IS_INCONSISTENT = 0xC00001A0
+STATUS_INVALID_LOCK_RANGE = 0xC00001A1
+STATUS_INVALID_ACE_CONDITION = 0xC00001A2
+STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT = 0xC00001A3
+STATUS_NOTIFICATION_GUID_ALREADY_DEFINED = 0xC00001A4
+STATUS_NETWORK_OPEN_RESTRICTION = 0xC0000201
+STATUS_NO_USER_SESSION_KEY = 0xC0000202
+STATUS_USER_SESSION_DELETED = 0xC0000203
+STATUS_RESOURCE_LANG_NOT_FOUND = 0xC0000204
+STATUS_INSUFF_SERVER_RESOURCES = 0xC0000205
+STATUS_INVALID_BUFFER_SIZE = 0xC0000206
+STATUS_INVALID_ADDRESS_COMPONENT = 0xC0000207
+STATUS_INVALID_ADDRESS_WILDCARD = 0xC0000208
+STATUS_TOO_MANY_ADDRESSES = 0xC0000209
+STATUS_ADDRESS_ALREADY_EXISTS = 0xC000020A
+STATUS_ADDRESS_CLOSED = 0xC000020B
+STATUS_CONNECTION_DISCONNECTED = 0xC000020C
+STATUS_CONNECTION_RESET = 0xC000020D
+STATUS_TOO_MANY_NODES = 0xC000020E
+STATUS_TRANSACTION_ABORTED = 0xC000020F
+STATUS_TRANSACTION_TIMED_OUT = 0xC0000210
+STATUS_TRANSACTION_NO_RELEASE = 0xC0000211
+STATUS_TRANSACTION_NO_MATCH = 0xC0000212
+STATUS_TRANSACTION_RESPONDED = 0xC0000213
+STATUS_TRANSACTION_INVALID_ID = 0xC0000214
+STATUS_TRANSACTION_INVALID_TYPE = 0xC0000215
+STATUS_NOT_SERVER_SESSION = 0xC0000216
+STATUS_NOT_CLIENT_SESSION = 0xC0000217
+STATUS_CANNOT_LOAD_REGISTRY_FILE = 0xC0000218
+STATUS_DEBUG_ATTACH_FAILED = 0xC0000219
+STATUS_SYSTEM_PROCESS_TERMINATED = 0xC000021A
+STATUS_DATA_NOT_ACCEPTED = 0xC000021B
+STATUS_NO_BROWSER_SERVERS_FOUND = 0xC000021C
+STATUS_VDM_HARD_ERROR = 0xC000021D
+STATUS_DRIVER_CANCEL_TIMEOUT = 0xC000021E
+STATUS_REPLY_MESSAGE_MISMATCH = 0xC000021F
+STATUS_MAPPED_ALIGNMENT = 0xC0000220
+STATUS_IMAGE_CHECKSUM_MISMATCH = 0xC0000221
+STATUS_LOST_WRITEBEHIND_DATA = 0xC0000222
+STATUS_CLIENT_SERVER_PARAMETERS_INVALID = 0xC0000223
+STATUS_PASSWORD_MUST_CHANGE = 0xC0000224
+STATUS_NOT_FOUND = 0xC0000225
+STATUS_NOT_TINY_STREAM = 0xC0000226
+STATUS_RECOVERY_FAILURE = 0xC0000227
+STATUS_STACK_OVERFLOW_READ = 0xC0000228
+STATUS_FAIL_CHECK = 0xC0000229
+STATUS_DUPLICATE_OBJECTID = 0xC000022A
+STATUS_OBJECTID_EXISTS = 0xC000022B
+STATUS_CONVERT_TO_LARGE = 0xC000022C
+STATUS_RETRY = 0xC000022D
+STATUS_FOUND_OUT_OF_SCOPE = 0xC000022E
+STATUS_ALLOCATE_BUCKET = 0xC000022F
+STATUS_PROPSET_NOT_FOUND = 0xC0000230
+STATUS_MARSHALL_OVERFLOW = 0xC0000231
+STATUS_INVALID_VARIANT = 0xC0000232
+STATUS_DOMAIN_CONTROLLER_NOT_FOUND = 0xC0000233
+STATUS_ACCOUNT_LOCKED_OUT = 0xC0000234
+STATUS_HANDLE_NOT_CLOSABLE = 0xC0000235
+STATUS_CONNECTION_REFUSED = 0xC0000236
+STATUS_GRACEFUL_DISCONNECT = 0xC0000237
+STATUS_ADDRESS_ALREADY_ASSOCIATED = 0xC0000238
+STATUS_ADDRESS_NOT_ASSOCIATED = 0xC0000239
+STATUS_CONNECTION_INVALID = 0xC000023A
+STATUS_CONNECTION_ACTIVE = 0xC000023B
+STATUS_NETWORK_UNREACHABLE = 0xC000023C
+STATUS_HOST_UNREACHABLE = 0xC000023D
+STATUS_PROTOCOL_UNREACHABLE = 0xC000023E
+STATUS_PORT_UNREACHABLE = 0xC000023F
+STATUS_REQUEST_ABORTED = 0xC0000240
+STATUS_CONNECTION_ABORTED = 0xC0000241
+STATUS_BAD_COMPRESSION_BUFFER = 0xC0000242
+STATUS_USER_MAPPED_FILE = 0xC0000243
+STATUS_AUDIT_FAILED = 0xC0000244
+STATUS_TIMER_RESOLUTION_NOT_SET = 0xC0000245
+STATUS_CONNECTION_COUNT_LIMIT = 0xC0000246
+STATUS_LOGIN_TIME_RESTRICTION = 0xC0000247
+STATUS_LOGIN_WKSTA_RESTRICTION = 0xC0000248
+STATUS_IMAGE_MP_UP_MISMATCH = 0xC0000249
+STATUS_INSUFFICIENT_LOGON_INFO = 0xC0000250
+STATUS_BAD_DLL_ENTRYPOINT = 0xC0000251
+STATUS_BAD_SERVICE_ENTRYPOINT = 0xC0000252
+STATUS_LPC_REPLY_LOST = 0xC0000253
+STATUS_IP_ADDRESS_CONFLICT1 = 0xC0000254
+STATUS_IP_ADDRESS_CONFLICT2 = 0xC0000255
+STATUS_REGISTRY_QUOTA_LIMIT = 0xC0000256
+STATUS_PATH_NOT_COVERED = 0xC0000257
+STATUS_NO_CALLBACK_ACTIVE = 0xC0000258
+STATUS_LICENSE_QUOTA_EXCEEDED = 0xC0000259
+STATUS_PWD_TOO_SHORT = 0xC000025A
+STATUS_PWD_TOO_RECENT = 0xC000025B
+STATUS_PWD_HISTORY_CONFLICT = 0xC000025C
+STATUS_PLUGPLAY_NO_DEVICE = 0xC000025E
+STATUS_UNSUPPORTED_COMPRESSION = 0xC000025F
+STATUS_INVALID_HW_PROFILE = 0xC0000260
+STATUS_INVALID_PLUGPLAY_DEVICE_PATH = 0xC0000261
+STATUS_DRIVER_ORDINAL_NOT_FOUND = 0xC0000262
+STATUS_DRIVER_ENTRYPOINT_NOT_FOUND = 0xC0000263
+STATUS_RESOURCE_NOT_OWNED = 0xC0000264
+STATUS_TOO_MANY_LINKS = 0xC0000265
+STATUS_QUOTA_LIST_INCONSISTENT = 0xC0000266
+STATUS_FILE_IS_OFFLINE = 0xC0000267
+STATUS_EVALUATION_EXPIRATION = 0xC0000268
+STATUS_ILLEGAL_DLL_RELOCATION = 0xC0000269
+STATUS_LICENSE_VIOLATION = 0xC000026A
+STATUS_DLL_INIT_FAILED_LOGOFF = 0xC000026B
+STATUS_DRIVER_UNABLE_TO_LOAD = 0xC000026C
+STATUS_DFS_UNAVAILABLE = 0xC000026D
+STATUS_VOLUME_DISMOUNTED = 0xC000026E
+STATUS_WX86_INTERNAL_ERROR = 0xC000026F
+STATUS_WX86_FLOAT_STACK_CHECK = 0xC0000270
+STATUS_VALIDATE_CONTINUE = 0xC0000271
+STATUS_NO_MATCH = 0xC0000272
+STATUS_NO_MORE_MATCHES = 0xC0000273
+STATUS_NOT_A_REPARSE_POINT = 0xC0000275
+STATUS_IO_REPARSE_TAG_INVALID = 0xC0000276
+STATUS_IO_REPARSE_TAG_MISMATCH = 0xC0000277
+STATUS_IO_REPARSE_DATA_INVALID = 0xC0000278
+STATUS_IO_REPARSE_TAG_NOT_HANDLED = 0xC0000279
+STATUS_REPARSE_POINT_NOT_RESOLVED = 0xC0000280
+STATUS_DIRECTORY_IS_A_REPARSE_POINT = 0xC0000281
+STATUS_RANGE_LIST_CONFLICT = 0xC0000282
+STATUS_SOURCE_ELEMENT_EMPTY = 0xC0000283
+STATUS_DESTINATION_ELEMENT_FULL = 0xC0000284
+STATUS_ILLEGAL_ELEMENT_ADDRESS = 0xC0000285
+STATUS_MAGAZINE_NOT_PRESENT = 0xC0000286
+STATUS_REINITIALIZATION_NEEDED = 0xC0000287
+STATUS_ENCRYPTION_FAILED = 0xC000028A
+STATUS_DECRYPTION_FAILED = 0xC000028B
+STATUS_RANGE_NOT_FOUND = 0xC000028C
+STATUS_NO_RECOVERY_POLICY = 0xC000028D
+STATUS_NO_EFS = 0xC000028E
+STATUS_WRONG_EFS = 0xC000028F
+STATUS_NO_USER_KEYS = 0xC0000290
+STATUS_FILE_NOT_ENCRYPTED = 0xC0000291
+STATUS_NOT_EXPORT_FORMAT = 0xC0000292
+STATUS_FILE_ENCRYPTED = 0xC0000293
+STATUS_WMI_GUID_NOT_FOUND = 0xC0000295
+STATUS_WMI_INSTANCE_NOT_FOUND = 0xC0000296
+STATUS_WMI_ITEMID_NOT_FOUND = 0xC0000297
+STATUS_WMI_TRY_AGAIN = 0xC0000298
+STATUS_SHARED_POLICY = 0xC0000299
+STATUS_POLICY_OBJECT_NOT_FOUND = 0xC000029A
+STATUS_POLICY_ONLY_IN_DS = 0xC000029B
+STATUS_VOLUME_NOT_UPGRADED = 0xC000029C
+STATUS_REMOTE_STORAGE_NOT_ACTIVE = 0xC000029D
+STATUS_REMOTE_STORAGE_MEDIA_ERROR = 0xC000029E
+STATUS_NO_TRACKING_SERVICE = 0xC000029F
+STATUS_SERVER_SID_MISMATCH = 0xC00002A0
+STATUS_DS_NO_ATTRIBUTE_OR_VALUE = 0xC00002A1
+STATUS_DS_INVALID_ATTRIBUTE_SYNTAX = 0xC00002A2
+STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED = 0xC00002A3
+STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS = 0xC00002A4
+STATUS_DS_BUSY = 0xC00002A5
+STATUS_DS_UNAVAILABLE = 0xC00002A6
+STATUS_DS_NO_RIDS_ALLOCATED = 0xC00002A7
+STATUS_DS_NO_MORE_RIDS = 0xC00002A8
+STATUS_DS_INCORRECT_ROLE_OWNER = 0xC00002A9
+STATUS_DS_RIDMGR_INIT_ERROR = 0xC00002AA
+STATUS_DS_OBJ_CLASS_VIOLATION = 0xC00002AB
+STATUS_DS_CANT_ON_NON_LEAF = 0xC00002AC
+STATUS_DS_CANT_ON_RDN = 0xC00002AD
+STATUS_DS_CANT_MOD_OBJ_CLASS = 0xC00002AE
+STATUS_DS_CROSS_DOM_MOVE_FAILED = 0xC00002AF
+STATUS_DS_GC_NOT_AVAILABLE = 0xC00002B0
+STATUS_DIRECTORY_SERVICE_REQUIRED = 0xC00002B1
+STATUS_REPARSE_ATTRIBUTE_CONFLICT = 0xC00002B2
+STATUS_CANT_ENABLE_DENY_ONLY = 0xC00002B3
+STATUS_FLOAT_MULTIPLE_FAULTS = 0xC00002B4
+STATUS_FLOAT_MULTIPLE_TRAPS = 0xC00002B5
+STATUS_DEVICE_REMOVED = 0xC00002B6
+STATUS_JOURNAL_DELETE_IN_PROGRESS = 0xC00002B7
+STATUS_JOURNAL_NOT_ACTIVE = 0xC00002B8
+STATUS_NOINTERFACE = 0xC00002B9
+STATUS_DS_ADMIN_LIMIT_EXCEEDED = 0xC00002C1
+STATUS_DRIVER_FAILED_SLEEP = 0xC00002C2
+STATUS_MUTUAL_AUTHENTICATION_FAILED = 0xC00002C3
+STATUS_CORRUPT_SYSTEM_FILE = 0xC00002C4
+STATUS_DATATYPE_MISALIGNMENT_ERROR = 0xC00002C5
+STATUS_WMI_READ_ONLY = 0xC00002C6
+STATUS_WMI_SET_FAILURE = 0xC00002C7
+STATUS_COMMITMENT_MINIMUM = 0xC00002C8
+STATUS_REG_NAT_CONSUMPTION = 0xC00002C9
+STATUS_TRANSPORT_FULL = 0xC00002CA
+STATUS_DS_SAM_INIT_FAILURE = 0xC00002CB
+STATUS_ONLY_IF_CONNECTED = 0xC00002CC
+STATUS_DS_SENSITIVE_GROUP_VIOLATION = 0xC00002CD
+STATUS_PNP_RESTART_ENUMERATION = 0xC00002CE
+STATUS_JOURNAL_ENTRY_DELETED = 0xC00002CF
+STATUS_DS_CANT_MOD_PRIMARYGROUPID = 0xC00002D0
+STATUS_SYSTEM_IMAGE_BAD_SIGNATURE = 0xC00002D1
+STATUS_PNP_REBOOT_REQUIRED = 0xC00002D2
+STATUS_POWER_STATE_INVALID = 0xC00002D3
+STATUS_DS_INVALID_GROUP_TYPE = 0xC00002D4
+STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = 0xC00002D5
+STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = 0xC00002D6
+STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = 0xC00002D7
+STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = 0xC00002D8
+STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = 0xC00002D9
+STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = 0xC00002DA
+STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = 0xC00002DB
+STATUS_DS_HAVE_PRIMARY_MEMBERS = 0xC00002DC
+STATUS_WMI_NOT_SUPPORTED = 0xC00002DD
+STATUS_INSUFFICIENT_POWER = 0xC00002DE
+STATUS_SAM_NEED_BOOTKEY_PASSWORD = 0xC00002DF
+STATUS_SAM_NEED_BOOTKEY_FLOPPY = 0xC00002E0
+STATUS_DS_CANT_START = 0xC00002E1
+STATUS_DS_INIT_FAILURE = 0xC00002E2
+STATUS_SAM_INIT_FAILURE = 0xC00002E3
+STATUS_DS_GC_REQUIRED = 0xC00002E4
+STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY = 0xC00002E5
+STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS = 0xC00002E6
+STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = 0xC00002E7
+STATUS_CURRENT_DOMAIN_NOT_ALLOWED = 0xC00002E9
+STATUS_CANNOT_MAKE = 0xC00002EA
+STATUS_SYSTEM_SHUTDOWN = 0xC00002EB
+STATUS_DS_INIT_FAILURE_CONSOLE = 0xC00002EC
+STATUS_DS_SAM_INIT_FAILURE_CONSOLE = 0xC00002ED
+STATUS_UNFINISHED_CONTEXT_DELETED = 0xC00002EE
+STATUS_NO_TGT_REPLY = 0xC00002EF
+STATUS_OBJECTID_NOT_FOUND = 0xC00002F0
+STATUS_NO_IP_ADDRESSES = 0xC00002F1
+STATUS_WRONG_CREDENTIAL_HANDLE = 0xC00002F2
+STATUS_CRYPTO_SYSTEM_INVALID = 0xC00002F3
+STATUS_MAX_REFERRALS_EXCEEDED = 0xC00002F4
+STATUS_MUST_BE_KDC = 0xC00002F5
+STATUS_STRONG_CRYPTO_NOT_SUPPORTED = 0xC00002F6
+STATUS_TOO_MANY_PRINCIPALS = 0xC00002F7
+STATUS_NO_PA_DATA = 0xC00002F8
+STATUS_PKINIT_NAME_MISMATCH = 0xC00002F9
+STATUS_SMARTCARD_LOGON_REQUIRED = 0xC00002FA
+STATUS_KDC_INVALID_REQUEST = 0xC00002FB
+STATUS_KDC_UNABLE_TO_REFER = 0xC00002FC
+STATUS_KDC_UNKNOWN_ETYPE = 0xC00002FD
+STATUS_SHUTDOWN_IN_PROGRESS = 0xC00002FE
+STATUS_SERVER_SHUTDOWN_IN_PROGRESS = 0xC00002FF
+STATUS_NOT_SUPPORTED_ON_SBS = 0xC0000300
+STATUS_WMI_GUID_DISCONNECTED = 0xC0000301
+STATUS_WMI_ALREADY_DISABLED = 0xC0000302
+STATUS_WMI_ALREADY_ENABLED = 0xC0000303
+STATUS_MFT_TOO_FRAGMENTED = 0xC0000304
+STATUS_COPY_PROTECTION_FAILURE = 0xC0000305
+STATUS_CSS_AUTHENTICATION_FAILURE = 0xC0000306
+STATUS_CSS_KEY_NOT_PRESENT = 0xC0000307
+STATUS_CSS_KEY_NOT_ESTABLISHED = 0xC0000308
+STATUS_CSS_SCRAMBLED_SECTOR = 0xC0000309
+STATUS_CSS_REGION_MISMATCH = 0xC000030A
+STATUS_CSS_RESETS_EXHAUSTED = 0xC000030B
+STATUS_PKINIT_FAILURE = 0xC0000320
+STATUS_SMARTCARD_SUBSYSTEM_FAILURE = 0xC0000321
+STATUS_NO_KERB_KEY = 0xC0000322
+STATUS_HOST_DOWN = 0xC0000350
+STATUS_UNSUPPORTED_PREAUTH = 0xC0000351
+STATUS_EFS_ALG_BLOB_TOO_BIG = 0xC0000352
+STATUS_PORT_NOT_SET = 0xC0000353
+STATUS_DEBUGGER_INACTIVE = 0xC0000354
+STATUS_DS_VERSION_CHECK_FAILURE = 0xC0000355
+STATUS_AUDITING_DISABLED = 0xC0000356
+STATUS_PRENT4_MACHINE_ACCOUNT = 0xC0000357
+STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER = 0xC0000358
+STATUS_INVALID_IMAGE_WIN_32 = 0xC0000359
+STATUS_INVALID_IMAGE_WIN_64 = 0xC000035A
+STATUS_BAD_BINDINGS = 0xC000035B
+STATUS_NETWORK_SESSION_EXPIRED = 0xC000035C
+STATUS_APPHELP_BLOCK = 0xC000035D
+STATUS_ALL_SIDS_FILTERED = 0xC000035E
+STATUS_NOT_SAFE_MODE_DRIVER = 0xC000035F
+STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT = 0xC0000361
+STATUS_ACCESS_DISABLED_BY_POLICY_PATH = 0xC0000362
+STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER = 0xC0000363
+STATUS_ACCESS_DISABLED_BY_POLICY_OTHER = 0xC0000364
+STATUS_FAILED_DRIVER_ENTRY = 0xC0000365
+STATUS_DEVICE_ENUMERATION_ERROR = 0xC0000366
+STATUS_MOUNT_POINT_NOT_RESOLVED = 0xC0000368
+STATUS_INVALID_DEVICE_OBJECT_PARAMETER = 0xC0000369
+STATUS_MCA_OCCURED = 0xC000036A
+STATUS_DRIVER_BLOCKED_CRITICAL = 0xC000036B
+STATUS_DRIVER_BLOCKED = 0xC000036C
+STATUS_DRIVER_DATABASE_ERROR = 0xC000036D
+STATUS_SYSTEM_HIVE_TOO_LARGE = 0xC000036E
+STATUS_INVALID_IMPORT_OF_NON_DLL = 0xC000036F
+STATUS_NO_SECRETS = 0xC0000371
+STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY = 0xC0000372
+STATUS_FAILED_STACK_SWITCH = 0xC0000373
+STATUS_HEAP_CORRUPTION = 0xC0000374
+STATUS_SMARTCARD_WRONG_PIN = 0xC0000380
+STATUS_SMARTCARD_CARD_BLOCKED = 0xC0000381
+STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED = 0xC0000382
+STATUS_SMARTCARD_NO_CARD = 0xC0000383
+STATUS_SMARTCARD_NO_KEY_CONTAINER = 0xC0000384
+STATUS_SMARTCARD_NO_CERTIFICATE = 0xC0000385
+STATUS_SMARTCARD_NO_KEYSET = 0xC0000386
+STATUS_SMARTCARD_IO_ERROR = 0xC0000387
+STATUS_DOWNGRADE_DETECTED = 0xC0000388
+STATUS_SMARTCARD_CERT_REVOKED = 0xC0000389
+STATUS_ISSUING_CA_UNTRUSTED = 0xC000038A
+STATUS_REVOCATION_OFFLINE_C = 0xC000038B
+STATUS_PKINIT_CLIENT_FAILURE = 0xC000038C
+STATUS_SMARTCARD_CERT_EXPIRED = 0xC000038D
+STATUS_DRIVER_FAILED_PRIOR_UNLOAD = 0xC000038E
+STATUS_SMARTCARD_SILENT_CONTEXT = 0xC000038F
+STATUS_PER_USER_TRUST_QUOTA_EXCEEDED = 0xC0000401
+STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED = 0xC0000402
+STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED = 0xC0000403
+STATUS_DS_NAME_NOT_UNIQUE = 0xC0000404
+STATUS_DS_DUPLICATE_ID_FOUND = 0xC0000405
+STATUS_DS_GROUP_CONVERSION_ERROR = 0xC0000406
+STATUS_VOLSNAP_PREPARE_HIBERNATE = 0xC0000407
+STATUS_USER2USER_REQUIRED = 0xC0000408
+STATUS_STACK_BUFFER_OVERRUN = 0xC0000409
+STATUS_NO_S4U_PROT_SUPPORT = 0xC000040A
+STATUS_CROSSREALM_DELEGATION_FAILURE = 0xC000040B
+STATUS_REVOCATION_OFFLINE_KDC = 0xC000040C
+STATUS_ISSUING_CA_UNTRUSTED_KDC = 0xC000040D
+STATUS_KDC_CERT_EXPIRED = 0xC000040E
+STATUS_KDC_CERT_REVOKED = 0xC000040F
+STATUS_PARAMETER_QUOTA_EXCEEDED = 0xC0000410
+STATUS_HIBERNATION_FAILURE = 0xC0000411
+STATUS_DELAY_LOAD_FAILED = 0xC0000412
+STATUS_AUTHENTICATION_FIREWALL_FAILED = 0xC0000413
+STATUS_VDM_DISALLOWED = 0xC0000414
+STATUS_HUNG_DISPLAY_DRIVER_THREAD = 0xC0000415
+STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE = 0xC0000416
+STATUS_INVALID_CRUNTIME_PARAMETER = 0xC0000417
+STATUS_NTLM_BLOCKED = 0xC0000418
+STATUS_DS_SRC_SID_EXISTS_IN_FOREST = 0xC0000419
+STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST = 0xC000041A
+STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST = 0xC000041B
+STATUS_INVALID_USER_PRINCIPAL_NAME = 0xC000041C
+STATUS_ASSERTION_FAILURE = 0xC0000420
+STATUS_VERIFIER_STOP = 0xC0000421
+STATUS_CALLBACK_POP_STACK = 0xC0000423
+STATUS_INCOMPATIBLE_DRIVER_BLOCKED = 0xC0000424
+STATUS_HIVE_UNLOADED = 0xC0000425
+STATUS_COMPRESSION_DISABLED = 0xC0000426
+STATUS_FILE_SYSTEM_LIMITATION = 0xC0000427
+STATUS_INVALID_IMAGE_HASH = 0xC0000428
+STATUS_NOT_CAPABLE = 0xC0000429
+STATUS_REQUEST_OUT_OF_SEQUENCE = 0xC000042A
+STATUS_IMPLEMENTATION_LIMIT = 0xC000042B
+STATUS_ELEVATION_REQUIRED = 0xC000042C
+STATUS_NO_SECURITY_CONTEXT = 0xC000042D
+STATUS_PKU2U_CERT_FAILURE = 0xC000042E
+STATUS_BEYOND_VDL = 0xC0000432
+STATUS_ENCOUNTERED_WRITE_IN_PROGRESS = 0xC0000433
+STATUS_PTE_CHANGED = 0xC0000434
+STATUS_PURGE_FAILED = 0xC0000435
+STATUS_CRED_REQUIRES_CONFIRMATION = 0xC0000440
+STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE = 0xC0000441
+STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER = 0xC0000442
+STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE = 0xC0000443
+STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE = 0xC0000444
+STATUS_CS_ENCRYPTION_FILE_NOT_CSE = 0xC0000445
+STATUS_INVALID_LABEL = 0xC0000446
+STATUS_DRIVER_PROCESS_TERMINATED = 0xC0000450
+STATUS_AMBIGUOUS_SYSTEM_DEVICE = 0xC0000451
+STATUS_SYSTEM_DEVICE_NOT_FOUND = 0xC0000452
+STATUS_RESTART_BOOT_APPLICATION = 0xC0000453
+STATUS_INSUFFICIENT_NVRAM_RESOURCES = 0xC0000454
+STATUS_INVALID_TASK_NAME = 0xC0000500
+STATUS_INVALID_TASK_INDEX = 0xC0000501
+STATUS_THREAD_ALREADY_IN_TASK = 0xC0000502
+STATUS_CALLBACK_BYPASS = 0xC0000503
+STATUS_FAIL_FAST_EXCEPTION = 0xC0000602
+STATUS_IMAGE_CERT_REVOKED = 0xC0000603
+STATUS_PORT_CLOSED = 0xC0000700
+STATUS_MESSAGE_LOST = 0xC0000701
+STATUS_INVALID_MESSAGE = 0xC0000702
+STATUS_REQUEST_CANCELED = 0xC0000703
+STATUS_RECURSIVE_DISPATCH = 0xC0000704
+STATUS_LPC_RECEIVE_BUFFER_EXPECTED = 0xC0000705
+STATUS_LPC_INVALID_CONNECTION_USAGE = 0xC0000706
+STATUS_LPC_REQUESTS_NOT_ALLOWED = 0xC0000707
+STATUS_RESOURCE_IN_USE = 0xC0000708
+STATUS_HARDWARE_MEMORY_ERROR = 0xC0000709
+STATUS_THREADPOOL_HANDLE_EXCEPTION = 0xC000070A
+STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED = 0xC000070B
+STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED = 0xC000070C
+STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED = 0xC000070D
+STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED = 0xC000070E
+STATUS_THREADPOOL_RELEASED_DURING_OPERATION = 0xC000070F
+STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING = 0xC0000710
+STATUS_APC_RETURNED_WHILE_IMPERSONATING = 0xC0000711
+STATUS_PROCESS_IS_PROTECTED = 0xC0000712
+STATUS_MCA_EXCEPTION = 0xC0000713
+STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE = 0xC0000714
+STATUS_SYMLINK_CLASS_DISABLED = 0xC0000715
+STATUS_INVALID_IDN_NORMALIZATION = 0xC0000716
+STATUS_NO_UNICODE_TRANSLATION = 0xC0000717
+STATUS_ALREADY_REGISTERED = 0xC0000718
+STATUS_CONTEXT_MISMATCH = 0xC0000719
+STATUS_PORT_ALREADY_HAS_COMPLETION_LIST = 0xC000071A
+STATUS_CALLBACK_RETURNED_THREAD_PRIORITY = 0xC000071B
+STATUS_INVALID_THREAD = 0xC000071C
+STATUS_CALLBACK_RETURNED_TRANSACTION = 0xC000071D
+STATUS_CALLBACK_RETURNED_LDR_LOCK = 0xC000071E
+STATUS_CALLBACK_RETURNED_LANG = 0xC000071F
+STATUS_CALLBACK_RETURNED_PRI_BACK = 0xC0000720
+STATUS_DISK_REPAIR_DISABLED = 0xC0000800
+STATUS_DS_DOMAIN_RENAME_IN_PROGRESS = 0xC0000801
+STATUS_DISK_QUOTA_EXCEEDED = 0xC0000802
+STATUS_CONTENT_BLOCKED = 0xC0000804
+STATUS_BAD_CLUSTERS = 0xC0000805
+STATUS_VOLUME_DIRTY = 0xC0000806
+STATUS_FILE_CHECKED_OUT = 0xC0000901
+STATUS_CHECKOUT_REQUIRED = 0xC0000902
+STATUS_BAD_FILE_TYPE = 0xC0000903
+STATUS_FILE_TOO_LARGE = 0xC0000904
+STATUS_FORMS_AUTH_REQUIRED = 0xC0000905
+STATUS_VIRUS_INFECTED = 0xC0000906
+STATUS_VIRUS_DELETED = 0xC0000907
+STATUS_BAD_MCFG_TABLE = 0xC0000908
+STATUS_CANNOT_BREAK_OPLOCK = 0xC0000909
+STATUS_WOW_ASSERTION = 0xC0009898
+STATUS_INVALID_SIGNATURE = 0xC000A000
+STATUS_HMAC_NOT_SUPPORTED = 0xC000A001
+STATUS_IPSEC_QUEUE_OVERFLOW = 0xC000A010
+STATUS_ND_QUEUE_OVERFLOW = 0xC000A011
+STATUS_HOPLIMIT_EXCEEDED = 0xC000A012
+STATUS_PROTOCOL_NOT_SUPPORTED = 0xC000A013
+STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED = 0xC000A080
+STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR = 0xC000A081
+STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR = 0xC000A082
+STATUS_XML_PARSE_ERROR = 0xC000A083
+STATUS_XMLDSIG_ERROR = 0xC000A084
+STATUS_WRONG_COMPARTMENT = 0xC000A085
+STATUS_AUTHIP_FAILURE = 0xC000A086
+STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS = 0xC000A087
+STATUS_DS_OID_NOT_FOUND = 0xC000A088
+STATUS_HASH_NOT_SUPPORTED = 0xC000A100
+STATUS_HASH_NOT_PRESENT = 0xC000A101
+DBG_NO_STATE_CHANGE = 0xC0010001
+DBG_APP_NOT_IDLE = 0xC0010002
+RPC_NT_INVALID_STRING_BINDING = 0xC0020001
+RPC_NT_WRONG_KIND_OF_BINDING = 0xC0020002
+RPC_NT_INVALID_BINDING = 0xC0020003
+RPC_NT_PROTSEQ_NOT_SUPPORTED = 0xC0020004
+RPC_NT_INVALID_RPC_PROTSEQ = 0xC0020005
+RPC_NT_INVALID_STRING_UUID = 0xC0020006
+RPC_NT_INVALID_ENDPOINT_FORMAT = 0xC0020007
+RPC_NT_INVALID_NET_ADDR = 0xC0020008
+RPC_NT_NO_ENDPOINT_FOUND = 0xC0020009
+RPC_NT_INVALID_TIMEOUT = 0xC002000A
+RPC_NT_OBJECT_NOT_FOUND = 0xC002000B
+RPC_NT_ALREADY_REGISTERED = 0xC002000C
+RPC_NT_TYPE_ALREADY_REGISTERED = 0xC002000D
+RPC_NT_ALREADY_LISTENING = 0xC002000E
+RPC_NT_NO_PROTSEQS_REGISTERED = 0xC002000F
+RPC_NT_NOT_LISTENING = 0xC0020010
+RPC_NT_UNKNOWN_MGR_TYPE = 0xC0020011
+RPC_NT_UNKNOWN_IF = 0xC0020012
+RPC_NT_NO_BINDINGS = 0xC0020013
+RPC_NT_NO_PROTSEQS = 0xC0020014
+RPC_NT_CANT_CREATE_ENDPOINT = 0xC0020015
+RPC_NT_OUT_OF_RESOURCES = 0xC0020016
+RPC_NT_SERVER_UNAVAILABLE = 0xC0020017
+RPC_NT_SERVER_TOO_BUSY = 0xC0020018
+RPC_NT_INVALID_NETWORK_OPTIONS = 0xC0020019
+RPC_NT_NO_CALL_ACTIVE = 0xC002001A
+RPC_NT_CALL_FAILED = 0xC002001B
+RPC_NT_CALL_FAILED_DNE = 0xC002001C
+RPC_NT_PROTOCOL_ERROR = 0xC002001D
+RPC_NT_UNSUPPORTED_TRANS_SYN = 0xC002001F
+RPC_NT_UNSUPPORTED_TYPE = 0xC0020021
+RPC_NT_INVALID_TAG = 0xC0020022
+RPC_NT_INVALID_BOUND = 0xC0020023
+RPC_NT_NO_ENTRY_NAME = 0xC0020024
+RPC_NT_INVALID_NAME_SYNTAX = 0xC0020025
+RPC_NT_UNSUPPORTED_NAME_SYNTAX = 0xC0020026
+RPC_NT_UUID_NO_ADDRESS = 0xC0020028
+RPC_NT_DUPLICATE_ENDPOINT = 0xC0020029
+RPC_NT_UNKNOWN_AUTHN_TYPE = 0xC002002A
+RPC_NT_MAX_CALLS_TOO_SMALL = 0xC002002B
+RPC_NT_STRING_TOO_LONG = 0xC002002C
+RPC_NT_PROTSEQ_NOT_FOUND = 0xC002002D
+RPC_NT_PROCNUM_OUT_OF_RANGE = 0xC002002E
+RPC_NT_BINDING_HAS_NO_AUTH = 0xC002002F
+RPC_NT_UNKNOWN_AUTHN_SERVICE = 0xC0020030
+RPC_NT_UNKNOWN_AUTHN_LEVEL = 0xC0020031
+RPC_NT_INVALID_AUTH_IDENTITY = 0xC0020032
+RPC_NT_UNKNOWN_AUTHZ_SERVICE = 0xC0020033
+EPT_NT_INVALID_ENTRY = 0xC0020034
+EPT_NT_CANT_PERFORM_OP = 0xC0020035
+EPT_NT_NOT_REGISTERED = 0xC0020036
+RPC_NT_NOTHING_TO_EXPORT = 0xC0020037
+RPC_NT_INCOMPLETE_NAME = 0xC0020038
+RPC_NT_INVALID_VERS_OPTION = 0xC0020039
+RPC_NT_NO_MORE_MEMBERS = 0xC002003A
+RPC_NT_NOT_ALL_OBJS_UNEXPORTED = 0xC002003B
+RPC_NT_INTERFACE_NOT_FOUND = 0xC002003C
+RPC_NT_ENTRY_ALREADY_EXISTS = 0xC002003D
+RPC_NT_ENTRY_NOT_FOUND = 0xC002003E
+RPC_NT_NAME_SERVICE_UNAVAILABLE = 0xC002003F
+RPC_NT_INVALID_NAF_ID = 0xC0020040
+RPC_NT_CANNOT_SUPPORT = 0xC0020041
+RPC_NT_NO_CONTEXT_AVAILABLE = 0xC0020042
+RPC_NT_INTERNAL_ERROR = 0xC0020043
+RPC_NT_ZERO_DIVIDE = 0xC0020044
+RPC_NT_ADDRESS_ERROR = 0xC0020045
+RPC_NT_FP_DIV_ZERO = 0xC0020046
+RPC_NT_FP_UNDERFLOW = 0xC0020047
+RPC_NT_FP_OVERFLOW = 0xC0020048
+RPC_NT_CALL_IN_PROGRESS = 0xC0020049
+RPC_NT_NO_MORE_BINDINGS = 0xC002004A
+RPC_NT_GROUP_MEMBER_NOT_FOUND = 0xC002004B
+EPT_NT_CANT_CREATE = 0xC002004C
+RPC_NT_INVALID_OBJECT = 0xC002004D
+RPC_NT_NO_INTERFACES = 0xC002004F
+RPC_NT_CALL_CANCELLED = 0xC0020050
+RPC_NT_BINDING_INCOMPLETE = 0xC0020051
+RPC_NT_COMM_FAILURE = 0xC0020052
+RPC_NT_UNSUPPORTED_AUTHN_LEVEL = 0xC0020053
+RPC_NT_NO_PRINC_NAME = 0xC0020054
+RPC_NT_NOT_RPC_ERROR = 0xC0020055
+RPC_NT_SEC_PKG_ERROR = 0xC0020057
+RPC_NT_NOT_CANCELLED = 0xC0020058
+RPC_NT_INVALID_ASYNC_HANDLE = 0xC0020062
+RPC_NT_INVALID_ASYNC_CALL = 0xC0020063
+RPC_NT_PROXY_ACCESS_DENIED = 0xC0020064
+RPC_NT_NO_MORE_ENTRIES = 0xC0030001
+RPC_NT_SS_CHAR_TRANS_OPEN_FAIL = 0xC0030002
+RPC_NT_SS_CHAR_TRANS_SHORT_FILE = 0xC0030003
+RPC_NT_SS_IN_NULL_CONTEXT = 0xC0030004
+RPC_NT_SS_CONTEXT_MISMATCH = 0xC0030005
+RPC_NT_SS_CONTEXT_DAMAGED = 0xC0030006
+RPC_NT_SS_HANDLES_MISMATCH = 0xC0030007
+RPC_NT_SS_CANNOT_GET_CALL_HANDLE = 0xC0030008
+RPC_NT_NULL_REF_POINTER = 0xC0030009
+RPC_NT_ENUM_VALUE_OUT_OF_RANGE = 0xC003000A
+RPC_NT_BYTE_COUNT_TOO_SMALL = 0xC003000B
+RPC_NT_BAD_STUB_DATA = 0xC003000C
+RPC_NT_INVALID_ES_ACTION = 0xC0030059
+RPC_NT_WRONG_ES_VERSION = 0xC003005A
+RPC_NT_WRONG_STUB_VERSION = 0xC003005B
+RPC_NT_INVALID_PIPE_OBJECT = 0xC003005C
+RPC_NT_INVALID_PIPE_OPERATION = 0xC003005D
+RPC_NT_WRONG_PIPE_VERSION = 0xC003005E
+RPC_NT_PIPE_CLOSED = 0xC003005F
+RPC_NT_PIPE_DISCIPLINE_ERROR = 0xC0030060
+RPC_NT_PIPE_EMPTY = 0xC0030061
+STATUS_PNP_BAD_MPS_TABLE = 0xC0040035
+STATUS_PNP_TRANSLATION_FAILED = 0xC0040036
+STATUS_PNP_IRQ_TRANSLATION_FAILED = 0xC0040037
+STATUS_PNP_INVALID_ID = 0xC0040038
+STATUS_IO_REISSUE_AS_CACHED = 0xC0040039
+STATUS_CTX_WINSTATION_NAME_INVALID = 0xC00A0001
+STATUS_CTX_INVALID_PD = 0xC00A0002
+STATUS_CTX_PD_NOT_FOUND = 0xC00A0003
+STATUS_CTX_CLOSE_PENDING = 0xC00A0006
+STATUS_CTX_NO_OUTBUF = 0xC00A0007
+STATUS_CTX_MODEM_INF_NOT_FOUND = 0xC00A0008
+STATUS_CTX_INVALID_MODEMNAME = 0xC00A0009
+STATUS_CTX_RESPONSE_ERROR = 0xC00A000A
+STATUS_CTX_MODEM_RESPONSE_TIMEOUT = 0xC00A000B
+STATUS_CTX_MODEM_RESPONSE_NO_CARRIER = 0xC00A000C
+STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE = 0xC00A000D
+STATUS_CTX_MODEM_RESPONSE_BUSY = 0xC00A000E
+STATUS_CTX_MODEM_RESPONSE_VOICE = 0xC00A000F
+STATUS_CTX_TD_ERROR = 0xC00A0010
+STATUS_CTX_LICENSE_CLIENT_INVALID = 0xC00A0012
+STATUS_CTX_LICENSE_NOT_AVAILABLE = 0xC00A0013
+STATUS_CTX_LICENSE_EXPIRED = 0xC00A0014
+STATUS_CTX_WINSTATION_NOT_FOUND = 0xC00A0015
+STATUS_CTX_WINSTATION_NAME_COLLISION = 0xC00A0016
+STATUS_CTX_WINSTATION_BUSY = 0xC00A0017
+STATUS_CTX_BAD_VIDEO_MODE = 0xC00A0018
+STATUS_CTX_GRAPHICS_INVALID = 0xC00A0022
+STATUS_CTX_NOT_CONSOLE = 0xC00A0024
+STATUS_CTX_CLIENT_QUERY_TIMEOUT = 0xC00A0026
+STATUS_CTX_CONSOLE_DISCONNECT = 0xC00A0027
+STATUS_CTX_CONSOLE_CONNECT = 0xC00A0028
+STATUS_CTX_SHADOW_DENIED = 0xC00A002A
+STATUS_CTX_WINSTATION_ACCESS_DENIED = 0xC00A002B
+STATUS_CTX_INVALID_WD = 0xC00A002E
+STATUS_CTX_WD_NOT_FOUND = 0xC00A002F
+STATUS_CTX_SHADOW_INVALID = 0xC00A0030
+STATUS_CTX_SHADOW_DISABLED = 0xC00A0031
+STATUS_RDP_PROTOCOL_ERROR = 0xC00A0032
+STATUS_CTX_CLIENT_LICENSE_NOT_SET = 0xC00A0033
+STATUS_CTX_CLIENT_LICENSE_IN_USE = 0xC00A0034
+STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE = 0xC00A0035
+STATUS_CTX_SHADOW_NOT_RUNNING = 0xC00A0036
+STATUS_CTX_LOGON_DISABLED = 0xC00A0037
+STATUS_CTX_SECURITY_LAYER_ERROR = 0xC00A0038
+STATUS_TS_INCOMPATIBLE_SESSIONS = 0xC00A0039
+STATUS_MUI_FILE_NOT_FOUND = 0xC00B0001
+STATUS_MUI_INVALID_FILE = 0xC00B0002
+STATUS_MUI_INVALID_RC_CONFIG = 0xC00B0003
+STATUS_MUI_INVALID_LOCALE_NAME = 0xC00B0004
+STATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME = 0xC00B0005
+STATUS_MUI_FILE_NOT_LOADED = 0xC00B0006
+STATUS_RESOURCE_ENUM_USER_STOP = 0xC00B0007
+STATUS_CLUSTER_INVALID_NODE = 0xC0130001
+STATUS_CLUSTER_NODE_EXISTS = 0xC0130002
+STATUS_CLUSTER_JOIN_IN_PROGRESS = 0xC0130003
+STATUS_CLUSTER_NODE_NOT_FOUND = 0xC0130004
+STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND = 0xC0130005
+STATUS_CLUSTER_NETWORK_EXISTS = 0xC0130006
+STATUS_CLUSTER_NETWORK_NOT_FOUND = 0xC0130007
+STATUS_CLUSTER_NETINTERFACE_EXISTS = 0xC0130008
+STATUS_CLUSTER_NETINTERFACE_NOT_FOUND = 0xC0130009
+STATUS_CLUSTER_INVALID_REQUEST = 0xC013000A
+STATUS_CLUSTER_INVALID_NETWORK_PROVIDER = 0xC013000B
+STATUS_CLUSTER_NODE_DOWN = 0xC013000C
+STATUS_CLUSTER_NODE_UNREACHABLE = 0xC013000D
+STATUS_CLUSTER_NODE_NOT_MEMBER = 0xC013000E
+STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS = 0xC013000F
+STATUS_CLUSTER_INVALID_NETWORK = 0xC0130010
+STATUS_CLUSTER_NO_NET_ADAPTERS = 0xC0130011
+STATUS_CLUSTER_NODE_UP = 0xC0130012
+STATUS_CLUSTER_NODE_PAUSED = 0xC0130013
+STATUS_CLUSTER_NODE_NOT_PAUSED = 0xC0130014
+STATUS_CLUSTER_NO_SECURITY_CONTEXT = 0xC0130015
+STATUS_CLUSTER_NETWORK_NOT_INTERNAL = 0xC0130016
+STATUS_CLUSTER_POISONED = 0xC0130017
+STATUS_ACPI_INVALID_OPCODE = 0xC0140001
+STATUS_ACPI_STACK_OVERFLOW = 0xC0140002
+STATUS_ACPI_ASSERT_FAILED = 0xC0140003
+STATUS_ACPI_INVALID_INDEX = 0xC0140004
+STATUS_ACPI_INVALID_ARGUMENT = 0xC0140005
+STATUS_ACPI_FATAL = 0xC0140006
+STATUS_ACPI_INVALID_SUPERNAME = 0xC0140007
+STATUS_ACPI_INVALID_ARGTYPE = 0xC0140008
+STATUS_ACPI_INVALID_OBJTYPE = 0xC0140009
+STATUS_ACPI_INVALID_TARGETTYPE = 0xC014000A
+STATUS_ACPI_INCORRECT_ARGUMENT_COUNT = 0xC014000B
+STATUS_ACPI_ADDRESS_NOT_MAPPED = 0xC014000C
+STATUS_ACPI_INVALID_EVENTTYPE = 0xC014000D
+STATUS_ACPI_HANDLER_COLLISION = 0xC014000E
+STATUS_ACPI_INVALID_DATA = 0xC014000F
+STATUS_ACPI_INVALID_REGION = 0xC0140010
+STATUS_ACPI_INVALID_ACCESS_SIZE = 0xC0140011
+STATUS_ACPI_ACQUIRE_GLOBAL_LOCK = 0xC0140012
+STATUS_ACPI_ALREADY_INITIALIZED = 0xC0140013
+STATUS_ACPI_NOT_INITIALIZED = 0xC0140014
+STATUS_ACPI_INVALID_MUTEX_LEVEL = 0xC0140015
+STATUS_ACPI_MUTEX_NOT_OWNED = 0xC0140016
+STATUS_ACPI_MUTEX_NOT_OWNER = 0xC0140017
+STATUS_ACPI_RS_ACCESS = 0xC0140018
+STATUS_ACPI_INVALID_TABLE = 0xC0140019
+STATUS_ACPI_REG_HANDLER_FAILED = 0xC0140020
+STATUS_ACPI_POWER_REQUEST_FAILED = 0xC0140021
+STATUS_SXS_SECTION_NOT_FOUND = 0xC0150001
+STATUS_SXS_CANT_GEN_ACTCTX = 0xC0150002
+STATUS_SXS_INVALID_ACTCTXDATA_FORMAT = 0xC0150003
+STATUS_SXS_ASSEMBLY_NOT_FOUND = 0xC0150004
+STATUS_SXS_MANIFEST_FORMAT_ERROR = 0xC0150005
+STATUS_SXS_MANIFEST_PARSE_ERROR = 0xC0150006
+STATUS_SXS_ACTIVATION_CONTEXT_DISABLED = 0xC0150007
+STATUS_SXS_KEY_NOT_FOUND = 0xC0150008
+STATUS_SXS_VERSION_CONFLICT = 0xC0150009
+STATUS_SXS_WRONG_SECTION_TYPE = 0xC015000A
+STATUS_SXS_THREAD_QUERIES_DISABLED = 0xC015000B
+STATUS_SXS_ASSEMBLY_MISSING = 0xC015000C
+STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET = 0xC015000E
+STATUS_SXS_EARLY_DEACTIVATION = 0xC015000F
+STATUS_SXS_INVALID_DEACTIVATION = 0xC0150010
+STATUS_SXS_MULTIPLE_DEACTIVATION = 0xC0150011
+STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY = 0xC0150012
+STATUS_SXS_PROCESS_TERMINATION_REQUESTED = 0xC0150013
+STATUS_SXS_CORRUPT_ACTIVATION_STACK = 0xC0150014
+STATUS_SXS_CORRUPTION = 0xC0150015
+STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE = 0xC0150016
+STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME = 0xC0150017
+STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE = 0xC0150018
+STATUS_SXS_IDENTITY_PARSE_ERROR = 0xC0150019
+STATUS_SXS_COMPONENT_STORE_CORRUPT = 0xC015001A
+STATUS_SXS_FILE_HASH_MISMATCH = 0xC015001B
+STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT = 0xC015001C
+STATUS_SXS_IDENTITIES_DIFFERENT = 0xC015001D
+STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT = 0xC015001E
+STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY = 0xC015001F
+STATUS_ADVANCED_INSTALLER_FAILED = 0xC0150020
+STATUS_XML_ENCODING_MISMATCH = 0xC0150021
+STATUS_SXS_MANIFEST_TOO_BIG = 0xC0150022
+STATUS_SXS_SETTING_NOT_REGISTERED = 0xC0150023
+STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE = 0xC0150024
+STATUS_SMI_PRIMITIVE_INSTALLER_FAILED = 0xC0150025
+STATUS_GENERIC_COMMAND_FAILED = 0xC0150026
+STATUS_SXS_FILE_HASH_MISSING = 0xC0150027
+STATUS_TRANSACTIONAL_CONFLICT = 0xC0190001
+STATUS_INVALID_TRANSACTION = 0xC0190002
+STATUS_TRANSACTION_NOT_ACTIVE = 0xC0190003
+STATUS_TM_INITIALIZATION_FAILED = 0xC0190004
+STATUS_RM_NOT_ACTIVE = 0xC0190005
+STATUS_RM_METADATA_CORRUPT = 0xC0190006
+STATUS_TRANSACTION_NOT_JOINED = 0xC0190007
+STATUS_DIRECTORY_NOT_RM = 0xC0190008
+STATUS_TRANSACTIONS_UNSUPPORTED_REMOTE = 0xC019000A
+STATUS_LOG_RESIZE_INVALID_SIZE = 0xC019000B
+STATUS_REMOTE_FILE_VERSION_MISMATCH = 0xC019000C
+STATUS_CRM_PROTOCOL_ALREADY_EXISTS = 0xC019000F
+STATUS_TRANSACTION_PROPAGATION_FAILED = 0xC0190010
+STATUS_CRM_PROTOCOL_NOT_FOUND = 0xC0190011
+STATUS_TRANSACTION_SUPERIOR_EXISTS = 0xC0190012
+STATUS_TRANSACTION_REQUEST_NOT_VALID = 0xC0190013
+STATUS_TRANSACTION_NOT_REQUESTED = 0xC0190014
+STATUS_TRANSACTION_ALREADY_ABORTED = 0xC0190015
+STATUS_TRANSACTION_ALREADY_COMMITTED = 0xC0190016
+STATUS_TRANSACTION_INVALID_MARSHALL_BUFFER = 0xC0190017
+STATUS_CURRENT_TRANSACTION_NOT_VALID = 0xC0190018
+STATUS_LOG_GROWTH_FAILED = 0xC0190019
+STATUS_OBJECT_NO_LONGER_EXISTS = 0xC0190021
+STATUS_STREAM_MINIVERSION_NOT_FOUND = 0xC0190022
+STATUS_STREAM_MINIVERSION_NOT_VALID = 0xC0190023
+STATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION = 0xC0190024
+STATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT = 0xC0190025
+STATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS = 0xC0190026
+STATUS_HANDLE_NO_LONGER_VALID = 0xC0190028
+STATUS_LOG_CORRUPTION_DETECTED = 0xC0190030
+STATUS_RM_DISCONNECTED = 0xC0190032
+STATUS_ENLISTMENT_NOT_SUPERIOR = 0xC0190033
+STATUS_FILE_IDENTITY_NOT_PERSISTENT = 0xC0190036
+STATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY = 0xC0190037
+STATUS_CANT_CROSS_RM_BOUNDARY = 0xC0190038
+STATUS_TXF_DIR_NOT_EMPTY = 0xC0190039
+STATUS_INDOUBT_TRANSACTIONS_EXIST = 0xC019003A
+STATUS_TM_VOLATILE = 0xC019003B
+STATUS_ROLLBACK_TIMER_EXPIRED = 0xC019003C
+STATUS_TXF_ATTRIBUTE_CORRUPT = 0xC019003D
+STATUS_EFS_NOT_ALLOWED_IN_TRANSACTION = 0xC019003E
+STATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED = 0xC019003F
+STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE = 0xC0190040
+STATUS_TRANSACTION_REQUIRED_PROMOTION = 0xC0190043
+STATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION = 0xC0190044
+STATUS_TRANSACTIONS_NOT_FROZEN = 0xC0190045
+STATUS_TRANSACTION_FREEZE_IN_PROGRESS = 0xC0190046
+STATUS_NOT_SNAPSHOT_VOLUME = 0xC0190047
+STATUS_NO_SAVEPOINT_WITH_OPEN_FILES = 0xC0190048
+STATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION = 0xC0190049
+STATUS_TM_IDENTITY_MISMATCH = 0xC019004A
+STATUS_FLOATED_SECTION = 0xC019004B
+STATUS_CANNOT_ACCEPT_TRANSACTED_WORK = 0xC019004C
+STATUS_CANNOT_ABORT_TRANSACTIONS = 0xC019004D
+STATUS_TRANSACTION_NOT_FOUND = 0xC019004E
+STATUS_RESOURCEMANAGER_NOT_FOUND = 0xC019004F
+STATUS_ENLISTMENT_NOT_FOUND = 0xC0190050
+STATUS_TRANSACTIONMANAGER_NOT_FOUND = 0xC0190051
+STATUS_TRANSACTIONMANAGER_NOT_ONLINE = 0xC0190052
+STATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION = 0xC0190053
+STATUS_TRANSACTION_NOT_ROOT = 0xC0190054
+STATUS_TRANSACTION_OBJECT_EXPIRED = 0xC0190055
+STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION = 0xC0190056
+STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED = 0xC0190057
+STATUS_TRANSACTION_RECORD_TOO_LONG = 0xC0190058
+STATUS_NO_LINK_TRACKING_IN_TRANSACTION = 0xC0190059
+STATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION = 0xC019005A
+STATUS_TRANSACTION_INTEGRITY_VIOLATED = 0xC019005B
+STATUS_EXPIRED_HANDLE = 0xC0190060
+STATUS_TRANSACTION_NOT_ENLISTED = 0xC0190061
+STATUS_LOG_SECTOR_INVALID = 0xC01A0001
+STATUS_LOG_SECTOR_PARITY_INVALID = 0xC01A0002
+STATUS_LOG_SECTOR_REMAPPED = 0xC01A0003
+STATUS_LOG_BLOCK_INCOMPLETE = 0xC01A0004
+STATUS_LOG_INVALID_RANGE = 0xC01A0005
+STATUS_LOG_BLOCKS_EXHAUSTED = 0xC01A0006
+STATUS_LOG_READ_CONTEXT_INVALID = 0xC01A0007
+STATUS_LOG_RESTART_INVALID = 0xC01A0008
+STATUS_LOG_BLOCK_VERSION = 0xC01A0009
+STATUS_LOG_BLOCK_INVALID = 0xC01A000A
+STATUS_LOG_READ_MODE_INVALID = 0xC01A000B
+STATUS_LOG_METADATA_CORRUPT = 0xC01A000D
+STATUS_LOG_METADATA_INVALID = 0xC01A000E
+STATUS_LOG_METADATA_INCONSISTENT = 0xC01A000F
+STATUS_LOG_RESERVATION_INVALID = 0xC01A0010
+STATUS_LOG_CANT_DELETE = 0xC01A0011
+STATUS_LOG_CONTAINER_LIMIT_EXCEEDED = 0xC01A0012
+STATUS_LOG_START_OF_LOG = 0xC01A0013
+STATUS_LOG_POLICY_ALREADY_INSTALLED = 0xC01A0014
+STATUS_LOG_POLICY_NOT_INSTALLED = 0xC01A0015
+STATUS_LOG_POLICY_INVALID = 0xC01A0016
+STATUS_LOG_POLICY_CONFLICT = 0xC01A0017
+STATUS_LOG_PINNED_ARCHIVE_TAIL = 0xC01A0018
+STATUS_LOG_RECORD_NONEXISTENT = 0xC01A0019
+STATUS_LOG_RECORDS_RESERVED_INVALID = 0xC01A001A
+STATUS_LOG_SPACE_RESERVED_INVALID = 0xC01A001B
+STATUS_LOG_TAIL_INVALID = 0xC01A001C
+STATUS_LOG_FULL = 0xC01A001D
+STATUS_LOG_MULTIPLEXED = 0xC01A001E
+STATUS_LOG_DEDICATED = 0xC01A001F
+STATUS_LOG_ARCHIVE_NOT_IN_PROGRESS = 0xC01A0020
+STATUS_LOG_ARCHIVE_IN_PROGRESS = 0xC01A0021
+STATUS_LOG_EPHEMERAL = 0xC01A0022
+STATUS_LOG_NOT_ENOUGH_CONTAINERS = 0xC01A0023
+STATUS_LOG_CLIENT_ALREADY_REGISTERED = 0xC01A0024
+STATUS_LOG_CLIENT_NOT_REGISTERED = 0xC01A0025
+STATUS_LOG_FULL_HANDLER_IN_PROGRESS = 0xC01A0026
+STATUS_LOG_CONTAINER_READ_FAILED = 0xC01A0027
+STATUS_LOG_CONTAINER_WRITE_FAILED = 0xC01A0028
+STATUS_LOG_CONTAINER_OPEN_FAILED = 0xC01A0029
+STATUS_LOG_CONTAINER_STATE_INVALID = 0xC01A002A
+STATUS_LOG_STATE_INVALID = 0xC01A002B
+STATUS_LOG_PINNED = 0xC01A002C
+STATUS_LOG_METADATA_FLUSH_FAILED = 0xC01A002D
+STATUS_LOG_INCONSISTENT_SECURITY = 0xC01A002E
+STATUS_LOG_APPENDED_FLUSH_FAILED = 0xC01A002F
+STATUS_LOG_PINNED_RESERVATION = 0xC01A0030
+STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD = 0xC01B00EA
+STATUS_FLT_NO_HANDLER_DEFINED = 0xC01C0001
+STATUS_FLT_CONTEXT_ALREADY_DEFINED = 0xC01C0002
+STATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST = 0xC01C0003
+STATUS_FLT_DISALLOW_FAST_IO = 0xC01C0004
+STATUS_FLT_INVALID_NAME_REQUEST = 0xC01C0005
+STATUS_FLT_NOT_SAFE_TO_POST_OPERATION = 0xC01C0006
+STATUS_FLT_NOT_INITIALIZED = 0xC01C0007
+STATUS_FLT_FILTER_NOT_READY = 0xC01C0008
+STATUS_FLT_POST_OPERATION_CLEANUP = 0xC01C0009
+STATUS_FLT_INTERNAL_ERROR = 0xC01C000A
+STATUS_FLT_DELETING_OBJECT = 0xC01C000B
+STATUS_FLT_MUST_BE_NONPAGED_POOL = 0xC01C000C
+STATUS_FLT_DUPLICATE_ENTRY = 0xC01C000D
+STATUS_FLT_CBDQ_DISABLED = 0xC01C000E
+STATUS_FLT_DO_NOT_ATTACH = 0xC01C000F
+STATUS_FLT_DO_NOT_DETACH = 0xC01C0010
+STATUS_FLT_INSTANCE_ALTITUDE_COLLISION = 0xC01C0011
+STATUS_FLT_INSTANCE_NAME_COLLISION = 0xC01C0012
+STATUS_FLT_FILTER_NOT_FOUND = 0xC01C0013
+STATUS_FLT_VOLUME_NOT_FOUND = 0xC01C0014
+STATUS_FLT_INSTANCE_NOT_FOUND = 0xC01C0015
+STATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND = 0xC01C0016
+STATUS_FLT_INVALID_CONTEXT_REGISTRATION = 0xC01C0017
+STATUS_FLT_NAME_CACHE_MISS = 0xC01C0018
+STATUS_FLT_NO_DEVICE_OBJECT = 0xC01C0019
+STATUS_FLT_VOLUME_ALREADY_MOUNTED = 0xC01C001A
+STATUS_FLT_ALREADY_ENLISTED = 0xC01C001B
+STATUS_FLT_CONTEXT_ALREADY_LINKED = 0xC01C001C
+STATUS_FLT_NO_WAITER_FOR_REPLY = 0xC01C0020
+STATUS_MONITOR_NO_DESCRIPTOR = 0xC01D0001
+STATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT = 0xC01D0002
+STATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM = 0xC01D0003
+STATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK = 0xC01D0004
+STATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED = 0xC01D0005
+STATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK = 0xC01D0006
+STATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK = 0xC01D0007
+STATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA = 0xC01D0008
+STATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK = 0xC01D0009
+STATUS_MONITOR_INVALID_MANUFACTURE_DATE = 0xC01D000A
+STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER = 0xC01E0000
+STATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER = 0xC01E0001
+STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER = 0xC01E0002
+STATUS_GRAPHICS_ADAPTER_WAS_RESET = 0xC01E0003
+STATUS_GRAPHICS_INVALID_DRIVER_MODEL = 0xC01E0004
+STATUS_GRAPHICS_PRESENT_MODE_CHANGED = 0xC01E0005
+STATUS_GRAPHICS_PRESENT_OCCLUDED = 0xC01E0006
+STATUS_GRAPHICS_PRESENT_DENIED = 0xC01E0007
+STATUS_GRAPHICS_CANNOTCOLORCONVERT = 0xC01E0008
+STATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED = 0xC01E000B
+STATUS_GRAPHICS_PRESENT_UNOCCLUDED = 0xC01E000C
+STATUS_GRAPHICS_NO_VIDEO_MEMORY = 0xC01E0100
+STATUS_GRAPHICS_CANT_LOCK_MEMORY = 0xC01E0101
+STATUS_GRAPHICS_ALLOCATION_BUSY = 0xC01E0102
+STATUS_GRAPHICS_TOO_MANY_REFERENCES = 0xC01E0103
+STATUS_GRAPHICS_TRY_AGAIN_LATER = 0xC01E0104
+STATUS_GRAPHICS_TRY_AGAIN_NOW = 0xC01E0105
+STATUS_GRAPHICS_ALLOCATION_INVALID = 0xC01E0106
+STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE = 0xC01E0107
+STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED = 0xC01E0108
+STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION = 0xC01E0109
+STATUS_GRAPHICS_INVALID_ALLOCATION_USAGE = 0xC01E0110
+STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION = 0xC01E0111
+STATUS_GRAPHICS_ALLOCATION_CLOSED = 0xC01E0112
+STATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE = 0xC01E0113
+STATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE = 0xC01E0114
+STATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE = 0xC01E0115
+STATUS_GRAPHICS_ALLOCATION_CONTENT_LOST = 0xC01E0116
+STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE = 0xC01E0200
+STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY = 0xC01E0300
+STATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED = 0xC01E0301
+STATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED = 0xC01E0302
+STATUS_GRAPHICS_INVALID_VIDPN = 0xC01E0303
+STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE = 0xC01E0304
+STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET = 0xC01E0305
+STATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED = 0xC01E0306
+STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET = 0xC01E0308
+STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET = 0xC01E0309
+STATUS_GRAPHICS_INVALID_FREQUENCY = 0xC01E030A
+STATUS_GRAPHICS_INVALID_ACTIVE_REGION = 0xC01E030B
+STATUS_GRAPHICS_INVALID_TOTAL_REGION = 0xC01E030C
+STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE = 0xC01E0310
+STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE = 0xC01E0311
+STATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET = 0xC01E0312
+STATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY = 0xC01E0313
+STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET = 0xC01E0314
+STATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET = 0xC01E0315
+STATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET = 0xC01E0316
+STATUS_GRAPHICS_SOURCE_ALREADY_IN_SET = 0xC01E0317
+STATUS_GRAPHICS_TARGET_ALREADY_IN_SET = 0xC01E0318
+STATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH = 0xC01E0319
+STATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY = 0xC01E031A
+STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET = 0xC01E031B
+STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE = 0xC01E031C
+STATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET = 0xC01E031D
+STATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET = 0xC01E031F
+STATUS_GRAPHICS_STALE_MODESET = 0xC01E0320
+STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET = 0xC01E0321
+STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE = 0xC01E0322
+STATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN = 0xC01E0323
+STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE = 0xC01E0324
+STATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION = 0xC01E0325
+STATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES = 0xC01E0326
+STATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY = 0xC01E0327
+STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE = 0xC01E0328
+STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET = 0xC01E0329
+STATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET = 0xC01E032A
+STATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR = 0xC01E032B
+STATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET = 0xC01E032C
+STATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET = 0xC01E032D
+STATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE = 0xC01E032E
+STATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE = 0xC01E032F
+STATUS_GRAPHICS_RESOURCES_NOT_RELATED = 0xC01E0330
+STATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE = 0xC01E0331
+STATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE = 0xC01E0332
+STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET = 0xC01E0333
+STATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER = 0xC01E0334
+STATUS_GRAPHICS_NO_VIDPNMGR = 0xC01E0335
+STATUS_GRAPHICS_NO_ACTIVE_VIDPN = 0xC01E0336
+STATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY = 0xC01E0337
+STATUS_GRAPHICS_MONITOR_NOT_CONNECTED = 0xC01E0338
+STATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY = 0xC01E0339
+STATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE = 0xC01E033A
+STATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE = 0xC01E033B
+STATUS_GRAPHICS_INVALID_STRIDE = 0xC01E033C
+STATUS_GRAPHICS_INVALID_PIXELFORMAT = 0xC01E033D
+STATUS_GRAPHICS_INVALID_COLORBASIS = 0xC01E033E
+STATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE = 0xC01E033F
+STATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY = 0xC01E0340
+STATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT = 0xC01E0341
+STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE = 0xC01E0342
+STATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN = 0xC01E0343
+STATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL = 0xC01E0344
+STATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION = 0xC01E0345
+STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED = 0xC01E0346
+STATUS_GRAPHICS_INVALID_GAMMA_RAMP = 0xC01E0347
+STATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED = 0xC01E0348
+STATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED = 0xC01E0349
+STATUS_GRAPHICS_MODE_NOT_IN_MODESET = 0xC01E034A
+STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON = 0xC01E034D
+STATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE = 0xC01E034E
+STATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE = 0xC01E034F
+STATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS = 0xC01E0350
+STATUS_GRAPHICS_INVALID_SCANLINE_ORDERING = 0xC01E0352
+STATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED = 0xC01E0353
+STATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS = 0xC01E0354
+STATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT = 0xC01E0355
+STATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM = 0xC01E0356
+STATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN = 0xC01E0357
+STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT = 0xC01E0358
+STATUS_GRAPHICS_MAX_NUM_PATHS_REACHED = 0xC01E0359
+STATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION = 0xC01E035A
+STATUS_GRAPHICS_INVALID_CLIENT_TYPE = 0xC01E035B
+STATUS_GRAPHICS_CLIENTVIDPN_NOT_SET = 0xC01E035C
+STATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED = 0xC01E0400
+STATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED = 0xC01E0401
+STATUS_GRAPHICS_NOT_A_LINKED_ADAPTER = 0xC01E0430
+STATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED = 0xC01E0431
+STATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED = 0xC01E0432
+STATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY = 0xC01E0433
+STATUS_GRAPHICS_CHAINLINKS_NOT_STARTED = 0xC01E0434
+STATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON = 0xC01E0435
+STATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE = 0xC01E0436
+STATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER = 0xC01E0438
+STATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED = 0xC01E043B
+STATUS_GRAPHICS_OPM_NOT_SUPPORTED = 0xC01E0500
+STATUS_GRAPHICS_COPP_NOT_SUPPORTED = 0xC01E0501
+STATUS_GRAPHICS_UAB_NOT_SUPPORTED = 0xC01E0502
+STATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS = 0xC01E0503
+STATUS_GRAPHICS_OPM_PARAMETER_ARRAY_TOO_SMALL = 0xC01E0504
+STATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST = 0xC01E0505
+STATUS_GRAPHICS_PVP_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME = 0xC01E0506
+STATUS_GRAPHICS_PVP_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP = 0xC01E0507
+STATUS_GRAPHICS_PVP_MIRRORING_DEVICES_NOT_SUPPORTED = 0xC01E0508
+STATUS_GRAPHICS_OPM_INVALID_POINTER = 0xC01E050A
+STATUS_GRAPHICS_OPM_INTERNAL_ERROR = 0xC01E050B
+STATUS_GRAPHICS_OPM_INVALID_HANDLE = 0xC01E050C
+STATUS_GRAPHICS_PVP_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE = 0xC01E050D
+STATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH = 0xC01E050E
+STATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED = 0xC01E050F
+STATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED = 0xC01E0510
+STATUS_GRAPHICS_PVP_HFS_FAILED = 0xC01E0511
+STATUS_GRAPHICS_OPM_INVALID_SRM = 0xC01E0512
+STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP = 0xC01E0513
+STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP = 0xC01E0514
+STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA = 0xC01E0515
+STATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET = 0xC01E0516
+STATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH = 0xC01E0517
+STATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE = 0xC01E0518
+STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS = 0xC01E051A
+STATUS_GRAPHICS_OPM_SESSION_TYPE_CHANGE_IN_PROGRESS = 0xC01E051B
+STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS = 0xC01E051C
+STATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST = 0xC01E051D
+STATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR = 0xC01E051E
+STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS = 0xC01E051F
+STATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED = 0xC01E0520
+STATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST = 0xC01E0521
+STATUS_GRAPHICS_I2C_NOT_SUPPORTED = 0xC01E0580
+STATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST = 0xC01E0581
+STATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA = 0xC01E0582
+STATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA = 0xC01E0583
+STATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED = 0xC01E0584
+STATUS_GRAPHICS_DDCCI_INVALID_DATA = 0xC01E0585
+STATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE = 0xC01E0586
+STATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING = 0xC01E0587
+STATUS_GRAPHICS_MCA_INTERNAL_ERROR = 0xC01E0588
+STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND = 0xC01E0589
+STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH = 0xC01E058A
+STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM = 0xC01E058B
+STATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE = 0xC01E058C
+STATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS = 0xC01E058D
+STATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED = 0xC01E05E0
+STATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME = 0xC01E05E1
+STATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP = 0xC01E05E2
+STATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED = 0xC01E05E3
+STATUS_GRAPHICS_INVALID_POINTER = 0xC01E05E4
+STATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE = 0xC01E05E5
+STATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL = 0xC01E05E6
+STATUS_GRAPHICS_INTERNAL_ERROR = 0xC01E05E7
+STATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS = 0xC01E05E8
+STATUS_FVE_LOCKED_VOLUME = 0xC0210000
+STATUS_FVE_NOT_ENCRYPTED = 0xC0210001
+STATUS_FVE_BAD_INFORMATION = 0xC0210002
+STATUS_FVE_TOO_SMALL = 0xC0210003
+STATUS_FVE_FAILED_WRONG_FS = 0xC0210004
+STATUS_FVE_FAILED_BAD_FS = 0xC0210005
+STATUS_FVE_FS_NOT_EXTENDED = 0xC0210006
+STATUS_FVE_FS_MOUNTED = 0xC0210007
+STATUS_FVE_NO_LICENSE = 0xC0210008
+STATUS_FVE_ACTION_NOT_ALLOWED = 0xC0210009
+STATUS_FVE_BAD_DATA = 0xC021000A
+STATUS_FVE_VOLUME_NOT_BOUND = 0xC021000B
+STATUS_FVE_NOT_DATA_VOLUME = 0xC021000C
+STATUS_FVE_CONV_READ_ERROR = 0xC021000D
+STATUS_FVE_CONV_WRITE_ERROR = 0xC021000E
+STATUS_FVE_OVERLAPPED_UPDATE = 0xC021000F
+STATUS_FVE_FAILED_SECTOR_SIZE = 0xC0210010
+STATUS_FVE_FAILED_AUTHENTICATION = 0xC0210011
+STATUS_FVE_NOT_OS_VOLUME = 0xC0210012
+STATUS_FVE_KEYFILE_NOT_FOUND = 0xC0210013
+STATUS_FVE_KEYFILE_INVALID = 0xC0210014
+STATUS_FVE_KEYFILE_NO_VMK = 0xC0210015
+STATUS_FVE_TPM_DISABLED = 0xC0210016
+STATUS_FVE_TPM_SRK_AUTH_NOT_ZERO = 0xC0210017
+STATUS_FVE_TPM_INVALID_PCR = 0xC0210018
+STATUS_FVE_TPM_NO_VMK = 0xC0210019
+STATUS_FVE_PIN_INVALID = 0xC021001A
+STATUS_FVE_AUTH_INVALID_APPLICATION = 0xC021001B
+STATUS_FVE_AUTH_INVALID_CONFIG = 0xC021001C
+STATUS_FVE_DEBUGGER_ENABLED = 0xC021001D
+STATUS_FVE_DRY_RUN_FAILED = 0xC021001E
+STATUS_FVE_BAD_METADATA_POINTER = 0xC021001F
+STATUS_FVE_OLD_METADATA_COPY = 0xC0210020
+STATUS_FVE_REBOOT_REQUIRED = 0xC0210021
+STATUS_FVE_RAW_ACCESS = 0xC0210022
+STATUS_FVE_RAW_BLOCKED = 0xC0210023
+STATUS_FVE_NO_FEATURE_LICENSE = 0xC0210026
+STATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED = 0xC0210027
+STATUS_FVE_CONV_RECOVERY_FAILED = 0xC0210028
+STATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG = 0xC0210029
+STATUS_FVE_VOLUME_TOO_SMALL = 0xC0210030
+STATUS_FWP_CALLOUT_NOT_FOUND = 0xC0220001
+STATUS_FWP_CONDITION_NOT_FOUND = 0xC0220002
+STATUS_FWP_FILTER_NOT_FOUND = 0xC0220003
+STATUS_FWP_LAYER_NOT_FOUND = 0xC0220004
+STATUS_FWP_PROVIDER_NOT_FOUND = 0xC0220005
+STATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND = 0xC0220006
+STATUS_FWP_SUBLAYER_NOT_FOUND = 0xC0220007
+STATUS_FWP_NOT_FOUND = 0xC0220008
+STATUS_FWP_ALREADY_EXISTS = 0xC0220009
+STATUS_FWP_IN_USE = 0xC022000A
+STATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS = 0xC022000B
+STATUS_FWP_WRONG_SESSION = 0xC022000C
+STATUS_FWP_NO_TXN_IN_PROGRESS = 0xC022000D
+STATUS_FWP_TXN_IN_PROGRESS = 0xC022000E
+STATUS_FWP_TXN_ABORTED = 0xC022000F
+STATUS_FWP_SESSION_ABORTED = 0xC0220010
+STATUS_FWP_INCOMPATIBLE_TXN = 0xC0220011
+STATUS_FWP_TIMEOUT = 0xC0220012
+STATUS_FWP_NET_EVENTS_DISABLED = 0xC0220013
+STATUS_FWP_INCOMPATIBLE_LAYER = 0xC0220014
+STATUS_FWP_KM_CLIENTS_ONLY = 0xC0220015
+STATUS_FWP_LIFETIME_MISMATCH = 0xC0220016
+STATUS_FWP_BUILTIN_OBJECT = 0xC0220017
+STATUS_FWP_TOO_MANY_BOOTTIME_FILTERS = 0xC0220018
+STATUS_FWP_TOO_MANY_CALLOUTS = 0xC0220018
+STATUS_FWP_NOTIFICATION_DROPPED = 0xC0220019
+STATUS_FWP_TRAFFIC_MISMATCH = 0xC022001A
+STATUS_FWP_INCOMPATIBLE_SA_STATE = 0xC022001B
+STATUS_FWP_NULL_POINTER = 0xC022001C
+STATUS_FWP_INVALID_ENUMERATOR = 0xC022001D
+STATUS_FWP_INVALID_FLAGS = 0xC022001E
+STATUS_FWP_INVALID_NET_MASK = 0xC022001F
+STATUS_FWP_INVALID_RANGE = 0xC0220020
+STATUS_FWP_INVALID_INTERVAL = 0xC0220021
+STATUS_FWP_ZERO_LENGTH_ARRAY = 0xC0220022
+STATUS_FWP_NULL_DISPLAY_NAME = 0xC0220023
+STATUS_FWP_INVALID_ACTION_TYPE = 0xC0220024
+STATUS_FWP_INVALID_WEIGHT = 0xC0220025
+STATUS_FWP_MATCH_TYPE_MISMATCH = 0xC0220026
+STATUS_FWP_TYPE_MISMATCH = 0xC0220027
+STATUS_FWP_OUT_OF_BOUNDS = 0xC0220028
+STATUS_FWP_RESERVED = 0xC0220029
+STATUS_FWP_DUPLICATE_CONDITION = 0xC022002A
+STATUS_FWP_DUPLICATE_KEYMOD = 0xC022002B
+STATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER = 0xC022002C
+STATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER = 0xC022002D
+STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER = 0xC022002E
+STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT = 0xC022002F
+STATUS_FWP_INCOMPATIBLE_AUTH_METHOD = 0xC0220030
+STATUS_FWP_INCOMPATIBLE_DH_GROUP = 0xC0220031
+STATUS_FWP_EM_NOT_SUPPORTED = 0xC0220032
+STATUS_FWP_NEVER_MATCH = 0xC0220033
+STATUS_FWP_PROVIDER_CONTEXT_MISMATCH = 0xC0220034
+STATUS_FWP_INVALID_PARAMETER = 0xC0220035
+STATUS_FWP_TOO_MANY_SUBLAYERS = 0xC0220036
+STATUS_FWP_CALLOUT_NOTIFICATION_FAILED = 0xC0220037
+STATUS_FWP_INCOMPATIBLE_AUTH_CONFIG = 0xC0220038
+STATUS_FWP_INCOMPATIBLE_CIPHER_CONFIG = 0xC0220039
+STATUS_FWP_DUPLICATE_AUTH_METHOD = 0xC022003C
+STATUS_FWP_TCPIP_NOT_READY = 0xC0220100
+STATUS_FWP_INJECT_HANDLE_CLOSING = 0xC0220101
+STATUS_FWP_INJECT_HANDLE_STALE = 0xC0220102
+STATUS_FWP_CANNOT_PEND = 0xC0220103
+STATUS_NDIS_CLOSING = 0xC0230002
+STATUS_NDIS_BAD_VERSION = 0xC0230004
+STATUS_NDIS_BAD_CHARACTERISTICS = 0xC0230005
+STATUS_NDIS_ADAPTER_NOT_FOUND = 0xC0230006
+STATUS_NDIS_OPEN_FAILED = 0xC0230007
+STATUS_NDIS_DEVICE_FAILED = 0xC0230008
+STATUS_NDIS_MULTICAST_FULL = 0xC0230009
+STATUS_NDIS_MULTICAST_EXISTS = 0xC023000A
+STATUS_NDIS_MULTICAST_NOT_FOUND = 0xC023000B
+STATUS_NDIS_REQUEST_ABORTED = 0xC023000C
+STATUS_NDIS_RESET_IN_PROGRESS = 0xC023000D
+STATUS_NDIS_INVALID_PACKET = 0xC023000F
+STATUS_NDIS_INVALID_DEVICE_REQUEST = 0xC0230010
+STATUS_NDIS_ADAPTER_NOT_READY = 0xC0230011
+STATUS_NDIS_INVALID_LENGTH = 0xC0230014
+STATUS_NDIS_INVALID_DATA = 0xC0230015
+STATUS_NDIS_BUFFER_TOO_SHORT = 0xC0230016
+STATUS_NDIS_INVALID_OID = 0xC0230017
+STATUS_NDIS_ADAPTER_REMOVED = 0xC0230018
+STATUS_NDIS_UNSUPPORTED_MEDIA = 0xC0230019
+STATUS_NDIS_GROUP_ADDRESS_IN_USE = 0xC023001A
+STATUS_NDIS_FILE_NOT_FOUND = 0xC023001B
+STATUS_NDIS_ERROR_READING_FILE = 0xC023001C
+STATUS_NDIS_ALREADY_MAPPED = 0xC023001D
+STATUS_NDIS_RESOURCE_CONFLICT = 0xC023001E
+STATUS_NDIS_MEDIA_DISCONNECTED = 0xC023001F
+STATUS_NDIS_INVALID_ADDRESS = 0xC0230022
+STATUS_NDIS_PAUSED = 0xC023002A
+STATUS_NDIS_INTERFACE_NOT_FOUND = 0xC023002B
+STATUS_NDIS_UNSUPPORTED_REVISION = 0xC023002C
+STATUS_NDIS_INVALID_PORT = 0xC023002D
+STATUS_NDIS_INVALID_PORT_STATE = 0xC023002E
+STATUS_NDIS_LOW_POWER_STATE = 0xC023002F
+STATUS_NDIS_NOT_SUPPORTED = 0xC02300BB
+STATUS_NDIS_OFFLOAD_POLICY = 0xC023100F
+STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED = 0xC0231012
+STATUS_NDIS_OFFLOAD_PATH_REJECTED = 0xC0231013
+STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED = 0xC0232000
+STATUS_NDIS_DOT11_MEDIA_IN_USE = 0xC0232001
+STATUS_NDIS_DOT11_POWER_STATE_INVALID = 0xC0232002
+STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL = 0xC0232003
+STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL = 0xC0232004
+STATUS_IPSEC_BAD_SPI = 0xC0360001
+STATUS_IPSEC_SA_LIFETIME_EXPIRED = 0xC0360002
+STATUS_IPSEC_WRONG_SA = 0xC0360003
+STATUS_IPSEC_REPLAY_CHECK_FAILED = 0xC0360004
+STATUS_IPSEC_INVALID_PACKET = 0xC0360005
+STATUS_IPSEC_INTEGRITY_CHECK_FAILED = 0xC0360006
+STATUS_IPSEC_CLEAR_TEXT_DROP = 0xC0360007
+STATUS_IPSEC_AUTH_FIREWALL_DROP = 0xC0360008
+STATUS_IPSEC_THROTTLE_DROP = 0xC0360009
+STATUS_IPSEC_DOSP_BLOCK = 0xC0368000
+STATUS_IPSEC_DOSP_RECEIVED_MULTICAST = 0xC0368001
+STATUS_IPSEC_DOSP_INVALID_PACKET = 0xC0368002
+STATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED = 0xC0368003
+STATUS_IPSEC_DOSP_MAX_ENTRIES = 0xC0368004
+STATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED = 0xC0368005
+STATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES = 0xC0368006
+STATUS_VOLMGR_MIRROR_NOT_SUPPORTED = 0xC038005B
+STATUS_VOLMGR_RAID5_NOT_SUPPORTED = 0xC038005C
+STATUS_VIRTDISK_PROVIDER_NOT_FOUND = 0xC03A0014
+STATUS_VIRTDISK_NOT_VIRTUAL_DISK = 0xC03A0015
+STATUS_VHD_PARENT_VHD_ACCESS_DENIED = 0xC03A0016
+STATUS_VHD_CHILD_PARENT_SIZE_MISMATCH = 0xC03A0017
+STATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED = 0xC03A0018
+STATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT = 0xC03A0019
diff --git a/tests/python_dependencies/impacket/ntlm.py b/tests/python_dependencies/impacket/ntlm.py
new file mode 100644
index 00000000..8376644b
--- /dev/null
+++ b/tests/python_dependencies/impacket/ntlm.py
@@ -0,0 +1,971 @@
+# Copyright (c) 2003-2016 CORE Security Technologies:
+#
+# This software is provided under under a slightly modified version
+# of the Apache Software License. See the accompanying LICENSE file
+# for more information.
+#
+import base64
+import struct
+import calendar
+import time
+import hashlib
+import random
+import string
+import binascii
+
+from impacket.structure import Structure
+from impacket import LOG
+
+
+# This is important. NTLMv2 is not negotiated by the client or server.
+# It is used if set locally on both sides. Change this item if you don't want to use
+# NTLMv2 by default and fall back to NTLMv1 (with EXTENDED_SESSION_SECURITY or not)
+# Check the following links:
+# http://davenport.sourceforge.net/ntlm.html
+# http://blogs.msdn.com/b/openspecification/archive/2010/04/20/ntlm-keys-and-sundry-stuff.aspx
+# http://social.msdn.microsoft.com/Forums/en-US/os_interopscenarios/thread/c8f488ed-1b96-4e06-bd65-390aa41138d1/
+# So I'm setting a global variable to control this, this can also be set programmatically
+
+USE_NTLMv2 = True # if false will fall back to NTLMv1 (or NTLMv1 with ESS a.k.a NTLM2)
+
+
+def computeResponse(flags, serverChallenge, clientChallenge, serverName, domain, user, password, lmhash='', nthash='',
+ use_ntlmv2=USE_NTLMv2):
+ if use_ntlmv2:
+ return computeResponseNTLMv2(flags, serverChallenge, clientChallenge, serverName, domain, user, password,
+ lmhash, nthash, use_ntlmv2=use_ntlmv2)
+ else:
+ return computeResponseNTLMv1(flags, serverChallenge, clientChallenge, serverName, domain, user, password,
+ lmhash, nthash, use_ntlmv2=use_ntlmv2)
+try:
+ POW = None
+ from Crypto.Cipher import ARC4
+ from Crypto.Cipher import DES
+ from Crypto.Hash import MD4
+except Exception:
+ try:
+ import POW
+ except Exception:
+ LOG.critical("Warning: You don't have any crypto installed. You need PyCrypto")
+ LOG.critical("See http://www.pycrypto.org/")
+
+NTLM_AUTH_NONE = 1
+NTLM_AUTH_CONNECT = 2
+NTLM_AUTH_CALL = 3
+NTLM_AUTH_PKT = 4
+NTLM_AUTH_PKT_INTEGRITY = 5
+NTLM_AUTH_PKT_PRIVACY = 6
+
+# If set, requests 56-bit encryption. If the client sends NTLMSSP_NEGOTIATE_SEAL or NTLMSSP_NEGOTIATE_SIGN
+# with NTLMSSP_NEGOTIATE_56 to the server in the NEGOTIATE_MESSAGE, the server MUST return NTLMSSP_NEGOTIATE_56 to
+# the client in the CHALLENGE_MESSAGE. Otherwise it is ignored. If both NTLMSSP_NEGOTIATE_56 and NTLMSSP_NEGOTIATE_128
+# are requested and supported by the client and server, NTLMSSP_NEGOTIATE_56 and NTLMSSP_NEGOTIATE_128 will both be
+# returned to the client. Clients and servers that set NTLMSSP_NEGOTIATE_SEAL SHOULD set NTLMSSP_NEGOTIATE_56 if it is
+# supported. An alternate name for this field is NTLMSSP_NEGOTIATE_56.
+NTLMSSP_NEGOTIATE_56 = 0x80000000
+
+# If set, requests an explicit key exchange. This capability SHOULD be used because it improves security for message
+# integrity or confidentiality. See sections 3.2.5.1.2, 3.2.5.2.1, and 3.2.5.2.2 for details. An alternate name for
+# this field is NTLMSSP_NEGOTIATE_KEY_EXCH.
+NTLMSSP_NEGOTIATE_KEY_EXCH = 0x40000000
+
+# If set, requests 128-bit session key negotiation. An alternate name for this field is NTLMSSP_NEGOTIATE_128.
+# If the client sends NTLMSSP_NEGOTIATE_128 to the server in the NEGOTIATE_MESSAGE, the server MUST return
+# NTLMSSP_NEGOTIATE_128 to the client in the CHALLENGE_MESSAGE only if the client sets NTLMSSP_NEGOTIATE_SEAL or
+# NTLMSSP_NEGOTIATE_SIGN. Otherwise it is ignored. If both NTLMSSP_NEGOTIATE_56 and NTLMSSP_NEGOTIATE_128 are
+# requested and supported by the client and server, NTLMSSP_NEGOTIATE_56 and NTLMSSP_NEGOTIATE_128 will both be
+# returned to the client. Clients and servers that set NTLMSSP_NEGOTIATE_SEAL SHOULD set NTLMSSP_NEGOTIATE_128 if it
+# is supported. An alternate name for this field is NTLMSSP_NEGOTIATE_128
+NTLMSSP_NEGOTIATE_128 = 0x20000000
+
+NTLMSSP_RESERVED_1 = 0x10000000
+NTLMSSP_RESERVED_2 = 0x08000000
+NTLMSSP_RESERVED_3 = 0x04000000
+
+# If set, requests the protocol version number. The data corresponding to this flag is provided in the Version field
+# of the NEGOTIATE_MESSAGE, the CHALLENGE_MESSAGE, and the AUTHENTICATE_MESSAGE.<22> An alternate name for this field
+# is NTLMSSP_NEGOTIATE_VERSION
+NTLMSSP_NEGOTIATE_VERSION = 0x02000000
+NTLMSSP_RESERVED_4 = 0x01000000
+
+# If set, indicates that the TargetInfo fields in the CHALLENGE_MESSAGE (section 2.2.1.2) are populated.
+# An alternate name for this field is NTLMSSP_NEGOTIATE_TARGET_INFO.
+NTLMSSP_NEGOTIATE_TARGET_INFO = 0x00800000
+
+# If set, requests the usage of the LMOWF (section 3.3). An alternate name for this field is
+# NTLMSSP_REQUEST_NON_NT_SESSION_KEY.
+NTLMSSP_REQUEST_NON_NT_SESSION_KEY = 0x00400000
+NTLMSSP_RESERVED_5 = 0x00200000
+
+# If set, requests an identify level token. An alternate name for this field is NTLMSSP_NEGOTIATE_IDENTIFY
+NTLMSSP_NEGOTIATE_IDENTIFY = 0x00100000
+
+# If set, requests usage of the NTLM v2 session security. NTLM v2 session security is a misnomer because it is not
+# NTLM v2. It is NTLM v1 using the extended session security that is also in NTLM v2. NTLMSSP_NEGOTIATE_LM_KEY and
+# NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY are mutually exclusive. If both NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
+# and NTLMSSP_NEGOTIATE_LM_KEY are requested, NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY alone MUST be returned to the
+# client. NTLM v2 authentication session key generation MUST be supported by both the client and the DC in order to be
+# used, and extended session security signing and sealing requires support from the client and the server in order to
+# be used.<23> An alternate name for this field is NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
+NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY = 0x00080000
+NTLMSSP_NEGOTIATE_NTLM2 = 0x00080000
+NTLMSSP_TARGET_TYPE_SHARE = 0x00040000
+
+# If set, TargetName MUST be a server name. The data corresponding to this flag is provided by the server in the
+# TargetName field of the CHALLENGE_MESSAGE. If this bit is set, then NTLMSSP_TARGET_TYPE_DOMAIN MUST NOT be set.
+# This flag MUST be ignored in the NEGOTIATE_MESSAGE and the AUTHENTICATE_MESSAGE. An alternate name for this field
+# is NTLMSSP_TARGET_TYPE_SERVER
+NTLMSSP_TARGET_TYPE_SERVER = 0x00020000
+
+# If set, TargetName MUST be a domain name. The data corresponding to this flag is provided by the server in the
+# TargetName field of the CHALLENGE_MESSAGE. If set, then NTLMSSP_TARGET_TYPE_SERVER MUST NOT be set. This flag MUST
+# be ignored in the NEGOTIATE_MESSAGE and the AUTHENTICATE_MESSAGE. An alternate name for this field is
+# NTLMSSP_TARGET_TYPE_DOMAIN.
+NTLMSSP_TARGET_TYPE_DOMAIN = 0x00010000
+
+# If set, requests the presence of a signature block on all messages. NTLMSSP_NEGOTIATE_ALWAYS_SIGN MUST be set in the
+# NEGOTIATE_MESSAGE to the server and the CHALLENGE_MESSAGE to the client. NTLMSSP_NEGOTIATE_ALWAYS_SIGN is overridden
+# by NTLMSSP_NEGOTIATE_SIGN and NTLMSSP_NEGOTIATE_SEAL, if they are supported. An alternate name for this field is
+# NTLMSSP_NEGOTIATE_ALWAYS_SIGN.
+NTLMSSP_NEGOTIATE_ALWAYS_SIGN = 0x00008000 # forces the other end to sign packets
+NTLMSSP_RESERVED_6 = 0x00004000
+
+# This flag indicates whether the Workstation field is present. If this flag is not set, the Workstation field MUST be
+# ignored. If this flag is set, the length field of the Workstation field specifies whether the workstation name is
+# nonempty or not.<24> An alternate name for this field is NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED.
+NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED = 0x00002000
+
+# If set, the domain name is provided (section 2.2.1.1).<25> An alternate name for this field is
+# NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED
+NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED = 0x00001000
+NTLMSSP_RESERVED_7 = 0x00000800
+
+
+# If set, LM authentication is not allowed and only NT authentication is used.
+NTLMSSP_NEGOTIATE_NT_ONLY = 0x00000400
+
+# If set, requests usage of the NTLM v1 session security protocol. NTLMSSP_NEGOTIATE_NTLM MUST be set in the
+# NEGOTIATE_MESSAGE to the server and the CHALLENGE_MESSAGE to the client. An alternate name for this field is
+# NTLMSSP_NEGOTIATE_NTLM
+NTLMSSP_NEGOTIATE_NTLM = 0x00000200
+NTLMSSP_RESERVED_8 = 0x00000100
+
+# If set, requests LAN Manager (LM) session key computation. NTLMSSP_NEGOTIATE_LM_KEY and
+# NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY are mutually exclusive. If both NTLMSSP_NEGOTIATE_LM_KEY and
+# NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY are requested, NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY alone MUST be
+# returned to the client. NTLM v2 authentication session key generation MUST be supported by both the client and the
+# DC in order to be used, and extended session security signing and sealing requires support from the client and the
+# server to be used. An alternate name for this field is NTLMSSP_NEGOTIATE_LM_KEY.
+NTLMSSP_NEGOTIATE_LM_KEY = 0x00000080
+
+# If set, requests connectionless authentication. If NTLMSSP_NEGOTIATE_DATAGRAM is set, then NTLMSSP_NEGOTIATE_KEY_EXCH
+# MUST always be set in the AUTHENTICATE_MESSAGE to the server and the CHALLENGE_MESSAGE to the client. An alternate
+# name for this field is NTLMSSP_NEGOTIATE_DATAGRAM.
+NTLMSSP_NEGOTIATE_DATAGRAM = 0x00000040
+
+# If set, requests session key negotiation for message confidentiality. If the client sends NTLMSSP_NEGOTIATE_SEAL to
+# the server in the NEGOTIATE_MESSAGE, the server MUST return NTLMSSP_NEGOTIATE_SEAL to the client in the
+# CHALLENGE_MESSAGE. Clients and servers that set NTLMSSP_NEGOTIATE_SEAL SHOULD always set NTLMSSP_NEGOTIATE_56 and
+# NTLMSSP_NEGOTIATE_128, if they are supported. An alternate name for this field is NTLMSSP_NEGOTIATE_SEAL.
+NTLMSSP_NEGOTIATE_SEAL = 0x00000020
+
+# If set, requests session key negotiation for message signatures. If the client sends NTLMSSP_NEGOTIATE_SIGN to the
+# server in the NEGOTIATE_MESSAGE, the server MUST return NTLMSSP_NEGOTIATE_SIGN to the client in the CHALLENGE_MESSAGE.
+# An alternate name for this field is NTLMSSP_NEGOTIATE_SIGN.
+NTLMSSP_NEGOTIATE_SIGN = 0x00000010 # means packet is signed, if verifier is wrong it fails
+NTLMSSP_RESERVED_9 = 0x00000008
+
+# If set, a TargetName field of the CHALLENGE_MESSAGE (section 2.2.1.2) MUST be supplied. An alternate name for this
+# field is NTLMSSP_REQUEST_TARGET.
+NTLMSSP_REQUEST_TARGET = 0x00000004
+
+# If set, requests OEM character set encoding. An alternate name for this field is NTLM_NEGOTIATE_OEM. See bit A for
+# details.
+NTLM_NEGOTIATE_OEM = 0x00000002
+
+# If set, requests Unicode character set encoding. An alternate name for this field is NTLMSSP_NEGOTIATE_UNICODE.
+NTLMSSP_NEGOTIATE_UNICODE = 0x00000001
+
+# AV_PAIR constants
+NTLMSSP_AV_EOL = 0x00
+NTLMSSP_AV_HOSTNAME = 0x01
+NTLMSSP_AV_DOMAINNAME = 0x02
+NTLMSSP_AV_DNS_HOSTNAME = 0x03
+NTLMSSP_AV_DNS_DOMAINNAME = 0x04
+NTLMSSP_AV_DNS_TREENAME = 0x05
+NTLMSSP_AV_FLAGS = 0x06
+NTLMSSP_AV_TIME = 0x07
+NTLMSSP_AV_RESTRICTIONS = 0x08
+NTLMSSP_AV_TARGET_NAME = 0x09
+NTLMSSP_AV_CHANNEL_BINDINGS = 0x0a
+
+class AV_PAIRS():
+ def __init__(self, data = None):
+ self.fields = {}
+ if data is not None:
+ self.fromString(data)
+
+ def __setitem__(self,key,value):
+ self.fields[key] = (len(value),value)
+
+ def __getitem__(self, key):
+ if self.fields.has_key(key):
+ return self.fields[key]
+ return None
+
+ def __delitem__(self, key):
+ del self.fields[key]
+
+ def __len__(self):
+ return len(self.getData())
+
+ def __str__(self):
+ return len(self.getData())
+
+ def fromString(self, data):
+ tInfo = data
+ fType = 0xff
+ while fType is not NTLMSSP_AV_EOL:
+ fType = struct.unpack('<H',tInfo[:struct.calcsize('<H')])[0]
+ tInfo = tInfo[struct.calcsize('<H'):]
+ length = struct.unpack('<H',tInfo[:struct.calcsize('<H')])[0]
+ tInfo = tInfo[struct.calcsize('<H'):]
+ content = tInfo[:length]
+ self.fields[fType]=(length,content)
+ tInfo = tInfo[length:]
+
+ def dump(self):
+ for i in self.fields.keys():
+ print "%s: {%r}" % (i,self[i])
+
+ def getData(self):
+ if self.fields.has_key(NTLMSSP_AV_EOL):
+ del self.fields[NTLMSSP_AV_EOL]
+ ans = ''
+ for i in self.fields.keys():
+ ans+= struct.pack('<HH', i, self[i][0])
+ ans+= self[i][1]
+
+ # end with a NTLMSSP_AV_EOL
+ ans += struct.pack('<HH', NTLMSSP_AV_EOL, 0)
+
+ return ans
+
+class NTLMAuthMixin:
+ def get_os_version(self):
+ if self['os_version'] == '':
+ return None
+ else:
+ mayor_v = struct.unpack('B',self['os_version'][0])[0]
+ minor_v = struct.unpack('B',self['os_version'][1])[0]
+ build_v = struct.unpack('H',self['os_version'][2:4])
+ return (mayor_v,minor_v,build_v)
+
+class NTLMAuthNegotiate(Structure, NTLMAuthMixin):
+
+ structure = (
+ ('','"NTLMSSP\x00'),
+ ('message_type','<L=1'),
+ ('flags','<L'),
+ ('domain_len','<H-domain_name'),
+ ('domain_max_len','<H-domain_name'),
+ ('domain_offset','<L=0'),
+ ('host_len','<H-host_name'),
+ ('host_maxlen','<H-host_name'),
+ ('host_offset','<L=0'),
+ ('os_version',':'),
+ ('host_name',':'),
+ ('domain_name',':'))
+
+ def __init__(self):
+ Structure.__init__(self)
+ self['flags']= (
+ NTLMSSP_NEGOTIATE_128 |
+ NTLMSSP_NEGOTIATE_KEY_EXCH|
+ # NTLMSSP_LM_KEY |
+ NTLMSSP_NEGOTIATE_NTLM |
+ NTLMSSP_NEGOTIATE_UNICODE |
+ # NTLMSSP_ALWAYS_SIGN |
+ NTLMSSP_NEGOTIATE_SIGN |
+ NTLMSSP_NEGOTIATE_SEAL |
+ # NTLMSSP_TARGET |
+ 0)
+ self['host_name']=''
+ self['domain_name']=''
+ self['os_version']=''
+
+ def getData(self):
+ if len(self.fields['host_name']) > 0:
+ self['flags'] |= NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED
+ if len(self.fields['domain_name']) > 0:
+ self['flags'] |= NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED
+ if len(self.fields['os_version']) > 0:
+ self['flags'] |= NTLMSSP_NEGOTIATE_VERSION
+ if (self['flags'] & NTLMSSP_NEGOTIATE_VERSION) == NTLMSSP_NEGOTIATE_VERSION:
+ version_len = 8
+ else:
+ version_len = 0
+ if (self['flags'] & NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED) == NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED:
+ self['host_offset']=32 + version_len
+ if (self['flags'] & NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED) == NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED:
+ self['domain_offset']=32+len(self['host_name']) + version_len
+ return Structure.getData(self)
+
+ def fromString(self,data):
+ Structure.fromString(self,data)
+
+ domain_offset = self['domain_offset']
+ domain_end = self['domain_len'] + domain_offset
+ self['domain_name'] = data[ domain_offset : domain_end ]
+
+ host_offset = self['host_offset']
+ host_end = self['host_len'] + host_offset
+ self['host_name'] = data[ host_offset : host_end ]
+
+ hasOsInfo = self['flags'] & NTLMSSP_NEGOTIATE_VERSION
+ if len(data) >= 36 and hasOsInfo:
+ self['os_version'] = data[32:40]
+ else:
+ self['os_version'] = ''
+
+class NTLMAuthChallenge(Structure):
+
+ structure = (
+ ('','"NTLMSSP\x00'),
+ ('message_type','<L=2'),
+ ('domain_len','<H-domain_name'),
+ ('domain_max_len','<H-domain_name'),
+ ('domain_offset','<L=40'),
+ ('flags','<L=0'),
+ ('challenge','8s'),
+ ('reserved','8s=""'),
+ ('TargetInfoFields_len','<H-TargetInfoFields'),
+ ('TargetInfoFields_max_len','<H-TargetInfoFields'),
+ ('TargetInfoFields_offset','<L'),
+ ('VersionLen','_-Version','self.checkVersion(self["flags"])'),
+ ('Version',':'),
+ ('domain_name',':'),
+ ('TargetInfoFields',':'))
+
+ def checkVersion(self, flags):
+ if flags is not None:
+ if flags & NTLMSSP_NEGOTIATE_VERSION == 0:
+ return 0
+ return 8
+
+ def getData(self):
+ if self['TargetInfoFields'] is not None and type(self['TargetInfoFields']) is not str:
+ raw_av_fields = self['TargetInfoFields'].getData()
+ self['TargetInfoFields'] = raw_av_fields
+ return Structure.getData(self)
+
+ def fromString(self,data):
+ Structure.fromString(self,data)
+ # Just in case there's more data after the TargetInfoFields
+ self['TargetInfoFields'] = self['TargetInfoFields'][:self['TargetInfoFields_len']]
+ # We gotta process the TargetInfoFields
+ #if self['TargetInfoFields_len'] > 0:
+ # av_pairs = AV_PAIRS(self['TargetInfoFields'][:self['TargetInfoFields_len']])
+ # self['TargetInfoFields'] = av_pairs
+
+ return self
+
+class NTLMAuthChallengeResponse(Structure, NTLMAuthMixin):
+
+ structure = (
+ ('','"NTLMSSP\x00'),
+ ('message_type','<L=3'),
+ ('lanman_len','<H-lanman'),
+ ('lanman_max_len','<H-lanman'),
+ ('lanman_offset','<L'),
+ ('ntlm_len','<H-ntlm'),
+ ('ntlm_max_len','<H-ntlm'),
+ ('ntlm_offset','<L'),
+ ('domain_len','<H-domain_name'),
+ ('domain_max_len','<H-domain_name'),
+ ('domain_offset','<L'),
+ ('user_len','<H-user_name'),
+ ('user_max_len','<H-user_name'),
+ ('user_offset','<L'),
+ ('host_len','<H-host_name'),
+ ('host_max_len','<H-host_name'),
+ ('host_offset','<L'),
+ ('session_key_len','<H-session_key'),
+ ('session_key_max_len','<H-session_key'),
+ ('session_key_offset','<L'),
+ ('flags','<L'),
+ ('VersionLen','_-Version','self.checkVersion(self["flags"])'),
+ ('Version',':=""'),
+ ('MICLen','_-MIC','self.checkMIC(self["flags"])'),
+ ('MIC',':=""'),
+ ('domain_name',':'),
+ ('user_name',':'),
+ ('host_name',':'),
+ ('lanman',':'),
+ ('ntlm',':'),
+ ('session_key',':'))
+
+ def __init__(self, username = '', password = '', challenge = '', lmhash = '', nthash = '', flags = 0):
+ Structure.__init__(self)
+ self['session_key']=''
+ self['user_name']=username.encode('utf-16le')
+ self['domain_name']='' #"CLON".encode('utf-16le')
+ self['host_name']='' #"BETS".encode('utf-16le')
+ self['flags'] = ( #authResp['flags']
+ # we think (beto & gera) that his flags force a memory conten leakage when a windows 2000 answers using uninitializaed verifiers
+ NTLMSSP_NEGOTIATE_128 |
+ NTLMSSP_NEGOTIATE_KEY_EXCH|
+ # NTLMSSP_LM_KEY |
+ NTLMSSP_NEGOTIATE_NTLM |
+ NTLMSSP_NEGOTIATE_UNICODE |
+ # NTLMSSP_ALWAYS_SIGN |
+ NTLMSSP_NEGOTIATE_SIGN |
+ NTLMSSP_NEGOTIATE_SEAL |
+ # NTLMSSP_TARGET |
+ 0)
+ # Here we do the stuff
+ if username and ( lmhash != '' or nthash != ''):
+ self['lanman'] = get_ntlmv1_response(lmhash, challenge)
+ self['ntlm'] = get_ntlmv1_response(nthash, challenge)
+ elif (username and password):
+ lmhash = compute_lmhash(password)
+ nthash = compute_nthash(password)
+ self['lanman']=get_ntlmv1_response(lmhash, challenge)
+ self['ntlm']=get_ntlmv1_response(nthash, challenge) # This is not used for LM_KEY nor NTLM_KEY
+ else:
+ self['lanman'] = ''
+ self['ntlm'] = ''
+ if not self['host_name']:
+ self['host_name'] = 'NULL'.encode('utf-16le') # for NULL session there must be a hostname
+
+ def checkVersion(self, flags):
+ if flags is not None:
+ if flags & NTLMSSP_NEGOTIATE_VERSION == 0:
+ return 0
+ return 8
+
+ def checkMIC(self, flags):
+ # TODO: Find a proper way to check the MIC is in there
+ if flags is not None:
+ if flags & NTLMSSP_NEGOTIATE_VERSION == 0:
+ return 0
+ return 16
+
+ def getData(self):
+ self['domain_offset']=64+self.checkMIC(self["flags"])+self.checkVersion(self["flags"])
+ self['user_offset']=64+self.checkMIC(self["flags"])+self.checkVersion(self["flags"])+len(self['domain_name'])
+ self['host_offset']=self['user_offset']+len(self['user_name'])
+ self['lanman_offset']=self['host_offset']+len(self['host_name'])
+ self['ntlm_offset']=self['lanman_offset']+len(self['lanman'])
+ self['session_key_offset']=self['ntlm_offset']+len(self['ntlm'])
+ return Structure.getData(self)
+
+ def fromString(self,data):
+ Structure.fromString(self,data)
+ # [MS-NLMP] page 27
+ # Payload data can be present in any order within the Payload field,
+ # with variable-length padding before or after the data
+
+ domain_offset = self['domain_offset']
+ domain_end = self['domain_len'] + domain_offset
+ self['domain_name'] = data[ domain_offset : domain_end ]
+
+ host_offset = self['host_offset']
+ host_end = self['host_len'] + host_offset
+ self['host_name'] = data[ host_offset: host_end ]
+
+ user_offset = self['user_offset']
+ user_end = self['user_len'] + user_offset
+ self['user_name'] = data[ user_offset: user_end ]
+
+ ntlm_offset = self['ntlm_offset']
+ ntlm_end = self['ntlm_len'] + ntlm_offset
+ self['ntlm'] = data[ ntlm_offset : ntlm_end ]
+
+ lanman_offset = self['lanman_offset']
+ lanman_end = self['lanman_len'] + lanman_offset
+ self['lanman'] = data[ lanman_offset : lanman_end]
+
+ #if len(data) >= 36:
+ # self['os_version'] = data[32:36]
+ #else:
+ # self['os_version'] = ''
+
+class ImpacketStructure(Structure):
+ def set_parent(self, other):
+ self.parent = other
+
+ def get_packet(self):
+ return str(self)
+
+ def get_size(self):
+ return len(self)
+
+class ExtendedOrNotMessageSignature(Structure):
+ def __init__(self, flags = 0, **kargs):
+ if flags & NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY:
+ self.structure = self.extendedMessageSignature
+ else:
+ self.structure = self.MessageSignature
+ return Structure.__init__(self, **kargs)
+
+class NTLMMessageSignature(ExtendedOrNotMessageSignature):
+ extendedMessageSignature = (
+ ('Version','<L=1'),
+ ('Checksum','<q'),
+ ('SeqNum','<i'),
+ )
+
+ MessageSignature = (
+ ('Version','<L=1'),
+ ('RandomPad','<i=0'),
+ ('Checksum','<i'),
+ ('SeqNum','<i'),
+ )
+
+KNOWN_DES_INPUT = "KGS!@#$%"
+
+def __expand_DES_key( key):
+ # Expand the key from a 7-byte password key into a 8-byte DES key
+ key = key[:7]
+ key += '\x00'*(7-len(key))
+ s = chr(((ord(key[0]) >> 1) & 0x7f) << 1)
+ s = s + chr(((ord(key[0]) & 0x01) << 6 | ((ord(key[1]) >> 2) & 0x3f)) << 1)
+ s = s + chr(((ord(key[1]) & 0x03) << 5 | ((ord(key[2]) >> 3) & 0x1f)) << 1)
+ s = s + chr(((ord(key[2]) & 0x07) << 4 | ((ord(key[3]) >> 4) & 0x0f)) << 1)
+ s = s + chr(((ord(key[3]) & 0x0f) << 3 | ((ord(key[4]) >> 5) & 0x07)) << 1)
+ s = s + chr(((ord(key[4]) & 0x1f) << 2 | ((ord(key[5]) >> 6) & 0x03)) << 1)
+ s = s + chr(((ord(key[5]) & 0x3f) << 1 | ((ord(key[6]) >> 7) & 0x01)) << 1)
+ s = s + chr((ord(key[6]) & 0x7f) << 1)
+ return s
+
+def __DES_block(key, msg):
+ if POW:
+ cipher = POW.Symmetric(POW.DES_ECB)
+ cipher.encryptInit(__expand_DES_key(key))
+ return cipher.update(msg)
+ else:
+ cipher = DES.new(__expand_DES_key(key),DES.MODE_ECB)
+ return cipher.encrypt(msg)
+
+def ntlmssp_DES_encrypt(key, challenge):
+ answer = __DES_block(key[:7], challenge)
+ answer += __DES_block(key[7:14], challenge)
+ answer += __DES_block(key[14:], challenge)
+ return answer
+
+# High level functions to use NTLMSSP
+
+def getNTLMSSPType1(workstation='', domain='', signingRequired = False, use_ntlmv2 = USE_NTLMv2):
+ # Let's do some encoding checks before moving on. Kind of dirty, but found effective when dealing with
+ # international characters.
+ import sys
+ encoding = sys.getfilesystemencoding()
+ if encoding is not None:
+ try:
+ workstation.encode('utf-16le')
+ except:
+ workstation = workstation.decode(encoding)
+ try:
+ domain.encode('utf-16le')
+ except:
+ domain = domain.decode(encoding)
+
+ # Let's prepare a Type 1 NTLMSSP Message
+ auth = NTLMAuthNegotiate()
+ auth['flags']=0
+ if signingRequired:
+ auth['flags'] = NTLMSSP_NEGOTIATE_KEY_EXCH | NTLMSSP_NEGOTIATE_SIGN | NTLMSSP_NEGOTIATE_ALWAYS_SIGN | NTLMSSP_NEGOTIATE_SEAL
+ if use_ntlmv2:
+ auth['flags'] |= NTLMSSP_NEGOTIATE_TARGET_INFO
+ auth['flags'] |= NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY | NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_56
+ auth['domain_name'] = domain.encode('utf-16le')
+ return auth
+
+def getNTLMSSPType3(type1, type2, user, password, domain, lmhash = '', nthash = '', use_ntlmv2 = USE_NTLMv2):
+
+ # Let's do some encoding checks before moving on. Kind of dirty, but found effective when dealing with
+ # international characters.
+ import sys
+ encoding = sys.getfilesystemencoding()
+ if encoding is not None:
+ try:
+ user.encode('utf-16le')
+ except:
+ user = user.decode(encoding)
+ try:
+ password.encode('utf-16le')
+ except:
+ password = password.decode(encoding)
+ try:
+ domain.encode('utf-16le')
+ except:
+ domain = user.decode(encoding)
+
+ ntlmChallenge = NTLMAuthChallenge(type2)
+
+ # Let's start with the original flags sent in the type1 message
+ responseFlags = type1['flags']
+
+ # Token received and parsed. Depending on the authentication
+ # method we will create a valid ChallengeResponse
+ ntlmChallengeResponse = NTLMAuthChallengeResponse(user, password, ntlmChallenge['challenge'])
+
+ clientChallenge = "".join([random.choice(string.digits+string.letters) for i in xrange(8)])
+
+ serverName = ntlmChallenge['TargetInfoFields']
+
+ ntResponse, lmResponse, sessionBaseKey = computeResponse(ntlmChallenge['flags'], ntlmChallenge['challenge'], clientChallenge, serverName, domain, user, password, lmhash, nthash, use_ntlmv2 )
+
+ # Let's check the return flags
+ if (ntlmChallenge['flags'] & NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY) == 0:
+ # No extended session security, taking it out
+ responseFlags &= 0xffffffff ^ NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
+ if (ntlmChallenge['flags'] & NTLMSSP_NEGOTIATE_128 ) == 0:
+ # No support for 128 key len, taking it out
+ responseFlags &= 0xffffffff ^ NTLMSSP_NEGOTIATE_128
+ if (ntlmChallenge['flags'] & NTLMSSP_NEGOTIATE_KEY_EXCH) == 0:
+ # No key exchange supported, taking it out
+ responseFlags &= 0xffffffff ^ NTLMSSP_NEGOTIATE_KEY_EXCH
+ if (ntlmChallenge['flags'] & NTLMSSP_NEGOTIATE_SEAL) == 0:
+ # No sign available, taking it out
+ responseFlags &= 0xffffffff ^ NTLMSSP_NEGOTIATE_SEAL
+ if (ntlmChallenge['flags'] & NTLMSSP_NEGOTIATE_SIGN) == 0:
+ # No sign available, taking it out
+ responseFlags &= 0xffffffff ^ NTLMSSP_NEGOTIATE_SIGN
+ if (ntlmChallenge['flags'] & NTLMSSP_NEGOTIATE_ALWAYS_SIGN) == 0:
+ # No sign available, taking it out
+ responseFlags &= 0xffffffff ^ NTLMSSP_NEGOTIATE_ALWAYS_SIGN
+
+ keyExchangeKey = KXKEY(ntlmChallenge['flags'],sessionBaseKey, lmResponse, ntlmChallenge['challenge'], password, lmhash, nthash,use_ntlmv2)
+
+ # Special case for anonymous login
+ if user == '' and password == '' and lmhash == '' and nthash == '':
+ keyExchangeKey = '\x00'*16
+
+ # If we set up key exchange, let's fill the right variables
+ if ntlmChallenge['flags'] & NTLMSSP_NEGOTIATE_KEY_EXCH:
+ # not exactly what I call random tho :\
+ # exportedSessionKey = this is the key we should use to sign
+ exportedSessionKey = "".join([random.choice(string.digits+string.letters) for i in xrange(16)])
+ #exportedSessionKey = "A"*16
+ #print "keyExchangeKey %r" % keyExchangeKey
+ # Let's generate the right session key based on the challenge flags
+ #if responseFlags & NTLMSSP_NTLM2_KEY:
+ # Extended session security enabled
+ # if responseFlags & NTLMSSP_KEY_128:
+ # Full key
+ # exportedSessionKey = exportedSessionKey
+ # elif responseFlags & NTLMSSP_KEY_56:
+ # Only 56-bit key
+ # exportedSessionKey = exportedSessionKey[:7]
+ # else:
+ # exportedSessionKey = exportedSessionKey[:5]
+ #elif responseFlags & NTLMSSP_KEY_56:
+ # No extended session security, just 56 bits key
+ # exportedSessionKey = exportedSessionKey[:7] + '\xa0'
+ #else:
+ # exportedSessionKey = exportedSessionKey[:5] + '\xe5\x38\xb0'
+
+ encryptedRandomSessionKey = generateEncryptedSessionKey(keyExchangeKey, exportedSessionKey)
+ else:
+ encryptedRandomSessionKey = None
+ # [MS-NLMP] page 46
+ exportedSessionKey = keyExchangeKey
+
+ ntlmChallengeResponse['flags'] = responseFlags
+ ntlmChallengeResponse['domain_name'] = domain.encode('utf-16le')
+ ntlmChallengeResponse['lanman'] = lmResponse
+ ntlmChallengeResponse['ntlm'] = ntResponse
+ if encryptedRandomSessionKey is not None:
+ ntlmChallengeResponse['session_key'] = encryptedRandomSessionKey
+
+ return ntlmChallengeResponse, exportedSessionKey
+
+
+# NTLMv1 Algorithm
+
+def generateSessionKeyV1(password, lmhash, nthash):
+ if POW:
+ hash = POW.Digest(POW.MD4_DIGEST)
+ else:
+ hash = MD4.new()
+ hash.update(NTOWFv1(password, lmhash, nthash))
+ return hash.digest()
+
+def computeResponseNTLMv1(flags, serverChallenge, clientChallenge, serverName, domain, user, password, lmhash='', nthash='', use_ntlmv2 = USE_NTLMv2):
+ if (user == '' and password == ''):
+ # Special case for anonymous authentication
+ lmResponse = ''
+ ntResponse = ''
+ else:
+ lmhash = LMOWFv1(password, lmhash, nthash)
+ nthash = NTOWFv1(password, lmhash, nthash)
+ if flags & NTLMSSP_NEGOTIATE_LM_KEY:
+ ntResponse = ''
+ lmResponse = get_ntlmv1_response(lmhash, serverChallenge)
+ elif flags & NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY:
+ md5 = hashlib.new('md5')
+ chall = (serverChallenge + clientChallenge)
+ md5.update(chall)
+ ntResponse = ntlmssp_DES_encrypt(nthash, md5.digest()[:8])
+ lmResponse = clientChallenge + '\x00'*16
+ else:
+ ntResponse = get_ntlmv1_response(nthash,serverChallenge)
+ lmResponse = get_ntlmv1_response(lmhash, serverChallenge)
+
+ sessionBaseKey = generateSessionKeyV1(password, lmhash, nthash)
+ return ntResponse, lmResponse, sessionBaseKey
+
+def compute_lmhash(password):
+ # This is done according to Samba's encryption specification (docs/html/ENCRYPTION.html)
+ password = password.upper()
+ lmhash = __DES_block(password[:7], KNOWN_DES_INPUT)
+ lmhash += __DES_block(password[7:14], KNOWN_DES_INPUT)
+ return lmhash
+
+def NTOWFv1(password, lmhash = '', nthash=''):
+ if nthash != '':
+ return nthash
+ return compute_nthash(password)
+
+def LMOWFv1(password, lmhash = '', nthash=''):
+ if lmhash != '':
+ return lmhash
+ return compute_lmhash(password)
+
+def compute_nthash(password):
+ # This is done according to Samba's encryption specification (docs/html/ENCRYPTION.html)
+ try:
+ password = unicode(password).encode('utf_16le')
+ except UnicodeDecodeError:
+ import sys
+ password = password.decode(sys.getfilesystemencoding()).encode('utf_16le')
+
+ if POW:
+ hash = POW.Digest(POW.MD4_DIGEST)
+ else:
+ hash = MD4.new()
+ hash.update(password)
+ return hash.digest()
+
+def get_ntlmv1_response(key, challenge):
+ return ntlmssp_DES_encrypt(key, challenge)
+
+# NTLMv2 Algorithm - as described in MS-NLMP Section 3.3.2
+
+# Crypto Stuff
+
+def MAC(flags, handle, signingKey, seqNum, message):
+ # [MS-NLMP] Section 3.4.4
+ # Returns the right messageSignature depending on the flags
+ messageSignature = NTLMMessageSignature(flags)
+ if flags & NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY:
+ if flags & NTLMSSP_NEGOTIATE_KEY_EXCH:
+ messageSignature['Version'] = 1
+ messageSignature['Checksum'] = struct.unpack('<q',handle(hmac_md5(signingKey, struct.pack('<i',seqNum)+message)[:8]))[0]
+ messageSignature['SeqNum'] = seqNum
+ seqNum += 1
+ else:
+ messageSignature['Version'] = 1
+ messageSignature['Checksum'] = struct.unpack('<q',hmac_md5(signingKey, struct.pack('<i',seqNum)+message)[:8])[0]
+ messageSignature['SeqNum'] = seqNum
+ seqNum += 1
+ else:
+ messageSignature['Version'] = 1
+ messageSignature['Checksum'] = struct.pack('<i',binascii.crc32(message))
+ messageSignature['RandomPad'] = 0
+ messageSignature['RandomPad'] = handle(struct.pack('<i',messageSignature['RandomPad']))
+ messageSignature['Checksum'] = struct.unpack('<i',handle(messageSignature['Checksum']))[0]
+ messageSignature['SeqNum'] = handle('\x00\x00\x00\x00')
+ messageSignature['SeqNum'] = struct.unpack('<i',messageSignature['SeqNum'])[0] ^ seqNum
+ messageSignature['RandomPad'] = 0
+
+ return messageSignature
+
+def SEAL(flags, signingKey, sealingKey, messageToSign, messageToEncrypt, seqNum, handle):
+ sealedMessage = handle(messageToEncrypt)
+ signature = MAC(flags, handle, signingKey, seqNum, messageToSign)
+ return sealedMessage, signature
+
+def SIGN(flags, signingKey, message, seqNum, handle):
+ return MAC(flags, handle, signingKey, seqNum, message)
+
+def SIGNKEY(flags, randomSessionKey, mode = 'Client'):
+ if flags & NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY:
+ if mode == 'Client':
+ md5 = hashlib.new('md5')
+ md5.update(randomSessionKey + "session key to client-to-server signing key magic constant\x00")
+ signKey = md5.digest()
+ else:
+ md5 = hashlib.new('md5')
+ md5.update(randomSessionKey + "session key to server-to-client signing key magic constant\x00")
+ signKey = md5.digest()
+ else:
+ signKey = None
+ return signKey
+
+def SEALKEY(flags, randomSessionKey, mode = 'Client'):
+ if flags & NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY:
+ if flags & NTLMSSP_NEGOTIATE_128:
+ sealKey = randomSessionKey
+ elif flags & NTLMSSP_NEGOTIATE_56:
+ sealKey = randomSessionKey[:7]
+ else:
+ sealKey = randomSessionKey[:5]
+
+ if mode == 'Client':
+ md5 = hashlib.new('md5')
+ md5.update(sealKey + 'session key to client-to-server sealing key magic constant\x00')
+ sealKey = md5.digest()
+ else:
+ md5 = hashlib.new('md5')
+ md5.update(sealKey + 'session key to server-to-client sealing key magic constant\x00')
+ sealKey = md5.digest()
+
+ elif flags & NTLMSSP_NEGOTIATE_56:
+ sealKey = randomSessionKey[:7] + '\xa0'
+ else:
+ sealKey = randomSessionKey[:5] + '\xe5\x38\xb0'
+
+ return sealKey
+
+
+def generateEncryptedSessionKey(keyExchangeKey, exportedSessionKey):
+ if POW:
+ cipher = POW.Symmetric(POW.RC4)
+ cipher.encryptInit(keyExchangeKey)
+ cipher_encrypt = cipher.update
+ else:
+ cipher = ARC4.new(keyExchangeKey)
+ cipher_encrypt = cipher.encrypt
+
+ sessionKey = cipher_encrypt(exportedSessionKey)
+ return sessionKey
+
+def KXKEY(flags, sessionBaseKey, lmChallengeResponse, serverChallenge, password, lmhash, nthash, use_ntlmv2 = USE_NTLMv2):
+ if use_ntlmv2:
+ return sessionBaseKey
+
+ if flags & NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY:
+ if flags & NTLMSSP_NEGOTIATE_NTLM:
+ keyExchangeKey = hmac_md5(sessionBaseKey, serverChallenge + lmChallengeResponse[:8])
+ else:
+ keyExchangeKey = sessionBaseKey
+ elif flags & NTLMSSP_NEGOTIATE_NTLM:
+ if flags & NTLMSSP_NEGOTIATE_LM_KEY:
+ keyExchangeKey = __DES_block(LMOWFv1(password,lmhash)[:7], lmChallengeResponse[:8]) + __DES_block(LMOWFv1(password,lmhash)[7] + '\xBD\xBD\xBD\xBD\xBD\xBD', lmChallengeResponse[:8])
+ elif flags & NTLMSSP_REQUEST_NON_NT_SESSION_KEY:
+ keyExchangeKey = LMOWFv1(password,lmhash)[:8] + '\x00'*8
+ else:
+ keyExchangeKey = sessionBaseKey
+ else:
+ raise "Can't create a valid KXKEY!"
+
+ return keyExchangeKey
+
+def hmac_md5(key, data):
+ if POW:
+ h = POW.Hmac(POW.MD5_DIGEST, key)
+ h.update(data)
+ result = h.mac()
+ else:
+ import hmac
+ h = hmac.new(key)
+ h.update(data)
+ result = h.digest()
+ return result
+
+def NTOWFv2( user, password, domain, hash = ''):
+ if hash != '':
+ theHash = hash
+ else:
+ theHash = compute_nthash(password)
+ return hmac_md5(theHash, user.upper().encode('utf-16le') + domain.encode('utf-16le'))
+
+def LMOWFv2( user, password, domain, lmhash = ''):
+ return NTOWFv2( user, password, domain, lmhash)
+
+
+def computeResponseNTLMv2(flags, serverChallenge, clientChallenge, serverName, domain, user, password, lmhash = '', nthash = '', use_ntlmv2 = USE_NTLMv2):
+
+ responseServerVersion = '\x01'
+ hiResponseServerVersion = '\x01'
+ responseKeyNT = NTOWFv2(user, password, domain, nthash)
+ responseKeyLM = LMOWFv2(user, password, domain, lmhash)
+
+ # If you're running test-ntlm, comment the following lines and uncoment the ones that are commented. Don't forget to turn it back after the tests!
+ ######################
+ av_pairs = AV_PAIRS(serverName)
+ # In order to support SPN target name validation, we have to add this to the serverName av_pairs. Otherwise we will get access denied
+ # This is set at Local Security Policy -> Local Policies -> Security Options -> Server SPN target name validation level
+ av_pairs[NTLMSSP_AV_TARGET_NAME] = 'cifs/'.encode('utf-16le') + av_pairs[NTLMSSP_AV_HOSTNAME][1]
+ if av_pairs[NTLMSSP_AV_TIME] is not None:
+ aTime = av_pairs[NTLMSSP_AV_TIME][1]
+ else:
+ aTime = struct.pack('<q', (116444736000000000 + calendar.timegm(time.gmtime()) * 10000000) )
+ #aTime = '\x00'*8
+ av_pairs[NTLMSSP_AV_TIME] = aTime
+ serverName = av_pairs.getData()
+
+ ######################
+ #aTime = '\x00'*8
+ ######################
+ temp = responseServerVersion + hiResponseServerVersion + '\x00' * 6 + aTime + clientChallenge + '\x00' * 4 + serverName + '\x00' * 4
+
+ ntProofStr = hmac_md5(responseKeyNT, serverChallenge + temp)
+
+ ntChallengeResponse = ntProofStr + temp
+ lmChallengeResponse = hmac_md5(responseKeyNT, serverChallenge + clientChallenge) + clientChallenge
+ sessionBaseKey = hmac_md5(responseKeyNT, ntProofStr)
+
+ if (user == '' and password == ''):
+ # Special case for anonymous authentication
+ ntChallengeResponse = ''
+ lmChallengeResponse = ''
+
+ return ntChallengeResponse, lmChallengeResponse, sessionBaseKey
+
+class NTLM_HTTP(object):
+ '''Parent class for NTLM HTTP classes.'''
+ MSG_TYPE = None
+
+ @classmethod
+ def get_instace(cls,msg_64):
+ msg = None
+ msg_type = 0
+ if msg_64 != '':
+ msg = base64.b64decode(msg_64[5:]) # Remove the 'NTLM '
+ msg_type = ord(msg[8])
+
+ for _cls in NTLM_HTTP.__subclasses__():
+ if msg_type == _cls.MSG_TYPE:
+ instance = _cls()
+ instance.fromString(msg)
+ return instance
+
+
+class NTLM_HTTP_AuthRequired(NTLM_HTTP):
+ commonHdr = ()
+ # Message 0 means the first HTTP request e.g. 'GET /bla.png'
+ MSG_TYPE = 0
+
+ def fromString(self,data):
+ pass
+
+
+class NTLM_HTTP_AuthNegotiate(NTLM_HTTP, NTLMAuthNegotiate):
+ commonHdr = ()
+ MSG_TYPE = 1
+
+ def __init__(self):
+ NTLMAuthNegotiate.__init__(self)
+
+
+class NTLM_HTTP_AuthChallengeResponse(NTLM_HTTP, NTLMAuthChallengeResponse):
+ commonHdr = ()
+ MSG_TYPE = 3
+
+ def __init__(self):
+ NTLMAuthChallengeResponse.__init__(self)
+
diff --git a/tests/python_dependencies/impacket/smb.py b/tests/python_dependencies/impacket/smb.py
new file mode 100644
index 00000000..95efb2c6
--- /dev/null
+++ b/tests/python_dependencies/impacket/smb.py
@@ -0,0 +1,4099 @@
+# Copyright (c) 2003-2016 CORE Security Technologies
+#
+# This software is provided under under a slightly modified version
+# of the Apache Software License. See the accompanying LICENSE file
+# for more information.
+#
+# Copyright (C) 2001 Michael Teo <michaelteo@bigfoot.com>
+# smb.py - SMB/CIFS library
+#
+# This software is provided 'as-is', without any express or implied warranty.
+# In no event will the author be held liable for any damages arising from the
+# use of this software.
+#
+# Permission is granted to anyone to use this software for any purpose,
+# including commercial applications, and to alter it and redistribute it
+# freely, subject to the following restrictions:
+#
+# 1. The origin of this software must not be misrepresented; you must not
+# claim that you wrote the original software. If you use this software
+# in a product, an acknowledgment in the product documentation would be
+# appreciated but is not required.
+#
+# 2. Altered source versions must be plainly marked as such, and must not be
+# misrepresented as being the original software.
+#
+# 3. This notice cannot be removed or altered from any source distribution.
+#
+# Altered source done by Alberto Solino (@agsolino)
+
+# Todo:
+# [ ] Try [SMB]transport fragmentation using Transact requests
+# [ ] Try other methods of doing write (write_raw, transact2, write, write_and_unlock, write_and_close, write_mpx)
+# [-] Try replacements for SMB_COM_NT_CREATE_ANDX (CREATE, T_TRANSACT_CREATE, OPEN_ANDX works
+# [x] Fix forceWriteAndx, which needs to send a RecvRequest, because recv() will not send it
+# [x] Fix Recv() when using RecvAndx and the answer comes splet in several packets
+# [ ] Try [SMB]transport fragmentation with overlaping segments
+# [ ] Try [SMB]transport fragmentation with out of order segments
+# [x] Do chained AndX requests
+# [ ] Transform the rest of the calls to structure
+# [X] Implement TRANS/TRANS2 reassembly for list_path
+
+import os
+import socket
+import string
+from binascii import a2b_hex
+import datetime
+from struct import pack, unpack
+from contextlib import contextmanager
+
+from impacket import nmb, ntlm, nt_errors, LOG
+from impacket.structure import Structure
+from impacket.spnego import SPNEGO_NegTokenInit, TypesMech, SPNEGO_NegTokenResp
+
+# For signing
+import hashlib
+
+unicode_support = 0
+unicode_convert = 1
+
+try:
+ from cStringIO import StringIO
+except ImportError:
+ from StringIO import StringIO
+
+# Dialect for SMB1
+SMB_DIALECT = 'NT LM 0.12'
+
+# Shared Device Type
+SHARED_DISK = 0x00
+SHARED_DISK_HIDDEN = 0x80000000
+SHARED_PRINT_QUEUE = 0x01
+SHARED_DEVICE = 0x02
+SHARED_IPC = 0x03
+
+# Extended attributes mask
+ATTR_ARCHIVE = 0x020
+ATTR_COMPRESSED = 0x800
+ATTR_NORMAL = 0x080
+ATTR_HIDDEN = 0x002
+ATTR_READONLY = 0x001
+ATTR_TEMPORARY = 0x100
+ATTR_DIRECTORY = 0x010
+ATTR_SYSTEM = 0x004
+
+# Service Type
+SERVICE_DISK = 'A:'
+SERVICE_PRINTER = 'LPT1:'
+SERVICE_IPC = 'IPC'
+SERVICE_COMM = 'COMM'
+SERVICE_ANY = '?????'
+
+# Server Type (Can be used to mask with SMBMachine.get_type() or SMBDomain.get_type())
+SV_TYPE_WORKSTATION = 0x00000001
+SV_TYPE_SERVER = 0x00000002
+SV_TYPE_SQLSERVER = 0x00000004
+SV_TYPE_DOMAIN_CTRL = 0x00000008
+SV_TYPE_DOMAIN_BAKCTRL = 0x00000010
+SV_TYPE_TIME_SOURCE = 0x00000020
+SV_TYPE_AFP = 0x00000040
+SV_TYPE_NOVELL = 0x00000080
+SV_TYPE_DOMAIN_MEMBER = 0x00000100
+SV_TYPE_PRINTQ_SERVER = 0x00000200
+SV_TYPE_DIALIN_SERVER = 0x00000400
+SV_TYPE_XENIX_SERVER = 0x00000800
+SV_TYPE_NT = 0x00001000
+SV_TYPE_WFW = 0x00002000
+SV_TYPE_SERVER_NT = 0x00004000
+SV_TYPE_POTENTIAL_BROWSER = 0x00010000
+SV_TYPE_BACKUP_BROWSER = 0x00020000
+SV_TYPE_MASTER_BROWSER = 0x00040000
+SV_TYPE_DOMAIN_MASTER = 0x00080000
+SV_TYPE_LOCAL_LIST_ONLY = 0x40000000
+SV_TYPE_DOMAIN_ENUM = 0x80000000
+
+# Options values for SMB.stor_file and SMB.retr_file
+SMB_O_CREAT = 0x10 # Create the file if file does not exists. Otherwise, operation fails.
+SMB_O_EXCL = 0x00 # When used with SMB_O_CREAT, operation fails if file exists. Cannot be used with SMB_O_OPEN.
+SMB_O_OPEN = 0x01 # Open the file if the file exists
+SMB_O_TRUNC = 0x02 # Truncate the file if the file exists
+
+# Share Access Mode
+SMB_SHARE_COMPAT = 0x00
+SMB_SHARE_DENY_EXCL = 0x10
+SMB_SHARE_DENY_WRITE = 0x20
+SMB_SHARE_DENY_READEXEC = 0x30
+SMB_SHARE_DENY_NONE = 0x40
+SMB_ACCESS_READ = 0x00
+SMB_ACCESS_WRITE = 0x01
+SMB_ACCESS_READWRITE = 0x02
+SMB_ACCESS_EXEC = 0x03
+
+TRANS_DISCONNECT_TID = 1
+TRANS_NO_RESPONSE = 2
+
+STATUS_SUCCESS = 0x00000000
+STATUS_LOGON_FAILURE = 0xC000006D
+STATUS_LOGON_TYPE_NOT_GRANTED = 0xC000015B
+MAX_TFRAG_SIZE = 5840
+EVASION_NONE = 0
+EVASION_LOW = 1
+EVASION_HIGH = 2
+EVASION_MAX = 3
+RPC_X_BAD_STUB_DATA = 0x6F7
+
+# SMB_FILE_ATTRIBUTES
+
+SMB_FILE_ATTRIBUTE_NORMAL = 0x0000
+SMB_FILE_ATTRIBUTE_READONLY = 0x0001
+SMB_FILE_ATTRIBUTE_HIDDEN = 0x0002
+SMB_FILE_ATTRIBUTE_SYSTEM = 0x0004
+SMB_FILE_ATTRIBUTE_VOLUME = 0x0008
+SMB_FILE_ATTRIBUTE_DIRECTORY = 0x0010
+SMB_FILE_ATTRIBUTE_ARCHIVE = 0x0020
+SMB_SEARCH_ATTRIBUTE_READONLY = 0x0100
+SMB_SEARCH_ATTRIBUTE_HIDDEN = 0x0200
+SMB_SEARCH_ATTRIBUTE_SYSTEM = 0x0400
+SMB_SEARCH_ATTRIBUTE_DIRECTORY = 0x1000
+SMB_SEARCH_ATTRIBUTE_ARCHIVE = 0x2000
+
+# Session SetupAndX Action flags
+SMB_SETUP_GUEST = 0x01
+SMB_SETUP_USE_LANMAN_KEY = 0x02
+
+# QUERY_INFORMATION levels
+SMB_INFO_ALLOCATION = 0x0001
+SMB_INFO_VOLUME = 0x0002
+FILE_FS_SIZE_INFORMATION = 0x0003
+SMB_QUERY_FS_VOLUME_INFO = 0x0102
+SMB_QUERY_FS_SIZE_INFO = 0x0103
+SMB_QUERY_FILE_EA_INFO = 0x0103
+SMB_QUERY_FS_DEVICE_INFO = 0x0104
+SMB_QUERY_FS_ATTRIBUTE_INFO = 0x0105
+SMB_QUERY_FILE_BASIC_INFO = 0x0101
+SMB_QUERY_FILE_STANDARD_INFO = 0x0102
+SMB_QUERY_FILE_ALL_INFO = 0x0107
+FILE_FS_FULL_SIZE_INFORMATION = 0x03EF
+
+# SET_INFORMATION levels
+SMB_SET_FILE_DISPOSITION_INFO = 0x0102
+SMB_SET_FILE_BASIC_INFO = 0x0101
+SMB_SET_FILE_END_OF_FILE_INFO = 0x0104
+
+
+# File System Attributes
+FILE_CASE_SENSITIVE_SEARCH = 0x00000001
+FILE_CASE_PRESERVED_NAMES = 0x00000002
+FILE_UNICODE_ON_DISK = 0x00000004
+FILE_PERSISTENT_ACLS = 0x00000008
+FILE_FILE_COMPRESSION = 0x00000010
+FILE_VOLUME_IS_COMPRESSED = 0x00008000
+
+# FIND_FIRST2 flags and levels
+SMB_FIND_CLOSE_AFTER_REQUEST = 0x0001
+SMB_FIND_CLOSE_AT_EOS = 0x0002
+SMB_FIND_RETURN_RESUME_KEYS = 0x0004
+SMB_FIND_CONTINUE_FROM_LAST = 0x0008
+SMB_FIND_WITH_BACKUP_INTENT = 0x0010
+
+FILE_DIRECTORY_FILE = 0x00000001
+FILE_DELETE_ON_CLOSE = 0x00001000
+FILE_NON_DIRECTORY_FILE = 0x00000040
+
+SMB_FIND_INFO_STANDARD = 0x0001
+SMB_FIND_FILE_DIRECTORY_INFO = 0x0101
+SMB_FIND_FILE_FULL_DIRECTORY_INFO= 0x0102
+SMB_FIND_FILE_NAMES_INFO = 0x0103
+SMB_FIND_FILE_BOTH_DIRECTORY_INFO= 0x0104
+SMB_FIND_FILE_ID_FULL_DIRECTORY_INFO = 0x105
+SMB_FIND_FILE_ID_BOTH_DIRECTORY_INFO = 0x106
+
+
+# DesiredAccess flags
+FILE_READ_DATA = 0x00000001
+FILE_WRITE_DATA = 0x00000002
+FILE_APPEND_DATA = 0x00000004
+FILE_EXECUTE = 0x00000020
+MAXIMUM_ALLOWED = 0x02000000
+GENERIC_ALL = 0x10000000
+GENERIC_EXECUTE = 0x20000000
+GENERIC_WRITE = 0x40000000
+GENERIC_READ = 0x80000000
+
+# ShareAccess flags
+FILE_SHARE_NONE = 0x00000000
+FILE_SHARE_READ = 0x00000001
+FILE_SHARE_WRITE = 0x00000002
+FILE_SHARE_DELETE = 0x00000004
+
+# CreateDisposition flags
+FILE_SUPERSEDE = 0x00000000
+FILE_OPEN = 0x00000001
+FILE_CREATE = 0x00000002
+FILE_OPEN_IF = 0x00000003
+FILE_OVERWRITE = 0x00000004
+FILE_OVERWRITE_IF = 0x00000005
+
+def strerror(errclass, errcode):
+ if errclass == 0x01:
+ return 'OS error', ERRDOS.get(errcode, 'Unknown error')
+ elif errclass == 0x02:
+ return 'Server error', ERRSRV.get(errcode, 'Unknown error')
+ elif errclass == 0x03:
+ return 'Hardware error', ERRHRD.get(errcode, 'Unknown error')
+ # This is not a standard error class for SMB
+ #elif errclass == 0x80:
+ # return 'Browse error', ERRBROWSE.get(errcode, 'Unknown error')
+ elif errclass == 0xff:
+ return 'Bad command', 'Bad command. Please file bug report'
+ else:
+ return 'Unknown error', 'Unknown error'
+
+# Raised when an error has occured during a session
+class SessionError(Exception):
+ # SMB X/Open error codes for the ERRDOS error class
+ ERRsuccess = 0
+ ERRbadfunc = 1
+ ERRbadfile = 2
+ ERRbadpath = 3
+ ERRnofids = 4
+ ERRnoaccess = 5
+ ERRbadfid = 6
+ ERRbadmcb = 7
+ ERRnomem = 8
+ ERRbadmem = 9
+ ERRbadenv = 10
+ ERRbadaccess = 12
+ ERRbaddata = 13
+ ERRres = 14
+ ERRbaddrive = 15
+ ERRremcd = 16
+ ERRdiffdevice = 17
+ ERRnofiles = 18
+ ERRgeneral = 31
+ ERRbadshare = 32
+ ERRlock = 33
+ ERRunsup = 50
+ ERRnetnamedel = 64
+ ERRnosuchshare = 67
+ ERRfilexists = 80
+ ERRinvalidparam = 87
+ ERRcannotopen = 110
+ ERRinsufficientbuffer = 122
+ ERRinvalidname = 123
+ ERRunknownlevel = 124
+ ERRnotlocked = 158
+ ERRrename = 183
+ ERRbadpipe = 230
+ ERRpipebusy = 231
+ ERRpipeclosing = 232
+ ERRnotconnected = 233
+ ERRmoredata = 234
+ ERRnomoreitems = 259
+ ERRbaddirectory = 267
+ ERReasnotsupported = 282
+ ERRlogonfailure = 1326
+ ERRbuftoosmall = 2123
+ ERRunknownipc = 2142
+ ERRnosuchprintjob = 2151
+ ERRinvgroup = 2455
+
+ # here's a special one from observing NT
+ ERRnoipc = 66
+
+ # These errors seem to be only returned by the NT printer driver system
+ ERRdriveralreadyinstalled = 1795
+ ERRunknownprinterport = 1796
+ ERRunknownprinterdriver = 1797
+ ERRunknownprintprocessor = 1798
+ ERRinvalidseparatorfile = 1799
+ ERRinvalidjobpriority = 1800
+ ERRinvalidprintername = 1801
+ ERRprinteralreadyexists = 1802
+ ERRinvalidprintercommand = 1803
+ ERRinvaliddatatype = 1804
+ ERRinvalidenvironment = 1805
+
+ ERRunknownprintmonitor = 3000
+ ERRprinterdriverinuse = 3001
+ ERRspoolfilenotfound = 3002
+ ERRnostartdoc = 3003
+ ERRnoaddjob = 3004
+ ERRprintprocessoralreadyinstalled = 3005
+ ERRprintmonitoralreadyinstalled = 3006
+ ERRinvalidprintmonitor = 3007
+ ERRprintmonitorinuse = 3008
+ ERRprinterhasjobsqueued = 3009
+
+ # Error codes for the ERRSRV class
+
+ ERRerror = 1
+ ERRbadpw = 2
+ ERRbadtype = 3
+ ERRaccess = 4
+ ERRinvnid = 5
+ ERRinvnetname = 6
+ ERRinvdevice = 7
+ ERRqfull = 49
+ ERRqtoobig = 50
+ ERRinvpfid = 52
+ ERRsmbcmd = 64
+ ERRsrverror = 65
+ ERRfilespecs = 67
+ ERRbadlink = 68
+ ERRbadpermits = 69
+ ERRbadpid = 70
+ ERRsetattrmode = 71
+ ERRpaused = 81
+ ERRmsgoff = 82
+ ERRnoroom = 83
+ ERRrmuns = 87
+ ERRtimeout = 88
+ ERRnoresource = 89
+ ERRtoomanyuids = 90
+ ERRbaduid = 91
+ ERRuseMPX = 250
+ ERRuseSTD = 251
+ ERRcontMPX = 252
+ ERRbadPW = None
+ ERRnosupport = 0
+ ERRunknownsmb = 22
+
+ # Error codes for the ERRHRD class
+
+ ERRnowrite = 19
+ ERRbadunit = 20
+ ERRnotready = 21
+ ERRbadcmd = 22
+ ERRdata = 23
+ ERRbadreq = 24
+ ERRseek = 25
+ ERRbadmedia = 26
+ ERRbadsector = 27
+ ERRnopaper = 28
+ ERRwrite = 29
+ ERRread = 30
+ ERRwrongdisk = 34
+ ERRFCBunavail = 35
+ ERRsharebufexc = 36
+ ERRdiskfull = 39
+
+
+ hard_msgs = {
+ 19: ("ERRnowrite", "Attempt to write on write-protected diskette."),
+ 20: ("ERRbadunit", "Unknown unit."),
+ 21: ("ERRnotready", "Drive not ready."),
+ 22: ("ERRbadcmd", "Unknown command."),
+ 23: ("ERRdata", "Data error (CRC)."),
+ 24: ("ERRbadreq", "Bad request structure length."),
+ 25: ("ERRseek", "Seek error."),
+ 26: ("ERRbadmedia", "Unknown media type."),
+ 27: ("ERRbadsector", "Sector not found."),
+ 28: ("ERRnopaper", "Printer out of paper."),
+ 29: ("ERRwrite", "Write fault."),
+ 30: ("ERRread", "Read fault."),
+ 31: ("ERRgeneral", "General failure."),
+ 32: ("ERRbadshare", "An open conflicts with an existing open."),
+ 33: ("ERRlock", "A Lock request conflicted with an existing lock or specified an invalid mode, or an Unlock requested attempted to remove a lock held by another process."),
+ 34: ("ERRwrongdisk", "The wrong disk was found in a drive."),
+ 35: ("ERRFCBUnavail", "No FCBs are available to process request."),
+ 36: ("ERRsharebufexc", "A sharing buffer has been exceeded.")
+ }
+
+ dos_msgs = {
+ ERRbadfunc: ("ERRbadfunc", "Invalid function."),
+ ERRbadfile: ("ERRbadfile", "File not found."),
+ ERRbadpath: ("ERRbadpath", "Directory invalid."),
+ ERRnofids: ("ERRnofids", "No file descriptors available"),
+ ERRnoaccess: ("ERRnoaccess", "Access denied."),
+ ERRbadfid: ("ERRbadfid", "Invalid file handle."),
+ ERRbadmcb: ("ERRbadmcb", "Memory control blocks destroyed."),
+ ERRnomem: ("ERRnomem", "Insufficient server memory to perform the requested function."),
+ ERRbadmem: ("ERRbadmem", "Invalid memory block address."),
+ ERRbadenv: ("ERRbadenv", "Invalid environment."),
+ 11: ("ERRbadformat", "Invalid format."),
+ ERRbadaccess: ("ERRbadaccess", "Invalid open mode."),
+ ERRbaddata: ("ERRbaddata", "Invalid data."),
+ ERRres: ("ERRres", "reserved."),
+ ERRbaddrive: ("ERRbaddrive", "Invalid drive specified."),
+ ERRremcd: ("ERRremcd", "A Delete Directory request attempted to remove the server's current directory."),
+ ERRdiffdevice: ("ERRdiffdevice", "Not same device."),
+ ERRnofiles: ("ERRnofiles", "A File Search command can find no more files matching the specified criteria."),
+ ERRbadshare: ("ERRbadshare", "The sharing mode specified for an Open conflicts with existing FIDs on the file."),
+ ERRlock: ("ERRlock", "A Lock request conflicted with an existing lock or specified an invalid mode, or an Unlock requested attempted to remove a lock held by another process."),
+ ERRunsup: ("ERRunsup", "The operation is unsupported"),
+ ERRnosuchshare: ("ERRnosuchshare", "You specified an invalid share name"),
+ ERRfilexists: ("ERRfilexists", "The file named in a Create Directory, Make New File or Link request already exists."),
+ ERRinvalidname: ("ERRinvalidname", "Invalid name"),
+ ERRbadpipe: ("ERRbadpipe", "Pipe invalid."),
+ ERRpipebusy: ("ERRpipebusy", "All instances of the requested pipe are busy."),
+ ERRpipeclosing: ("ERRpipeclosing", "Pipe close in progress."),
+ ERRnotconnected: ("ERRnotconnected", "No process on other end of pipe."),
+ ERRmoredata: ("ERRmoredata", "There is more data to be returned."),
+ ERRinvgroup: ("ERRinvgroup", "Invalid workgroup (try the -W option)"),
+ ERRlogonfailure: ("ERRlogonfailure", "Logon failure"),
+ ERRdiskfull: ("ERRdiskfull", "Disk full"),
+ ERRgeneral: ("ERRgeneral", "General failure"),
+ ERRunknownlevel: ("ERRunknownlevel", "Unknown info level")
+ }
+
+ server_msgs = {
+ 1: ("ERRerror", "Non-specific error code."),
+ 2: ("ERRbadpw", "Bad password - name/password pair in a Tree Connect or Session Setup are invalid."),
+ 3: ("ERRbadtype", "reserved."),
+ 4: ("ERRaccess", "The requester does not have the necessary access rights within the specified context for the requested function. The context is defined by the TID or the UID."),
+ 5: ("ERRinvnid", "The tree ID (TID) specified in a command was invalid."),
+ 6: ("ERRinvnetname", "Invalid network name in tree connect."),
+ 7: ("ERRinvdevice", "Invalid device - printer request made to non-printer connection or non-printer request made to printer connection."),
+ 49: ("ERRqfull", "Print queue full (files) -- returned by open print file."),
+ 50: ("ERRqtoobig", "Print queue full -- no space."),
+ 51: ("ERRqeof", "EOF on print queue dump."),
+ 52: ("ERRinvpfid", "Invalid print file FID."),
+ 64: ("ERRsmbcmd", "The server did not recognize the command received."),
+ 65: ("ERRsrverror","The server encountered an internal error, e.g., system file unavailable."),
+ 67: ("ERRfilespecs", "The file handle (FID) and pathname parameters contained an invalid combination of values."),
+ 68: ("ERRreserved", "reserved."),
+ 69: ("ERRbadpermits", "The access permissions specified for a file or directory are not a valid combination. The server cannot set the requested attribute."),
+ 70: ("ERRreserved", "reserved."),
+ 71: ("ERRsetattrmode", "The attribute mode in the Set File Attribute request is invalid."),
+ 81: ("ERRpaused", "Server is paused."),
+ 82: ("ERRmsgoff", "Not receiving messages."),
+ 83: ("ERRnoroom", "No room to buffer message."),
+ 87: ("ERRrmuns", "Too many remote user names."),
+ 88: ("ERRtimeout", "Operation timed out."),
+ 89: ("ERRnoresource", "No resources currently available for request."),
+ 90: ("ERRtoomanyuids", "Too many UIDs active on this session."),
+ 91: ("ERRbaduid", "The UID is not known as a valid ID on this session."),
+ 250: ("ERRusempx","Temp unable to support Raw, use MPX mode."),
+ 251: ("ERRusestd","Temp unable to support Raw, use standard read/write."),
+ 252: ("ERRcontmpx", "Continue in MPX mode."),
+ 253: ("ERRreserved", "reserved."),
+ 254: ("ERRreserved", "reserved."),
+ 0xFFFF: ("ERRnosupport", "Function not supported.")
+ }
+ # Error clases
+
+ ERRDOS = 0x1
+ error_classes = { 0: ("SUCCESS", {}),
+ ERRDOS: ("ERRDOS", dos_msgs),
+ 0x02: ("ERRSRV",server_msgs),
+ 0x03: ("ERRHRD",hard_msgs),
+ 0x04: ("ERRXOS", {} ),
+ 0xE1: ("ERRRMX1", {} ),
+ 0xE2: ("ERRRMX2", {} ),
+ 0xE3: ("ERRRMX3", {} ),
+ 0xFF: ("ERRCMD", {} ) }
+
+
+
+ def __init__( self, error_string, error_class, error_code, nt_status = 0):
+ Exception.__init__(self, error_string)
+ self.nt_status = nt_status
+ self._args = error_string
+ if nt_status:
+ self.error_class = 0
+ self.error_code = (error_code << 16) + error_class
+ else:
+ self.error_class = error_class
+ self.error_code = error_code
+
+
+ def get_error_class( self ):
+ return self.error_class
+
+ def get_error_code( self ):
+ return self.error_code
+
+ def __str__( self ):
+ error_class = SessionError.error_classes.get( self.error_class, None )
+ if not error_class:
+ error_code_str = self.error_code
+ error_class_str = self.error_class
+ else:
+ error_class_str = error_class[0]
+ error_code = error_class[1].get( self.error_code, None )
+ if not error_code:
+ error_code_str = self.error_code
+ else:
+ error_code_str = '%s(%s)' % error_code
+
+ if self.nt_status:
+ return 'SMB SessionError: %s(%s)' % nt_errors.ERROR_MESSAGES[self.error_code]
+ else:
+ # Fall back to the old format
+ return 'SMB SessionError: class: %s, code: %s' % (error_class_str, error_code_str)
+
+
+# Raised when an supported feature is present/required in the protocol but is not
+# currently supported by pysmb
+class UnsupportedFeature(Exception): pass
+
+# Contains information about a SMB shared device/service
+class SharedDevice:
+ def __init__(self, name, share_type, comment):
+ self.__name = name
+ self.__type = share_type
+ self.__comment = comment
+
+ def get_name(self):
+ return self.__name
+
+ def get_type(self):
+ return self.__type
+
+ def get_comment(self):
+ return self.__comment
+
+ def __repr__(self):
+ return '<SharedDevice instance: name=' + self.__name + ', type=' + str(self.__type) + ', comment="' + self.__comment + '">'
+
+
+# Contains information about the shared file/directory
+class SharedFile:
+ def __init__(self, ctime, atime, mtime, filesize, allocsize, attribs, shortname, longname):
+ self.__ctime = ctime
+ self.__atime = atime
+ self.__mtime = mtime
+ self.__filesize = filesize
+ self.__allocsize = allocsize
+ self.__attribs = attribs
+ try:
+ self.__shortname = shortname[:string.index(shortname, '\0')]
+ except ValueError:
+ self.__shortname = shortname
+ try:
+ self.__longname = longname[:string.index(longname, '\0')]
+ except ValueError:
+ self.__longname = longname
+
+ def get_ctime(self):
+ return self.__ctime
+
+ def get_ctime_epoch(self):
+ return self.__convert_smbtime(self.__ctime)
+
+ def get_mtime(self):
+ return self.__mtime
+
+ def get_mtime_epoch(self):
+ return self.__convert_smbtime(self.__mtime)
+
+ def get_atime(self):
+ return self.__atime
+
+ def get_atime_epoch(self):
+ return self.__convert_smbtime(self.__atime)
+
+ def get_filesize(self):
+ return self.__filesize
+
+ def get_allocsize(self):
+ return self.__allocsize
+
+ def get_attributes(self):
+ return self.__attribs
+
+ def is_archive(self):
+ return self.__attribs & ATTR_ARCHIVE
+
+ def is_compressed(self):
+ return self.__attribs & ATTR_COMPRESSED
+
+ def is_normal(self):
+ return self.__attribs & ATTR_NORMAL
+
+ def is_hidden(self):
+ return self.__attribs & ATTR_HIDDEN
+
+ def is_readonly(self):
+ return self.__attribs & ATTR_READONLY
+
+ def is_temporary(self):
+ return self.__attribs & ATTR_TEMPORARY
+
+ def is_directory(self):
+ return self.__attribs & ATTR_DIRECTORY
+
+ def is_system(self):
+ return self.__attribs & ATTR_SYSTEM
+
+ def get_shortname(self):
+ return self.__shortname
+
+ def get_longname(self):
+ return self.__longname
+
+ def __repr__(self):
+ return '<SharedFile instance: shortname="' + self.__shortname + '", longname="' + self.__longname + '", filesize=' + str(self.__filesize) + '>'
+
+ @staticmethod
+ def __convert_smbtime(t):
+ x = t >> 32
+ y = t & 0xffffffffL
+ geo_cal_offset = 11644473600.0 # = 369.0 * 365.25 * 24 * 60 * 60 - (3.0 * 24 * 60 * 60 + 6.0 * 60 * 60)
+ return (x * 4.0 * (1 << 30) + (y & 0xfff00000L)) * 1.0e-7 - geo_cal_offset
+
+
+# Contain information about a SMB machine
+class SMBMachine:
+ def __init__(self, nbname, nbt_type, comment):
+ self.__nbname = nbname
+ self.__type = nbt_type
+ self.__comment = comment
+
+ def __repr__(self):
+ return '<SMBMachine instance: nbname="' + self.__nbname + '", type=' + hex(self.__type) + ', comment="' + self.__comment + '">'
+
+class SMBDomain:
+ def __init__(self, nbgroup, domain_type, master_browser):
+ self.__nbgroup = nbgroup
+ self.__type = domain_type
+ self.__master_browser = master_browser
+
+ def __repr__(self):
+ return '<SMBDomain instance: nbgroup="' + self.__nbgroup + '", type=' + hex(self.__type) + ', master browser="' + self.__master_browser + '">'
+
+# Represents a SMB Packet
+class NewSMBPacket(Structure):
+ structure = (
+ ('Signature', '"\xffSMB'),
+ ('Command','B=0'),
+ ('ErrorClass','B=0'),
+ ('_reserved','B=0'),
+ ('ErrorCode','<H=0'),
+ ('Flags1','B=0'),
+ ('Flags2','<H=0'),
+ ('PIDHigh','<H=0'),
+ ('SecurityFeatures','8s=""'),
+ ('Reserved','<H=0'),
+ ('Tid','<H=0xffff'),
+ ('Pid','<H=0'),
+ ('Uid','<H=0'),
+ ('Mid','<H=0'),
+ ('Data','*:'),
+ )
+
+ def __init__(self, **kargs):
+ Structure.__init__(self, **kargs)
+
+ if self.fields.has_key('Flags2') is False:
+ self['Flags2'] = 0
+ if self.fields.has_key('Flags1') is False:
+ self['Flags1'] = 0
+
+ if not kargs.has_key('data'):
+ self['Data'] = []
+
+ def addCommand(self, command):
+ if len(self['Data']) == 0:
+ self['Command'] = command.command
+ else:
+ self['Data'][-1]['Parameters']['AndXCommand'] = command.command
+ self['Data'][-1]['Parameters']['AndXOffset'] = len(self)
+ self['Data'].append(command)
+
+ def isMoreData(self):
+ return (self['Command'] in [SMB.SMB_COM_TRANSACTION, SMB.SMB_COM_READ_ANDX, SMB.SMB_COM_READ_RAW] and
+ self['ErrorClass'] == 1 and self['ErrorCode'] == SessionError.ERRmoredata)
+
+ def isMoreProcessingRequired(self):
+ return self['ErrorClass'] == 0x16 and self['ErrorCode'] == 0xc000
+
+ def isValidAnswer(self, cmd):
+ # this was inside a loop reading more from the net (with recv_packet(None))
+ if self['Command'] == cmd:
+ if (self['ErrorClass'] == 0x00 and
+ self['ErrorCode'] == 0x00):
+ return 1
+ elif self.isMoreData():
+ return 1
+ elif self.isMoreProcessingRequired():
+ return 1
+ raise SessionError, ("SMB Library Error", self['ErrorClass'] + (self['_reserved'] << 8), self['ErrorCode'], self['Flags2'] & SMB.FLAGS2_NT_STATUS)
+ else:
+ raise UnsupportedFeature, ("Unexpected answer from server: Got %d, Expected %d" % (self['Command'], cmd))
+
+
+class SMBCommand(Structure):
+ structure = (
+ ('WordCount', 'B=len(Parameters)/2'),
+ ('_ParametersLength','_-Parameters','WordCount*2'),
+ ('Parameters',':'), # default set by constructor
+ ('ByteCount','<H-Data'),
+ ('Data',':'), # default set by constructor
+ )
+
+ def __init__(self, commandOrData = None, data = None, **kargs):
+ if type(commandOrData) == type(0):
+ self.command = commandOrData
+ else:
+ data = data or commandOrData
+
+ Structure.__init__(self, data = data, **kargs)
+
+ if data is None:
+ self['Parameters'] = ''
+ self['Data'] = ''
+
+class AsciiOrUnicodeStructure(Structure):
+ UnicodeStructure = ()
+ AsciiStructure = ()
+ def __init__(self, flags = 0, **kargs):
+ if flags & SMB.FLAGS2_UNICODE:
+ self.structure = self.UnicodeStructure
+ else:
+ self.structure = self.AsciiStructure
+ Structure.__init__(self, **kargs)
+
+class SMBCommand_Parameters(Structure):
+ pass
+
+class SMBAndXCommand_Parameters(Structure):
+ commonHdr = (
+ ('AndXCommand','B=0xff'),
+ ('_reserved','B=0'),
+ ('AndXOffset','<H=0'),
+ )
+ structure = ( # default structure, overriden by subclasses
+ ('Data',':=""'),
+ )
+
+############# TRANSACTIONS RELATED
+# TRANS2_QUERY_FS_INFORMATION
+# QUERY_FS Information Levels
+# SMB_QUERY_FS_ATTRIBUTE_INFO
+class SMBQueryFsAttributeInfo(Structure):
+ structure = (
+ ('FileSystemAttributes','<L'),
+ ('MaxFilenNameLengthInBytes','<L'),
+ ('LengthOfFileSystemName','<L-FileSystemName'),
+ ('FileSystemName',':'),
+ )
+
+class SMBQueryFsInfoVolume(AsciiOrUnicodeStructure):
+ commonHdr = (
+ ('ulVolSerialNbr','<L=0xABCDEFAA'),
+ ('cCharCount','<B-VolumeLabel'),
+ )
+ AsciiStructure = (
+ ('VolumeLabel','z'),
+ )
+ UnicodeStructure = (
+ ('VolumeLabel','u'),
+ )
+
+# FILE_FS_SIZE_INFORMATION
+class FileFsSizeInformation(Structure):
+ structure = (
+ ('TotalAllocationUnits','<q=148529400'),
+ ('AvailableAllocationUnits','<q=14851044'),
+ ('SectorsPerAllocationUnit','<L=2'),
+ ('BytesPerSector','<L=512'),
+ )
+
+# SMB_QUERY_FS_SIZE_INFO
+class SMBQueryFsSizeInfo(Structure):
+ structure = (
+ ('TotalAllocationUnits','<q=148529400'),
+ ('TotalFreeAllocationUnits','<q=14851044'),
+ ('SectorsPerAllocationUnit','<L=2'),
+ ('BytesPerSector','<L=512'),
+ )
+# FILE_FS_FULL_SIZE_INFORMATION
+class SMBFileFsFullSizeInformation(Structure):
+ structure = (
+ ('TotalAllocationUnits','<q=148529400'),
+ ('CallerAvailableAllocationUnits','<q=148529400'),
+ ('ActualAvailableAllocationUnits','<q=148529400'),
+ ('SectorsPerAllocationUnit','<L=15'),
+ ('BytesPerSector','<L=512')
+ )
+# SMB_QUERY_FS_VOLUME_INFO
+class SMBQueryFsVolumeInfo(Structure):
+ structure = (
+ ('VolumeCreationTime','<q'),
+ ('SerialNumber','<L=0xABCDEFAA'),
+ ('VolumeLabelSize','<L=len(VolumeLabel)'),
+ ('Reserved','<H=0x10'),
+ ('VolumeLabel',':')
+ )
+# SMB_FIND_FILE_BOTH_DIRECTORY_INFO level
+class SMBFindFileBothDirectoryInfo(AsciiOrUnicodeStructure):
+ commonHdr = (
+ ('NextEntryOffset','<L=0'),
+ ('FileIndex','<L=0'),
+ ('CreationTime','<q'),
+ ('LastAccessTime','<q'),
+ ('LastWriteTime','<q'),
+ ('LastChangeTime','<q'),
+ ('EndOfFile','<q=0'),
+ ('AllocationSize','<q=0'),
+ ('ExtFileAttributes','<L=0'),
+ )
+ AsciiStructure = (
+ ('FileNameLength','<L-FileName','len(FileName)'),
+ ('EaSize','<L=0'),
+ ('ShortNameLength','<B=0'),
+ ('Reserved','<B=0'),
+ ('ShortName','24s'),
+ ('FileName',':'),
+ )
+ UnicodeStructure = (
+ ('FileNameLength','<L-FileName','len(FileName)*2'),
+ ('EaSize','<L=0'),
+ ('ShortNameLength','<B=0'),
+ ('Reserved','<B=0'),
+ ('ShortName','24s'),
+ ('FileName',':'),
+ )
+
+# SMB_FIND_FILE_ID_FULL_DIRECTORY_INFO level
+class SMBFindFileIdFullDirectoryInfo(AsciiOrUnicodeStructure):
+ commonHdr = (
+ ('NextEntryOffset','<L=0'),
+ ('FileIndex','<L=0'),
+ ('CreationTime','<q'),
+ ('LastAccessTime','<q'),
+ ('LastWriteTime','<q'),
+ ('LastChangeTime','<q'),
+ ('EndOfFile','<q=0'),
+ ('AllocationSize','<q=0'),
+ ('ExtFileAttributes','<L=0'),
+ )
+ AsciiStructure = (
+ ('FileNameLength','<L-FileName','len(FileName)'),
+ ('EaSize','<L=0'),
+ ('FileID','<q=0'),
+ ('FileName',':'),
+ )
+ UnicodeStructure = (
+ ('FileNameLength','<L-FileName','len(FileName)*2'),
+ ('EaSize','<L=0'),
+ ('FileID','<q=0'),
+ ('FileName',':'),
+ )
+
+# SMB_FIND_FILE_ID_BOTH_DIRECTORY_INFO level
+class SMBFindFileIdBothDirectoryInfo(AsciiOrUnicodeStructure):
+ commonHdr = (
+ ('NextEntryOffset','<L=0'),
+ ('FileIndex','<L=0'),
+ ('CreationTime','<q'),
+ ('LastAccessTime','<q'),
+ ('LastWriteTime','<q'),
+ ('LastChangeTime','<q'),
+ ('EndOfFile','<q=0'),
+ ('AllocationSize','<q=0'),
+ ('ExtFileAttributes','<L=0'),
+ )
+ AsciiStructure = (
+ ('FileNameLength','<L-FileName','len(FileName)'),
+ ('EaSize','<L=0'),
+ ('ShortNameLength','<B=0'),
+ ('Reserved','<B=0'),
+ ('ShortName','24s'),
+ ('Reserved','<H=0'),
+ ('FileID','<q=0'),
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('FileNameLength','<L-FileName','len(FileName)*2'),
+ ('EaSize','<L=0'),
+ ('ShortNameLength','<B=0'),
+ ('Reserved','<B=0'),
+ ('ShortName','24s'),
+ ('Reserved','<H=0'),
+ ('FileID','<q=0'),
+ ('FileName',':'),
+ )
+
+# SMB_FIND_FILE_DIRECTORY_INFO level
+class SMBFindFileDirectoryInfo(AsciiOrUnicodeStructure):
+ commonHdr = (
+ ('NextEntryOffset','<L=0'),
+ ('FileIndex','<L=0'),
+ ('CreationTime','<q'),
+ ('LastAccessTime','<q'),
+ ('LastWriteTime','<q'),
+ ('LastChangeTime','<q'),
+ ('EndOfFile','<q=0'),
+ ('AllocationSize','<q=1'),
+ ('ExtFileAttributes','<L=0'),
+ )
+ AsciiStructure = (
+ ('FileNameLength','<L-FileName','len(FileName)'),
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('FileNameLength','<L-FileName','len(FileName)*2'),
+ ('FileName',':'),
+ )
+
+# SMB_FIND_FILE_NAMES_INFO level
+class SMBFindFileNamesInfo(AsciiOrUnicodeStructure):
+ commonHdr = (
+ ('NextEntryOffset','<L=0'),
+ ('FileIndex','<L=0'),
+ )
+ AsciiStructure = (
+ ('FileNameLength','<L-FileName','len(FileName)'),
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('FileNameLength','<L-FileName','len(FileName)*2'),
+ ('FileName',':'),
+ )
+
+# SMB_FIND_FILE_FULL_DIRECTORY_INFO level
+class SMBFindFileFullDirectoryInfo(AsciiOrUnicodeStructure):
+ commonHdr = (
+ ('NextEntryOffset','<L=0'),
+ ('FileIndex','<L=0'),
+ ('CreationTime','<q'),
+ ('LastAccessTime','<q'),
+ ('LastWriteTime','<q'),
+ ('LastChangeTime','<q'),
+ ('EndOfFile','<q=0'),
+ ('AllocationSize','<q=1'),
+ ('ExtFileAttributes','<L=0'),
+ )
+ AsciiStructure = (
+ ('FileNameLength','<L-FileName','len(FileName)'),
+ ('EaSize','<L'),
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('FileNameLength','<L-FileName','len(FileName)*2'),
+ ('EaSize','<L'),
+ ('FileName',':'),
+ )
+
+# SMB_FIND_INFO_STANDARD level
+class SMBFindInfoStandard(AsciiOrUnicodeStructure):
+ commonHdr = (
+ ('ResumeKey','<L=0xff'),
+ ('CreationDate','<H=0'),
+ ('CreationTime','<H=0'),
+ ('LastAccessDate','<H=0'),
+ ('LastAccessTime','<H=0'),
+ ('LastWriteDate','<H=0'),
+ ('LastWriteTime','<H=0'),
+ ('EaSize','<L'),
+ ('AllocationSize','<L=1'),
+ ('ExtFileAttributes','<H=0'),
+ )
+ AsciiStructure = (
+ ('FileNameLength','<B-FileName','len(FileName)'),
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('FileNameLength','<B-FileName','len(FileName)*2'),
+ ('FileName',':'),
+ )
+
+# SET_FILE_INFORMATION structures
+# SMB_SET_FILE_DISPOSITION_INFO
+class SMBSetFileDispositionInfo(Structure):
+ structure = (
+ ('DeletePending','<B'),
+ )
+
+# SMB_SET_FILE_BASIC_INFO
+class SMBSetFileBasicInfo(Structure):
+ structure = (
+ ('CreationTime','<q'),
+ ('LastAccessTime','<q'),
+ ('LastWriteTime','<q'),
+ ('ChangeTime','<q'),
+ ('ExtFileAttributes','<H'),
+ ('Reserved','<L'),
+ )
+
+# FILE_STREAM_INFORMATION
+class SMBFileStreamInformation(Structure):
+ commonHdr = (
+ ('NextEntryOffset','<L=0'),
+ ('StreamNameLength','<L=0'),
+ ('StreamSize','<q=0'),
+ ('StreamAllocationSize','<q=0'),
+ ('StreamName',':=""'),
+ )
+
+# FILE_NETWORK_OPEN_INFORMATION
+class SMBFileNetworkOpenInfo(Structure):
+ structure = (
+ ('CreationTime','<q=0'),
+ ('LastAccessTime','<q=0'),
+ ('LastWriteTime','<q=0'),
+ ('ChangeTime','<q=0'),
+ ('AllocationSize','<q=0'),
+ ('EndOfFile','<q=0'),
+ ('FileAttributes','<L=0'),
+ ('Reserved','<L=0'),
+ )
+
+# SMB_SET_FILE_END_OF_FILE_INFO
+class SMBSetFileEndOfFileInfo(Structure):
+ structure = (
+ ('EndOfFile','<q'),
+ )
+
+# TRANS2_FIND_NEXT2
+class SMBFindNext2_Parameters(AsciiOrUnicodeStructure):
+ commonHdr = (
+ ('SID','<H'),
+ ('SearchCount','<H'),
+ ('InformationLevel','<H'),
+ ('ResumeKey','<L'),
+ ('Flags','<H'),
+ )
+ AsciiStructure = (
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('FileName','u'),
+ )
+
+class SMBFindNext2Response_Parameters(Structure):
+ structure = (
+ ('SearchCount','<H'),
+ ('EndOfSearch','<H=1'),
+ ('EaErrorOffset','<H=0'),
+ ('LastNameOffset','<H=0'),
+ )
+
+class SMBFindNext2_Data(Structure):
+ structure = (
+ ('GetExtendedAttributesListLength','_-GetExtendedAttributesList', 'self["GetExtendedAttributesListLength"]'),
+ ('GetExtendedAttributesList',':'),
+ )
+
+
+# TRANS2_FIND_FIRST2
+class SMBFindFirst2Response_Parameters(Structure):
+ structure = (
+ ('SID','<H'),
+ ('SearchCount','<H'),
+ ('EndOfSearch','<H=1'),
+ ('EaErrorOffset','<H=0'),
+ ('LastNameOffset','<H=0'),
+ )
+
+class SMBFindFirst2_Parameters(AsciiOrUnicodeStructure):
+ commonHdr = (
+ ('SearchAttributes','<H'),
+ ('SearchCount','<H'),
+ ('Flags','<H'),
+ ('InformationLevel','<H'),
+ ('SearchStorageType','<L'),
+ )
+ AsciiStructure = (
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('FileName','u'),
+ )
+
+class SMBFindFirst2_Data(Structure):
+ structure = (
+ ('GetExtendedAttributesListLength','_-GetExtendedAttributesList', 'self["GetExtendedAttributesListLength"]'),
+ ('GetExtendedAttributesList',':'),
+ )
+
+# TRANS2_SET_PATH_INFORMATION
+class SMBSetPathInformation_Parameters(AsciiOrUnicodeStructure):
+ commonHdr = (
+ ('InformationLevel','<H'),
+ ('Reserved','<L'),
+ )
+ AsciiStructure = (
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('FileName','u'),
+ )
+
+class SMBSetPathInformationResponse_Parameters(Structure):
+ structure = (
+ ('EaErrorOffset','<H=0'),
+ )
+
+# TRANS2_SET_FILE_INFORMATION
+class SMBSetFileInformation_Parameters(Structure):
+ structure = (
+ ('FID','<H'),
+ ('InformationLevel','<H'),
+ ('Reserved','<H'),
+ )
+
+class SMBSetFileInformationResponse_Parameters(Structure):
+ structure = (
+ ('EaErrorOffset','<H=0'),
+ )
+
+# TRANS2_QUERY_FILE_INFORMATION
+class SMBQueryFileInformation_Parameters(Structure):
+ structure = (
+ ('FID','<H'),
+ ('InformationLevel','<H'),
+ )
+
+class SMBQueryFileInformationResponse_Parameters(Structure):
+ structure = (
+ ('EaErrorOffset','<H=0'),
+ )
+
+class SMBQueryFileInformation_Data(Structure):
+ structure = (
+ ('GetExtendedAttributeList',':'),
+ )
+
+# TRANS2_QUERY_PATH_INFORMATION
+class SMBQueryPathInformationResponse_Parameters(Structure):
+ structure = (
+ ('EaErrorOffset','<H=0'),
+ )
+
+class SMBQueryPathInformation_Parameters(AsciiOrUnicodeStructure):
+ commonHdr = (
+ ('InformationLevel','<H'),
+ ('Reserved','<L=0'),
+ )
+ AsciiStructure = (
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('FileName','u'),
+ )
+
+class SMBQueryPathInformation_Data(Structure):
+ structure = (
+ ('GetExtendedAttributeList',':'),
+ )
+
+
+# SMB_QUERY_FILE_EA_INFO
+class SMBQueryFileEaInfo(Structure):
+ structure = (
+ ('EaSize','<L=0'),
+ )
+
+# SMB_QUERY_FILE_BASIC_INFO
+class SMBQueryFileBasicInfo(Structure):
+ structure = (
+ ('CreationTime','<q'),
+ ('LastAccessTime','<q'),
+ ('LastWriteTime','<q'),
+ ('LastChangeTime','<q'),
+ ('ExtFileAttributes','<L'),
+ #('Reserved','<L=0'),
+ )
+
+# SMB_QUERY_FILE_STANDARD_INFO
+class SMBQueryFileStandardInfo(Structure):
+ structure = (
+ ('AllocationSize','<q'),
+ ('EndOfFile','<q'),
+ ('NumberOfLinks','<L=0'),
+ ('DeletePending','<B=0'),
+ ('Directory','<B'),
+ )
+
+# SMB_QUERY_FILE_ALL_INFO
+class SMBQueryFileAllInfo(Structure):
+ structure = (
+ ('CreationTime','<q'),
+ ('LastAccessTime','<q'),
+ ('LastWriteTime','<q'),
+ ('LastChangeTime','<q'),
+ ('ExtFileAttributes','<L'),
+ ('Reserved','<L=0'),
+ ('AllocationSize','<q'),
+ ('EndOfFile','<q'),
+ ('NumberOfLinks','<L=0'),
+ ('DeletePending','<B=0'),
+ ('Directory','<B'),
+ ('Reserved','<H=0'),
+ ('EaSize','<L=0'),
+ ('FileNameLength','<L-FileName','len(FileName)'),
+ ('FileName',':'),
+ )
+
+# \PIPE\LANMAN NetShareEnum
+class SMBNetShareEnum(Structure):
+ structure = (
+ ('RAPOpcode','<H=0'),
+ ('ParamDesc','z'),
+ ('DataDesc','z'),
+ ('InfoLevel','<H'),
+ ('ReceiveBufferSize','<H'),
+ )
+
+class SMBNetShareEnumResponse(Structure):
+ structure = (
+ ('Status','<H=0'),
+ ('Convert','<H=0'),
+ ('EntriesReturned','<H'),
+ ('EntriesAvailable','<H'),
+ )
+
+class NetShareInfo1(Structure):
+ structure = (
+ ('NetworkName','13s'),
+ ('Pad','<B=0'),
+ ('Type','<H=0'),
+ ('RemarkOffsetLow','<H=0'),
+ ('RemarkOffsetHigh','<H=0'),
+ )
+
+# \PIPE\LANMAN NetServerGetInfo
+class SMBNetServerGetInfoResponse(Structure):
+ structure = (
+ ('Status','<H=0'),
+ ('Convert','<H=0'),
+ ('TotalBytesAvailable','<H'),
+ )
+
+class SMBNetServerInfo1(Structure):
+ # Level 1 Response
+ structure = (
+ ('ServerName','16s'),
+ ('MajorVersion','B=5'),
+ ('MinorVersion','B=0'),
+ ('ServerType','<L=3'),
+ ('ServerCommentLow','<H=0'),
+ ('ServerCommentHigh','<H=0'),
+ )
+
+# \PIPE\LANMAN NetShareGetInfo
+class SMBNetShareGetInfo(Structure):
+ structure = (
+ ('RAPOpcode','<H=0'),
+ ('ParamDesc','z'),
+ ('DataDesc','z'),
+ ('ShareName','z'),
+ ('InfoLevel','<H'),
+ ('ReceiveBufferSize','<H'),
+ )
+
+class SMBNetShareGetInfoResponse(Structure):
+ structure = (
+ ('Status','<H=0'),
+ ('Convert','<H=0'),
+ ('TotalBytesAvailable','<H'),
+ )
+
+############# Security Features
+class SecurityFeatures(Structure):
+ structure = (
+ ('Key','<L=0'),
+ ('CID','<H=0'),
+ ('SequenceNumber','<H=0'),
+ )
+
+############# SMB_COM_QUERY_INFORMATION2 (0x23)
+class SMBQueryInformation2_Parameters(Structure):
+ structure = (
+ ('Fid','<H'),
+ )
+
+class SMBQueryInformation2Response_Parameters(Structure):
+ structure = (
+ ('CreateDate','<H'),
+ ('CreationTime','<H'),
+ ('LastAccessDate','<H'),
+ ('LastAccessTime','<H'),
+ ('LastWriteDate','<H'),
+ ('LastWriteTime','<H'),
+ ('FileDataSize','<L'),
+ ('FileAllocationSize','<L'),
+ ('FileAttributes','<L'),
+ )
+
+
+
+############# SMB_COM_SESSION_SETUP_ANDX (0x73)
+class SMBSessionSetupAndX_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('MaxBuffer','<H'),
+ ('MaxMpxCount','<H'),
+ ('VCNumber','<H'),
+ ('SessionKey','<L'),
+ ('AnsiPwdLength','<H'),
+ ('UnicodePwdLength','<H'),
+ ('_reserved','<L=0'),
+ ('Capabilities','<L'),
+ )
+
+class SMBSessionSetupAndX_Extended_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('MaxBufferSize','<H'),
+ ('MaxMpxCount','<H'),
+ ('VcNumber','<H'),
+ ('SessionKey','<L'),
+ ('SecurityBlobLength','<H'),
+ ('Reserved','<L=0'),
+ ('Capabilities','<L'),
+ )
+
+class SMBSessionSetupAndX_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('AnsiPwdLength','_-AnsiPwd','self["AnsiPwdLength"]'),
+ ('UnicodePwdLength','_-UnicodePwd','self["UnicodePwdLength"]'),
+ ('AnsiPwd',':=""'),
+ ('UnicodePwd',':=""'),
+ ('Account','z=""'),
+ ('PrimaryDomain','z=""'),
+ ('NativeOS','z=""'),
+ ('NativeLanMan','z=""'),
+ )
+
+ UnicodeStructure = (
+ ('AnsiPwdLength','_-AnsiPwd','self["AnsiPwdLength"]'),
+ ('UnicodePwdLength','_-UnicodePwd','self["UnicodePwdLength"]'),
+ ('AnsiPwd',':=""'),
+ ('UnicodePwd',':=""'),
+ ('Account','u=""'),
+ ('PrimaryDomain','u=""'),
+ ('NativeOS','u=""'),
+ ('NativeLanMan','u=""'),
+ )
+
+class SMBSessionSetupAndX_Extended_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('SecurityBlobLength','_-SecurityBlob','self["SecurityBlobLength"]'),
+ ('SecurityBlob',':'),
+ ('NativeOS','z=""'),
+ ('NativeLanMan','z=""'),
+ )
+
+ UnicodeStructure = (
+ ('SecurityBlobLength','_-SecurityBlob','self["SecurityBlobLength"]'),
+ ('SecurityBlob',':'),
+ ('NativeOS','u=""'),
+ ('NativeLanMan','u=""'),
+ )
+
+class SMBSessionSetupAndXResponse_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('Action','<H'),
+ )
+
+class SMBSessionSetupAndX_Extended_Response_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('Action','<H=0'),
+ ('SecurityBlobLength','<H'),
+ )
+
+class SMBSessionSetupAndXResponse_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('NativeOS','z=""'),
+ ('NativeLanMan','z=""'),
+ ('PrimaryDomain','z=""'),
+ )
+
+ UnicodeStructure = (
+ ('NativeOS','u=""'),
+ ('NativeLanMan','u=""'),
+ ('PrimaryDomain','u=""'),
+ )
+
+class SMBSessionSetupAndX_Extended_Response_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('SecurityBlobLength','_-SecurityBlob','self["SecurityBlobLength"]'),
+ ('SecurityBlob',':'),
+ ('NativeOS','z=""'),
+ ('NativeLanMan','z=""'),
+ )
+
+ UnicodeStructure = (
+ ('SecurityBlobLength','_-SecurityBlob','self["SecurityBlobLength"]'),
+ ('SecurityBlob',':'),
+ ('NativeOS','u=""'),
+ ('NativeLanMan','u=""'),
+ )
+
+############# SMB_COM_TREE_CONNECT (0x70)
+class SMBTreeConnect_Parameters(SMBCommand_Parameters):
+ structure = (
+ )
+
+class SMBTreeConnect_Data(SMBCommand_Parameters):
+ structure = (
+ ('PathFormat','"\x04'),
+ ('Path','z'),
+ ('PasswordFormat','"\x04'),
+ ('Password','z'),
+ ('ServiceFormat','"\x04'),
+ ('Service','z'),
+ )
+
+############# SMB_COM_TREE_CONNECT_ANDX (0x75)
+class SMBTreeConnectAndX_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('Flags','<H=0'),
+ ('PasswordLength','<H'),
+ )
+
+class SMBTreeConnectAndXResponse_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('OptionalSupport','<H=0'),
+ )
+
+class SMBTreeConnectAndXExtendedResponse_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('OptionalSupport','<H=1'),
+ ('MaximalShareAccessRights','<L=0x1fffff'),
+ ('GuestMaximalShareAccessRights','<L=0x1fffff'),
+ )
+
+class SMBTreeConnectAndX_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('_PasswordLength','_-Password','self["_PasswordLength"]'),
+ ('Password',':'),
+ ('Path','z'),
+ ('Service','z'),
+ )
+
+ UnicodeStructure = (
+ ('_PasswordLength','_-Password','self["_PasswordLength"] if self["_PasswordLength"] > 0 else 1'),
+ ('Password',':'),
+ ('Path','u'),
+ ('Service','z'),
+ )
+
+class SMBTreeConnectAndXResponse_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('Service','z'),
+ ('PadLen','_-Pad','self["PadLen"]'),
+ ('Pad',':=""'),
+ ('NativeFileSystem','z'),
+ )
+ UnicodeStructure = (
+ ('Service','z'),
+ ('PadLen','_-Pad','self["PadLen"]'),
+ ('Pad',':=""'),
+ ('NativeFileSystem','u'),
+ )
+
+############# SMB_COM_NT_CREATE_ANDX (0xA2)
+class SMBNtCreateAndX_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('_reserved', 'B=0'),
+ ('FileNameLength','<H'), # NameLength
+ ('CreateFlags','<L'), # Flags
+ ('RootFid','<L=0'), # RootDirectoryFID
+ ('AccessMask','<L'), # DesiredAccess
+ ('AllocationSizeLo','<L=0'), # AllocationSize
+ ('AllocationSizeHi','<L=0'),
+ ('FileAttributes','<L=0'), # ExtFileAttributes
+ ('ShareAccess','<L=3'), #
+ ('Disposition','<L=1'), # CreateDisposition
+ ('CreateOptions','<L'), # CreateOptions
+ ('Impersonation','<L=2'),
+ ('SecurityFlags','B=3'),
+ )
+
+class SMBNtCreateAndXResponse_Parameters(SMBAndXCommand_Parameters):
+ # XXX Is there a memory leak in the response for NTCreate (where the Data section would be) in Win 2000, Win XP, and Win 2003?
+ structure = (
+ ('OplockLevel', 'B=0'),
+ ('Fid','<H'),
+ ('CreateAction','<L'),
+ ('CreateTime','<q=0'),
+ ('LastAccessTime','<q=0'),
+ ('LastWriteTime','<q=0'),
+ ('LastChangeTime','<q=0'),
+ ('FileAttributes','<L=0x80'),
+ ('AllocationSize','<q=0'),
+ ('EndOfFile','<q=0'),
+ ('FileType','<H=0'),
+ ('IPCState','<H=0'),
+ ('IsDirectory','B'),
+ )
+
+class SMBNtCreateAndXExtendedResponse_Parameters(SMBAndXCommand_Parameters):
+ # [MS-SMB] Extended response description
+ structure = (
+ ('OplockLevel', 'B=0'),
+ ('Fid','<H'),
+ ('CreateAction','<L'),
+ ('CreateTime','<q=0'),
+ ('LastAccessTime','<q=0'),
+ ('LastWriteTime','<q=0'),
+ ('LastChangeTime','<q=0'),
+ ('FileAttributes','<L=0x80'),
+ ('AllocationSize','<q=0'),
+ ('EndOfFile','<q=0'),
+ ('FileType','<H=0'),
+ ('IPCState','<H=0'),
+ ('IsDirectory','B'),
+ ('VolumeGUID','16s'),
+ ('FileIdLow','<L=0'),
+ ('FileIdHigh','<L=0'),
+ ('MaximalAccessRights','<L=0x12019b'),
+ ('GuestMaximalAccessRights','<L=0x120089'),
+ )
+
+class SMBNtCreateAndX_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('Pad','B'),
+ ('FileName','u'),
+ )
+
+############# SMB_COM_OPEN_ANDX (0xD2)
+class SMBOpenAndX_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('Flags','<H=0'),
+ ('DesiredAccess','<H=0'),
+ ('SearchAttributes','<H=0'),
+ ('FileAttributes','<H=0'),
+ ('CreationTime','<L=0'),
+ ('OpenMode','<H=1'), # SMB_O_OPEN = 1
+ ('AllocationSize','<L=0'),
+ ('Reserved','8s=""'),
+ )
+
+class SMBOpenAndX_Data(SMBNtCreateAndX_Data):
+ pass
+
+class SMBOpenAndXResponse_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('Fid','<H=0'),
+ ('FileAttributes','<H=0'),
+ ('LastWriten','<L=0'),
+ ('FileSize','<L=0'),
+ ('GrantedAccess','<H=0'),
+ ('FileType','<H=0'),
+ ('IPCState','<H=0'),
+ ('Action','<H=0'),
+ ('ServerFid','<L=0'),
+ ('_reserved','<H=0'),
+ )
+
+############# SMB_COM_WRITE (0x0B)
+class SMBWrite_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('Fid','<H'),
+ ('Count','<H'),
+ ('Offset','<L'),
+ ('Remaining','<H'),
+ )
+
+class SMBWriteResponse_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('Count','<H'),
+ )
+
+class SMBWrite_Data(Structure):
+ structure = (
+ ('BufferFormat','<B=1'),
+ ('DataLength','<H-Data'),
+ ('Data',':'),
+ )
+
+
+############# SMB_COM_WRITE_ANDX (0x2F)
+class SMBWriteAndX_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('Fid','<H=0'),
+ ('Offset','<L=0'),
+ ('_reserved','<L=0xff'),
+ ('WriteMode','<H=8'),
+ ('Remaining','<H=0'),
+ ('DataLength_Hi','<H=0'),
+ ('DataLength','<H=0'),
+ ('DataOffset','<H=0'),
+ ('HighOffset','<L=0'),
+ )
+
+class SMBWriteAndX_Data_Short(Structure):
+ structure = (
+ ('_PadLen','_-Pad','self["DataOffset"] - 59'),
+ ('Pad',':'),
+ #('Pad','<B=0'),
+ ('DataLength','_-Data','self["DataLength"]'),
+ ('Data',':'),
+ )
+
+class SMBWriteAndX_Data(Structure):
+ structure = (
+ ('_PadLen','_-Pad','self["DataOffset"] - 63'),
+ ('Pad',':'),
+ #('Pad','<B=0'),
+ ('DataLength','_-Data','self["DataLength"]'),
+ ('Data',':'),
+ )
+
+
+class SMBWriteAndX_Parameters_Short(SMBAndXCommand_Parameters):
+ structure = (
+ ('Fid','<H'),
+ ('Offset','<L'),
+ ('_reserved','<L=0xff'),
+ ('WriteMode','<H=8'),
+ ('Remaining','<H'),
+ ('DataLength_Hi','<H=0'),
+ ('DataLength','<H'),
+ ('DataOffset','<H=0'),
+ )
+
+class SMBWriteAndXResponse_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('Count','<H'),
+ ('Available','<H'),
+ ('Reserved','<L=0'),
+ )
+
+############# SMB_COM_WRITE_RAW (0x1D)
+class SMBWriteRaw_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('Fid','<H'),
+ ('Count','<H'),
+ ('_reserved','<H=0'),
+ ('Offset','<L'),
+ ('Timeout','<L=0'),
+ ('WriteMode','<H=0'),
+ ('_reserved2','<L=0'),
+ ('DataLength','<H'),
+ ('DataOffset','<H=0'),
+ )
+
+############# SMB_COM_READ (0x0A)
+class SMBRead_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('Fid','<H'),
+ ('Count','<H'),
+ ('Offset','<L'),
+ ('Remaining','<H=Count'),
+ )
+
+class SMBReadResponse_Parameters(Structure):
+ structure = (
+ ('Count','<H=0'),
+ ('_reserved','8s=""'),
+ )
+
+class SMBReadResponse_Data(Structure):
+ structure = (
+ ('BufferFormat','<B=0x1'),
+ ('DataLength','<H-Data'),
+ ('Data',':'),
+ )
+
+############# SMB_COM_READ_RAW (0x1A)
+class SMBReadRaw_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('Fid','<H'),
+ ('Offset','<L'),
+ ('MaxCount','<H'),
+ ('MinCount','<H=MaxCount'),
+ ('Timeout','<L=0'),
+ ('_reserved','<H=0'),
+ )
+
+############# SMB_COM_NT_TRANSACT (0xA0)
+class SMBNTTransaction_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('MaxSetupCount','<B=0'),
+ ('Reserved1','<H=0'),
+ ('TotalParameterCount','<L'),
+ ('TotalDataCount','<L'),
+ ('MaxParameterCount','<L=1024'),
+ ('MaxDataCount','<L=65504'),
+ ('ParameterCount','<L'),
+ ('ParameterOffset','<L'),
+ ('DataCount','<L'),
+ ('DataOffset','<L'),
+ ('SetupCount','<B=len(Setup)/2'),
+ ('Function','<H=0'),
+ ('SetupLength','_-Setup','SetupCount*2'),
+ ('Setup',':'),
+ )
+
+class SMBNTTransactionResponse_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('Reserved1','3s=""'),
+ ('TotalParameterCount','<L'),
+ ('TotalDataCount','<L'),
+ ('ParameterCount','<L'),
+ ('ParameterOffset','<L'),
+ ('ParameterDisplacement','<L=0'),
+ ('DataCount','<L'),
+ ('DataOffset','<L'),
+ ('DataDisplacement','<L=0'),
+ ('SetupCount','<B=0'),
+ ('SetupLength','_-Setup','SetupCount*2'),
+ ('Setup',':'),
+ )
+
+class SMBNTTransaction_Data(Structure):
+ structure = (
+ ('Pad1Length','_-Pad1','self["Pad1Length"]'),
+ ('Pad1',':'),
+ ('NT_Trans_ParametersLength','_-NT_Trans_Parameters','self["NT_Trans_ParametersLength"]'),
+ ('NT_Trans_Parameters',':'),
+ ('Pad2Length','_-Pad2','self["Pad2Length"]'),
+ ('Pad2',':'),
+ ('NT_Trans_DataLength','_-NT_Trans_Data','self["NT_Trans_DataLength"]'),
+ ('NT_Trans_Data',':'),
+ )
+
+class SMBNTTransactionResponse_Data(Structure):
+ structure = (
+ ('Pad1Length','_-Pad1','self["Pad1Length"]'),
+ ('Pad1',':'),
+ ('Trans_ParametersLength','_-Trans_Parameters','self["Trans_ParametersLength"]'),
+ ('Trans_Parameters',':'),
+ ('Pad2Length','_-Pad2','self["Pad2Length"]'),
+ ('Pad2',':'),
+ ('Trans_DataLength','_-Trans_Data','self["Trans_DataLength"]'),
+ ('Trans_Data',':'),
+ )
+
+
+############# SMB_COM_TRANSACTION2_SECONDARY (0x33)
+class SMBTransaction2Secondary_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('TotalParameterCount','<H'),
+ ('TotalDataCount','<H'),
+ ('ParameterCount','<H'),
+ ('ParameterOffset','<H'),
+ ('DataCount','<H'),
+ ('DataOffset','<H'),
+ ('DataDisplacement','<H=0'),
+ ('FID','<H'),
+ )
+
+class SMBTransaction2Secondary_Data(Structure):
+ structure = (
+ ('Pad1Length','_-Pad1','self["Pad1Length"]'),
+ ('Pad1',':'),
+ ('Trans_ParametersLength','_-Trans_Parameters','self["Trans_ParametersLength"]'),
+ ('Trans_Parameters',':'),
+ ('Pad2Length','_-Pad2','self["Pad2Length"]'),
+ ('Pad2',':'),
+ ('Trans_DataLength','_-Trans_Data','self["Trans_DataLength"]'),
+ ('Trans_Data',':'),
+ )
+
+
+############# SMB_COM_TRANSACTION2 (0x32)
+
+class SMBTransaction2_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('TotalParameterCount','<H'),
+ ('TotalDataCount','<H'),
+ ('MaxParameterCount','<H=1024'),
+ ('MaxDataCount','<H=65504'),
+ ('MaxSetupCount','<B=0'),
+ ('Reserved1','<B=0'),
+ ('Flags','<H=0'),
+ ('Timeout','<L=0'),
+ ('Reserved2','<H=0'),
+ ('ParameterCount','<H'),
+ ('ParameterOffset','<H'),
+ ('DataCount','<H'),
+ ('DataOffset','<H'),
+ ('SetupCount','<B=len(Setup)/2'),
+ ('Reserved3','<B=0'),
+ ('SetupLength','_-Setup','SetupCount*2'),
+ ('Setup',':'),
+ )
+
+class SMBTransaction2Response_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('TotalParameterCount','<H'),
+ ('TotalDataCount','<H'),
+ ('Reserved1','<H=0'),
+ ('ParameterCount','<H'),
+ ('ParameterOffset','<H'),
+ ('ParameterDisplacement','<H=0'),
+ ('DataCount','<H'),
+ ('DataOffset','<H'),
+ ('DataDisplacement','<H=0'),
+ ('SetupCount','<B=0'),
+ ('Reserved2','<B=0'),
+ ('SetupLength','_-Setup','SetupCount*2'),
+ ('Setup',':'),
+ )
+
+class SMBTransaction2_Data(Structure):
+ structure = (
+# ('NameLength','_-Name','1'),
+# ('Name',':'),
+ ('Pad1Length','_-Pad1','self["Pad1Length"]'),
+ ('Pad1',':'),
+ ('Trans_ParametersLength','_-Trans_Parameters','self["Trans_ParametersLength"]'),
+ ('Trans_Parameters',':'),
+ ('Pad2Length','_-Pad2','self["Pad2Length"]'),
+ ('Pad2',':'),
+ ('Trans_DataLength','_-Trans_Data','self["Trans_DataLength"]'),
+ ('Trans_Data',':'),
+ )
+
+class SMBTransaction2Response_Data(Structure):
+ structure = (
+ ('Pad1Length','_-Pad1','self["Pad1Length"]'),
+ ('Pad1',':'),
+ ('Trans_ParametersLength','_-Trans_Parameters','self["Trans_ParametersLength"]'),
+ ('Trans_Parameters',':'),
+ ('Pad2Length','_-Pad2','self["Pad2Length"]'),
+ ('Pad2',':'),
+ ('Trans_DataLength','_-Trans_Data','self["Trans_DataLength"]'),
+ ('Trans_Data',':'),
+ )
+
+############# SMB_COM_QUERY_INFORMATION (0x08)
+
+class SMBQueryInformation_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('BufferFormat','B=4'),
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('BufferFormat','B=4'),
+ ('FileName','u'),
+ )
+
+
+class SMBQueryInformationResponse_Parameters(Structure):
+ structure = (
+ ('FileAttributes','<H'),
+ ('LastWriteTime','<L'),
+ ('FileSize','<L'),
+ ('Reserved','"0123456789'),
+ )
+
+############# SMB_COM_TRANSACTION (0x25)
+class SMBTransaction_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('TotalParameterCount','<H'),
+ ('TotalDataCount','<H'),
+ ('MaxParameterCount','<H=1024'),
+ ('MaxDataCount','<H=65504'),
+ ('MaxSetupCount','<B=0'),
+ ('Reserved1','<B=0'),
+ ('Flags','<H=0'),
+ ('Timeout','<L=0'),
+ ('Reserved2','<H=0'),
+ ('ParameterCount','<H'),
+ ('ParameterOffset','<H'),
+ ('DataCount','<H'),
+ ('DataOffset','<H'),
+ ('SetupCount','<B=len(Setup)/2'),
+ ('Reserved3','<B=0'),
+ ('SetupLength','_-Setup','SetupCount*2'),
+ ('Setup',':'),
+ )
+
+class SMBTransactionResponse_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('TotalParameterCount','<H'),
+ ('TotalDataCount','<H'),
+ ('Reserved1','<H=0'),
+ ('ParameterCount','<H'),
+ ('ParameterOffset','<H'),
+ ('ParameterDisplacement','<H=0'),
+ ('DataCount','<H'),
+ ('DataOffset','<H'),
+ ('DataDisplacement','<H=0'),
+ ('SetupCount','<B'),
+ ('Reserved2','<B=0'),
+ ('SetupLength','_-Setup','SetupCount*2'),
+ ('Setup',':'),
+ )
+
+# TODO: We should merge these both. But this will require fixing
+# the instances where this structure is used on the client side
+class SMBTransaction_SData(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('Name','z'),
+ ('Trans_ParametersLength','_-Trans_Parameters'),
+ ('Trans_Parameters',':'),
+ ('Trans_DataLength','_-Trans_Data'),
+ ('Trans_Data',':'),
+ )
+ UnicodeStructure = (
+ ('Pad','B'),
+ ('Name','u'),
+ ('Trans_ParametersLength','_-Trans_Parameters'),
+ ('Trans_Parameters',':'),
+ ('Trans_DataLength','_-Trans_Data'),
+ ('Trans_Data',':'),
+ )
+
+class SMBTransaction_Data(Structure):
+ structure = (
+ ('NameLength','_-Name'),
+ ('Name',':'),
+ ('Trans_ParametersLength','_-Trans_Parameters'),
+ ('Trans_Parameters',':'),
+ ('Trans_DataLength','_-Trans_Data'),
+ ('Trans_Data',':'),
+ )
+
+class SMBTransactionResponse_Data(Structure):
+ structure = (
+ ('Trans_ParametersLength','_-Trans_Parameters'),
+ ('Trans_Parameters',':'),
+ ('Trans_DataLength','_-Trans_Data'),
+ ('Trans_Data',':'),
+ )
+
+############# SMB_COM_READ_ANDX (0x2E)
+class SMBReadAndX_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('Fid','<H'),
+ ('Offset','<L'),
+ ('MaxCount','<H'),
+ ('MinCount','<H=MaxCount'),
+ ('_reserved','<L=0x0'),
+ ('Remaining','<H=MaxCount'),
+ ('HighOffset','<L=0'),
+ )
+
+class SMBReadAndX_Parameters2(SMBAndXCommand_Parameters):
+ structure = (
+ ('Fid','<H'),
+ ('Offset','<L'),
+ ('MaxCount','<H'),
+ ('MinCount','<H=MaxCount'),
+ ('_reserved','<L=0xffffffff'),
+ ('Remaining','<H=MaxCount'),
+ )
+
+class SMBReadAndXResponse_Parameters(SMBAndXCommand_Parameters):
+ structure = (
+ ('Remaining','<H=0'),
+ ('DataMode','<H=0'),
+ ('_reserved','<H=0'),
+ ('DataCount','<H'),
+ ('DataOffset','<H'),
+ ('DataCount_Hi','<L'),
+ ('_reserved2','6s=""'),
+ )
+
+############# SMB_COM_ECHO (0x2B)
+class SMBEcho_Data(Structure):
+ structure = (
+ ('Data',':'),
+ )
+
+class SMBEcho_Parameters(Structure):
+ structure = (
+ ('EchoCount','<H'),
+ )
+
+class SMBEchoResponse_Data(Structure):
+ structure = (
+ ('Data',':'),
+ )
+
+class SMBEchoResponse_Parameters(Structure):
+ structure = (
+ ('SequenceNumber','<H=1'),
+ )
+
+############# SMB_COM_QUERY_INFORMATION_DISK (0x80)
+class SMBQueryInformationDiskResponse_Parameters(Structure):
+ structure = (
+ ('TotalUnits','<H'),
+ ('BlocksPerUnit','<H'),
+ ('BlockSize','<H'),
+ ('FreeUnits','<H'),
+ ('Reserved','<H=0'),
+ )
+
+
+############# SMB_COM_LOGOFF_ANDX (0x74)
+class SMBLogOffAndX(SMBAndXCommand_Parameters):
+ strucure = ()
+
+############# SMB_COM_CLOSE (0x04)
+class SMBClose_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('FID','<H'),
+ ('Time','<L=0'),
+ )
+
+############# SMB_COM_FLUSH (0x05)
+class SMBFlush_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('FID','<H'),
+ )
+
+############# SMB_COM_CREATE_DIRECTORY (0x00)
+class SMBCreateDirectory_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('BufferFormat','<B=4'),
+ ('DirectoryName','z'),
+ )
+ UnicodeStructure = (
+ ('BufferFormat','<B=4'),
+ ('DirectoryName','u'),
+ )
+
+############# SMB_COM_DELETE (0x06)
+class SMBDelete_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('BufferFormat','<B=4'),
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('BufferFormat','<B=4'),
+ ('FileName','u'),
+ )
+
+class SMBDelete_Parameters(Structure):
+ structure = (
+ ('SearchAttributes','<H'),
+ )
+
+############# SMB_COM_DELETE_DIRECTORY (0x01)
+class SMBDeleteDirectory_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('BufferFormat','<B=4'),
+ ('DirectoryName','z'),
+ )
+ UnicodeStructure = (
+ ('BufferFormat','<B=4'),
+ ('DirectoryName','u'),
+ )
+
+############# SMB_COM_CHECK_DIRECTORY (0x10)
+class SMBCheckDirectory_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('BufferFormat','<B=4'),
+ ('DirectoryName','z'),
+ )
+ UnicodeStructure = (
+ ('BufferFormat','<B=4'),
+ ('DirectoryName','u'),
+ )
+
+############# SMB_COM_RENAME (0x07)
+class SMBRename_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('SearchAttributes','<H'),
+ )
+
+class SMBRename_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('BufferFormat1','<B=4'),
+ ('OldFileName','z'),
+ ('BufferFormat2','<B=4'),
+ ('NewFileName','z'),
+ )
+ UnicodeStructure = (
+ ('BufferFormat1','<B=4'),
+ ('OldFileName','u'),
+ ('BufferFormat2','<B=4'),
+ ('Pad','B=0'),
+ ('NewFileName','u'),
+ )
+
+
+############# SMB_COM_OPEN (0x02)
+class SMBOpen_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('DesiredAccess','<H=0'),
+ ('SearchAttributes','<H=0'),
+ )
+
+class SMBOpen_Data(AsciiOrUnicodeStructure):
+ AsciiStructure = (
+ ('FileNameFormat','"\x04'),
+ ('FileName','z'),
+ )
+ UnicodeStructure = (
+ ('FileNameFormat','"\x04'),
+ ('FileName','z'),
+ )
+
+class SMBOpenResponse_Parameters(SMBCommand_Parameters):
+ structure = (
+ ('Fid','<H=0'),
+ ('FileAttributes','<H=0'),
+ ('LastWriten','<L=0'),
+ ('FileSize','<L=0'),
+ ('GrantedAccess','<H=0'),
+ )
+
+############# EXTENDED SECURITY CLASSES
+class SMBExtended_Security_Parameters(Structure):
+ structure = (
+ ('DialectIndex','<H'),
+ ('SecurityMode','<B'),
+ ('MaxMpxCount','<H'),
+ ('MaxNumberVcs','<H'),
+ ('MaxBufferSize','<L'),
+ ('MaxRawSize','<L'),
+ ('SessionKey','<L'),
+ ('Capabilities','<L'),
+ ('LowDateTime','<L'),
+ ('HighDateTime','<L'),
+ ('ServerTimeZone','<H'),
+ ('ChallengeLength','<B'),
+ )
+
+class SMBExtended_Security_Data(Structure):
+ structure = (
+ ('ServerGUID','16s'),
+ ('SecurityBlob',':'),
+ )
+
+class SMBNTLMDialect_Parameters(Structure):
+ structure = (
+ ('DialectIndex','<H'),
+ ('SecurityMode','<B'),
+ ('MaxMpxCount','<H'),
+ ('MaxNumberVcs','<H'),
+ ('MaxBufferSize','<L'),
+ ('MaxRawSize','<L'),
+ ('SessionKey','<L'),
+ ('Capabilities','<L'),
+ ('LowDateTime','<L'),
+ ('HighDateTime','<L'),
+ ('ServerTimeZone','<H'),
+ ('ChallengeLength','<B'),
+ )
+
+class SMBNTLMDialect_Data(Structure):
+ structure = (
+ ('ChallengeLength','_-Challenge','self["ChallengeLength"]'),
+ ('Challenge',':'),
+ ('Payload',':'),
+# For some reason on an old Linux this field is not present, we have to check this out. There must be a flag stating this.
+ ('DomainName','_'),
+ ('ServerName','_'),
+ )
+ def __init__(self,data = None, alignment = 0):
+ Structure.__init__(self,data,alignment)
+ #self['ChallengeLength']=8
+
+ def fromString(self,data):
+ Structure.fromString(self,data)
+ self['DomainName'] = ''
+ self['ServerName'] = ''
+
+class SMB:
+ # SMB Command Codes
+ SMB_COM_CREATE_DIRECTORY = 0x00
+ SMB_COM_DELETE_DIRECTORY = 0x01
+ SMB_COM_OPEN = 0x02
+ SMB_COM_CREATE = 0x03
+ SMB_COM_CLOSE = 0x04
+ SMB_COM_FLUSH = 0x05
+ SMB_COM_DELETE = 0x06
+ SMB_COM_RENAME = 0x07
+ SMB_COM_QUERY_INFORMATION = 0x08
+ SMB_COM_SET_INFORMATION = 0x09
+ SMB_COM_READ = 0x0A
+ SMB_COM_WRITE = 0x0B
+ SMB_COM_LOCK_BYTE_RANGE = 0x0C
+ SMB_COM_UNLOCK_BYTE_RANGE = 0x0D
+ SMB_COM_CREATE_TEMPORARY = 0x0E
+ SMB_COM_CREATE_NEW = 0x0F
+ SMB_COM_CHECK_DIRECTORY = 0x10
+ SMB_COM_PROCESS_EXIT = 0x11
+ SMB_COM_SEEK = 0x12
+ SMB_COM_LOCK_AND_READ = 0x13
+ SMB_COM_WRITE_AND_UNLOCK = 0x14
+ SMB_COM_READ_RAW = 0x1A
+ SMB_COM_READ_MPX = 0x1B
+ SMB_COM_READ_MPX_SECONDARY = 0x1C
+ SMB_COM_WRITE_RAW = 0x1D
+ SMB_COM_WRITE_MPX = 0x1E
+ SMB_COM_WRITE_MPX_SECONDARY = 0x1F
+ SMB_COM_WRITE_COMPLETE = 0x20
+ SMB_COM_QUERY_SERVER = 0x21
+ SMB_COM_SET_INFORMATION2 = 0x22
+ SMB_COM_QUERY_INFORMATION2 = 0x23
+ SMB_COM_LOCKING_ANDX = 0x24
+ SMB_COM_TRANSACTION = 0x25
+ SMB_COM_TRANSACTION_SECONDARY = 0x26
+ SMB_COM_IOCTL = 0x27
+ SMB_COM_IOCTL_SECONDARY = 0x28
+ SMB_COM_COPY = 0x29
+ SMB_COM_MOVE = 0x2A
+ SMB_COM_ECHO = 0x2B
+ SMB_COM_WRITE_AND_CLOSE = 0x2C
+ SMB_COM_OPEN_ANDX = 0x2D
+ SMB_COM_READ_ANDX = 0x2E
+ SMB_COM_WRITE_ANDX = 0x2F
+ SMB_COM_NEW_FILE_SIZE = 0x30
+ SMB_COM_CLOSE_AND_TREE_DISC = 0x31
+ SMB_COM_TRANSACTION2 = 0x32
+ SMB_COM_TRANSACTION2_SECONDARY = 0x33
+ SMB_COM_FIND_CLOSE2 = 0x34
+ SMB_COM_FIND_NOTIFY_CLOSE = 0x35
+ # Used by Xenix/Unix 0x60 - 0x6E
+ SMB_COM_TREE_CONNECT = 0x70
+ SMB_COM_TREE_DISCONNECT = 0x71
+ SMB_COM_NEGOTIATE = 0x72
+ SMB_COM_SESSION_SETUP_ANDX = 0x73
+ SMB_COM_LOGOFF_ANDX = 0x74
+ SMB_COM_TREE_CONNECT_ANDX = 0x75
+ SMB_COM_QUERY_INFORMATION_DISK = 0x80
+ SMB_COM_SEARCH = 0x81
+ SMB_COM_FIND = 0x82
+ SMB_COM_FIND_UNIQUE = 0x83
+ SMB_COM_FIND_CLOSE = 0x84
+ SMB_COM_NT_TRANSACT = 0xA0
+ SMB_COM_NT_TRANSACT_SECONDARY = 0xA1
+ SMB_COM_NT_CREATE_ANDX = 0xA2
+ SMB_COM_NT_CANCEL = 0xA4
+ SMB_COM_NT_RENAME = 0xA5
+ SMB_COM_OPEN_PRINT_FILE = 0xC0
+ SMB_COM_WRITE_PRINT_FILE = 0xC1
+ SMB_COM_CLOSE_PRINT_FILE = 0xC2
+ SMB_COM_GET_PRINT_QUEUE = 0xC3
+ SMB_COM_READ_BULK = 0xD8
+ SMB_COM_WRITE_BULK = 0xD9
+ SMB_COM_WRITE_BULK_DATA = 0xDA
+
+ # TRANSACT codes
+ TRANS_TRANSACT_NMPIPE = 0x26
+
+ # TRANSACT2 codes
+ TRANS2_FIND_FIRST2 = 0x0001
+ TRANS2_FIND_NEXT2 = 0x0002
+ TRANS2_QUERY_FS_INFORMATION = 0x0003
+ TRANS2_QUERY_PATH_INFORMATION = 0x0005
+ TRANS2_QUERY_FILE_INFORMATION = 0x0007
+ TRANS2_SET_FILE_INFORMATION = 0x0008
+ TRANS2_SET_PATH_INFORMATION = 0x0006
+
+ # Security Share Mode (Used internally by SMB class)
+ SECURITY_SHARE_MASK = 0x01
+ SECURITY_SHARE_SHARE = 0x00
+ SECURITY_SHARE_USER = 0x01
+ SECURITY_SIGNATURES_ENABLED = 0X04
+ SECURITY_SIGNATURES_REQUIRED = 0X08
+
+ # Security Auth Mode (Used internally by SMB class)
+ SECURITY_AUTH_MASK = 0x02
+ SECURITY_AUTH_ENCRYPTED = 0x02
+ SECURITY_AUTH_PLAINTEXT = 0x00
+
+ # Raw Mode Mask (Used internally by SMB class. Good for dialect up to and including LANMAN2.1)
+ RAW_READ_MASK = 0x01
+ RAW_WRITE_MASK = 0x02
+
+ # Capabilities Mask (Used internally by SMB class. Good for dialect NT LM 0.12)
+ CAP_RAW_MODE = 0x00000001
+ CAP_MPX_MODE = 0x0002
+ CAP_UNICODE = 0x0004
+ CAP_LARGE_FILES = 0x0008
+ CAP_EXTENDED_SECURITY = 0x80000000
+ CAP_USE_NT_ERRORS = 0x40
+ CAP_NT_SMBS = 0x10
+ CAP_LARGE_READX = 0x00004000
+ CAP_LARGE_WRITEX = 0x00008000
+ CAP_RPC_REMOTE_APIS = 0x20
+
+ # Flags1 Mask
+ FLAGS1_LOCK_AND_READ_OK = 0x01
+ FLAGS1_PATHCASELESS = 0x08
+ FLAGS1_CANONICALIZED_PATHS = 0x10
+ FLAGS1_REPLY = 0x80
+
+ # Flags2 Mask
+ FLAGS2_LONG_NAMES = 0x0001
+ FLAGS2_EAS = 0x0002
+ FLAGS2_SMB_SECURITY_SIGNATURE = 0x0004
+ FLAGS2_IS_LONG_NAME = 0x0040
+ FLAGS2_DFS = 0x1000
+ FLAGS2_PAGING_IO = 0x2000
+ FLAGS2_NT_STATUS = 0x4000
+ FLAGS2_UNICODE = 0x8000
+ FLAGS2_COMPRESSED = 0x0008
+ FLAGS2_SMB_SECURITY_SIGNATURE_REQUIRED = 0x0010
+ FLAGS2_EXTENDED_SECURITY = 0x0800
+
+ # Dialect's Security Mode flags
+ NEGOTIATE_USER_SECURITY = 0x01
+ NEGOTIATE_ENCRYPT_PASSWORDS = 0x02
+ NEGOTIATE_SECURITY_SIGNATURE_ENABLE = 0x04
+ NEGOTIATE_SECURITY_SIGNATURE_REQUIRED = 0x08
+
+ # Tree Connect AndX Response optionalSuppor flags
+ SMB_SUPPORT_SEARCH_BITS = 0x01
+ SMB_SHARE_IS_IN_DFS = 0x02
+
+ def __init__(self, remote_name, remote_host, my_name = None, host_type = nmb.TYPE_SERVER, sess_port = 445, timeout=None, UDP = 0, session = None, negPacket = None):
+ # The uid attribute will be set when the client calls the login() method
+ self._uid = 0
+ self.__server_name = ''
+ self.__server_os = ''
+ self.__server_os_major = None
+ self.__server_os_minor = None
+ self.__server_os_build = None
+ self.__server_lanman = ''
+ self.__server_domain = ''
+ self.__server_dns_domain_name = ''
+ self.__remote_name = string.upper(remote_name)
+ self.__remote_host = remote_host
+ self.__isNTLMv2 = True
+ self._dialects_parameters = None
+ self._dialects_data = None
+ # Credentials
+ self.__userName = ''
+ self.__password = ''
+ self.__domain = ''
+ self.__lmhash = ''
+ self.__nthash = ''
+ self.__aesKey = ''
+ self.__kdc = ''
+ self.__TGT = None
+ self.__TGS = None
+
+ # Negotiate Protocol Result, used everywhere
+ # Could be extended or not, flags should be checked before
+ self._dialect_data = 0
+ self._dialect_parameters = 0
+ self._action = 0
+ self._sess = None
+ self.encrypt_passwords = True
+ self.tid = 0
+ self.fid = 0
+
+ # Signing stuff
+ self._SignSequenceNumber = 0
+ self._SigningSessionKey = ''
+ self._SigningChallengeResponse = ''
+ self._SignatureEnabled = False
+ self._SignatureVerificationEnabled = False
+ self._SignatureRequired = False
+
+ # Base flags (default flags, can be overriden using set_flags())
+ self.__flags1 = SMB.FLAGS1_PATHCASELESS | SMB.FLAGS1_CANONICALIZED_PATHS
+ self.__flags2 = SMB.FLAGS2_EXTENDED_SECURITY | SMB.FLAGS2_NT_STATUS | SMB.FLAGS2_LONG_NAMES
+
+ if timeout is None:
+ self.__timeout = 60
+ else:
+ self.__timeout = timeout
+
+ # If port 445 and the name sent is *SMBSERVER we're setting the name to the IP.
+ # This is to help some old applications still believing
+ # *SMSBSERVER will work against modern OSes. If port is NETBIOS_SESSION_PORT the user better
+ # know about *SMBSERVER's limitations
+ if sess_port == 445 and remote_name == '*SMBSERVER':
+ self.__remote_name = remote_host
+
+ if session is None:
+ if not my_name:
+ my_name = socket.gethostname()
+ i = string.find(my_name, '.')
+ if i > -1:
+ my_name = my_name[:i]
+
+ if UDP:
+ self._sess = nmb.NetBIOSUDPSession(my_name, remote_name, remote_host, host_type, sess_port, self.__timeout)
+ else:
+ self._sess = nmb.NetBIOSTCPSession(my_name, remote_name, remote_host, host_type, sess_port, self.__timeout)
+
+ # Initialize session values (_dialect_data and _dialect_parameters)
+ self.neg_session()
+
+ # Call login() without any authentication information to
+ # setup a session if the remote server
+ # is in share mode.
+ if (self._dialects_parameters['SecurityMode'] & SMB.SECURITY_SHARE_MASK) == SMB.SECURITY_SHARE_SHARE:
+ self.login('', '')
+ else:
+ self._sess = session
+ self.neg_session(negPacket = negPacket)
+ # Call login() without any authentication information to
+ # setup a session if the remote server
+ # is in share mode.
+ if (self._dialects_parameters['SecurityMode'] & SMB.SECURITY_SHARE_MASK) == SMB.SECURITY_SHARE_SHARE:
+ self.login('', '')
+
+ @staticmethod
+ def ntlm_supported():
+ return False
+
+ def get_remote_name(self):
+ return self.__remote_name
+
+ def get_remote_host(self):
+ return self.__remote_host
+
+ def get_flags(self):
+ return self.__flags1, self.__flags2
+
+ def set_flags(self, flags1=None, flags2=None):
+ if flags1 is not None:
+ self.__flags1 = flags1
+ if flags2 is not None:
+ self.__flags2 = flags2
+
+ def set_timeout(self, timeout):
+ prev_timeout = self.__timeout
+ self.__timeout = timeout
+ return prev_timeout
+
+ def get_timeout(self):
+ return self.__timeout
+
+ @contextmanager
+ def use_timeout(self, timeout):
+ prev_timeout = self.set_timeout(timeout)
+ try:
+ yield
+ finally:
+ self.set_timeout(prev_timeout)
+
+ def get_session(self):
+ return self._sess
+
+ def get_tid(self):
+ return self.tid
+
+ def get_fid(self):
+ return self.fid
+
+ def isGuestSession(self):
+ return self._action & SMB_SETUP_GUEST
+
+ def doesSupportNTLMv2(self):
+ return self.__isNTLMv2
+
+ def __del__(self):
+ if self._sess:
+ self._sess.close()
+
+ def recvSMB(self):
+ r = self._sess.recv_packet(self.__timeout)
+ return NewSMBPacket(data = r.get_trailer())
+
+ @staticmethod
+ def __decode_trans(params, data):
+ totparamcnt, totdatacnt, _, paramcnt, paramoffset, paramds, datacnt, dataoffset, datads, setupcnt = unpack('<HHHHHHHHHB', params[:19])
+ if paramcnt + paramds < totparamcnt or datacnt + datads < totdatacnt:
+ has_more = 1
+ else:
+ has_more = 0
+ paramoffset = paramoffset - 55 - setupcnt * 2
+ dataoffset = dataoffset - 55 - setupcnt * 2
+ return has_more, params[20:20 + setupcnt * 2], data[paramoffset:paramoffset + paramcnt], data[dataoffset:dataoffset + datacnt]
+
+ # TODO: Move this to NewSMBPacket, it belongs there
+ def signSMB(self, packet, signingSessionKey, signingChallengeResponse):
+ # This logic MUST be applied for messages sent in response to any of the higher-layer actions and in
+ # compliance with the message sequencing rules.
+ # * The client or server that sends the message MUST provide the 32-bit sequence number for this
+ # message, as specified in sections 3.2.4.1 and 3.3.4.1.
+ # * The SMB_FLAGS2_SMB_SECURITY_SIGNATURE flag in the header MUST be set.
+ # * To generate the signature, a 32-bit sequence number is copied into the
+ # least significant 32 bits of the SecuritySignature field and the remaining
+ # 4 bytes are set to 0x00.
+ # * The MD5 algorithm, as specified in [RFC1321], MUST be used to generate a hash of the SMB
+ # message from the start of the SMB Header, which is defined as follows.
+ # CALL MD5Init( md5context )
+ # CALL MD5Update( md5context, Connection.SigningSessionKey )
+ # CALL MD5Update( md5context, Connection.SigningChallengeResponse )
+ # CALL MD5Update( md5context, SMB message )
+ # CALL MD5Final( digest, md5context )
+ # SET signature TO the first 8 bytes of the digest
+ # The resulting 8-byte signature MUST be copied into the SecuritySignature field of the SMB Header,
+ # after which the message can be transmitted.
+
+ #print "seq(%d) signingSessionKey %r, signingChallengeResponse %r" % (self._SignSequenceNumber, signingSessionKey, signingChallengeResponse)
+ packet['SecurityFeatures'] = pack('<q',self._SignSequenceNumber)
+ # Sign with the sequence
+ m = hashlib.md5()
+ m.update( signingSessionKey )
+ m.update( signingChallengeResponse )
+ m.update( str(packet) )
+ # Replace sequence with acual hash
+ packet['SecurityFeatures'] = m.digest()[:8]
+ if self._SignatureVerificationEnabled:
+ self._SignSequenceNumber +=1
+ else:
+ self._SignSequenceNumber +=2
+
+ def checkSignSMB(self, packet, signingSessionKey, signingChallengeResponse):
+ # Let's check
+ signature = packet['SecurityFeatures']
+ #print "Signature received: %r " % signature
+ self.signSMB(packet, signingSessionKey, signingChallengeResponse)
+ #print "Signature calculated: %r" % packet['SecurityFeatures']
+ if self._SignatureVerificationEnabled is not True:
+ self._SignSequenceNumber -= 1
+ return packet['SecurityFeatures'] == signature
+
+ def sendSMB(self,smb):
+ smb['Uid'] = self._uid
+ #At least on AIX, PIDs can exceed 16 bits, so we mask them out
+ smb['Pid'] = (os.getpid() & 0xFFFF)
+ # set flags
+ smb['Flags1'] |= self.__flags1
+ smb['Flags2'] |= self.__flags2
+ if self._SignatureEnabled:
+ smb['Flags2'] |= SMB.FLAGS2_SMB_SECURITY_SIGNATURE
+ self.signSMB(smb, self._SigningSessionKey, self._SigningChallengeResponse)
+
+ self._sess.send_packet(str(smb))
+
+ @staticmethod
+ def isValidAnswer(s, cmd):
+ while 1:
+ if s.rawData():
+ if s.get_command() == cmd:
+ if s.get_error_class() == 0x00 and s.get_error_code() == 0x00:
+ return 1
+ else:
+ raise SessionError, ( "SMB Library Error", s.get_error_class()+ (s.get_reserved() << 8), s.get_error_code() , s.get_flags2() & SMB.FLAGS2_NT_STATUS )
+ else:
+ break
+ return 0
+
+ def neg_session(self, extended_security = True, negPacket = None):
+ def parsePacket(smb):
+ if smb.isValidAnswer(SMB.SMB_COM_NEGOTIATE):
+ sessionResponse = SMBCommand(smb['Data'][0])
+ self._dialects_parameters = SMBNTLMDialect_Parameters(sessionResponse['Parameters'])
+ self._dialects_data = SMBNTLMDialect_Data()
+ self._dialects_data['ChallengeLength'] = self._dialects_parameters['ChallengeLength']
+ self._dialects_data.fromString(sessionResponse['Data'])
+ if self._dialects_parameters['Capabilities'] & SMB.CAP_EXTENDED_SECURITY:
+ # Whether we choose it or it is enforced by the server, we go for extended security
+ self._dialects_parameters = SMBExtended_Security_Parameters(sessionResponse['Parameters'])
+ self._dialects_data = SMBExtended_Security_Data(sessionResponse['Data'])
+ # Let's setup some variable for later use
+ if self._dialects_parameters['SecurityMode'] & SMB.SECURITY_SIGNATURES_REQUIRED:
+ self._SignatureRequired = True
+
+ # Interestingly, the security Blob might be missing sometimes.
+ #spnego = SPNEGO_NegTokenInit(self._dialects_data['SecurityBlob'])
+ #for i in spnego['MechTypes']:
+ # print "Mech Found: %s" % MechTypes[i]
+ return 1
+
+ # If not, let's try the old way
+ else:
+ if self._dialects_data['ServerName'] is not None:
+ self.__server_name = self._dialects_data['ServerName']
+
+ if self._dialects_parameters['DialectIndex'] == 0xffff:
+ raise UnsupportedFeature,"Remote server does not know NT LM 0.12"
+ return 1
+ else:
+ return 0
+
+ if negPacket is None:
+ smb = NewSMBPacket()
+ negSession = SMBCommand(SMB.SMB_COM_NEGOTIATE)
+ flags2 = self.get_flags()[1]
+ if extended_security is True:
+ self.set_flags(flags2=flags2|SMB.FLAGS2_EXTENDED_SECURITY)
+ else:
+ self.set_flags(flags2=flags2 & (~SMB.FLAGS2_EXTENDED_SECURITY))
+
+ negSession['Data'] = '\x02NT LM 0.12\x00'
+ smb.addCommand(negSession)
+ self.sendSMB(smb)
+
+ while 1:
+ smb = self.recvSMB()
+ return parsePacket(smb)
+ else:
+
+ return parsePacket( NewSMBPacket( data = negPacket))
+
+ def tree_connect(self, path, password = '', service = SERVICE_ANY):
+ LOG.warning("[MS-CIFS] This is an original Core Protocol command.This command has been deprecated.Client Implementations SHOULD use SMB_COM_TREE_CONNECT_ANDX")
+
+ # return 0x800
+ if password:
+ # Password is only encrypted if the server passed us an "encryption" during protocol dialect
+ if self._dialects_parameters['ChallengeLength'] > 0:
+ # this code is untested
+ password = self.get_ntlmv1_response(ntlm.compute_lmhash(password))
+
+ if not unicode_support:
+ if unicode_convert:
+ path = str(path)
+ else:
+ raise Exception('SMB: Can\t conver path from unicode!')
+
+ smb = NewSMBPacket()
+ treeConnect = SMBCommand(SMB.SMB_COM_TREE_CONNECT)
+ treeConnect['Parameters'] = SMBTreeConnect_Parameters()
+ treeConnect['Data'] = SMBTreeConnect_Data()
+ treeConnect['Data']['Path'] = path.upper()
+ treeConnect['Data']['Password'] = password
+ treeConnect['Data']['Service'] = service
+ smb.addCommand(treeConnect)
+ self.sendSMB(smb)
+
+ while 1:
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_TREE_CONNECT):
+ # XXX Here we are ignoring the rest of the response
+ return smb['Tid']
+ return smb['Tid']
+
+ def get_uid(self):
+ return self._uid
+
+ def set_uid(self, uid):
+ self._uid = uid
+
+ def tree_connect_andx(self, path, password = None, service = SERVICE_ANY, smb_packet=None):
+ if password:
+ # Password is only encrypted if the server passed us an "encryption" during protocol dialect
+ if self._dialects_parameters['ChallengeLength'] > 0:
+ # this code is untested
+ password = self.get_ntlmv1_response(ntlm.compute_lmhash(password))
+ else:
+ password = '\x00'
+
+ if not unicode_support:
+ if unicode_convert:
+ path = str(path)
+ else:
+ raise Exception('SMB: Can\t convert path from unicode!')
+
+ if smb_packet is None:
+ smb = NewSMBPacket()
+ else:
+ smb = smb_packet
+
+ # Just in case this came with the full path ,let's just leave
+ # the sharename, we'll take care of the rest
+
+ share = path.split('\\')[-1]
+ try:
+ _, _, _, _, sockaddr = socket.getaddrinfo(self.get_remote_host(), 80, 0, 0, socket.IPPROTO_TCP)[0]
+ remote_host = sockaddr[0]
+ except Exception:
+ remote_host = self.get_remote_host()
+
+ path = '\\\\' + remote_host + '\\' +share
+ path = path.upper().encode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else path
+
+ treeConnect = SMBCommand(SMB.SMB_COM_TREE_CONNECT_ANDX)
+ treeConnect['Parameters'] = SMBTreeConnectAndX_Parameters()
+ treeConnect['Data'] = SMBTreeConnectAndX_Data(flags=self.__flags2)
+ treeConnect['Parameters']['PasswordLength'] = len(password)
+ treeConnect['Data']['Password'] = password
+ treeConnect['Data']['Path'] = path
+ treeConnect['Data']['Service'] = service
+
+ if self.__flags2 & SMB.FLAGS2_UNICODE:
+ treeConnect['Data']['Pad'] = 0x0
+
+ smb.addCommand(treeConnect)
+
+ # filename = "\PIPE\epmapper"
+
+ # ntCreate = SMBCommand(SMB.SMB_COM_NT_CREATE_ANDX)
+ # ntCreate['Parameters'] = SMBNtCreateAndX_Parameters()
+ # ntCreate['Data'] = SMBNtCreateAndX_Data()
+ # ntCreate['Parameters']['FileNameLength'] = len(filename)
+ # ntCreate['Parameters']['CreateFlags'] = 0
+ # ntCreate['Parameters']['AccessMask'] = 0x3
+ # ntCreate['Parameters']['CreateOptions'] = 0x0
+ # ntCreate['Data']['FileName'] = filename
+
+ # smb.addCommand(ntCreate)
+ self.sendSMB(smb)
+
+ while 1:
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_TREE_CONNECT_ANDX):
+ # XXX Here we are ignoring the rest of the response
+ self.tid = smb['Tid']
+ return self.tid
+ self.tid = smb['Tid']
+ return self.tid
+
+ # backwars compatibility
+ connect_tree = tree_connect_andx
+
+ @staticmethod
+ def getDialect():
+ return SMB_DIALECT
+
+ def get_server_name(self):
+ #return self._dialects_data['ServerName']
+ return self.__server_name
+
+ def get_session_key(self):
+ return self._SigningSessionKey
+
+ def set_session_key(self, key):
+ self._SigningSessionKey = key
+
+ def get_encryption_key(self):
+ if self._dialects_data.fields.has_key('Challenge'):
+ return self._dialects_data['Challenge']
+ else:
+ return None
+
+ def get_server_time(self):
+ timestamp = self._dialects_parameters['HighDateTime']
+ timestamp <<= 32
+ timestamp |= self._dialects_parameters['LowDateTime']
+ timestamp -= 116444736000000000
+ timestamp /= 10000000
+ d = datetime.datetime.utcfromtimestamp(timestamp)
+ return d.strftime("%a, %d %b %Y %H:%M:%S GMT")
+
+ def disconnect_tree(self, tid):
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ smb.addCommand(SMBCommand(SMB.SMB_COM_TREE_DISCONNECT))
+
+ self.sendSMB(smb)
+ self.recvSMB()
+
+ def open(self, tid, filename, open_mode, desired_access):
+ filename = string.replace(filename,'/', '\\')
+ filename = filename.encode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else filename
+
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ openFile = SMBCommand(SMB.SMB_COM_OPEN)
+ openFile['Parameters'] = SMBOpen_Parameters()
+ openFile['Parameters']['DesiredAccess'] = desired_access
+ openFile['Parameters']['OpenMode'] = open_mode
+ openFile['Parameters']['SearchAttributes'] = ATTR_READONLY | ATTR_HIDDEN | ATTR_ARCHIVE
+ openFile['Data'] = SMBOpen_Data(flags=self.__flags2)
+ openFile['Data']['FileName'] = filename
+
+ if self.__flags2 & SMB.FLAGS2_UNICODE:
+ openFile['Data']['Pad'] = 0x0
+
+ smb.addCommand(openFile)
+
+ self.sendSMB(smb)
+
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_OPEN):
+ # XXX Here we are ignoring the rest of the response
+ openFileResponse = SMBCommand(smb['Data'][0])
+ openFileParameters = SMBOpenResponse_Parameters(openFileResponse['Parameters'])
+
+ return (
+ openFileParameters['Fid'],
+ openFileParameters['FileAttributes'],
+ openFileParameters['LastWriten'],
+ openFileParameters['FileSize'],
+ openFileParameters['GrantedAccess'],
+ )
+
+ def open_andx(self, tid, filename, open_mode, desired_access):
+ filename = string.replace(filename,'/', '\\')
+ filename = filename.encode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else filename
+
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ openFile = SMBCommand(SMB.SMB_COM_OPEN_ANDX)
+ openFile['Parameters'] = SMBOpenAndX_Parameters()
+ openFile['Parameters']['DesiredAccess'] = desired_access
+ openFile['Parameters']['OpenMode'] = open_mode
+ openFile['Parameters']['SearchAttributes'] = ATTR_READONLY | ATTR_HIDDEN | ATTR_ARCHIVE
+ openFile['Data'] = SMBOpenAndX_Data(flags=self.__flags2)
+ openFile['Data']['FileName'] = filename
+
+ if self.__flags2 & SMB.FLAGS2_UNICODE:
+ openFile['Data']['Pad'] = 0x0
+
+ smb.addCommand(openFile)
+
+ self.sendSMB(smb)
+
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_OPEN_ANDX):
+ # XXX Here we are ignoring the rest of the response
+ openFileResponse = SMBCommand(smb['Data'][0])
+ openFileParameters = SMBOpenAndXResponse_Parameters(openFileResponse['Parameters'])
+
+ return (
+ openFileParameters['Fid'],
+ openFileParameters['FileAttributes'],
+ openFileParameters['LastWriten'],
+ openFileParameters['FileSize'],
+ openFileParameters['GrantedAccess'],
+ openFileParameters['FileType'],
+ openFileParameters['IPCState'],
+ openFileParameters['Action'],
+ openFileParameters['ServerFid'],
+ )
+
+ def close(self, tid, fid):
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ closeFile = SMBCommand(SMB.SMB_COM_CLOSE)
+ closeFile['Parameters'] = SMBClose_Parameters()
+ closeFile['Parameters']['FID'] = fid
+ smb.addCommand(closeFile)
+
+ self.sendSMB(smb)
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_CLOSE):
+ return 1
+ return 0
+
+ def send_trans(self, tid, setup, name, param, data, noAnswer = 0):
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ transCommand = SMBCommand(SMB.SMB_COM_TRANSACTION)
+ transCommand['Parameters'] = SMBTransaction_Parameters()
+ transCommand['Data'] = SMBTransaction_Data()
+
+ transCommand['Parameters']['Setup'] = setup
+ transCommand['Parameters']['TotalParameterCount'] = len(param)
+ transCommand['Parameters']['TotalDataCount'] = len(data)
+
+ transCommand['Parameters']['ParameterCount'] = len(param)
+ transCommand['Parameters']['ParameterOffset'] = 32+3+28+len(setup)+len(name)
+
+ transCommand['Parameters']['DataCount'] = len(data)
+ transCommand['Parameters']['DataOffset'] = transCommand['Parameters']['ParameterOffset'] + len(param)
+
+ transCommand['Data']['Name'] = name
+ transCommand['Data']['Trans_Parameters'] = param
+ transCommand['Data']['Trans_Data'] = data
+
+ if noAnswer:
+ transCommand['Parameters']['Flags'] = TRANS_NO_RESPONSE
+
+ smb.addCommand(transCommand)
+
+ self.sendSMB(smb)
+
+ def send_trans2(self, tid, setup, name, param, data):
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ command = pack('<H', setup)
+
+ transCommand = SMBCommand(SMB.SMB_COM_TRANSACTION2)
+ transCommand['Parameters'] = SMBTransaction2_Parameters()
+ transCommand['Parameters']['MaxDataCount'] = self._dialects_parameters['MaxBufferSize']
+ transCommand['Data'] = SMBTransaction2_Data()
+
+ transCommand['Parameters']['Setup'] = command
+ transCommand['Parameters']['TotalParameterCount'] = len(param)
+ transCommand['Parameters']['TotalDataCount'] = len(data)
+
+ if len(param) > 0:
+ padLen = (4 - (32+2+28 + len(command)) % 4 ) % 4
+ padBytes = '\xFF' * padLen
+ transCommand['Data']['Pad1'] = padBytes
+ else:
+ transCommand['Data']['Pad1'] = ''
+ padLen = 0
+
+ transCommand['Parameters']['ParameterCount'] = len(param)
+ transCommand['Parameters']['ParameterOffset'] = 32+2+28+len(command)+len(name) + padLen
+
+ if len(data) > 0:
+ pad2Len = (4 - (32+2+28 + len(command) + padLen + len(param)) % 4) % 4
+ transCommand['Data']['Pad2'] = '\xFF' * pad2Len
+ else:
+ transCommand['Data']['Pad2'] = ''
+ pad2Len = 0
+
+ transCommand['Parameters']['DataCount'] = len(data)
+ transCommand['Parameters']['DataOffset'] = transCommand['Parameters']['ParameterOffset'] + len(param) + pad2Len
+
+ transCommand['Data']['Name'] = name
+ transCommand['Data']['Trans_Parameters'] = param
+ transCommand['Data']['Trans_Data'] = data
+ smb.addCommand(transCommand)
+
+ self.sendSMB(smb)
+
+ def query_file_info(self, tid, fid, fileInfoClass = SMB_QUERY_FILE_STANDARD_INFO):
+ self.send_trans2(tid, SMB.TRANS2_QUERY_FILE_INFORMATION, '\x00', pack('<HH', fid, fileInfoClass), '')
+
+ resp = self.recvSMB()
+ if resp.isValidAnswer(SMB.SMB_COM_TRANSACTION2):
+ trans2Response = SMBCommand(resp['Data'][0])
+ trans2Parameters = SMBTransaction2Response_Parameters(trans2Response['Parameters'])
+ # Remove Potential Prefix Padding
+ return trans2Response['Data'][-trans2Parameters['TotalDataCount']:]
+
+ def __nonraw_retr_file(self, tid, fid, offset, datasize, callback):
+ if (self._dialects_parameters['Capabilities'] & SMB.CAP_LARGE_READX) and self._SignatureEnabled is False:
+ max_buf_size = 65000
+ else:
+ max_buf_size = self._dialects_parameters['MaxBufferSize'] & ~0x3ff # Read in multiple KB blocks
+
+ read_offset = offset
+ while read_offset < datasize:
+ data = self.read_andx(tid, fid, read_offset, max_buf_size)
+
+ callback(data)
+ read_offset += len(data)
+
+ def __nonraw_stor_file(self, tid, fid, offset, datasize, callback):
+ if (self._dialects_parameters['Capabilities'] & SMB.CAP_LARGE_WRITEX) and self._SignatureEnabled is False:
+ max_buf_size = 65000
+ else:
+ max_buf_size = self._dialects_parameters['MaxBufferSize'] & ~0x3ff # Write in multiple KB blocks
+
+ write_offset = offset
+ while 1:
+ data = callback(max_buf_size)
+ if not data:
+ break
+
+ smb = self.write_andx(tid,fid,data, write_offset)
+ writeResponse = SMBCommand(smb['Data'][0])
+ writeResponseParameters = SMBWriteAndXResponse_Parameters(writeResponse['Parameters'])
+ write_offset += writeResponseParameters['Count']
+
+ def get_server_domain(self):
+ return self.__server_domain
+
+ def get_server_dns_domain_name(self):
+ return self.__server_dns_domain_name
+
+ def get_server_os(self):
+ return self.__server_os
+
+ def get_server_os_major(self):
+ return self.__server_os_major
+
+ def get_server_os_minor(self):
+ return self.__server_os_minor
+
+ def get_server_os_build(self):
+ return self.__server_os_build
+
+ def set_server_os(self, os):
+ self.__server_os = os
+
+ def get_server_lanman(self):
+ return self.__server_lanman
+
+ def is_login_required(self):
+ # Login is required if share mode is user.
+ # Otherwise only public services or services in share mode
+ # are allowed.
+ return (self._dialects_parameters['SecurityMode'] & SMB.SECURITY_SHARE_MASK) == SMB.SECURITY_SHARE_USER
+
+ def is_signing_required(self):
+ return self._SignatureRequired
+
+ def get_ntlmv1_response(self, key):
+ challenge = self._dialects_data['Challenge']
+ return ntlm.get_ntlmv1_response(key, challenge)
+
+ def kerberos_login(self, user, password, domain = '', lmhash = '', nthash = '', aesKey = '', kdcHost = '', TGT=None, TGS=None):
+ # Importing down here so pyasn1 is not required if kerberos is not used.
+ from impacket.krb5.asn1 import AP_REQ, Authenticator, TGS_REP, seq_set
+ from impacket.krb5.kerberosv5 import getKerberosTGT, getKerberosTGS
+ from impacket.krb5 import constants
+ from impacket.krb5.types import Principal, KerberosTime, Ticket
+ from pyasn1.codec.der import decoder, encoder
+ import datetime
+
+ # login feature does not support unicode
+ # disable it if enabled
+ flags2 = self.__flags2
+ if flags2 & SMB.FLAGS2_UNICODE:
+ self.__flags2 = flags2 & (flags2 ^ SMB.FLAGS2_UNICODE)
+
+ # If TGT or TGS are specified, they are in the form of:
+ # TGS['KDC_REP'] = the response from the server
+ # TGS['cipher'] = the cipher used
+ # TGS['sessionKey'] = the sessionKey
+ # If we have hashes, normalize them
+ if lmhash != '' or nthash != '':
+ if len(lmhash) % 2: lmhash = '0%s' % lmhash
+ if len(nthash) % 2: nthash = '0%s' % nthash
+ try: # just in case they were converted already
+ lmhash = a2b_hex(lmhash)
+ nthash = a2b_hex(nthash)
+ except:
+ pass
+
+ self.__userName = user
+ self.__password = password
+ self.__domain = domain
+ self.__lmhash = lmhash
+ self.__nthash = nthash
+ self.__aesKey = aesKey
+ self.__kdc = kdcHost
+ self.__TGT = TGT
+ self.__TGS = TGS
+
+ # First of all, we need to get a TGT for the user
+ userName = Principal(user, type=constants.PrincipalNameType.NT_PRINCIPAL.value)
+ if TGT is None:
+ if TGS is None:
+ tgt, cipher, oldSessionKey, sessionKey = getKerberosTGT(userName, password, domain, lmhash, nthash, aesKey, kdcHost)
+ else:
+ tgt = TGT['KDC_REP']
+ cipher = TGT['cipher']
+ sessionKey = TGT['sessionKey']
+
+ # Now that we have the TGT, we should ask for a TGS for cifs
+
+ if TGS is None:
+ serverName = Principal('cifs/%s' % self.__remote_name, type=constants.PrincipalNameType.NT_SRV_INST.value)
+ tgs, cipher, oldSessionKey, sessionKey = getKerberosTGS(serverName, domain, kdcHost, tgt, cipher, sessionKey)
+ else:
+ tgs = TGS['KDC_REP']
+ cipher = TGS['cipher']
+ sessionKey = TGS['sessionKey']
+
+ smb = NewSMBPacket()
+
+ # Are we required to sign SMB? If so we do it, if not we skip it
+ if self._SignatureRequired:
+ smb['Flags2'] |= SMB.FLAGS2_SMB_SECURITY_SIGNATURE
+
+
+ sessionSetup = SMBCommand(SMB.SMB_COM_SESSION_SETUP_ANDX)
+ sessionSetup['Parameters'] = SMBSessionSetupAndX_Extended_Parameters()
+ sessionSetup['Data'] = SMBSessionSetupAndX_Extended_Data()
+
+ sessionSetup['Parameters']['MaxBufferSize'] = 61440
+ sessionSetup['Parameters']['MaxMpxCount'] = 2
+ sessionSetup['Parameters']['VcNumber'] = 1
+ sessionSetup['Parameters']['SessionKey'] = 0
+ sessionSetup['Parameters']['Capabilities'] = SMB.CAP_EXTENDED_SECURITY | SMB.CAP_USE_NT_ERRORS | SMB.CAP_UNICODE | SMB.CAP_LARGE_READX | SMB.CAP_LARGE_WRITEX
+
+
+ # Let's build a NegTokenInit with the NTLMSSP
+ # TODO: In the future we should be able to choose different providers
+
+ blob = SPNEGO_NegTokenInit()
+
+ # Kerberos v5 mech
+ blob['MechTypes'] = [TypesMech['MS KRB5 - Microsoft Kerberos 5']]
+
+ # Let's extract the ticket from the TGS
+ tgs = decoder.decode(tgs, asn1Spec = TGS_REP())[0]
+ ticket = Ticket()
+ ticket.from_asn1(tgs['ticket'])
+
+ # Now let's build the AP_REQ
+ apReq = AP_REQ()
+ apReq['pvno'] = 5
+ apReq['msg-type'] = int(constants.ApplicationTagNumbers.AP_REQ.value)
+
+ opts = list()
+ apReq['ap-options'] = constants.encodeFlags(opts)
+ seq_set(apReq,'ticket', ticket.to_asn1)
+
+ authenticator = Authenticator()
+ authenticator['authenticator-vno'] = 5
+ authenticator['crealm'] = domain
+ seq_set(authenticator, 'cname', userName.components_to_asn1)
+ now = datetime.datetime.utcnow()
+
+ authenticator['cusec'] = now.microsecond
+ authenticator['ctime'] = KerberosTime.to_asn1(now)
+
+ encodedAuthenticator = encoder.encode(authenticator)
+
+ # Key Usage 11
+ # AP-REQ Authenticator (includes application authenticator
+ # subkey), encrypted with the application session key
+ # (Section 5.5.1)
+ encryptedEncodedAuthenticator = cipher.encrypt(sessionKey, 11, encodedAuthenticator, None)
+
+ apReq['authenticator'] = None
+ apReq['authenticator']['etype'] = cipher.enctype
+ apReq['authenticator']['cipher'] = encryptedEncodedAuthenticator
+
+ blob['MechToken'] = encoder.encode(apReq)
+
+ sessionSetup['Parameters']['SecurityBlobLength'] = len(blob)
+ sessionSetup['Parameters'].getData()
+ sessionSetup['Data']['SecurityBlob'] = blob.getData()
+
+ # Fake Data here, don't want to get us fingerprinted
+ sessionSetup['Data']['NativeOS'] = 'Unix'
+ sessionSetup['Data']['NativeLanMan'] = 'Samba'
+
+ smb.addCommand(sessionSetup)
+ self.sendSMB(smb)
+
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_SESSION_SETUP_ANDX):
+ # We will need to use this uid field for all future requests/responses
+ self._uid = smb['Uid']
+
+ # Now we have to extract the blob to continue the auth process
+ sessionResponse = SMBCommand(smb['Data'][0])
+ sessionParameters = SMBSessionSetupAndX_Extended_Response_Parameters(sessionResponse['Parameters'])
+ sessionData = SMBSessionSetupAndX_Extended_Response_Data(flags = smb['Flags2'])
+ sessionData['SecurityBlobLength'] = sessionParameters['SecurityBlobLength']
+ sessionData.fromString(sessionResponse['Data'])
+
+ self._action = sessionParameters['Action']
+ # If smb sign required, let's enable it for the rest of the connection
+ if self._dialects_parameters['SecurityMode'] & SMB.SECURITY_SIGNATURES_REQUIRED:
+ self._SigningSessionKey = sessionKey.contents
+ self._SignSequenceNumber = 2
+ self._SignatureEnabled = True
+
+ # restore unicode flag if needed
+ if flags2 & SMB.FLAGS2_UNICODE:
+ self.__flags2 |= SMB.FLAGS2_UNICODE
+
+ return 1
+ else:
+ raise Exception('Error: Could not login successfully')
+
+ def login_extended(self, user, password, domain = '', lmhash = '', nthash = '', use_ntlmv2 = True ):
+
+ # login feature does not support unicode
+ # disable it if enabled
+ flags2 = self.__flags2
+ if flags2 & SMB.FLAGS2_UNICODE:
+ self.__flags2 = flags2 & (flags2 ^ SMB.FLAGS2_UNICODE)
+
+ # Once everything's working we should join login methods into a single one
+ smb = NewSMBPacket()
+ # Are we required to sign SMB? If so we do it, if not we skip it
+ if self._SignatureRequired:
+ smb['Flags2'] |= SMB.FLAGS2_SMB_SECURITY_SIGNATURE
+
+ sessionSetup = SMBCommand(SMB.SMB_COM_SESSION_SETUP_ANDX)
+ sessionSetup['Parameters'] = SMBSessionSetupAndX_Extended_Parameters()
+ sessionSetup['Data'] = SMBSessionSetupAndX_Extended_Data()
+
+ sessionSetup['Parameters']['MaxBufferSize'] = 61440
+ sessionSetup['Parameters']['MaxMpxCount'] = 2
+ sessionSetup['Parameters']['VcNumber'] = 1
+ sessionSetup['Parameters']['SessionKey'] = 0
+ sessionSetup['Parameters']['Capabilities'] = SMB.CAP_EXTENDED_SECURITY | SMB.CAP_USE_NT_ERRORS | SMB.CAP_UNICODE | SMB.CAP_LARGE_READX | SMB.CAP_LARGE_WRITEX
+
+
+ # Let's build a NegTokenInit with the NTLMSSP
+ # TODO: In the future we should be able to choose different providers
+
+ blob = SPNEGO_NegTokenInit()
+
+ # NTLMSSP
+ blob['MechTypes'] = [TypesMech['NTLMSSP - Microsoft NTLM Security Support Provider']]
+ auth = ntlm.getNTLMSSPType1('','',self._SignatureRequired, use_ntlmv2 = use_ntlmv2)
+ blob['MechToken'] = str(auth)
+
+ sessionSetup['Parameters']['SecurityBlobLength'] = len(blob)
+ sessionSetup['Parameters'].getData()
+ sessionSetup['Data']['SecurityBlob'] = blob.getData()
+
+ # Fake Data here, don't want to get us fingerprinted
+ sessionSetup['Data']['NativeOS'] = 'Unix'
+ sessionSetup['Data']['NativeLanMan'] = 'Samba'
+
+ smb.addCommand(sessionSetup)
+ self.sendSMB(smb)
+
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_SESSION_SETUP_ANDX):
+ # We will need to use this uid field for all future requests/responses
+ self._uid = smb['Uid']
+
+ # Now we have to extract the blob to continue the auth process
+ sessionResponse = SMBCommand(smb['Data'][0])
+ sessionParameters = SMBSessionSetupAndX_Extended_Response_Parameters(sessionResponse['Parameters'])
+ sessionData = SMBSessionSetupAndX_Extended_Response_Data(flags = smb['Flags2'])
+ sessionData['SecurityBlobLength'] = sessionParameters['SecurityBlobLength']
+ sessionData.fromString(sessionResponse['Data'])
+ respToken = SPNEGO_NegTokenResp(sessionData['SecurityBlob'])
+
+ # Let's parse some data and keep it to ourselves in case it is asked
+ ntlmChallenge = ntlm.NTLMAuthChallenge(respToken['ResponseToken'])
+ if ntlmChallenge['TargetInfoFields_len'] > 0:
+ av_pairs = ntlm.AV_PAIRS(ntlmChallenge['TargetInfoFields'][:ntlmChallenge['TargetInfoFields_len']])
+ if av_pairs[ntlm.NTLMSSP_AV_HOSTNAME] is not None:
+ try:
+ self.__server_name = av_pairs[ntlm.NTLMSSP_AV_HOSTNAME][1].decode('utf-16le')
+ except:
+ # For some reason, we couldn't decode Unicode here.. silently discard the operation
+ pass
+ if av_pairs[ntlm.NTLMSSP_AV_DOMAINNAME] is not None:
+ try:
+ if self.__server_name != av_pairs[ntlm.NTLMSSP_AV_DOMAINNAME][1].decode('utf-16le'):
+ self.__server_domain = av_pairs[ntlm.NTLMSSP_AV_DOMAINNAME][1].decode('utf-16le')
+ except:
+ # For some reason, we couldn't decode Unicode here.. silently discard the operation
+ pass
+ if av_pairs[ntlm.NTLMSSP_AV_DNS_DOMAINNAME] is not None:
+ try:
+ self.__server_dns_domain_name = av_pairs[ntlm.NTLMSSP_AV_DNS_DOMAINNAME][1].decode('utf-16le')
+ except:
+ # For some reason, we couldn't decode Unicode here.. silently discard the operation
+ pass
+
+ # Parse Version to know the target Operating system name. Not provided elsewhere anymore
+ if ntlmChallenge.fields.has_key('Version'):
+ version = ntlmChallenge['Version']
+
+ if len(version) >= 4:
+ self.__server_os_major, self.__server_os_minor, self.__server_os_build = unpack('<BBH',version[:4])
+
+ type3, exportedSessionKey = ntlm.getNTLMSSPType3(auth, respToken['ResponseToken'], user, password, domain, lmhash, nthash, use_ntlmv2 = use_ntlmv2)
+
+ if exportedSessionKey is not None:
+ self._SigningSessionKey = exportedSessionKey
+
+ smb = NewSMBPacket()
+
+ # Are we required to sign SMB? If so we do it, if not we skip it
+ if self._SignatureRequired:
+ smb['Flags2'] |= SMB.FLAGS2_SMB_SECURITY_SIGNATURE
+
+ respToken2 = SPNEGO_NegTokenResp()
+ respToken2['ResponseToken'] = str(type3)
+
+ # Reusing the previous structure
+ sessionSetup['Parameters']['SecurityBlobLength'] = len(respToken2)
+ sessionSetup['Data']['SecurityBlob'] = respToken2.getData()
+
+ # Storing some info for later use
+ self.__server_os = sessionData['NativeOS']
+ self.__server_lanman = sessionData['NativeLanMan']
+
+ smb.addCommand(sessionSetup)
+ self.sendSMB(smb)
+
+ smb = self.recvSMB()
+ self._uid = 0
+ if smb.isValidAnswer(SMB.SMB_COM_SESSION_SETUP_ANDX):
+ self._uid = smb['Uid']
+ sessionResponse = SMBCommand(smb['Data'][0])
+ sessionParameters = SMBSessionSetupAndXResponse_Parameters(sessionResponse['Parameters'])
+
+ self._action = sessionParameters['Action']
+ # If smb sign required, let's enable it for the rest of the connection
+ if self._dialects_parameters['SecurityMode'] & SMB.SECURITY_SIGNATURES_REQUIRED:
+ self._SignSequenceNumber = 2
+ self._SignatureEnabled = True
+
+ # restore unicode flag if needed
+ if flags2 & SMB.FLAGS2_UNICODE:
+ self.__flags2 |= SMB.FLAGS2_UNICODE
+
+ return 1
+ else:
+ raise Exception('Error: Could not login successfully')
+
+ def getCredentials(self):
+ return (
+ self.__userName,
+ self.__password,
+ self.__domain,
+ self.__lmhash,
+ self.__nthash,
+ self.__aesKey,
+ self.__TGT,
+ self.__TGS)
+
+ def getIOCapabilities(self):
+ res = dict()
+ if (self._dialects_parameters['Capabilities'] & SMB.CAP_LARGE_READX) and self._SignatureEnabled is False:
+ max_size = 65000
+ else:
+ max_size = self._dialects_parameters['MaxBufferSize'] # Read in multiple KB blocks
+ res['MaxReadSize'] = max_size
+ res['MaxWriteSize'] = max_size
+ return res
+
+ def login(self, user, password, domain = '', lmhash = '', nthash = '', ntlm_fallback = True):
+
+ # If we have hashes, normalize them
+ if lmhash != '' or nthash != '':
+ if len(lmhash) % 2: lmhash = '0%s' % lmhash
+ if len(nthash) % 2: nthash = '0%s' % nthash
+ try: # just in case they were converted already
+ lmhash = a2b_hex(lmhash)
+ nthash = a2b_hex(nthash)
+ except:
+ pass
+
+ self.__userName = user
+ self.__password = password
+ self.__domain = domain
+ self.__lmhash = lmhash
+ self.__nthash = nthash
+ self.__aesKey = ''
+ self.__TGT = None
+ self.__TGS = None
+
+ if self._dialects_parameters['Capabilities'] & SMB.CAP_EXTENDED_SECURITY:
+ try:
+ self.login_extended(user, password, domain, lmhash, nthash, use_ntlmv2 = True)
+ except:
+ # If the target OS is Windows 5.0 or Samba, let's try using NTLMv1
+ if ntlm_fallback and ((self.get_server_lanman().find('Windows 2000') != -1) or (self.get_server_lanman().find('Samba') != -1)):
+ self.login_extended(user, password, domain, lmhash, nthash, use_ntlmv2 = False)
+ self.__isNTLMv2 = False
+ else:
+ raise
+ elif ntlm_fallback:
+ self.login_standard(user, password, domain, lmhash, nthash)
+ self.__isNTLMv2 = False
+ else:
+ raise SessionError('Cannot authenticate against target, enable ntlm_fallback')
+
+ def login_standard(self, user, password, domain = '', lmhash = '', nthash = ''):
+
+ # login feature does not support unicode
+ # disable it if enabled
+ flags2 = self.__flags2
+ if flags2 & SMB.FLAGS2_UNICODE:
+ self.__flags2 = flags2 & (flags2 ^ SMB.FLAGS2_UNICODE)
+
+ # Only supports NTLMv1
+ # Password is only encrypted if the server passed us an "encryption key" during protocol dialect negotiation
+ if self._dialects_parameters['ChallengeLength'] > 0:
+ if lmhash != '' or nthash != '':
+ pwd_ansi = self.get_ntlmv1_response(lmhash)
+ pwd_unicode = self.get_ntlmv1_response(nthash)
+ elif password:
+ lmhash = ntlm.compute_lmhash(password)
+ nthash = ntlm.compute_nthash(password)
+ pwd_ansi = self.get_ntlmv1_response(lmhash)
+ pwd_unicode = self.get_ntlmv1_response(nthash)
+ else: # NULL SESSION
+ pwd_ansi = ''
+ pwd_unicode = ''
+ else:
+ pwd_ansi = password
+ pwd_unicode = ''
+
+ smb = NewSMBPacket()
+
+ sessionSetup = SMBCommand(SMB.SMB_COM_SESSION_SETUP_ANDX)
+ sessionSetup['Parameters'] = SMBSessionSetupAndX_Parameters()
+ sessionSetup['Data'] = SMBSessionSetupAndX_Data()
+
+ sessionSetup['Parameters']['MaxBuffer'] = 61440
+ sessionSetup['Parameters']['MaxMpxCount'] = 2
+ sessionSetup['Parameters']['VCNumber'] = os.getpid()
+ sessionSetup['Parameters']['SessionKey'] = self._dialects_parameters['SessionKey']
+ sessionSetup['Parameters']['AnsiPwdLength'] = len(pwd_ansi)
+ sessionSetup['Parameters']['UnicodePwdLength'] = len(pwd_unicode)
+ sessionSetup['Parameters']['Capabilities'] = SMB.CAP_RAW_MODE | SMB.CAP_USE_NT_ERRORS | SMB.CAP_LARGE_READX | SMB.CAP_LARGE_WRITEX
+
+ sessionSetup['Data']['AnsiPwd'] = pwd_ansi
+ sessionSetup['Data']['UnicodePwd'] = pwd_unicode
+ sessionSetup['Data']['Account'] = str(user)
+ sessionSetup['Data']['PrimaryDomain'] = str(domain)
+ sessionSetup['Data']['NativeOS'] = str(os.name)
+ sessionSetup['Data']['NativeLanMan'] = 'pysmb'
+ smb.addCommand(sessionSetup)
+
+ self.sendSMB(smb)
+
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_SESSION_SETUP_ANDX):
+ # We will need to use this uid field for all future requests/responses
+ self._uid = smb['Uid']
+ sessionResponse = SMBCommand(smb['Data'][0])
+ sessionParameters = SMBSessionSetupAndXResponse_Parameters(sessionResponse['Parameters'])
+ sessionData = SMBSessionSetupAndXResponse_Data(flags = smb['Flags2'], data = sessionResponse['Data'])
+
+ self._action = sessionParameters['Action']
+
+ # Still gotta figure out how to do this with no EXTENDED_SECURITY
+ if sessionParameters['Action'] & SMB_SETUP_USE_LANMAN_KEY == 0:
+ self._SigningChallengeResponse = sessionSetup['Data']['UnicodePwd']
+ self._SigningSessionKey = nthash
+ else:
+ self._SigningChallengeResponse = sessionSetup['Data']['AnsiPwd']
+ self._SigningSessionKey = lmhash
+
+ #self._SignSequenceNumber = 1
+ #self.checkSignSMB(smb, self._SigningSessionKey ,self._SigningChallengeResponse)
+ #self._SignatureEnabled = True
+ self.__server_os = sessionData['NativeOS']
+ self.__server_lanman = sessionData['NativeLanMan']
+ self.__server_domain = sessionData['PrimaryDomain']
+
+ # restore unicode flag if needed
+ if flags2 & SMB.FLAGS2_UNICODE:
+ self.__flags2 |= SMB.FLAGS2_UNICODE
+
+ return 1
+ else: raise Exception('Error: Could not login successfully')
+
+ def waitNamedPipe(self, tid, pipe, timeout = 5, noAnswer = 0):
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ transCommand = SMBCommand(SMB.SMB_COM_TRANSACTION)
+ transCommand['Parameters'] = SMBTransaction_Parameters()
+ transCommand['Data'] = SMBTransaction_Data()
+
+ setup = '\x53\x00\x00\x00'
+ name = '\\PIPE%s\x00' % pipe
+ transCommand['Parameters']['Setup'] = setup
+ transCommand['Parameters']['TotalParameterCount'] = 0
+ transCommand['Parameters']['TotalDataCount'] = 0
+ transCommand['Parameters']['MaxParameterCount'] = 0
+ transCommand['Parameters']['MaxDataCount'] = 0
+ transCommand['Parameters']['Timeout'] = timeout * 1000
+
+ transCommand['Parameters']['ParameterCount'] = 0
+ transCommand['Parameters']['ParameterOffset'] = 32+3+28+len(setup)+len(name)
+
+ transCommand['Parameters']['DataCount'] = 0
+ transCommand['Parameters']['DataOffset'] = 0
+
+ transCommand['Data']['Name'] = name
+ transCommand['Data']['Trans_Parameters'] = ''
+ transCommand['Data']['Trans_Data'] = ''
+
+ if noAnswer:
+ transCommand['Parameters']['Flags'] = TRANS_NO_RESPONSE
+
+ smb.addCommand(transCommand)
+ self.sendSMB(smb)
+
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_TRANSACTION):
+ return 1
+ return 0
+
+ def read(self, tid, fid, offset=0, max_size = None, wait_answer=1):
+ if not max_size:
+ max_size = self._dialects_parameters['MaxBufferSize'] # Read in multiple KB blocks
+
+ # max_size is not working, because although it would, the server returns an error (More data avail)
+
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ read = SMBCommand(SMB.SMB_COM_READ)
+ read['Parameters'] = SMBRead_Parameters()
+ read['Parameters']['Fid'] = fid
+ read['Parameters']['Offset'] = offset
+ read['Parameters']['Count'] = max_size
+ smb.addCommand(read)
+
+ if wait_answer:
+ while 1:
+ self.sendSMB(smb)
+ ans = self.recvSMB()
+
+ if ans.isValidAnswer(SMB.SMB_COM_READ):
+ readResponse = SMBCommand(ans['Data'][0])
+ readData = SMBReadResponse_Data(readResponse['Data'])
+
+ return readData['Data']
+
+ return None
+
+ def read_andx(self, tid, fid, offset=0, max_size = None, wait_answer=1, smb_packet=None):
+ if not max_size:
+ if (self._dialects_parameters['Capabilities'] & SMB.CAP_LARGE_READX) and self._SignatureEnabled is False:
+ max_size = 65000
+ else:
+ max_size = self._dialects_parameters['MaxBufferSize'] # Read in multiple KB blocks
+
+ # max_size is not working, because although it would, the server returns an error (More data avail)
+
+ if smb_packet is None:
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ readAndX = SMBCommand(SMB.SMB_COM_READ_ANDX)
+ readAndX['Parameters'] = SMBReadAndX_Parameters()
+ readAndX['Parameters']['Fid'] = fid
+ readAndX['Parameters']['Offset'] = offset
+ readAndX['Parameters']['MaxCount'] = max_size
+ smb.addCommand(readAndX)
+ else:
+ smb = smb_packet
+
+ if wait_answer:
+ answer = ''
+ while 1:
+ self.sendSMB(smb)
+ ans = self.recvSMB()
+
+ if ans.isValidAnswer(SMB.SMB_COM_READ_ANDX):
+ # XXX Here we are only using a few fields from the response
+ readAndXResponse = SMBCommand(ans['Data'][0])
+ readAndXParameters = SMBReadAndXResponse_Parameters(readAndXResponse['Parameters'])
+
+ offset = readAndXParameters['DataOffset']
+ count = readAndXParameters['DataCount']+0x10000*readAndXParameters['DataCount_Hi']
+ answer += str(ans)[offset:offset+count]
+ if not ans.isMoreData():
+ return answer
+ max_size = min(max_size, readAndXParameters['Remaining'])
+ readAndX['Parameters']['Offset'] += count # XXX Offset is not important (apparently)
+ else:
+ self.sendSMB(smb)
+ ans = self.recvSMB()
+
+ try:
+ if ans.isValidAnswer(SMB.SMB_COM_READ_ANDX):
+ return ans
+ else:
+ return None
+ except:
+ return ans
+
+ return None
+
+ def read_raw(self, tid, fid, offset=0, max_size = None, wait_answer=1):
+ if not max_size:
+ max_size = self._dialects_parameters['MaxBufferSize'] # Read in multiple KB blocks
+
+ # max_size is not working, because although it would, the server returns an error (More data avail)
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ readRaw = SMBCommand(SMB.SMB_COM_READ_RAW)
+ readRaw['Parameters'] = SMBReadRaw_Parameters()
+ readRaw['Parameters']['Fid'] = fid
+ readRaw['Parameters']['Offset'] = offset
+ readRaw['Parameters']['MaxCount'] = max_size
+ smb.addCommand(readRaw)
+
+ self.sendSMB(smb)
+ if wait_answer:
+ data = self._sess.recv_packet(self.__timeout).get_trailer()
+ if not data:
+ # If there is no data it means there was an error
+ data = self.read_andx(tid, fid, offset, max_size)
+ return data
+
+ return None
+
+ def write(self,tid,fid,data, offset = 0, wait_answer=1):
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ write = SMBCommand(SMB.SMB_COM_WRITE)
+ write['Parameters'] = SMBWrite_Parameters()
+ write['Data'] = SMBWrite_Data()
+ write['Parameters']['Fid'] = fid
+ write['Parameters']['Count'] = len(data)
+ write['Parameters']['Offset'] = offset
+ write['Parameters']['Remaining'] = len(data)
+ write['Data']['Data'] = data
+ smb.addCommand(write)
+
+ self.sendSMB(smb)
+
+ if wait_answer:
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_WRITE):
+ return smb
+ return None
+
+ def write_andx(self,tid,fid,data, offset = 0, wait_answer=1, write_pipe_mode = False, smb_packet=None):
+ if smb_packet is None:
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ writeAndX = SMBCommand(SMB.SMB_COM_WRITE_ANDX)
+ smb.addCommand(writeAndX)
+
+ writeAndX['Parameters'] = SMBWriteAndX_Parameters()
+ writeAndX['Parameters']['Fid'] = fid
+ writeAndX['Parameters']['Offset'] = offset
+ writeAndX['Parameters']['WriteMode'] = 8
+ writeAndX['Parameters']['Remaining'] = len(data)
+ writeAndX['Parameters']['DataLength'] = len(data)
+ writeAndX['Parameters']['DataOffset'] = len(smb) # this length already includes the parameter
+ writeAndX['Data'] = data
+
+ if write_pipe_mode is True:
+ # First of all we gotta know what the MaxBuffSize is
+ maxBuffSize = self._dialects_parameters['MaxBufferSize']
+ if len(data) > maxBuffSize:
+ chunks_size = maxBuffSize - 60
+ writeAndX['Parameters']['WriteMode'] = 0x0c
+ sendData = '\xff\xff' + data
+ totalLen = len(sendData)
+ writeAndX['Parameters']['DataLength'] = chunks_size
+ writeAndX['Parameters']['Remaining'] = totalLen-2
+ writeAndX['Data'] = sendData[:chunks_size]
+
+ self.sendSMB(smb)
+ if wait_answer:
+ smbResp = self.recvSMB()
+ smbResp.isValidAnswer(SMB.SMB_COM_WRITE_ANDX)
+
+ alreadySent = chunks_size
+ sendData = sendData[chunks_size:]
+
+ while alreadySent < totalLen:
+ writeAndX['Parameters']['WriteMode'] = 0x04
+ writeAndX['Parameters']['DataLength'] = len(sendData[:chunks_size])
+ writeAndX['Data'] = sendData[:chunks_size]
+ self.sendSMB(smb)
+ if wait_answer:
+ smbResp = self.recvSMB()
+ smbResp.isValidAnswer(SMB.SMB_COM_WRITE_ANDX)
+ alreadySent += writeAndX['Parameters']['DataLength']
+ sendData = sendData[chunks_size:]
+
+ return smbResp
+
+ else:
+ smb = smb_packet
+
+ self.sendSMB(smb)
+
+ if wait_answer:
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_WRITE_ANDX):
+ return smb
+ return None
+
+ def write_raw(self,tid,fid,data, offset = 0, wait_answer=1):
+ LOG.warning("[MS-CIFS] This command was introduced in the CorePlus dialect, but is often listed as part of the LAN Manager 1.0 dialect.This command has been deprecated.Clients SHOULD use SMB_COM_WRITE_ANDX")
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+
+ writeRaw = SMBCommand(SMB.SMB_COM_WRITE_RAW)
+ writeRaw['Parameters'] = SMBWriteRaw_Parameters()
+ writeRaw['Parameters']['Fid'] = fid
+ writeRaw['Parameters']['Offset'] = offset
+ writeRaw['Parameters']['Count'] = len(data)
+ writeRaw['Parameters']['DataLength'] = 0
+ writeRaw['Parameters']['DataOffset'] = 0
+ smb.addCommand(writeRaw)
+
+ self.sendSMB(smb)
+ self._sess.send_packet(data)
+
+ if wait_answer:
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_WRITE_RAW):
+ return smb
+ return None
+
+ def TransactNamedPipe(self, tid, fid, data = '', noAnswer = 0, waitAnswer = 1, offset = 0):
+ self.send_trans(tid,pack('<HH', 0x26, fid),'\\PIPE\\\x00','',data, noAnswer = noAnswer)
+
+ if noAnswer or not waitAnswer:
+ return
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_TRANSACTION):
+ transResponse = SMBCommand(smb['Data'][0])
+ transParameters = SMBTransactionResponse_Parameters(transResponse['Parameters'])
+ return transResponse['Data'][-transParameters['TotalDataCount']:] # Remove Potential Prefix Padding
+ return None
+
+ def TransactNamedPipeRecv(self):
+ s = self.recvSMB()
+ if s.isValidAnswer(SMB.SMB_COM_TRANSACTION):
+ transResponse = SMBCommand(s['Data'][0])
+ transParameters = SMBTransactionResponse_Parameters(transResponse['Parameters'])
+ return transResponse['Data'][-transParameters['TotalDataCount']:] # Remove Potential Prefix Padding
+ return None
+
+ def nt_create_andx(self,tid,filename, smb_packet=None, cmd = None, shareAccessMode = FILE_SHARE_READ | FILE_SHARE_WRITE, disposition = FILE_OPEN, accessMask = 0x2019f):
+ filename = filename.replace('/', '\\')
+ filename = filename.encode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else filename
+
+ if smb_packet is None:
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+ else:
+ smb = smb_packet
+
+ if cmd is None:
+ ntCreate = SMBCommand(SMB.SMB_COM_NT_CREATE_ANDX)
+ ntCreate['Parameters'] = SMBNtCreateAndX_Parameters()
+ ntCreate['Data'] = SMBNtCreateAndX_Data(flags=self.__flags2)
+ ntCreate['Parameters']['FileNameLength'] = len(filename)
+ ntCreate['Parameters']['CreateFlags'] = 0x16
+ ntCreate['Parameters']['AccessMask'] = accessMask
+ ntCreate['Parameters']['CreateOptions'] = 0x40
+ ntCreate['Parameters']['ShareAccess'] = shareAccessMode
+ ntCreate['Parameters']['Disposition'] = disposition
+ ntCreate['Data']['FileName'] = filename
+
+ if self.__flags2 & SMB.FLAGS2_UNICODE:
+ ntCreate['Data']['Pad'] = 0x0
+ else:
+ ntCreate = cmd
+
+ smb.addCommand(ntCreate)
+
+ self.sendSMB(smb)
+
+ while 1:
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_NT_CREATE_ANDX):
+ # XXX Here we are ignoring the rest of the response
+ ntCreateResponse = SMBCommand(smb['Data'][0])
+ ntCreateParameters = SMBNtCreateAndXResponse_Parameters(ntCreateResponse['Parameters'])
+
+ self.fid = ntCreateParameters['Fid']
+ return ntCreateParameters['Fid']
+
+ def logoff(self):
+ smb = NewSMBPacket()
+
+ logOff = SMBCommand(SMB.SMB_COM_LOGOFF_ANDX)
+ logOff['Parameters'] = SMBLogOffAndX()
+ smb.addCommand(logOff)
+
+ self.sendSMB(smb)
+ self.recvSMB()
+ # Let's clear some fields so you can login again under the same session
+ self._uid = 0
+
+ def list_path(self, service, path = '*', password = None):
+ path = path.replace('/', '\\')
+ path = path.encode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else path
+
+ tid = self.tree_connect_andx('\\\\' + self.__remote_name + '\\' + service, password)
+ try:
+ findFirstParameter = SMBFindFirst2_Parameters()
+ findFirstParameter['SearchAttributes'] = SMB_FILE_ATTRIBUTE_DIRECTORY | SMB_FILE_ATTRIBUTE_HIDDEN | \
+ SMB_FILE_ATTRIBUTE_SYSTEM | SMB_FILE_ATTRIBUTE_READONLY | \
+ SMB_FILE_ATTRIBUTE_ARCHIVE
+ findFirstParameter['SearchCount'] = 512
+ findFirstParameter['Flags'] = SMB_FIND_RETURN_RESUME_KEYS | SMB_FIND_CLOSE_AT_EOS
+ findFirstParameter['InformationLevel'] = SMB_FIND_FILE_BOTH_DIRECTORY_INFO
+ findFirstParameter['SearchStorageType'] = 0
+ findFirstParameter['FileName'] = path + ('\x00\x00' if self.__flags2 & SMB.FLAGS2_UNICODE else '\x00')
+ self.send_trans2(tid, SMB.TRANS2_FIND_FIRST2, '\x00', findFirstParameter, '')
+ files = [ ]
+
+ totalDataCount = 1
+ findData = ''
+ findFirst2ParameterBlock = ''
+ while len(findData) < totalDataCount:
+ resp = self.recvSMB()
+
+ if resp.isValidAnswer(SMB.SMB_COM_TRANSACTION2):
+ trans2Response = SMBCommand(resp['Data'][0])
+ trans2Parameters = SMBTransaction2Response_Parameters(trans2Response['Parameters'])
+ totalDataCount = trans2Parameters['TotalDataCount']
+ findFirst2ParameterBlock += trans2Response['Data'][trans2Parameters['ParameterOffset']-55:][:trans2Parameters['ParameterCount']]
+ findData += trans2Response['Data'][trans2Parameters['DataOffset']-55:]
+
+ findParameterBlock = SMBFindFirst2Response_Parameters(findFirst2ParameterBlock)
+ # Save the SID for resume operations
+ sid = findParameterBlock['SID']
+
+ while True:
+ record = SMBFindFileBothDirectoryInfo(data = findData)
+
+ shortname = record['ShortName'].decode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else record['ShortName']
+ filename = record['FileName'].decode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else record['FileName']
+
+ fileRecord = SharedFile(record['CreationTime'], record['LastAccessTime'], record['LastChangeTime'],
+ record['EndOfFile'], record['AllocationSize'], record['ExtFileAttributes'],
+ shortname, filename)
+ files.append(fileRecord)
+ if record['NextEntryOffset'] > 0 and len(findData[record['NextEntryOffset']:]) > 0:
+ findData = findData[record['NextEntryOffset']:]
+ else:
+ # More data to search?
+ if findParameterBlock['EndOfSearch'] == 0:
+ resume_filename = record['FileName']
+ findNextParameter = SMBFindNext2_Parameters()
+ findNextParameter['SID'] = sid
+ findNextParameter['SearchCount'] = 1024
+ findNextParameter['InformationLevel'] = SMB_FIND_FILE_BOTH_DIRECTORY_INFO
+ findNextParameter['ResumeKey'] = 0
+ findNextParameter['Flags'] = SMB_FIND_RETURN_RESUME_KEYS | SMB_FIND_CLOSE_AT_EOS
+ findNextParameter['FileName'] = resume_filename + ('\x00\x00' if self.__flags2 & SMB.FLAGS2_UNICODE else '\x00')
+ self.send_trans2(tid, SMB.TRANS2_FIND_NEXT2, '\x00', findNextParameter, '')
+ findData = ''
+ findNext2ParameterBlock = ''
+ totalDataCount = 1
+ while len(findData) < totalDataCount:
+ resp = self.recvSMB()
+
+ if resp.isValidAnswer(SMB.SMB_COM_TRANSACTION2):
+ trans2Response = SMBCommand(resp['Data'][0])
+ trans2Parameters = SMBTransaction2Response_Parameters(trans2Response['Parameters'])
+ totalDataCount = trans2Parameters['TotalDataCount']
+ findNext2ParameterBlock += trans2Response['Data'][trans2Parameters['ParameterOffset']-55:][:trans2Parameters['ParameterCount']]
+ findData += trans2Response['Data'][trans2Parameters['DataOffset']-55:]
+ findParameterBlock = SMBFindNext2Response_Parameters(findNext2ParameterBlock)
+ else:
+ break
+ finally:
+ self.disconnect_tree(tid)
+
+ return files
+
+ def retr_file(self, service, filename, callback, mode = FILE_OPEN, offset = 0, password = None, shareAccessMode = SMB_ACCESS_READ):
+ filename = string.replace(filename, '/', '\\')
+
+ fid = -1
+ tid = self.tree_connect_andx('\\\\' + self.__remote_name + '\\' + service, password)
+ try:
+ fid = self.nt_create_andx(tid, filename, shareAccessMode = shareAccessMode, accessMask = 0x20089)
+
+ res = self.query_file_info(tid, fid)
+ datasize = SMBQueryFileStandardInfo(res)['EndOfFile']
+
+ self.__nonraw_retr_file(tid, fid, offset, datasize, callback)
+ finally:
+ if fid >= 0:
+ self.close(tid, fid)
+ self.disconnect_tree(tid)
+
+ def stor_file(self, service, filename, callback, mode = FILE_OVERWRITE_IF, offset = 0, password = None, shareAccessMode = SMB_ACCESS_WRITE):
+ filename = string.replace(filename, '/', '\\')
+
+ fid = -1
+ tid = self.tree_connect_andx('\\\\' + self.__remote_name + '\\' + service, password)
+ try:
+ fid = self.nt_create_andx(tid, filename, shareAccessMode = shareAccessMode, disposition = mode )
+
+ self.__nonraw_stor_file(tid, fid, offset, 0, callback)
+ finally:
+ if fid >= 0:
+ self.close(tid, fid)
+ self.disconnect_tree(tid)
+
+ def stor_file_nonraw(self, service, filename, callback, mode = FILE_OVERWRITE_IF, offset = 0, password = None, shareAccessMode = SMB_ACCESS_WRITE ):
+ filename = string.replace(filename, '/', '\\')
+
+ fid = -1
+ tid = self.tree_connect_andx('\\\\' + self.__remote_name + '\\' + service, password)
+ try:
+ fid = self.nt_create_andx(tid, filename, shareAccessMode = shareAccessMode, disposition = mode)
+ self.__nonraw_stor_file(tid, fid, offset, 0, callback)
+ finally:
+ if fid >= 0:
+ self.close(tid, fid)
+ self.disconnect_tree(tid)
+
+ def check_dir(self, service, path, password = None):
+ path = string.replace(path,'/', '\\')
+ tid = self.tree_connect_andx('\\\\' + self.__remote_name + '\\' + service, password)
+ try:
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+ smb['Mid'] = 0
+
+ cmd = SMBCommand(SMB.SMB_COM_CHECK_DIRECTORY)
+ cmd['Parameters'] = ''
+ cmd['Data'] = SMBCheckDirectory_Data(flags = self.__flags2)
+ cmd['Data']['DirectoryName'] = path.encode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else path
+ smb.addCommand(cmd)
+
+ self.sendSMB(smb)
+
+ while 1:
+ s = self.recvSMB()
+ if s.isValidAnswer(SMB.SMB_COM_CHECK_DIRECTORY):
+ return
+ finally:
+ self.disconnect_tree(tid)
+
+ def remove(self, service, path, password = None):
+ path = string.replace(path,'/', '\\')
+ # Perform a list to ensure the path exists
+ self.list_path(service, path, password)
+
+ tid = self.tree_connect_andx('\\\\' + self.__remote_name + '\\' + service, password)
+ try:
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+ smb['Mid'] = 0
+
+ cmd = SMBCommand(SMB.SMB_COM_DELETE)
+ cmd['Parameters'] = SMBDelete_Parameters()
+ cmd['Parameters']['SearchAttributes'] = ATTR_HIDDEN | ATTR_SYSTEM | ATTR_ARCHIVE
+ cmd['Data'] = SMBDelete_Data(flags = self.__flags2)
+ cmd['Data']['FileName'] = (path + '\x00').encode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else (path + '\x00')
+ smb.addCommand(cmd)
+
+ self.sendSMB(smb)
+
+ while 1:
+ s = self.recvSMB()
+ if s.isValidAnswer(SMB.SMB_COM_DELETE):
+ return
+ finally:
+ self.disconnect_tree(tid)
+
+ def rmdir(self, service, path, password = None):
+ path = string.replace(path,'/', '\\')
+ # Check that the directory exists
+ self.check_dir(service, path, password)
+
+ tid = self.tree_connect_andx('\\\\' + self.__remote_name + '\\' + service, password)
+ try:
+ path = path.encode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else path
+
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+ createDir = SMBCommand(SMB.SMB_COM_DELETE_DIRECTORY)
+ createDir['Data'] = SMBDeleteDirectory_Data(flags=self.__flags2)
+ createDir['Data']['DirectoryName'] = path
+ smb.addCommand(createDir)
+
+ self.sendSMB(smb)
+
+ while 1:
+ s = self.recvSMB()
+ if s.isValidAnswer(SMB.SMB_COM_DELETE_DIRECTORY):
+ return
+ finally:
+ self.disconnect_tree(tid)
+
+ def mkdir(self, service, path, password = None):
+ path = string.replace(path,'/', '\\')
+ tid = self.tree_connect_andx('\\\\' + self.__remote_name + '\\' + service, password)
+ try:
+ path = path.encode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else path
+
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+ smb['Mid'] = 0
+
+ createDir = SMBCommand(SMB.SMB_COM_CREATE_DIRECTORY)
+ createDir['Data'] = SMBCreateDirectory_Data(flags=self.__flags2)
+ createDir['Data']['DirectoryName'] = path
+ smb.addCommand(createDir)
+
+ self.sendSMB(smb)
+
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_CREATE_DIRECTORY):
+ return 1
+ return 0
+ finally:
+ self.disconnect_tree(tid)
+
+ def rename(self, service, old_path, new_path, password = None):
+ old_path = string.replace(old_path,'/', '\\')
+ new_path = string.replace(new_path,'/', '\\')
+ tid = self.tree_connect_andx('\\\\' + self.__remote_name + '\\' + service, password)
+ try:
+ smb = NewSMBPacket()
+ smb['Tid'] = tid
+ smb['Mid'] = 0
+
+ renameCmd = SMBCommand(SMB.SMB_COM_RENAME)
+ renameCmd['Parameters'] = SMBRename_Parameters()
+ renameCmd['Parameters']['SearchAttributes'] = ATTR_SYSTEM | ATTR_HIDDEN | ATTR_DIRECTORY
+ renameCmd['Data'] = SMBRename_Data(flags = self.__flags2)
+ renameCmd['Data']['OldFileName'] = old_path.encode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else old_path
+ renameCmd['Data']['NewFileName'] = new_path.encode('utf-16le') if self.__flags2 & SMB.FLAGS2_UNICODE else new_path
+ smb.addCommand(renameCmd)
+
+ self.sendSMB(smb)
+
+ smb = self.recvSMB()
+ if smb.isValidAnswer(SMB.SMB_COM_RENAME):
+ return 1
+ return 0
+ finally:
+ self.disconnect_tree(tid)
+
+ def writeFile(self, treeId, fileId, data, offset = 0):
+ if (self._dialects_parameters['Capabilities'] & SMB.CAP_LARGE_WRITEX) and self._SignatureEnabled is False:
+ max_buf_size = 65000
+ else:
+ max_buf_size = self._dialects_parameters['MaxBufferSize'] & ~0x3ff # Write in multiple KB blocks
+
+ write_offset = offset
+ while 1:
+ if len(data) == 0:
+ break
+ writeData = data[:max_buf_size]
+ data = data[max_buf_size:]
+
+ smb = self.write_andx(treeId,fileId,writeData, write_offset)
+ writeResponse = SMBCommand(smb['Data'][0])
+ writeResponseParameters = SMBWriteAndXResponse_Parameters(writeResponse['Parameters'])
+ write_offset += writeResponseParameters['Count']
+
+ def get_socket(self):
+ return self._sess.get_socket()
+
+ERRDOS = { 1: 'Invalid function',
+ 2: 'File not found',
+ 3: 'Invalid directory',
+ 4: 'Too many open files',
+ 5: 'Access denied',
+ 6: 'Invalid file handle. Please file a bug report.',
+ 7: 'Memory control blocks destroyed',
+ 8: 'Out of memory',
+ 9: 'Invalid memory block address',
+ 10: 'Invalid environment',
+ 11: 'Invalid format',
+ 12: 'Invalid open mode',
+ 13: 'Invalid data',
+ 15: 'Invalid drive',
+ 16: 'Attempt to remove server\'s current directory',
+ 17: 'Not the same device',
+ 18: 'No files found',
+ 32: 'Sharing mode conflicts detected',
+ 33: 'Lock request conflicts detected',
+ 80: 'File already exists'
+ }
+
+ERRSRV = { 1: 'Non-specific error',
+ 2: 'Bad password',
+ 4: 'Access denied',
+ 5: 'Invalid tid. Please file a bug report.',
+ 6: 'Invalid network name',
+ 7: 'Invalid device',
+ 49: 'Print queue full',
+ 50: 'Print queue full',
+ 51: 'EOF on print queue dump',
+ 52: 'Invalid print file handle',
+ 64: 'Command not recognized. Please file a bug report.',
+ 65: 'Internal server error',
+ 67: 'Invalid path',
+ 69: 'Invalid access permissions',
+ 71: 'Invalid attribute mode',
+ 81: 'Server is paused',
+ 82: 'Not receiving messages',
+ 83: 'No room to buffer messages',
+ 87: 'Too many remote user names',
+ 88: 'Operation timeout',
+ 89: 'Out of resources',
+ 91: 'Invalid user handle. Please file a bug report.',
+ 250: 'Temporarily unable to support raw mode for transfer',
+ 251: 'Temporarily unable to support raw mode for transfer',
+ 252: 'Continue in MPX mode',
+ 65535: 'Unsupported function'
+ }
+
+ERRHRD = { 19: 'Media is write-protected',
+ 20: 'Unknown unit',
+ 21: 'Drive not ready',
+ 22: 'Unknown command',
+ 23: 'CRC error',
+ 24: 'Bad request',
+ 25: 'Seek error',
+ 26: 'Unknown media type',
+ 27: 'Sector not found',
+ 28: 'Printer out of paper',
+ 29: 'Write fault',
+ 30: 'Read fault',
+ 31: 'General failure',
+ 32: 'Open conflicts with an existing open',
+ 33: 'Invalid lock request',
+ 34: 'Wrong disk in drive',
+ 35: 'FCBs not available',
+ 36: 'Sharing buffer exceeded'
+ }
+
diff --git a/tests/python_dependencies/impacket/smb3.py b/tests/python_dependencies/impacket/smb3.py
new file mode 100644
index 00000000..5548e4b0
--- /dev/null
+++ b/tests/python_dependencies/impacket/smb3.py
@@ -0,0 +1,1629 @@
+# Copyright (c) 2003-2016 CORE Security Technologies
+#
+# This software is provided under under a slightly modified version
+# of the Apache Software License. See the accompanying LICENSE file
+# for more information.
+#
+# Author: Alberto Solino (@agsolino)
+#
+# Description:
+# [MS-SMB2] Protocol Implementation (SMB2 and SMB3)
+# As you might see in the code, it's implemented strictly following
+# the structures defined in the protocol specification. This may
+# not be the most efficient way (e.g. self._Connection is the
+# same to self._Session in the context of this library ) but
+# it certainly helps following the document way easier.
+#
+# ToDo:
+# [X] Implement SMB2_CHANGE_NOTIFY
+# [X] Implement SMB2_QUERY_INFO
+# [X] Implement SMB2_SET_INFO
+# [ ] Implement SMB2_OPLOCK_BREAK
+# [X] Implement SMB3 signing
+# [ ] Implement SMB3 encryption
+# [ ] Add more backward compatible commands from the smb.py code
+# [ ] Fix up all the 'ToDo' comments inside the code
+#
+
+import socket
+import ntpath
+import random
+import string
+import struct
+from binascii import a2b_hex
+from contextlib import contextmanager
+
+from impacket import nmb, ntlm, uuid, crypto, LOG
+from impacket.smb3structs import *
+from impacket.nt_errors import STATUS_SUCCESS, STATUS_MORE_PROCESSING_REQUIRED, STATUS_INVALID_PARAMETER, \
+ STATUS_NO_MORE_FILES, STATUS_PENDING, STATUS_NOT_IMPLEMENTED, ERROR_MESSAGES
+from impacket.spnego import SPNEGO_NegTokenInit, TypesMech, SPNEGO_NegTokenResp
+
+
+# For signing
+import hashlib, hmac, copy
+
+# Structs to be used
+TREE_CONNECT = {
+ 'ShareName' : '',
+ 'TreeConnectId' : 0,
+ 'Session' : 0,
+ 'IsDfsShare' : False,
+ # If the client implements the SMB 3.0 dialect,
+ # the client MUST also implement the following
+ 'IsCAShare' : False,
+ 'EncryptData' : False,
+ 'IsScaleoutShare' : False,
+ # Outside the protocol
+ 'NumberOfUses' : 0,
+}
+
+FILE = {
+ 'OpenTable' : [],
+ 'LeaseKey' : '',
+ 'LeaseState' : 0,
+ 'LeaseEpoch' : 0,
+}
+
+OPEN = {
+ 'FileID' : '',
+ 'TreeConnect' : 0,
+ 'Connection' : 0, # Not Used
+ 'Oplocklevel' : 0,
+ 'Durable' : False,
+ 'FileName' : '',
+ 'ResilientHandle' : False,
+ 'LastDisconnectTime' : 0,
+ 'ResilientTimeout' : 0,
+ 'OperationBuckets' : [],
+ # If the client implements the SMB 3.0 dialect,
+ # the client MUST implement the following
+ 'CreateGuid' : '',
+ 'IsPersistent' : False,
+ 'DesiredAccess' : '',
+ 'ShareMode' : 0,
+ 'CreateOption' : '',
+ 'FileAttributes' : '',
+ 'CreateDisposition' : '',
+}
+
+REQUEST = {
+ 'CancelID' : '',
+ 'Message' : '',
+ 'Timestamp' : 0,
+}
+
+CHANNEL = {
+ 'SigningKey' : '',
+ 'Connection' : 0,
+}
+
+
+class SessionError(Exception):
+ def __init__( self, error = 0, packet=0):
+ Exception.__init__(self)
+ self.error = error
+ self.packet = packet
+
+ def get_error_code( self ):
+ return self.error
+
+ def get_error_packet( self ):
+ return self.packet
+
+ def __str__( self ):
+ return 'SMB SessionError: %s(%s)' % (ERROR_MESSAGES[self.error])
+
+
+class SMB3:
+ def __init__(self, remote_name, remote_host, my_name = None, host_type = nmb.TYPE_SERVER, sess_port = 445, timeout=60, UDP = 0, preferredDialect = None, session = None):
+
+ # [MS-SMB2] Section 3
+ self.RequireMessageSigning = False #
+ self.ConnectionTable = {}
+ self.GlobalFileTable = {}
+ self.ClientGuid = ''.join([random.choice(string.letters) for i in range(16)])
+ # Only for SMB 3.0
+ self.EncryptionAlgorithmList = ['AES-CCM']
+ self.MaxDialect = []
+ self.RequireSecureNegotiate = False
+
+ # Per Transport Connection Data
+ self._Connection = {
+ # Indexed by SessionID
+ #'SessionTable' : {},
+ # Indexed by MessageID
+ 'OutstandingRequests' : {},
+ 'OutstandingResponses' : {}, #
+ 'SequenceWindow' : 0, #
+ 'GSSNegotiateToken' : '', #
+ 'MaxTransactSize' : 0, #
+ 'MaxReadSize' : 0, #
+ 'MaxWriteSize' : 0, #
+ 'ServerGuid' : '', #
+ 'RequireSigning' : False, #
+ 'ServerName' : '', #
+ # If the client implements the SMB 2.1 or SMB 3.0 dialects, it MUST
+ # also implement the following
+ 'Dialect' : '', #
+ 'SupportsFileLeasing' : False, #
+ 'SupportsMultiCredit' : False, #
+ # If the client implements the SMB 3.0 dialect,
+ # it MUST also implement the following
+ 'SupportsDirectoryLeasing' : False, #
+ 'SupportsMultiChannel' : False, #
+ 'SupportsPersistentHandles': False, #
+ 'SupportsEncryption' : False, #
+ 'ClientCapabilities' : 0,
+ 'ServerCapabilities' : 0, #
+ 'ClientSecurityMode' : 0, #
+ 'ServerSecurityMode' : 0, #
+ # Outside the protocol
+ 'ServerIP' : '', #
+ }
+
+ self._Session = {
+ 'SessionID' : 0, #
+ 'TreeConnectTable' : {}, #
+ 'SessionKey' : '', #
+ 'SigningRequired' : False, #
+ 'Connection' : 0, #
+ 'UserCredentials' : '', #
+ 'OpenTable' : {}, #
+ # If the client implements the SMB 3.0 dialect,
+ # it MUST also implement the following
+ 'ChannelList' : [],
+ 'ChannelSequence' : 0,
+ #'EncryptData' : False,
+ 'EncryptData' : True,
+ 'EncryptionKey' : '',
+ 'DecryptionKey' : '',
+ 'SigningKey' : '',
+ 'ApplicationKey' : '',
+ # Outside the protocol
+ 'SessionFlags' : 0, #
+ 'ServerName' : '', #
+ 'ServerDomain' : '', #
+ 'ServerDNSDomainName' : '', #
+ 'ServerOS' : '', #
+ 'SigningActivated' : False, #
+ }
+
+ self.SMB_PACKET = SMB2Packet
+
+ self._timeout = timeout
+ self._Connection['ServerIP'] = remote_host
+ self._NetBIOSSession = None
+
+ self.__userName = ''
+ self.__password = ''
+ self.__domain = ''
+ self.__lmhash = ''
+ self.__nthash = ''
+ self.__kdc = ''
+ self.__aesKey = ''
+ self.__TGT = None
+ self.__TGS = None
+
+ if sess_port == 445 and remote_name == '*SMBSERVER':
+ self._Connection['ServerName'] = remote_host
+ else:
+ self._Connection['ServerName'] = remote_name
+
+ if session is None:
+ if not my_name:
+ my_name = socket.gethostname()
+ i = string.find(my_name, '.')
+ if i > -1:
+ my_name = my_name[:i]
+
+ if UDP:
+ self._NetBIOSSession = nmb.NetBIOSUDPSession(my_name, self._Connection['ServerName'], remote_host, host_type, sess_port, self._timeout)
+ else:
+ self._NetBIOSSession = nmb.NetBIOSTCPSession(my_name, self._Connection['ServerName'], remote_host, host_type, sess_port, self._timeout)
+
+ self.negotiateSession(preferredDialect)
+ else:
+ self._NetBIOSSession = session
+ # We should increase the SequenceWindow since a packet was already received.
+ self._Connection['SequenceWindow'] += 1
+ # Let's negotiate again using the same connection
+ self.negotiateSession(preferredDialect)
+
+ def printStatus(self):
+ print "CONNECTION"
+ for i in self._Connection.items():
+ print "%-40s : %s" % i
+ print
+ print "SESSION"
+ for i in self._Session.items():
+ print "%-40s : %s" % i
+
+ def getServerName(self):
+ return self._Session['ServerName']
+
+ def getServerIP(self):
+ return self._Connection['ServerIP']
+
+ def getServerDomain(self):
+ return self._Session['ServerDomain']
+
+ def getServerDNSDomainName(self):
+ return self._Session['ServerDNSDomainName']
+
+ def getServerOS(self):
+ return self._Session['ServerOS']
+
+ def getServerOSMajor(self):
+ return self._Session['ServerOSMajor']
+
+ def getServerOSMinor(self):
+ return self._Session['ServerOSMinor']
+
+ def getServerOSBuild(self):
+ return self._Session['ServerOSBuild']
+
+ def isGuestSession(self):
+ return self._Session['SessionFlags'] & SMB2_SESSION_FLAG_IS_GUEST
+
+ def setTimeout(self, timeout):
+ self._timeout = timeout
+
+ @contextmanager
+ def useTimeout(self, timeout):
+ prev_timeout = self.getTimeout(timeout)
+ try:
+ yield
+ finally:
+ self.setTimeout(prev_timeout)
+
+ def getDialect(self):
+ return self._Connection['Dialect']
+
+
+ def signSMB(self, packet):
+ packet['Signature'] = '\x00'*16
+ if self._Connection['Dialect'] == SMB2_DIALECT_21 or self._Connection['Dialect'] == SMB2_DIALECT_002:
+ if len(self._Session['SessionKey']) > 0:
+ signature = hmac.new(self._Session['SessionKey'], str(packet), hashlib.sha256).digest()
+ packet['Signature'] = signature[:16]
+ else:
+ if len(self._Session['SessionKey']) > 0:
+ p = str(packet)
+ signature = crypto.AES_CMAC(self._Session['SigningKey'], p, len(p))
+ packet['Signature'] = signature
+
+ def sendSMB(self, packet):
+ # The idea here is to receive multiple/single commands and create a compound request, and send it
+ # Should return the MessageID for later retrieval. Implement compounded related requests.
+
+ # If Connection.Dialect is equal to "3.000" and if Connection.SupportsMultiChannel or
+ # Connection.SupportsPersistentHandles is TRUE, the client MUST set ChannelSequence in the
+ # SMB2 header to Session.ChannelSequence
+
+ # Check this is not a CANCEL request. If so, don't consume sequece numbers
+ if packet['Command'] is not SMB2_CANCEL:
+ packet['MessageID'] = self._Connection['SequenceWindow']
+ self._Connection['SequenceWindow'] += 1
+ packet['SessionID'] = self._Session['SessionID']
+
+ # Default the credit charge to 1 unless set by the caller
+ if packet.fields.has_key('CreditCharge') is False:
+ packet['CreditCharge'] = 1
+
+ # Standard credit request after negotiating protocol
+ if self._Connection['SequenceWindow'] > 3:
+ packet['CreditRequestResponse'] = 127
+
+ messageId = packet['MessageID']
+
+ if self._Session['SigningActivated'] is True and self._Connection['SequenceWindow'] > 2:
+ if packet['TreeID'] > 0 and self._Session['TreeConnectTable'].has_key(packet['TreeID']) is True:
+ if self._Session['TreeConnectTable'][packet['TreeID']]['EncryptData'] is False:
+ packet['Flags'] = SMB2_FLAGS_SIGNED
+ self.signSMB(packet)
+ elif packet['TreeID'] == 0:
+ packet['Flags'] = SMB2_FLAGS_SIGNED
+ self.signSMB(packet)
+
+ if (self._Session['SessionFlags'] & SMB2_SESSION_FLAG_ENCRYPT_DATA) or ( packet['TreeID'] != 0 and self._Session['TreeConnectTable'][packet['TreeID']]['EncryptData'] is True):
+ plainText = str(packet)
+ transformHeader = SMB2_TRANSFORM_HEADER()
+ transformHeader['Nonce'] = ''.join([random.choice(string.letters) for i in range(11)])
+ transformHeader['OriginalMessageSize'] = len(plainText)
+ transformHeader['EncryptionAlgorithm'] = SMB2_ENCRYPTION_AES128_CCM
+ transformHeader['SessionID'] = self._Session['SessionID']
+ from Crypto.Cipher import AES
+ try:
+ AES.MODE_CCM
+ except:
+ LOG.critical("Your pycrypto doesn't support AES.MODE_CCM. Currently only pycrypto experimental supports this mode.\nDownload it from https://www.dlitz.net/software/pycrypto ")
+ raise
+ cipher = AES.new(self._Session['EncryptionKey'], AES.MODE_CCM, transformHeader['Nonce'])
+ cipher.update(str(transformHeader)[20:])
+ cipherText = cipher.encrypt(plainText)
+ transformHeader['Signature'] = cipher.digest()
+ packet = str(transformHeader) + cipherText
+
+ self._NetBIOSSession.send_packet(str(packet))
+ return messageId
+
+ def recvSMB(self, packetID = None):
+ # First, verify we don't have the packet already
+ if self._Connection['OutstandingResponses'].has_key(packetID):
+ return self._Connection['OutstandingResponses'].pop(packetID)
+
+ data = self._NetBIOSSession.recv_packet(self._timeout)
+
+ if data.get_trailer().startswith('\xfdSMB'):
+ # Packet is encrypted
+ transformHeader = SMB2_TRANSFORM_HEADER(data.get_trailer())
+ from Crypto.Cipher import AES
+ try:
+ AES.MODE_CCM
+ except:
+ LOG.critical("Your pycrypto doesn't support AES.MODE_CCM. Currently only pycrypto experimental supports this mode.\nDownload it from https://www.dlitz.net/software/pycrypto ")
+ raise
+ cipher = AES.new(self._Session['DecryptionKey'], AES.MODE_CCM, transformHeader['Nonce'][:11])
+ cipher.update(str(transformHeader)[20:])
+ plainText = cipher.decrypt(data.get_trailer()[len(SMB2_TRANSFORM_HEADER()):])
+ #cipher.verify(transformHeader['Signature'])
+ packet = SMB2Packet(plainText)
+ else:
+ # In all SMB dialects for a response this field is interpreted as the Status field.
+ # This field can be set to any value. For a list of valid status codes,
+ # see [MS-ERREF] section 2.3.
+ packet = SMB2Packet(data.get_trailer())
+
+ # Loop while we receive pending requests
+ if packet['Status'] == STATUS_PENDING:
+ status = STATUS_PENDING
+ while status == STATUS_PENDING:
+ data = self._NetBIOSSession.recv_packet(self._timeout)
+ if data.get_trailer().startswith('\xfeSMB'):
+ packet = SMB2Packet(data.get_trailer())
+ else:
+ # Packet is encrypted
+ transformHeader = SMB2_TRANSFORM_HEADER(data.get_trailer())
+ from Crypto.Cipher import AES
+ try:
+ AES.MODE_CCM
+ except:
+ LOG.critical("Your pycrypto doesn't support AES.MODE_CCM. Currently only pycrypto experimental supports this mode.\nDownload it from https://www.dlitz.net/software/pycrypto ")
+ raise
+ cipher = AES.new(self._Session['DecryptionKey'], AES.MODE_CCM, transformHeader['Nonce'][:11])
+ cipher.update(str(transformHeader)[20:])
+ plainText = cipher.decrypt(data.get_trailer()[len(SMB2_TRANSFORM_HEADER()):])
+ #cipher.verify(transformHeader['Signature'])
+ packet = SMB2Packet(plainText)
+ status = packet['Status']
+
+ if packet['MessageID'] == packetID or packetID is None:
+ # if self._Session['SigningRequired'] is True:
+ # self.signSMB(packet)
+ # Let's update the sequenceWindow based on the CreditsCharged
+ self._Connection['SequenceWindow'] += (packet['CreditCharge'] - 1)
+ return packet
+ else:
+ self._Connection['OutstandingResponses'][packet['MessageID']] = packet
+ return self.recvSMB(packetID)
+
+ def negotiateSession(self, preferredDialect = None):
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_NEGOTIATE
+ negSession = SMB2Negotiate()
+
+ negSession['SecurityMode'] = SMB2_NEGOTIATE_SIGNING_ENABLED
+ if self.RequireMessageSigning is True:
+ negSession['SecurityMode'] |= SMB2_NEGOTIATE_SIGNING_REQUIRED
+ negSession['Capabilities'] = SMB2_GLOBAL_CAP_ENCRYPTION
+ negSession['ClientGuid'] = self.ClientGuid
+ if preferredDialect is not None:
+ negSession['Dialects'] = [preferredDialect]
+ else:
+ negSession['Dialects'] = [SMB2_DIALECT_002, SMB2_DIALECT_21, SMB2_DIALECT_30]
+ negSession['DialectCount'] = len(negSession['Dialects'])
+ packet['Data'] = negSession
+
+ # Storing this data for later use
+ self._Connection['ClientSecurityMode'] = negSession['SecurityMode']
+ self._Connection['Capabilities'] = negSession['Capabilities']
+
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ # ToDo this:
+ # If the DialectRevision in the SMB2 NEGOTIATE Response is 0x02FF, the client MUST issue a new
+ # SMB2 NEGOTIATE request as described in section 3.2.4.2.2.2 with the only exception
+ # that the client MUST allocate sequence number 1 from Connection.SequenceWindow, and MUST set
+ # MessageId field of the SMB2 header to 1. Otherwise, the client MUST proceed as follows.
+ negResp = SMB2Negotiate_Response(ans['Data'])
+ self._Connection['MaxTransactSize'] = min(0x100000,negResp['MaxTransactSize'])
+ self._Connection['MaxReadSize'] = min(0x100000,negResp['MaxReadSize'])
+ self._Connection['MaxWriteSize'] = min(0x100000,negResp['MaxWriteSize'])
+ self._Connection['ServerGuid'] = negResp['ServerGuid']
+ self._Connection['GSSNegotiateToken'] = negResp['Buffer']
+ self._Connection['Dialect'] = negResp['DialectRevision']
+ if (negResp['SecurityMode'] & SMB2_NEGOTIATE_SIGNING_REQUIRED) == SMB2_NEGOTIATE_SIGNING_REQUIRED:
+ self._Connection['RequireSigning'] = True
+ if (negResp['Capabilities'] & SMB2_GLOBAL_CAP_LEASING) == SMB2_GLOBAL_CAP_LEASING:
+ self._Connection['SupportsFileLeasing'] = True
+ if (negResp['Capabilities'] & SMB2_GLOBAL_CAP_LARGE_MTU) == SMB2_GLOBAL_CAP_LARGE_MTU:
+ self._Connection['SupportsMultiCredit'] = True
+
+ if self._Connection['Dialect'] == SMB2_DIALECT_30:
+ # Switching to the right packet format
+ self.SMB_PACKET = SMB3Packet
+ if (negResp['Capabilities'] & SMB2_GLOBAL_CAP_DIRECTORY_LEASING) == SMB2_GLOBAL_CAP_DIRECTORY_LEASING:
+ self._Connection['SupportsDirectoryLeasing'] = True
+ if (negResp['Capabilities'] & SMB2_GLOBAL_CAP_MULTI_CHANNEL) == SMB2_GLOBAL_CAP_MULTI_CHANNEL:
+ self._Connection['SupportsMultiChannel'] = True
+ if (negResp['Capabilities'] & SMB2_GLOBAL_CAP_PERSISTENT_HANDLES) == SMB2_GLOBAL_CAP_PERSISTENT_HANDLES:
+ self._Connection['SupportsPersistentHandles'] = True
+ if (negResp['Capabilities'] & SMB2_GLOBAL_CAP_ENCRYPTION) == SMB2_GLOBAL_CAP_ENCRYPTION:
+ self._Connection['SupportsEncryption'] = True
+
+ self._Connection['ServerCapabilities'] = negResp['Capabilities']
+ self._Connection['ServerSecurityMode'] = negResp['SecurityMode']
+
+ def getCredentials(self):
+ return (
+ self.__userName,
+ self.__password,
+ self.__domain,
+ self.__lmhash,
+ self.__nthash,
+ self.__aesKey,
+ self.__TGT,
+ self.__TGS)
+
+ def kerberosLogin(self, user, password, domain = '', lmhash = '', nthash = '', aesKey='', kdcHost = '', TGT=None, TGS=None):
+ # If TGT or TGS are specified, they are in the form of:
+ # TGS['KDC_REP'] = the response from the server
+ # TGS['cipher'] = the cipher used
+ # TGS['sessionKey'] = the sessionKey
+ # If we have hashes, normalize them
+ if lmhash != '' or nthash != '':
+ if len(lmhash) % 2: lmhash = '0%s' % lmhash
+ if len(nthash) % 2: nthash = '0%s' % nthash
+ try: # just in case they were converted already
+ lmhash = a2b_hex(lmhash)
+ nthash = a2b_hex(nthash)
+ except:
+ pass
+
+ self.__userName = user
+ self.__password = password
+ self.__domain = domain
+ self.__lmhash = lmhash
+ self.__nthash = nthash
+ self.__kdc = kdcHost
+ self.__aesKey = aesKey
+ self.__TGT = TGT
+ self.__TGS = TGS
+
+ sessionSetup = SMB2SessionSetup()
+ if self.RequireMessageSigning is True:
+ sessionSetup['SecurityMode'] = SMB2_NEGOTIATE_SIGNING_REQUIRED
+ else:
+ sessionSetup['SecurityMode'] = SMB2_NEGOTIATE_SIGNING_ENABLED
+
+ sessionSetup['Flags'] = 0
+ #sessionSetup['Capabilities'] = SMB2_GLOBAL_CAP_LARGE_MTU | SMB2_GLOBAL_CAP_LEASING | SMB2_GLOBAL_CAP_DFS
+
+ # Importing down here so pyasn1 is not required if kerberos is not used.
+ from impacket.krb5.asn1 import AP_REQ, Authenticator, TGS_REP, seq_set
+ from impacket.krb5.kerberosv5 import getKerberosTGT, getKerberosTGS
+ from impacket.krb5 import constants
+ from impacket.krb5.types import Principal, KerberosTime, Ticket
+ from pyasn1.codec.der import decoder, encoder
+ import datetime
+
+ # First of all, we need to get a TGT for the user
+ userName = Principal(user, type=constants.PrincipalNameType.NT_PRINCIPAL.value)
+ if TGT is None:
+ if TGS is None:
+ tgt, cipher, oldSessionKey, sessionKey = getKerberosTGT(userName, password, domain, lmhash, nthash, aesKey, kdcHost)
+ else:
+ tgt = TGT['KDC_REP']
+ cipher = TGT['cipher']
+ sessionKey = TGT['sessionKey']
+
+ # Save the ticket
+ # If you want, for debugging purposes
+# from impacket.krb5.ccache import CCache
+# ccache = CCache()
+# try:
+# if TGS is None:
+# ccache.fromTGT(tgt, oldSessionKey, sessionKey)
+# else:
+# ccache.fromTGS(TGS['KDC_REP'], TGS['oldSessionKey'], TGS['sessionKey'] )
+# ccache.saveFile('/tmp/ticket.bin')
+# except Exception, e:
+# print e
+# pass
+
+ # Now that we have the TGT, we should ask for a TGS for cifs
+
+ if TGS is None:
+ serverName = Principal('cifs/%s' % (self._Connection['ServerName']), type=constants.PrincipalNameType.NT_SRV_INST.value)
+ tgs, cipher, oldSessionKey, sessionKey = getKerberosTGS(serverName, domain, kdcHost, tgt, cipher, sessionKey)
+ else:
+ tgs = TGS['KDC_REP']
+ cipher = TGS['cipher']
+ sessionKey = TGS['sessionKey']
+
+ # Let's build a NegTokenInit with a Kerberos REQ_AP
+
+ blob = SPNEGO_NegTokenInit()
+
+ # Kerberos
+ blob['MechTypes'] = [TypesMech['MS KRB5 - Microsoft Kerberos 5']]
+
+ # Let's extract the ticket from the TGS
+ tgs = decoder.decode(tgs, asn1Spec = TGS_REP())[0]
+ ticket = Ticket()
+ ticket.from_asn1(tgs['ticket'])
+
+ # Now let's build the AP_REQ
+ apReq = AP_REQ()
+ apReq['pvno'] = 5
+ apReq['msg-type'] = int(constants.ApplicationTagNumbers.AP_REQ.value)
+
+ opts = list()
+ apReq['ap-options'] = constants.encodeFlags(opts)
+ seq_set(apReq,'ticket', ticket.to_asn1)
+
+ authenticator = Authenticator()
+ authenticator['authenticator-vno'] = 5
+ authenticator['crealm'] = domain
+ seq_set(authenticator, 'cname', userName.components_to_asn1)
+ now = datetime.datetime.utcnow()
+
+ authenticator['cusec'] = now.microsecond
+ authenticator['ctime'] = KerberosTime.to_asn1(now)
+
+ encodedAuthenticator = encoder.encode(authenticator)
+
+ # Key Usage 11
+ # AP-REQ Authenticator (includes application authenticator
+ # subkey), encrypted with the application session key
+ # (Section 5.5.1)
+ encryptedEncodedAuthenticator = cipher.encrypt(sessionKey, 11, encodedAuthenticator, None)
+
+ apReq['authenticator'] = None
+ apReq['authenticator']['etype'] = cipher.enctype
+ apReq['authenticator']['cipher'] = encryptedEncodedAuthenticator
+
+ blob['MechToken'] = encoder.encode(apReq)
+
+ sessionSetup['SecurityBufferLength'] = len(blob)
+ sessionSetup['Buffer'] = blob.getData()
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_SESSION_SETUP
+ packet['Data'] = sessionSetup
+
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ self._Session['SessionID'] = ans['SessionID']
+ self._Session['SigningRequired'] = self._Connection['RequireSigning']
+ self._Session['UserCredentials'] = (user, password, domain, lmhash, nthash)
+ self._Session['Connection'] = self._NetBIOSSession.get_socket()
+
+ self._Session['SessionKey'] = sessionKey.contents[:16]
+ if self._Session['SigningRequired'] is True and self._Connection['Dialect'] == SMB2_DIALECT_30:
+ self._Session['SigningKey'] = crypto.KDF_CounterMode(self._Session['SessionKey'], "SMB2AESCMAC\x00", "SmbSign\x00", 128)
+
+ # Calculate the key derivations for dialect 3.0
+ if self._Session['SigningRequired'] is True:
+ self._Session['SigningActivated'] = True
+ if self._Connection['Dialect'] == SMB2_DIALECT_30:
+ self._Session['ApplicationKey'] = crypto.KDF_CounterMode(self._Session['SessionKey'], "SMB2APP\x00", "SmbRpc\x00", 128)
+ self._Session['EncryptionKey'] = crypto.KDF_CounterMode(self._Session['SessionKey'], "SMB2AESCCM\x00", "ServerIn \x00", 128)
+ self._Session['DecryptionKey'] = crypto.KDF_CounterMode(self._Session['SessionKey'], "SMB2AESCCM\x00", "ServerOut\x00", 128)
+
+ return True
+ else:
+ # We clean the stuff we used in case we want to authenticate again
+ # within the same connection
+ self._Session['UserCredentials'] = ''
+ self._Session['Connection'] = 0
+ self._Session['SessionID'] = 0
+ self._Session['SigningRequired'] = False
+ self._Session['SigningKey'] = ''
+ self._Session['SessionKey'] = ''
+ self._Session['SigningActivated'] = False
+ raise
+
+
+ def login(self, user, password, domain = '', lmhash = '', nthash = ''):
+ # If we have hashes, normalize them
+ if lmhash != '' or nthash != '':
+ if len(lmhash) % 2: lmhash = '0%s' % lmhash
+ if len(nthash) % 2: nthash = '0%s' % nthash
+ try: # just in case they were converted already
+ lmhash = a2b_hex(lmhash)
+ nthash = a2b_hex(nthash)
+ except:
+ pass
+
+ self.__userName = user
+ self.__password = password
+ self.__domain = domain
+ self.__lmhash = lmhash
+ self.__nthash = nthash
+ self.__aesKey = ''
+ self.__TGT = None
+ self.__TGS = None
+
+ sessionSetup = SMB2SessionSetup()
+ if self.RequireMessageSigning is True:
+ sessionSetup['SecurityMode'] = SMB2_NEGOTIATE_SIGNING_REQUIRED
+ else:
+ sessionSetup['SecurityMode'] = SMB2_NEGOTIATE_SIGNING_ENABLED
+
+ sessionSetup['Flags'] = 0
+ #sessionSetup['Capabilities'] = SMB2_GLOBAL_CAP_LARGE_MTU | SMB2_GLOBAL_CAP_LEASING | SMB2_GLOBAL_CAP_DFS
+
+ # Let's build a NegTokenInit with the NTLMSSP
+ # TODO: In the future we should be able to choose different providers
+
+ blob = SPNEGO_NegTokenInit()
+
+ # NTLMSSP
+ blob['MechTypes'] = [TypesMech['NTLMSSP - Microsoft NTLM Security Support Provider']]
+ auth = ntlm.getNTLMSSPType1('','', self._Connection['RequireSigning'])
+ blob['MechToken'] = str(auth)
+
+ sessionSetup['SecurityBufferLength'] = len(blob)
+ sessionSetup['Buffer'] = blob.getData()
+
+ # ToDo:
+ # If this authentication is for establishing an alternative channel for an existing Session, as specified
+ # in section 3.2.4.1.7, the client MUST also set the following values:
+ # The SessionId field in the SMB2 header MUST be set to the Session.SessionId for the new
+ # channel being established.
+ # The SMB2_SESSION_FLAG_BINDING bit MUST be set in the Flags field.
+ # The PreviousSessionId field MUST be set to zero.
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_SESSION_SETUP
+ packet['Data'] = sessionSetup
+
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+ if ans.isValidAnswer(STATUS_MORE_PROCESSING_REQUIRED):
+ self._Session['SessionID'] = ans['SessionID']
+ self._Session['SigningRequired'] = self._Connection['RequireSigning']
+ self._Session['UserCredentials'] = (user, password, domain, lmhash, nthash)
+ self._Session['Connection'] = self._NetBIOSSession.get_socket()
+ sessionSetupResponse = SMB2SessionSetup_Response(ans['Data'])
+ respToken = SPNEGO_NegTokenResp(sessionSetupResponse['Buffer'])
+
+ # Let's parse some data and keep it to ourselves in case it is asked
+ ntlmChallenge = ntlm.NTLMAuthChallenge(respToken['ResponseToken'])
+ if ntlmChallenge['TargetInfoFields_len'] > 0:
+ av_pairs = ntlm.AV_PAIRS(ntlmChallenge['TargetInfoFields'][:ntlmChallenge['TargetInfoFields_len']])
+ if av_pairs[ntlm.NTLMSSP_AV_HOSTNAME] is not None:
+ try:
+ self._Session['ServerName'] = av_pairs[ntlm.NTLMSSP_AV_HOSTNAME][1].decode('utf-16le')
+ except:
+ # For some reason, we couldn't decode Unicode here.. silently discard the operation
+ pass
+ if av_pairs[ntlm.NTLMSSP_AV_DOMAINNAME] is not None:
+ try:
+ if self._Session['ServerName'] != av_pairs[ntlm.NTLMSSP_AV_DOMAINNAME][1].decode('utf-16le'):
+ self._Session['ServerDomain'] = av_pairs[ntlm.NTLMSSP_AV_DOMAINNAME][1].decode('utf-16le')
+ except:
+ # For some reason, we couldn't decode Unicode here.. silently discard the operation
+ pass
+ if av_pairs[ntlm.NTLMSSP_AV_DNS_DOMAINNAME] is not None:
+ try:
+ self._Session['ServerDNSDomainName'] = av_pairs[ntlm.NTLMSSP_AV_DNS_DOMAINNAME][1].decode('utf-16le')
+ except:
+ # For some reason, we couldn't decode Unicode here.. silently discard the operation
+ pass
+
+ # Parse Version to know the target Operating system name. Not provided elsewhere anymore
+ if ntlmChallenge.fields.has_key('Version'):
+ version = ntlmChallenge['Version']
+
+ if len(version) >= 4:
+ self._Session['ServerOS'] = "Windows %d.%d Build %d" % (ord(version[0]), ord(version[1]), struct.unpack('<H',version[2:4])[0])
+ self._Session["ServerOSMajor"] = ord(version[0])
+ self._Session["ServerOSMinor"] = ord(version[1])
+ self._Session["ServerOSBuild"] = struct.unpack('<H',version[2:4])[0]
+
+ type3, exportedSessionKey = ntlm.getNTLMSSPType3(auth, respToken['ResponseToken'], user, password, domain, lmhash, nthash)
+
+ if exportedSessionKey is not None:
+ self._Session['SessionKey'] = exportedSessionKey
+ if self._Session['SigningRequired'] is True and self._Connection['Dialect'] == SMB2_DIALECT_30:
+ self._Session['SigningKey'] = crypto.KDF_CounterMode(exportedSessionKey, "SMB2AESCMAC\x00", "SmbSign\x00", 128)
+
+ respToken2 = SPNEGO_NegTokenResp()
+ respToken2['ResponseToken'] = str(type3)
+
+ # Reusing the previous structure
+ sessionSetup['SecurityBufferLength'] = len(respToken2)
+ sessionSetup['Buffer'] = respToken2.getData()
+
+ packetID = self.sendSMB(packet)
+ packet = self.recvSMB(packetID)
+ try:
+ if packet.isValidAnswer(STATUS_SUCCESS):
+ sessionSetupResponse = SMB2SessionSetup_Response(packet['Data'])
+ self._Session['SessionFlags'] = sessionSetupResponse['SessionFlags']
+
+ # Calculate the key derivations for dialect 3.0
+ if self._Session['SigningRequired'] is True:
+ self._Session['SigningActivated'] = True
+ if self._Connection['Dialect'] == SMB2_DIALECT_30:
+ self._Session['ApplicationKey'] = crypto.KDF_CounterMode(exportedSessionKey, "SMB2APP\x00", "SmbRpc\x00", 128)
+ self._Session['EncryptionKey'] = crypto.KDF_CounterMode(exportedSessionKey, "SMB2AESCCM\x00", "ServerIn \x00", 128)
+ self._Session['DecryptionKey'] = crypto.KDF_CounterMode(exportedSessionKey, "SMB2AESCCM\x00", "ServerOut\x00", 128)
+
+ return True
+ except:
+ # We clean the stuff we used in case we want to authenticate again
+ # within the same connection
+ self._Session['UserCredentials'] = ''
+ self._Session['Connection'] = 0
+ self._Session['SessionID'] = 0
+ self._Session['SigningRequired'] = False
+ self._Session['SigningKey'] = ''
+ self._Session['SessionKey'] = ''
+ self._Session['SigningActivated'] = False
+ raise
+
+ def connectTree(self, share):
+
+ # Just in case this came with the full path (maybe an SMB1 client), let's just leave
+ # the sharename, we'll take care of the rest
+
+ #print self._Session['TreeConnectTable']
+ share = share.split('\\')[-1]
+ if self._Session['TreeConnectTable'].has_key(share):
+ # Already connected, no need to reconnect
+ treeEntry = self._Session['TreeConnectTable'][share]
+ treeEntry['NumberOfUses'] += 1
+ self._Session['TreeConnectTable'][treeEntry['TreeConnectId']]['NumberOfUses'] += 1
+ return treeEntry['TreeConnectId']
+
+ #path = share
+ try:
+ _, _, _, _, sockaddr = socket.getaddrinfo(self._Connection['ServerIP'], 80, 0, 0, socket.IPPROTO_TCP)[0]
+ remoteHost = sockaddr[0]
+ except:
+ remoteHost = self._Connection['ServerIP']
+ path = '\\\\' + remoteHost + '\\' +share
+
+ treeConnect = SMB2TreeConnect()
+ treeConnect['Buffer'] = path.encode('utf-16le')
+ treeConnect['PathLength'] = len(path)*2
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_TREE_CONNECT
+ packet['Data'] = treeConnect
+ packetID = self.sendSMB(packet)
+ packet = self.recvSMB(packetID)
+ if packet.isValidAnswer(STATUS_SUCCESS):
+ treeConnectResponse = SMB2TreeConnect_Response(packet['Data'])
+ treeEntry = copy.deepcopy(TREE_CONNECT)
+ treeEntry['ShareName'] = share
+ treeEntry['TreeConnectId'] = packet['TreeID']
+ treeEntry['Session'] = packet['SessionID']
+ treeEntry['NumberOfUses'] += 1
+ if (treeConnectResponse['Capabilities'] & SMB2_SHARE_CAP_DFS) == SMB2_SHARE_CAP_DFS:
+ treeEntry['IsDfsShare'] = True
+ if (treeConnectResponse['Capabilities'] & SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY) == SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY:
+ treeEntry['IsCAShare'] = True
+
+ if self._Connection['Dialect'] == SMB2_DIALECT_30:
+ if (self._Connection['SupportsEncryption'] is True) and ((treeConnectResponse['ShareFlags'] & SMB2_SHAREFLAG_ENCRYPT_DATA) == SMB2_SHAREFLAG_ENCRYPT_DATA):
+ treeEntry['EncryptData'] = True
+ # ToDo: This and what follows
+ # If Session.EncryptData is FALSE, the client MUST then generate an encryption key, a
+ # decryption key as specified in section 3.1.4.2, by providing the following inputs and store
+ # them in Session.EncryptionKey and Session.DecryptionKey:
+ if (treeConnectResponse['Capabilities'] & SMB2_SHARE_CAP_SCALEOUT) == SMB2_SHARE_CAP_SCALEOUT:
+ treeEntry['IsScaleoutShare'] = True
+
+ self._Session['TreeConnectTable'][packet['TreeID']] = treeEntry
+ self._Session['TreeConnectTable'][share] = treeEntry
+
+ return packet['TreeID']
+
+ def disconnectTree(self, treeId):
+ if self._Session['TreeConnectTable'].has_key(treeId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+
+ if self._Session['TreeConnectTable'].has_key(treeId):
+ # More than 1 use? descrease it and return, if not, send the packet
+ if self._Session['TreeConnectTable'][treeId]['NumberOfUses'] > 1:
+ treeEntry = self._Session['TreeConnectTable'][treeId]
+ treeEntry['NumberOfUses'] -= 1
+ self._Session['TreeConnectTable'][treeEntry['ShareName']]['NumberOfUses'] -= 1
+ return True
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_TREE_DISCONNECT
+ packet['TreeID'] = treeId
+ treeDisconnect = SMB2TreeDisconnect()
+ packet['Data'] = treeDisconnect
+ packetID = self.sendSMB(packet)
+ packet = self.recvSMB(packetID)
+ if packet.isValidAnswer(STATUS_SUCCESS):
+ shareName = self._Session['TreeConnectTable'][treeId]['ShareName']
+ del(self._Session['TreeConnectTable'][shareName])
+ del(self._Session['TreeConnectTable'][treeId])
+ return True
+
+ def create(self, treeId, fileName, desiredAccess, shareMode, creationOptions, creationDisposition, fileAttributes, impersonationLevel = SMB2_IL_IMPERSONATION, securityFlags = 0, oplockLevel = SMB2_OPLOCK_LEVEL_NONE, createContexts = None):
+ if self._Session['TreeConnectTable'].has_key(treeId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+
+ fileName = string.replace(fileName, '/', '\\')
+ if len(fileName) > 0:
+ fileName = ntpath.normpath(fileName)
+ if fileName[0] == '\\':
+ fileName = fileName[1:]
+
+ if self._Session['TreeConnectTable'][treeId]['IsDfsShare'] is True:
+ pathName = fileName
+ else:
+ pathName = '\\\\' + self._Connection['ServerName'] + '\\' + fileName
+
+ fileEntry = copy.deepcopy(FILE)
+ fileEntry['LeaseKey'] = uuid.generate()
+ fileEntry['LeaseState'] = SMB2_LEASE_NONE
+ self.GlobalFileTable[pathName] = fileEntry
+
+ if self._Connection['Dialect'] == SMB2_DIALECT_30 and self._Connection['SupportsDirectoryLeasing'] is True:
+ # Is this file NOT on the root directory?
+ if len(fileName.split('\\')) > 2:
+ parentDir = ntpath.dirname(pathName)
+ if self.GlobalFileTable.has_key(parentDir):
+ LOG.critical("Don't know what to do now! :-o")
+ raise
+ else:
+ parentEntry = copy.deepcopy(FILE)
+ parentEntry['LeaseKey'] = uuid.generate()
+ parentEntry['LeaseState'] = SMB2_LEASE_NONE
+ self.GlobalFileTable[parentDir] = parentEntry
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_CREATE
+ packet['TreeID'] = treeId
+ if self._Session['TreeConnectTable'][treeId]['IsDfsShare'] is True:
+ packet['Flags'] = SMB2_FLAGS_DFS_OPERATIONS
+
+ smb2Create = SMB2Create()
+ smb2Create['SecurityFlags'] = 0
+ smb2Create['RequestedOplockLevel'] = oplockLevel
+ smb2Create['ImpersonationLevel'] = impersonationLevel
+ smb2Create['DesiredAccess'] = desiredAccess
+ smb2Create['FileAttributes'] = fileAttributes
+ smb2Create['ShareAccess'] = shareMode
+ smb2Create['CreateDisposition'] = creationDisposition
+ smb2Create['CreateOptions'] = creationOptions
+
+ smb2Create['NameLength'] = len(fileName)*2
+ if fileName != '':
+ smb2Create['Buffer'] = fileName.encode('utf-16le')
+ else:
+ smb2Create['Buffer'] = '\x00'
+
+ if createContexts is not None:
+ smb2Create['Buffer'] += createContexts
+ smb2Create['CreateContextsOffset'] = len(SMB2Packet()) + SMB2Create.SIZE + smb2Create['NameLength']
+ smb2Create['CreateContextsLength'] = len(createContexts)
+ else:
+ smb2Create['CreateContextsOffset'] = 0
+ smb2Create['CreateContextsLength'] = 0
+
+ packet['Data'] = smb2Create
+
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ createResponse = SMB2Create_Response(ans['Data'])
+
+ openFile = copy.deepcopy(OPEN)
+ openFile['FileID'] = createResponse['FileID']
+ openFile['TreeConnect'] = treeId
+ openFile['Oplocklevel'] = oplockLevel
+ openFile['Durable'] = False
+ openFile['ResilientHandle'] = False
+ openFile['LastDisconnectTime'] = 0
+ openFile['FileName'] = pathName
+
+ # ToDo: Complete the OperationBuckets
+ if self._Connection['Dialect'] == SMB2_DIALECT_30:
+ openFile['DesiredAccess'] = oplockLevel
+ openFile['ShareMode'] = oplockLevel
+ openFile['CreateOptions'] = oplockLevel
+ openFile['FileAttributes'] = oplockLevel
+ openFile['CreateDisposition'] = oplockLevel
+
+ # ToDo: Process the contexts
+ self._Session['OpenTable'][str(createResponse['FileID'])] = openFile
+
+ # The client MUST generate a handle for the Open, and it MUST
+ # return success and the generated handle to the calling application.
+ # In our case, str(FileID)
+ return str(createResponse['FileID'])
+
+ def close(self, treeId, fileId):
+ if self._Session['TreeConnectTable'].has_key(treeId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+ if self._Session['OpenTable'].has_key(fileId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_CLOSE
+ packet['TreeID'] = treeId
+
+ smbClose = SMB2Close()
+ smbClose['Flags'] = 0
+ smbClose['FileID'] = fileId
+
+ packet['Data'] = smbClose
+
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ del(self.GlobalFileTable[self._Session['OpenTable'][fileId]['FileName']])
+ del(self._Session['OpenTable'][fileId])
+
+ # ToDo Remove stuff from GlobalFileTable
+ return True
+
+ def read(self, treeId, fileId, offset = 0, bytesToRead = 0, waitAnswer = True):
+ # IMPORTANT NOTE: As you can see, this was coded as a recursive function
+ # Hence, you can exhaust the memory pretty easy ( large bytesToRead )
+ # This function should NOT be used for reading files directly, but another higher
+ # level function should be used that will break the read into smaller pieces
+
+ if self._Session['TreeConnectTable'].has_key(treeId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+ if self._Session['OpenTable'].has_key(fileId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_READ
+ packet['TreeID'] = treeId
+
+ if self._Connection['MaxReadSize'] < bytesToRead:
+ maxBytesToRead = self._Connection['MaxReadSize']
+ else:
+ maxBytesToRead = bytesToRead
+
+ if self._Connection['Dialect'] != SMB2_DIALECT_002 and self._Connection['SupportsMultiCredit'] is True:
+ packet['CreditCharge'] = ( 1 + (maxBytesToRead - 1) / 65536)
+ else:
+ maxBytesToRead = min(65536,bytesToRead)
+
+ smbRead = SMB2Read()
+ smbRead['Padding'] = 0x50
+ smbRead['FileID'] = fileId
+ smbRead['Length'] = maxBytesToRead
+ smbRead['Offset'] = offset
+ packet['Data'] = smbRead
+
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ readResponse = SMB2Read_Response(ans['Data'])
+ retData = readResponse['Buffer']
+ if readResponse['DataRemaining'] > 0:
+ retData += self.read(treeId, fileId, offset+len(retData), readResponse['DataRemaining'], waitAnswer)
+ return retData
+
+ def write(self, treeId, fileId, data, offset = 0, bytesToWrite = 0, waitAnswer = True):
+ # IMPORTANT NOTE: As you can see, this was coded as a recursive function
+ # Hence, you can exhaust the memory pretty easy ( large bytesToWrite )
+ # This function should NOT be used for writing directly to files, but another higher
+ # level function should be used that will break the writes into smaller pieces
+
+ if self._Session['TreeConnectTable'].has_key(treeId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+ if self._Session['OpenTable'].has_key(fileId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_WRITE
+ packet['TreeID'] = treeId
+
+ if self._Connection['MaxWriteSize'] < bytesToWrite:
+ maxBytesToWrite = self._Connection['MaxWriteSize']
+ else:
+ maxBytesToWrite = bytesToWrite
+
+ if self._Connection['Dialect'] != SMB2_DIALECT_002 and self._Connection['SupportsMultiCredit'] is True:
+ packet['CreditCharge'] = ( 1 + (maxBytesToWrite - 1) / 65536)
+ else:
+ maxBytesToWrite = min(65536,bytesToWrite)
+
+ smbWrite = SMB2Write()
+ smbWrite['FileID'] = fileId
+ smbWrite['Length'] = maxBytesToWrite
+ smbWrite['Offset'] = offset
+ smbWrite['WriteChannelInfoOffset'] = 0
+ smbWrite['Buffer'] = data[:maxBytesToWrite]
+ packet['Data'] = smbWrite
+
+ packetID = self.sendSMB(packet)
+ if waitAnswer is True:
+ ans = self.recvSMB(packetID)
+ else:
+ return maxBytesToWrite
+
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ writeResponse = SMB2Write_Response(ans['Data'])
+ bytesWritten = writeResponse['Count']
+ if bytesWritten < bytesToWrite:
+ bytesWritten += self.write(treeId, fileId, data[bytesWritten:], offset+bytesWritten, bytesToWrite-bytesWritten, waitAnswer)
+ return bytesWritten
+
+ def queryDirectory(self, treeId, fileId, searchString = '*', resumeIndex = 0, informationClass = FILENAMES_INFORMATION, maxBufferSize = None, enumRestart = False, singleEntry = False):
+ if self._Session['TreeConnectTable'].has_key(treeId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+ if self._Session['OpenTable'].has_key(fileId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_QUERY_DIRECTORY
+ packet['TreeID'] = treeId
+
+ queryDirectory = SMB2QueryDirectory()
+ queryDirectory['FileInformationClass'] = informationClass
+ if resumeIndex != 0 :
+ queryDirectory['Flags'] = SMB2_INDEX_SPECIFIED
+ queryDirectory['FileIndex'] = resumeIndex
+ queryDirectory['FileID'] = fileId
+ if maxBufferSize is None:
+ maxBufferSize = self._Connection['MaxReadSize']
+ queryDirectory['OutputBufferLength'] = maxBufferSize
+ queryDirectory['FileNameLength'] = len(searchString)*2
+ queryDirectory['Buffer'] = searchString.encode('utf-16le')
+
+ packet['Data'] = queryDirectory
+
+ if self._Connection['Dialect'] != SMB2_DIALECT_002 and self._Connection['SupportsMultiCredit'] is True:
+ packet['CreditCharge'] = ( 1 + (maxBufferSize - 1) / 65536)
+
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ queryDirectoryResponse = SMB2QueryDirectory_Response(ans['Data'])
+ return queryDirectoryResponse['Buffer']
+
+ def echo(self):
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_ECHO
+ smbEcho = SMB2Echo()
+ packet['Data'] = smbEcho
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ return True
+
+ def cancel(self, packetID):
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_CANCEL
+ packet['MessageID'] = packetID
+
+ smbCancel = SMB2Cancel()
+
+ packet['Data'] = smbCancel
+ self.sendSMB(packet)
+
+ def ioctl(self, treeId, fileId = None, ctlCode = -1, flags = 0, inputBlob = '', maxInputResponse = None, maxOutputResponse = None, waitAnswer = 1):
+ if self._Session['TreeConnectTable'].has_key(treeId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+ if fileId is None:
+ fileId = '\xff'*16
+ else:
+ if self._Session['OpenTable'].has_key(fileId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_IOCTL
+ packet['TreeID'] = treeId
+
+ smbIoctl = SMB2Ioctl()
+ smbIoctl['FileID'] = fileId
+ smbIoctl['CtlCode'] = ctlCode
+ smbIoctl['MaxInputResponse'] = maxInputResponse
+ smbIoctl['MaxOutputResponse'] = maxOutputResponse
+ smbIoctl['InputCount'] = len(inputBlob)
+ if len(inputBlob) == 0:
+ smbIoctl['InputOffset'] = 0
+ smbIoctl['Buffer'] = '\x00'
+ else:
+ smbIoctl['Buffer'] = inputBlob
+ smbIoctl['OutputOffset'] = 0
+ smbIoctl['MaxOutputResponse'] = maxOutputResponse
+ smbIoctl['Flags'] = flags
+
+ packet['Data'] = smbIoctl
+
+ packetID = self.sendSMB(packet)
+
+ if waitAnswer == 0:
+ return True
+
+ ans = self.recvSMB(packetID)
+
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ smbIoctlResponse = SMB2Ioctl_Response(ans['Data'])
+ return smbIoctlResponse['Buffer']
+
+ def flush(self,treeId, fileId):
+ if self._Session['TreeConnectTable'].has_key(treeId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+ if self._Session['OpenTable'].has_key(fileId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_FLUSH
+ packet['TreeID'] = treeId
+
+ smbFlush = SMB2Flush()
+ smbFlush['FileID'] = fileId
+
+ packet['Data'] = smbFlush
+
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ return True
+
+ def lock(self, treeId, fileId, locks, lockSequence = 0):
+ if self._Session['TreeConnectTable'].has_key(treeId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+ if self._Session['OpenTable'].has_key(fileId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_LOCK
+ packet['TreeID'] = treeId
+
+ smbLock = SMB2Lock()
+ smbLock['FileID'] = fileId
+ smbLock['LockCount'] = len(locks)
+ smbLock['LockSequence'] = lockSequence
+ smbLock['Locks'] = ''.join(str(x) for x in locks)
+
+ packet['Data'] = smbLock
+
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ smbFlushResponse = SMB2Lock_Response(ans['Data'])
+ return True
+
+ # ToDo:
+ # If Open.ResilientHandle is TRUE or Connection.SupportsMultiChannel is TRUE, the client MUST
+ # do the following:
+ # The client MUST scan through Open.OperationBuckets and find an element with its Free field
+ # set to TRUE. If no such element could be found, an implementation-specific error MUST be
+ # returned to the application.
+ # Let the zero-based array index of the element chosen above be referred to as BucketIndex, and
+ # let BucketNumber = BucketIndex +1.
+ # Set Open.OperationBuckets[BucketIndex].Free = FALSE
+ # Let the SequenceNumber of the element chosen above be referred to as BucketSequence.
+ # The LockSequence field of the SMB2 lock request MUST be set to (BucketNumber<< 4) +
+ # BucketSequence.
+ # Increment the SequenceNumber of the element chosen above using MOD 16 arithmetic.
+
+ def logoff(self):
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_LOGOFF
+
+ smbLogoff = SMB2Logoff()
+
+ packet['Data'] = smbLogoff
+
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ # We clean the stuff we used in case we want to authenticate again
+ # within the same connection
+ self._Session['UserCredentials'] = ''
+ self._Session['Connection'] = 0
+ self._Session['SessionID'] = 0
+ self._Session['SigningRequired'] = False
+ self._Session['SigningKey'] = ''
+ self._Session['SessionKey'] = ''
+ self._Session['SigningActivated'] = False
+ return True
+
+ def queryInfo(self, treeId, fileId, inputBlob = '', infoType = SMB2_0_INFO_FILE, fileInfoClass = SMB2_FILE_STANDARD_INFO, additionalInformation = 0, flags = 0 ):
+ if self._Session['TreeConnectTable'].has_key(treeId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+ if self._Session['OpenTable'].has_key(fileId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_QUERY_INFO
+ packet['TreeID'] = treeId
+
+ queryInfo = SMB2QueryInfo()
+ queryInfo['FileID'] = fileId
+ queryInfo['InfoType'] = SMB2_0_INFO_FILE
+ queryInfo['FileInfoClass'] = fileInfoClass
+ queryInfo['OutputBufferLength'] = 65535
+ queryInfo['AdditionalInformation'] = additionalInformation
+ if len(inputBlob) == 0:
+ queryInfo['InputBufferOffset'] = 0
+ queryInfo['Buffer'] = '\x00'
+ else:
+ queryInfo['InputBufferLength'] = len(inputBlob)
+ queryInfo['Buffer'] = inputBlob
+ queryInfo['Flags'] = flags
+
+ packet['Data'] = queryInfo
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ queryResponse = SMB2QueryInfo_Response(ans['Data'])
+ return queryResponse['Buffer']
+
+ def setInfo(self, treeId, fileId, inputBlob = '', infoType = SMB2_0_INFO_FILE, fileInfoClass = SMB2_FILE_STANDARD_INFO, additionalInformation = 0 ):
+ if self._Session['TreeConnectTable'].has_key(treeId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+ if self._Session['OpenTable'].has_key(fileId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+
+ packet = self.SMB_PACKET()
+ packet['Command'] = SMB2_SET_INFO
+ packet['TreeID'] = treeId
+
+ setInfo = SMB2SetInfo()
+ setInfo['InfoType'] = SMB2_0_INFO_FILE
+ setInfo['FileInfoClass'] = fileInfoClass
+ setInfo['BufferLength'] = len(inputBlob)
+ setInfo['AdditionalInformation'] = additionalInformation
+ setInfo['FileID'] = fileId
+ setInfo['Buffer'] = inputBlob
+
+ packet['Data'] = setInfo
+ packetID = self.sendSMB(packet)
+ ans = self.recvSMB(packetID)
+
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ return True
+
+ def getSessionKey(self):
+ if self.getDialect() == SMB2_DIALECT_30:
+ return self._Session['ApplicationKey']
+ else:
+ return self._Session['SessionKey']
+
+ def setSessionKey(self, key):
+ if self.getDialect() == SMB2_DIALECT_30:
+ self._Session['ApplicationKey'] = key
+ else:
+ self._Session['SessionKey'] = key
+
+ ######################################################################
+ # Higher level functions
+
+ def rename(self, shareName, oldPath, newPath):
+ oldPath = string.replace(oldPath,'/', '\\')
+ oldPath = ntpath.normpath(oldPath)
+ if len(oldPath) > 0 and oldPath[0] == '\\':
+ oldPath = oldPath[1:]
+
+ newPath = string.replace(newPath,'/', '\\')
+ newPath = ntpath.normpath(newPath)
+ if len(newPath) > 0 and newPath[0] == '\\':
+ newPath = newPath[1:]
+
+ treeId = self.connectTree(shareName)
+ fileId = None
+ try:
+ fileId = self.create(treeId, oldPath, MAXIMUM_ALLOWED ,FILE_SHARE_READ | FILE_SHARE_WRITE |FILE_SHARE_DELETE, 0x200020, FILE_OPEN, 0)
+ renameReq = FILE_RENAME_INFORMATION_TYPE_2()
+ renameReq['ReplaceIfExists'] = 1
+ renameReq['RootDirectory'] = '\x00'*8
+ renameReq['FileNameLength'] = len(newPath)*2
+ renameReq['FileName'] = newPath.encode('utf-16le')
+ self.setInfo(treeId, fileId, renameReq, infoType = SMB2_0_INFO_FILE, fileInfoClass = SMB2_FILE_RENAME_INFO)
+ finally:
+ if fileId is not None:
+ self.close(treeId, fileId)
+ self.disconnectTree(treeId)
+
+ return True
+
+ def writeFile(self, treeId, fileId, data, offset = 0):
+ finished = False
+ writeOffset = offset
+ while not finished:
+ if len(data) == 0:
+ break
+ writeData = data[:self._Connection['MaxWriteSize']]
+ data = data[self._Connection['MaxWriteSize']:]
+ written = self.write(treeId, fileId, writeData, writeOffset, len(writeData))
+ writeOffset += written
+ return writeOffset - offset
+
+ def listPath(self, shareName, path, password = None):
+ # ToDo: Handle situations where share is password protected
+ path = string.replace(path,'/', '\\')
+ path = ntpath.normpath(path)
+ if len(path) > 0 and path[0] == '\\':
+ path = path[1:]
+
+ treeId = self.connectTree(shareName)
+
+ fileId = None
+ try:
+ # ToDo, we're assuming it's a directory, we should check what the file type is
+ fileId = self.create(treeId, ntpath.dirname(path), FILE_READ_ATTRIBUTES | FILE_READ_DATA ,FILE_SHARE_READ | FILE_SHARE_WRITE |FILE_SHARE_DELETE, FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, FILE_OPEN, 0)
+ res = ''
+ files = []
+ from impacket import smb
+ while True:
+ try:
+ res = self.queryDirectory( treeId, fileId, ntpath.basename(path), maxBufferSize = 65535, informationClass = FILE_FULL_DIRECTORY_INFORMATION )
+ nextOffset = 1
+ while nextOffset != 0:
+ fileInfo = smb.SMBFindFileFullDirectoryInfo(smb.SMB.FLAGS2_UNICODE)
+ fileInfo.fromString(res)
+ files.append(smb.SharedFile(fileInfo['CreationTime'],fileInfo['LastAccessTime'],fileInfo['LastChangeTime'],fileInfo['EndOfFile'],fileInfo['AllocationSize'],fileInfo['ExtFileAttributes'],fileInfo['FileName'].decode('utf-16le'), fileInfo['FileName'].decode('utf-16le')))
+ nextOffset = fileInfo['NextEntryOffset']
+ res = res[nextOffset:]
+ except SessionError, e:
+ if (e.get_error_code()) != STATUS_NO_MORE_FILES:
+ raise
+ break
+ finally:
+ if fileId is not None:
+ self.close(treeId, fileId)
+ self.disconnectTree(treeId)
+
+ return files
+
+ def mkdir(self, shareName, pathName, password = None):
+ # ToDo: Handle situations where share is password protected
+ pathName = string.replace(pathName,'/', '\\')
+ pathName = ntpath.normpath(pathName)
+ if len(pathName) > 0 and pathName[0] == '\\':
+ pathName = pathName[1:]
+
+ treeId = self.connectTree(shareName)
+
+ fileId = None
+ try:
+ fileId = self.create(treeId, pathName,GENERIC_ALL ,FILE_SHARE_READ | FILE_SHARE_WRITE |FILE_SHARE_DELETE, FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, FILE_CREATE, 0)
+ finally:
+ if fileId is not None:
+ self.close(treeId, fileId)
+ self.disconnectTree(treeId)
+
+ return True
+
+ def rmdir(self, shareName, pathName, password = None):
+ # ToDo: Handle situations where share is password protected
+ pathName = string.replace(pathName,'/', '\\')
+ pathName = ntpath.normpath(pathName)
+ if len(pathName) > 0 and pathName[0] == '\\':
+ pathName = pathName[1:]
+
+ treeId = self.connectTree(shareName)
+
+ fileId = None
+ try:
+ fileId = self.create(treeId, pathName, DELETE, FILE_SHARE_DELETE, FILE_DIRECTORY_FILE | FILE_DELETE_ON_CLOSE, FILE_OPEN, 0)
+ finally:
+ if fileId is not None:
+ self.close(treeId, fileId)
+ self.disconnectTree(treeId)
+
+ return True
+
+ def remove(self, shareName, pathName, password = None):
+ # ToDo: Handle situations where share is password protected
+ pathName = string.replace(pathName,'/', '\\')
+ pathName = ntpath.normpath(pathName)
+ if len(pathName) > 0 and pathName[0] == '\\':
+ pathName = pathName[1:]
+
+ treeId = self.connectTree(shareName)
+
+ fileId = None
+ try:
+ fileId = self.create(treeId, pathName,DELETE | FILE_READ_ATTRIBUTES, FILE_SHARE_DELETE, FILE_NON_DIRECTORY_FILE | FILE_DELETE_ON_CLOSE, FILE_OPEN, 0)
+ finally:
+ if fileId is not None:
+ self.close(treeId, fileId)
+ self.disconnectTree(treeId)
+
+ return True
+
+ def retrieveFile(self, shareName, path, callback, mode = FILE_OPEN, offset = 0, password = None, shareAccessMode = FILE_SHARE_READ):
+ # ToDo: Handle situations where share is password protected
+ path = string.replace(path,'/', '\\')
+ path = ntpath.normpath(path)
+ if len(path) > 0 and path[0] == '\\':
+ path = path[1:]
+
+ treeId = self.connectTree(shareName)
+ fileId = None
+ from impacket import smb
+ try:
+ fileId = self.create(treeId, path, FILE_READ_DATA, shareAccessMode, FILE_NON_DIRECTORY_FILE, mode, 0)
+ res = self.queryInfo(treeId, fileId)
+ fileInfo = smb.SMBQueryFileStandardInfo(res)
+ fileSize = fileInfo['EndOfFile']
+ if (fileSize-offset) < self._Connection['MaxReadSize']:
+ # Skip reading 0 bytes files.
+ if (fileSize-offset) > 0:
+ data = self.read(treeId, fileId, offset, fileSize-offset)
+ callback(data)
+ else:
+ written = 0
+ toBeRead = fileSize-offset
+ while written < toBeRead:
+ data = self.read(treeId, fileId, offset, self._Connection['MaxReadSize'])
+ written += len(data)
+ offset += len(data)
+ callback(data)
+ finally:
+ if fileId is not None:
+ self.close(treeId, fileId)
+ self.disconnectTree(treeId)
+
+ def storeFile(self, shareName, path, callback, mode = FILE_OVERWRITE_IF, offset = 0, password = None, shareAccessMode = FILE_SHARE_WRITE):
+ # ToDo: Handle situations where share is password protected
+ path = string.replace(path,'/', '\\')
+ path = ntpath.normpath(path)
+ if len(path) > 0 and path[0] == '\\':
+ path = path[1:]
+
+ treeId = self.connectTree(shareName)
+ fileId = None
+ try:
+ fileId = self.create(treeId, path, FILE_WRITE_DATA, shareAccessMode, FILE_NON_DIRECTORY_FILE, mode, 0)
+ finished = False
+ writeOffset = offset
+ while not finished:
+ data = callback(self._Connection['MaxWriteSize'])
+ if len(data) == 0:
+ break
+ written = self.write(treeId, fileId, data, writeOffset, len(data))
+ writeOffset += written
+ finally:
+ if fileId is not None:
+ self.close(treeId, fileId)
+ self.disconnectTree(treeId)
+
+ def waitNamedPipe(self, treeId, pipename, timeout = 5):
+ pipename = ntpath.basename(pipename)
+ if self._Session['TreeConnectTable'].has_key(treeId) is False:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+ if len(pipename) > 0xffff:
+ raise SessionError(STATUS_INVALID_PARAMETER)
+
+ pipeWait = FSCTL_PIPE_WAIT_STRUCTURE()
+ pipeWait['Timeout'] = timeout*100000
+ pipeWait['NameLength'] = len(pipename)*2
+ pipeWait['TimeoutSpecified'] = 1
+ pipeWait['Name'] = pipename.encode('utf-16le')
+
+ return self.ioctl(treeId, None, FSCTL_PIPE_WAIT,flags=SMB2_0_IOCTL_IS_FSCTL, inputBlob=pipeWait, maxInputResponse = 0, maxOutputResponse=0)
+
+ def getIOCapabilities(self):
+ res = dict()
+
+ res['MaxReadSize'] = self._Connection['MaxReadSize']
+ res['MaxWriteSize'] = self._Connection['MaxWriteSize']
+ return res
+
+
+ ######################################################################
+ # Backward compatibility functions and alias for SMB1 and DCE Transports
+ # NOTE: It is strongly recommended not to use these commands
+ # when implementing new client calls.
+ get_server_name = getServerName
+ get_server_domain = getServerDomain
+ get_server_dns_domain_name = getServerDNSDomainName
+ get_remote_name = getServerName
+ get_remote_host = getServerIP
+ get_server_os = getServerOS
+ get_server_os_major = getServerOSMajor
+ get_server_os_minor = getServerOSMinor
+ get_server_os_build = getServerOSBuild
+ tree_connect_andx = connectTree
+ tree_connect = connectTree
+ connect_tree = connectTree
+ disconnect_tree = disconnectTree
+ set_timeout = setTimeout
+ use_timeout = useTimeout
+ stor_file = storeFile
+ retr_file = retrieveFile
+ list_path = listPath
+
+ def __del__(self):
+ if self._NetBIOSSession:
+ self._NetBIOSSession.close()
+
+
+ def doesSupportNTLMv2(self):
+ # Always true :P
+ return True
+
+ def is_login_required(self):
+ # Always true :P
+ return True
+
+ def is_signing_required(self):
+ return self._Session["SigningRequired"]
+
+ def nt_create_andx(self, treeId, fileName, smb_packet=None, cmd = None):
+ if len(fileName) > 0 and fileName[0] == '\\':
+ fileName = fileName[1:]
+
+ if cmd is not None:
+ from impacket import smb
+ ntCreate = smb.SMBCommand(data = str(cmd))
+ params = smb.SMBNtCreateAndX_Parameters(ntCreate['Parameters'])
+ return self.create(treeId, fileName, params['AccessMask'], params['ShareAccess'],
+ params['CreateOptions'], params['Disposition'], params['FileAttributes'],
+ params['Impersonation'], params['SecurityFlags'])
+
+ else:
+ return self.create(treeId, fileName,
+ FILE_READ_DATA | FILE_WRITE_DATA | FILE_APPEND_DATA | FILE_READ_EA |
+ FILE_WRITE_EA | FILE_WRITE_ATTRIBUTES | FILE_READ_ATTRIBUTES | READ_CONTROL,
+ FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_NON_DIRECTORY_FILE, FILE_OPEN, 0 )
+
+ def get_socket(self):
+ return self._NetBIOSSession.get_socket()
+
+
+ def write_andx(self,tid,fid,data, offset = 0, wait_answer=1, write_pipe_mode = False, smb_packet=None):
+ # ToDo: Handle the custom smb_packet situation
+ return self.write(tid, fid, data, offset, len(data))
+
+ def TransactNamedPipe(self, tid, fid, data, noAnswer = 0, waitAnswer = 1, offset = 0):
+ return self.ioctl(tid, fid, FSCTL_PIPE_TRANSCEIVE, SMB2_0_IOCTL_IS_FSCTL, data, maxOutputResponse = 65535, waitAnswer = noAnswer | waitAnswer)
+
+ def TransactNamedPipeRecv(self):
+ ans = self.recvSMB()
+
+ if ans.isValidAnswer(STATUS_SUCCESS):
+ smbIoctlResponse = SMB2Ioctl_Response(ans['Data'])
+ return smbIoctlResponse['Buffer']
+
+
+ def read_andx(self, tid, fid, offset=0, max_size = None, wait_answer=1, smb_packet=None):
+ # ToDo: Handle the custom smb_packet situation
+ if max_size is None:
+ max_size = self._Connection['MaxReadSize']
+ return self.read(tid, fid, offset, max_size, wait_answer)
+
+ def list_shared(self):
+ # In the context of SMB2/3, forget about the old LANMAN, throw NOT IMPLEMENTED
+ raise SessionError(STATUS_NOT_IMPLEMENTED)
+
+ def open_andx(self, tid, fileName, open_mode, desired_access):
+ # ToDo Return all the attributes of the file
+ if len(fileName) > 0 and fileName[0] == '\\':
+ fileName = fileName[1:]
+
+ fileId = self.create(tid,fileName,desired_access, open_mode, FILE_NON_DIRECTORY_FILE, open_mode, 0)
+ return fileId, 0, 0, 0, 0, 0, 0, 0, 0
+
diff --git a/tests/python_dependencies/impacket/smb3structs.py b/tests/python_dependencies/impacket/smb3structs.py
new file mode 100644
index 00000000..ddc8a908
--- /dev/null
+++ b/tests/python_dependencies/impacket/smb3structs.py
@@ -0,0 +1,1363 @@
+# Copyright (c) 2003-2016 CORE Security Technologies
+#
+# This software is provided under under a slightly modified version
+# of the Apache Software License. See the accompanying LICENSE file
+# for more information.
+#
+# Author: Alberto Solino (@agsolino)
+#
+# Description:
+# SMB 2 and 3 Protocol Structures and constants [MS-SMB2]
+#
+
+from impacket.structure import Structure
+
+# Constants
+
+# SMB Packet
+SMB2_PACKET_SIZE = 64
+
+# SMB Commands
+SMB2_NEGOTIATE = 0x0000 #
+SMB2_SESSION_SETUP = 0x0001 #
+SMB2_LOGOFF = 0x0002 #
+SMB2_TREE_CONNECT = 0x0003 #
+SMB2_TREE_DISCONNECT = 0x0004 #
+SMB2_CREATE = 0x0005 #
+SMB2_CLOSE = 0x0006 #
+SMB2_FLUSH = 0x0007 #
+SMB2_READ = 0x0008 #
+SMB2_WRITE = 0x0009 #
+SMB2_LOCK = 0x000A #
+SMB2_IOCTL = 0x000B #
+SMB2_CANCEL = 0x000C #
+SMB2_ECHO = 0x000D #
+SMB2_QUERY_DIRECTORY = 0x000E #
+SMB2_CHANGE_NOTIFY = 0x000F
+SMB2_QUERY_INFO = 0x0010 #
+SMB2_SET_INFO = 0x0011
+SMB2_OPLOCK_BREAK = 0x0012
+
+# SMB Flags
+SMB2_FLAGS_SERVER_TO_REDIR = 0x00000001
+SMB2_FLAGS_ASYNC_COMMAND = 0x00000002
+SMB2_FLAGS_RELATED_OPERATIONS = 0x00000004
+SMB2_FLAGS_SIGNED = 0x00000008
+SMB2_FLAGS_DFS_OPERATIONS = 0x10000000
+SMB2_FLAGS_REPLAY_OPERATION = 0x80000000
+
+# SMB Error SymLink Flags
+SYMLINK_FLAG_ABSOLUTE = 0x0
+SYMLINK_FLAG_RELATIVE = 0x1
+
+# SMB2_NEGOTIATE
+# Security Modes
+SMB2_NEGOTIATE_SIGNING_ENABLED = 0x1
+SMB2_NEGOTIATE_SIGNING_REQUIRED = 0x2
+
+# Capabilities
+SMB2_GLOBAL_CAP_DFS = 0x01
+SMB2_GLOBAL_CAP_LEASING = 0x02
+SMB2_GLOBAL_CAP_LARGE_MTU = 0x04
+SMB2_GLOBAL_CAP_MULTI_CHANNEL = 0x08
+SMB2_GLOBAL_CAP_PERSISTENT_HANDLES = 0x10
+SMB2_GLOBAL_CAP_DIRECTORY_LEASING = 0x20
+SMB2_GLOBAL_CAP_ENCRYPTION = 0x40
+
+# Dialects
+SMB2_DIALECT_002 = 0x0202
+SMB2_DIALECT_21 = 0x0210
+SMB2_DIALECT_30 = 0x0300
+SMB2_DIALECT_WILDCARD = 0x02FF
+
+# SMB2_SESSION_SETUP
+# Flags
+SMB2_SESSION_FLAG_BINDING = 0x01
+SMB2_SESSION_FLAG_IS_GUEST = 0x01
+SMB2_SESSION_FLAG_IS_NULL = 0x02
+SMB2_SESSION_FLAG_ENCRYPT_DATA = 0x04
+
+# SMB2_TREE_CONNECT
+# Types
+SMB2_SHARE_TYPE_DISK = 0x1
+SMB2_SHARE_TYPE_PIPE = 0x2
+SMB2_SHARE_TYPE_PRINT = 0x3
+
+# Share Flags
+SMB2_SHAREFLAG_MANUAL_CACHING = 0x00000000
+SMB2_SHAREFLAG_AUTO_CACHING = 0x00000010
+SMB2_SHAREFLAG_VDO_CACHING = 0x00000020
+SMB2_SHAREFLAG_NO_CACHING = 0x00000030
+SMB2_SHAREFLAG_DFS = 0x00000001
+SMB2_SHAREFLAG_DFS_ROOT = 0x00000002
+SMB2_SHAREFLAG_RESTRICT_EXCLUSIVE_OPENS = 0x00000100
+SMB2_SHAREFLAG_FORCE_SHARED_DELETE = 0x00000200
+SMB2_SHAREFLAG_ALLOW_NAMESPACE_CACHING = 0x00000400
+SMB2_SHAREFLAG_ACCESS_BASED_DIRECTORY_ENUM = 0x00000800
+SMB2_SHAREFLAG_FORCE_LEVELII_OPLOCK = 0x00001000
+SMB2_SHAREFLAG_ENABLE_HASH_V1 = 0x00002000
+SMB2_SHAREFLAG_ENABLE_HASH_V2 = 0x00004000
+SMB2_SHAREFLAG_ENCRYPT_DATA = 0x00008000
+
+# Capabilities
+SMB2_SHARE_CAP_DFS = 0x00000008
+SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY = 0x00000010
+SMB2_SHARE_CAP_SCALEOUT = 0x00000020
+SMB2_SHARE_CAP_CLUSTER = 0x00000040
+
+# SMB_CREATE
+# Oplocks
+SMB2_OPLOCK_LEVEL_NONE = 0x00
+SMB2_OPLOCK_LEVEL_II = 0x01
+SMB2_OPLOCK_LEVEL_EXCLUSIVE = 0x08
+SMB2_OPLOCK_LEVEL_BATCH = 0x09
+SMB2_OPLOCK_LEVEL_LEASE = 0xFF
+
+# Impersonation Level
+SMB2_IL_ANONYMOUS = 0x00000000
+SMB2_IL_IDENTIFICATION = 0x00000001
+SMB2_IL_IMPERSONATION = 0x00000002
+SMB2_IL_DELEGATE = 0x00000003
+
+# File Attributes
+FILE_ATTRIBUTE_ARCHIVE = 0x00000020
+FILE_ATTRIBUTE_COMPRESSED = 0x00000800
+FILE_ATTRIBUTE_DIRECTORY = 0x00000010
+FILE_ATTRIBUTE_ENCRYPTED = 0x00004000
+FILE_ATTRIBUTE_HIDDEN = 0x00000002
+FILE_ATTRIBUTE_NORMAL = 0x00000080
+FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000
+FILE_ATTRIBUTE_OFFLINE = 0x00001000
+FILE_ATTRIBUTE_READONLY = 0x00000001
+FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400
+FILE_ATTRIBUTE_SPARSE_FILE = 0x00000200
+FILE_ATTRIBUTE_SYSTEM = 0x00000004
+FILE_ATTRIBUTE_TEMPORARY = 0x00000100
+FILE_ATTRIBUTE_INTEGRITY_STREAM = 0x00000800
+FILE_ATTRIBUTE_NO_SCRUB_DATA = 0x00020000
+
+# Share Access
+FILE_SHARE_READ = 0x00000001
+FILE_SHARE_WRITE = 0x00000002
+FILE_SHARE_DELETE = 0x00000004
+
+# Create Disposition
+FILE_SUPERSEDE = 0x00000000
+FILE_OPEN = 0x00000001
+FILE_CREATE = 0x00000002
+FILE_OPEN_IF = 0x00000003
+FILE_OVERWRITE = 0x00000004
+FILE_OVERWRITE_IF = 0x00000005
+
+# Create Options
+FILE_DIRECTORY_FILE = 0x00000001
+FILE_WRITE_THROUGH = 0x00000002
+FILE_SEQUENTIAL_ONLY = 0x00000004
+FILE_NO_INTERMEDIATE_BUFFERING = 0x00000008
+FILE_SYNCHRONOUS_IO_ALERT = 0x00000010
+FILE_SYNCHRONOUS_IO_NONALERT = 0x00000020
+FILE_NON_DIRECTORY_FILE = 0x00000040
+FILE_COMPLETE_IF_OPLOCKED = 0x00000100
+FILE_NO_EA_KNOWLEDGE = 0x00000200
+FILE_RANDOM_ACCESS = 0x00000800
+FILE_DELETE_ON_CLOSE = 0x00001000
+FILE_OPEN_BY_FILE_ID = 0x00002000
+FILE_OPEN_FOR_BACKUP_INTENT = 0x00004000
+FILE_NO_COMPRESSION = 0x00008000
+FILE_RESERVE_OPFILTER = 0x00100000
+FILE_OPEN_REPARSE_POINT = 0x00200000
+FILE_OPEN_NO_RECALL = 0x00400000
+FILE_OPEN_FOR_FREE_SPACE_QUERY = 0x00800000
+
+# File Access Mask / Desired Access
+FILE_READ_DATA = 0x00000001
+FILE_WRITE_DATA = 0x00000002
+FILE_APPEND_DATA = 0x00000004
+FILE_READ_EA = 0x00000008
+FILE_WRITE_EA = 0x00000010
+FILE_EXECUTE = 0x00000020
+FILE_READ_ATTRIBUTES = 0x00000080
+FILE_WRITE_ATTRIBUTES = 0x00000100
+DELETE = 0x00010000
+READ_CONTROL = 0x00020000
+WRITE_DAC = 0x00040000
+WRITE_OWNER = 0x00080000
+SYNCHRONIZE = 0x00100000
+ACCESS_SYSTEM_SECURITY = 0x01000000
+MAXIMUM_ALLOWED = 0x02000000
+GENERIC_ALL = 0x10000000
+GENERIC_EXECUTE = 0x20000000
+GENERIC_WRITE = 0x40000000
+GENERIC_READ = 0x80000000
+
+# Directory Access Mask
+FILE_LIST_DIRECTORY = 0x00000001
+FILE_ADD_FILE = 0x00000002
+FILE_ADD_SUBDIRECTORY = 0x00000004
+FILE_TRAVERSE = 0x00000020
+FILE_DELETE_CHILD = 0x00000040
+
+# Create Contexts
+SMB2_CREATE_EA_BUFFER = 0x45787441
+SMB2_CREATE_SD_BUFFER = 0x53656344
+SMB2_CREATE_DURABLE_HANDLE_REQUEST = 0x44486e51
+SMB2_CREATE_DURABLE_HANDLE_RECONNECT = 0x44486e43
+SMB2_CREATE_ALLOCATION_SIZE = 0x416c5369
+SMB2_CREATE_QUERY_MAXIMAL_ACCESS_REQUEST = 0x4d784163
+SMB2_CREATE_TIMEWARP_TOKEN = 0x54577270
+SMB2_CREATE_QUERY_ON_DISK_ID = 0x51466964
+SMB2_CREATE_REQUEST = 0x52714c73
+SMB2_CREATE_REQUEST_LEASE_V2 = 0x52714c73
+SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 = 0x44483251
+SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2 = 0x44483243
+SMB2_CREATE_APP_INSTANCE_ID = 0x45BCA66AEFA7F74A9008FA462E144D74
+
+# Flags
+SMB2_CREATE_FLAG_REPARSEPOINT = 0x1
+FILE_NEED_EA = 0x80
+
+# CreateAction
+FILE_SUPERSEDED = 0x00000000
+FILE_OPENED = 0x00000001
+FILE_CREATED = 0x00000002
+FILE_OVERWRITTEN = 0x00000003
+
+# SMB2_CREATE_REQUEST_LEASE states
+SMB2_LEASE_NONE = 0x00
+SMB2_LEASE_READ_CACHING = 0x01
+SMB2_LEASE_HANDLE_CACHING = 0x02
+SMB2_LEASE_WRITE_CACHING = 0x04
+
+# SMB2_CREATE_REQUEST_LEASE_V2 Flags
+SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET = 0x4
+
+# SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 Flags
+SMB2_DHANDLE_FLAG_PERSISTENT = 0x02
+
+# SMB2_CLOSE
+# Flags
+SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB = 0x0001
+
+# SMB2_READ
+# Channel
+SMB2_CHANNEL_NONE = 0x00
+SMB2_CHANNEL_RDMA_V1 = 0x01
+
+# SMB2_WRITE
+# Flags
+SMB2_WRITEFLAG_WRITE_THROUGH = 0x01
+
+# Lease Break Notification
+SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED = 0x01
+
+# SMB_LOCK
+# Flags
+SMB2_LOCKFLAG_SHARED_LOCK = 0x01
+SMB2_LOCKFLAG_EXCLUSIVE_LOCK = 0x02
+SMB2_LOCKFLAG_UNLOCK = 0x04
+SMB2_LOCKFLAG_FAIL_IMMEDIATELY = 0x10
+
+# SMB IOCTL
+# Control Codes
+FSCTL_DFS_GET_REFERRALS = 0x00060194
+FSCTL_PIPE_PEEK = 0x0011400C
+FSCTL_PIPE_WAIT = 0x00110018
+FSCTL_PIPE_TRANSCEIVE = 0x0011C017
+FSCTL_SRV_COPYCHUNK = 0x001440F2
+FSCTL_SRV_ENUMERATE_SNAPSHOTS = 0x00144064
+FSCTL_SRV_REQUEST_RESUME_KEY = 0x00140078
+FSCTL_SRV_READ_HASH = 0x001441bb
+FSCTL_SRV_COPYCHUNK_WRITE = 0x001480F2
+FSCTL_LMR_REQUEST_RESILIENCY = 0x001401D4
+FSCTL_QUERY_NETWORK_INTERFACE_INFO = 0x001401FC
+FSCTL_SET_REPARSE_POINT = 0x000900A4
+FSCTL_DFS_GET_REFERRALS_EX = 0x000601B0
+FSCTL_FILE_LEVEL_TRIM = 0x00098208
+FSCTL_VALIDATE_NEGOTIATE_INFO = 0x00140204
+
+# Flags
+SMB2_0_IOCTL_IS_FSCTL = 0x1
+
+# SRV_READ_HASH
+# Type
+SRV_HASH_TYPE_PEER_DIST = 0x01
+
+# Version
+SRV_HASH_VER_1 = 0x1
+SRV_HASH_VER_2 = 0x2
+
+# Retrieval Type
+SRV_HASH_RETRIEVE_HASH_BASED = 0x01
+SRV_HASH_RETRIEVE_FILE_BASED = 0x02
+
+# NETWORK_INTERFACE_INFO
+# Capabilities
+RSS_CAPABLE = 0x01
+RDMA_CAPABLE = 0x02
+
+# SMB2_QUERY_DIRECTORIES
+# Information Class
+FILE_DIRECTORY_INFORMATION = 0x01
+FILE_FULL_DIRECTORY_INFORMATION = 0x02
+FILEID_FULL_DIRECTORY_INFORMATION = 0x26
+FILE_BOTH_DIRECTORY_INFORMATION = 0x03
+FILEID_BOTH_DIRECTORY_INFORMATION = 0x25
+FILENAMES_INFORMATION = 0x0C
+
+# Flags
+SMB2_RESTART_SCANS = 0x01
+SMB2_RETURN_SINGLE_ENTRY = 0x02
+SMB2_INDEX_SPECIFIED = 0x04
+SMB2_REOPEN = 0x10
+
+# SMB2_CHANGE_NOTIFY
+# Flags
+SMB2_WATCH_TREE = 0x01
+
+# Filters
+FILE_NOTIFY_CHANGE_FILE_NAME = 0x00000001
+FILE_NOTIFY_CHANGE_DIR_NAME = 0x00000002
+FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x00000004
+FILE_NOTIFY_CHANGE_SIZE = 0x00000008
+FILE_NOTIFY_CHANGE_LAST_WRITE = 0x00000010
+FILE_NOTIFY_CHANGE_LAST_ACCESS = 0x00000020
+FILE_NOTIFY_CHANGE_CREATION = 0x00000040
+FILE_NOTIFY_CHANGE_EA = 0x00000080
+FILE_NOTIFY_CHANGE_SECURITY = 0x00000100
+FILE_NOTIFY_CHANGE_STREAM_NAME = 0x00000200
+FILE_NOTIFY_CHANGE_STREAM_SIZE = 0x00000400
+FILE_NOTIFY_CHANGE_STREAM_WRITE = 0x00000800
+
+# FILE_NOTIFY_INFORMATION
+# Actions
+FILE_ACTION_ADDED = 0x00000001
+FILE_ACTION_REMOVED = 0x00000002
+FILE_ACTION_MODIFIED = 0x00000003
+FILE_ACTION_RENAMED_OLD_NAME = 0x00000004
+FILE_ACTION_RENAMED_NEW_NAME = 0x00000005
+
+# SMB2_QUERY_INFO
+# InfoTypes
+SMB2_0_INFO_FILE = 0x01
+SMB2_0_INFO_FILESYSTEM = 0x02
+SMB2_0_INFO_SECURITY = 0x03
+SMB2_0_INFO_QUOTA = 0x04
+
+# File Information Classes
+SMB2_FILE_ACCESS_INFO = 8
+SMB2_FILE_ALIGNMENT_INFO = 17
+SMB2_FILE_ALL_INFO = 18
+SMB2_FILE_ALLOCATION_INFO = 19
+SMB2_FILE_ALTERNATE_NAME_INFO = 21
+SMB2_ATTRIBUTE_TAG_INFO = 35
+SMB2_FILE_BASIC_INFO = 4
+SMB2_FILE_BOTH_DIRECTORY_INFO = 3
+SMB2_FILE_COMPRESSION_INFO = 28
+SMB2_FILE_DIRECTORY_INFO = 1
+SMB2_FILE_DISPOSITION_INFO = 13
+SMB2_FILE_EA_INFO = 7
+SMB2_FILE_END_OF_FILE_INFO = 20
+SMB2_FULL_DIRECTORY_INFO = 2
+SMB2_FULL_EA_INFO = 15
+SMB2_FILE_HARDLINK_INFO = 46
+SMB2_FILE_ID_BOTH_DIRECTORY_INFO = 37
+SMB2_FILE_ID_FULL_DIRECTORY_INFO = 38
+SMB2_FILE_ID_GLOBAL_TX_DIRECTORY_INFO = 50
+SMB2_FILE_INTERNAL_INFO = 6
+SMB2_FILE_LINK_INFO = 11
+SMB2_FILE_MAILSLOT_QUERY_INFO = 26
+SMB2_FILE_MAILSLOT_SET_INFO = 27
+SMB2_FILE_MODE_INFO = 16
+SMB2_FILE_MOVE_CLUSTER_INFO = 31
+SMB2_FILE_NAME_INFO = 9
+SMB2_FILE_NAMES_INFO = 12
+SMB2_FILE_NETWORK_OPEN_INFO = 34
+SMB2_FILE_NORMALIZED_NAME_INFO = 48
+SMB2_FILE_OBJECT_ID_INFO = 29
+SMB2_FILE_PIPE_INFO = 23
+SMB2_FILE_PIPE_LOCAL_INFO = 24
+SMB2_FILE_PIPE_REMOTE_INFO = 25
+SMB2_FILE_POSITION_INFO = 14
+SMB2_FILE_QUOTA_INFO = 32
+SMB2_FILE_RENAME_INFO = 10
+SMB2_FILE_REPARSE_POINT_INFO = 33
+SMB2_FILE_SFIO_RESERVE_INFO = 44
+SMB2_FILE_SHORT_NAME_INFO = 45
+SMB2_FILE_STANDARD_INFO = 5
+SMB2_FILE_STANDARD_LINK_INFO = 54
+SMB2_FILE_STREAM_INFO = 22
+SMB2_FILE_TRACKING_INFO = 36
+SMB2_FILE_VALID_DATA_LENGTH_INFO = 39
+
+# File System Information Classes
+SMB2_FILESYSTEM_VOLUME_INFO = 1
+SMB2_FILESYSTEM_LABEL_INFO = 2
+SMB2_FILESYSTEM_SIZE_INFO = 3
+SMB2_FILESYSTEM_DEVICE_INFO = 4
+SMB2_FILESYSTEM_ATTRIBUTE_INFO = 5
+SMB2_FILESYSTEM_CONTROL_INFO = 6
+SMB2_FILESYSTEM_FULL_SIZE_INFO = 7
+SMB2_FILESYSTEM_OBJECT_ID_INFO = 8
+SMB2_FILESYSTEM_DRIVER_PATH_INFO = 9
+SMB2_FILESYSTEM_SECTOR_SIZE_INFO = 11
+
+# Additional information
+OWNER_SECURITY_INFORMATION = 0x00000001
+GROUP_SECURITY_INFORMATION = 0x00000002
+DACL_SECURITY_INFORMATION = 0x00000004
+SACL_SECURITY_INFORMATION = 0x00000008
+LABEL_SECURITY_INFORMATION = 0x00000010
+
+# Flags
+SL_RESTART_SCAN = 0x00000001
+SL_RETURN_SINGLE_ENTRY = 0x00000002
+SL_INDEX_SPECIFIED = 0x00000004
+
+# TRANSFORM_HEADER
+SMB2_ENCRYPTION_AES128_CCM = 0x0001
+
+
+# STRUCtures
+# Represents a SMB2/3 Packet
+class SMBPacketBase(Structure):
+ def addCommand(self,command):
+ # Pad to 8 bytes and put the offset of another SMBPacket
+ raise 'Implement This!'
+
+ def isValidAnswer(self, status):
+ if self['Status'] != status:
+ import smb3
+ raise smb3.SessionError(self['Status'], self)
+ return True
+
+ def __init__(self, data = None):
+ Structure.__init__(self,data)
+ if data is None:
+ self['TreeID'] = 0
+
+
+class SMB2PacketAsync(SMBPacketBase):
+ structure = (
+ ('ProtocolID','"\xfeSMB'),
+ ('StructureSize','<H=64'),
+ ('CreditCharge','<H=0'),
+ ('Status','<L=0'),
+ ('Command','<H=0'),
+ ('CreditRequestResponse','<H=0'),
+ ('Flags','<L=0'),
+ ('NextCommand','<L=0'),
+ ('MessageID','<Q=0'),
+ ('AsyncID','<Q=0'),
+ ('SessionID','<Q=0'),
+ ('Signature','16s=""'),
+ ('Data',':=""'),
+ )
+
+class SMB3PacketAsync(SMBPacketBase):
+ structure = (
+ ('ProtocolID','"\xfeSMB'),
+ ('StructureSize','<H=64'),
+ ('CreditCharge','<H=0'),
+ ('ChannelSequence','<H=0'),
+ ('Reserved','<H=0'),
+ ('Command','<H=0'),
+ ('CreditRequestResponse','<H=0'),
+ ('Flags','<L=0'),
+ ('NextCommand','<L=0'),
+ ('MessageID','<Q=0'),
+ ('AsyncID','<Q=0'),
+ ('SessionID','<Q=0'),
+ ('Signature','16s=""'),
+ ('Data',':=""'),
+ )
+
+class SMB2Packet(SMBPacketBase):
+ structure = (
+ ('ProtocolID','"\xfeSMB'),
+ ('StructureSize','<H=64'),
+ ('CreditCharge','<H=0'),
+ ('Status','<L=0'),
+ ('Command','<H=0'),
+ ('CreditRequestResponse','<H=0'),
+ ('Flags','<L=0'),
+ ('NextCommand','<L=0'),
+ ('MessageID','<Q=0'),
+ ('Reserved','<L=0'),
+ ('TreeID','<L=0'),
+ ('SessionID','<Q=0'),
+ ('Signature','16s=""'),
+ ('Data',':=""'),
+ )
+
+class SMB3Packet(SMBPacketBase):
+ structure = (
+ ('ProtocolID','"\xfeSMB'),
+ ('StructureSize','<H=64'),
+ ('CreditCharge','<H=0'),
+ ('ChannelSequence','<H=0'),
+ ('Reserved','<H=0'),
+ ('Command','<H=0'),
+ ('CreditRequestResponse','<H=0'),
+ ('Flags','<L=0'),
+ ('NextCommand','<L=0'),
+ ('MessageID','<Q=0'),
+ ('Reserved','<L=0'),
+ ('TreeID','<L=0'),
+ ('SessionID','<Q=0'),
+ ('Signature','16s=""'),
+ ('Data',':=""'),
+ )
+
+class SMB2Error(Structure):
+ structure = (
+ ('StructureSize','<H=9'),
+ ('Reserved','<H=0'),
+ ('ByteCount','<L=0'),
+ ('_ErrorData','_-ErrorData','self["ByteCount"]'),
+ ('ErrorData','"\xff'),
+ )
+
+class SMB2ErrorSymbolicLink(Structure):
+ structure = (
+ ('SymLinkLength','<L=0'),
+ ('SymLinkErrorTag','<L=0'),
+ ('ReparseTag','<L=0'),
+ ('ReparseDataLenght','<H=0'),
+ ('UnparsedPathLength','<H=0'),
+ ('SubstituteNameOffset','<H=0'),
+ ('SubstituteNameLength','<H=0'),
+ ('PrintNameOffset','<H=0'),
+ ('PrintNameLength','<H=0'),
+ ('Flags','<L=0'),
+ ('PathBuffer',':'),
+ )
+
+# SMB2_NEGOTIATE
+class SMB2Negotiate(Structure):
+ structure = (
+ ('StructureSize','<H=36'),
+ ('DialectCount','<H=0'),
+ ('SecurityMode','<H=0'),
+ ('Reserved','<H=0'),
+ ('Capabilities','<L=0'),
+ ('ClientGuid','16s=""'),
+ ('ClientStartTime','<Q=0'),
+ ('Dialects','*<H'),
+ )
+
+class SMB2Negotiate_Response(Structure):
+ structure = (
+ ('StructureSize','<H=65'),
+ ('SecurityMode','<H=0'),
+ ('DialectRevision','<H=0'),
+ ('Reserved','<H=0'),
+ ('ServerGuid','16s=""'),
+ ('Capabilities','<L=0'),
+ ('MaxTransactSize','<L=0'),
+ ('MaxReadSize','<L=0'),
+ ('MaxWriteSize','<L=0'),
+ ('SystemTime','<Q=0'),
+ ('ServerStartTime','<Q=0'),
+ ('SecurityBufferOffset','<H=0'),
+ ('SecurityBufferLength','<H=0'),
+ ('Reserved2','<L=0'),
+ ('_AlignPad','_-AlignPad','self["SecurityBufferOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["SecurityBufferLength"]'),
+ ('Buffer',':'),
+ )
+
+# SMB2_SESSION_SETUP
+class SMB2SessionSetup(Structure):
+ SIZE = 24
+ structure = (
+ ('StructureSize','<H=25'),
+ ('Flags','<B=0'),
+ ('SecurityMode','<B=0'),
+ ('Capabilities','<L=0'),
+ ('Channel','<L=0'),
+ ('SecurityBufferOffset','<H=(self.SIZE + 64 + len(self["AlignPad"]))'),
+ ('SecurityBufferLength','<H=0'),
+ ('PreviousSessionId','<Q=0'),
+ ('_AlignPad','_-AlignPad','self["SecurityBufferOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["SecurityBufferLength"]'),
+ ('Buffer',':'),
+ )
+
+ def __init__(self, data = None):
+ Structure.__init__(self,data)
+ if data is None:
+ self['AlignPad'] = ''
+
+ def getData(self):
+ #self['AlignPad'] = '\x00' * ((8 - ((24 + SMB2_PACKET_SIZE) & 7)) & 7)
+ #self['SecurityBufferOffset'] = 24 + SMB2_PACKET_SIZE +len(self['AlignPad'])
+ #self['SecurityBufferLength'] += len(self['AlignPad'])
+ return Structure.getData(self)
+
+
+class SMB2SessionSetup_Response(Structure):
+ structure = (
+ ('StructureSize','<H=9'),
+ ('SessionFlags','<H=0'),
+ ('SecurityBufferOffset','<H=0'),
+ ('SecurityBufferLength','<H=0'),
+ ('_AlignPad','_-AlignPad','self["SecurityBufferOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["SecurityBufferLength"]'),
+ ('Buffer',':'),
+ )
+
+# SMB2_LOGOFF
+class SMB2Logoff(Structure):
+ structure = (
+ ('StructureSize','<H=4'),
+ ('Reserved','<H=0'),
+ )
+
+
+class SMB2Logoff_Response(Structure):
+ structure = (
+ ('StructureSize','<H=4'),
+ ('Reserved','<H=0'),
+ )
+
+# SMB2_TREE_CONNECT
+class SMB2TreeConnect(Structure):
+ SIZE = 8
+ structure = (
+ ('StructureSize','<H=9'),
+ ('Reserved','<H=0'),
+ ('PathOffset','<H=(self.SIZE + 64 + len(self["AlignPad"]))'),
+ ('PathLength','<H=0'),
+ ('_AlignPad','_-AlignPad','self["PathOffset"] - (64 + self.SIZE - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["PathLength"]'),
+ ('Buffer',':'),
+ )
+ def __init__(self, data = None):
+ Structure.__init__(self,data)
+ if data is None:
+ self['AlignPad'] = ''
+
+class SMB2TreeConnect_Response(Structure):
+ structure = (
+ ('StructureSize','<H=16'),
+ ('ShareType','<B=0'),
+ ('Reserved','<B=0'),
+ ('ShareFlags','<L=0'),
+ ('Capabilities','<L=0'),
+ ('MaximalAccess','<L=0'),
+ )
+
+# SMB2_TREE_DISCONNECT
+class SMB2TreeDisconnect(Structure):
+ structure = (
+ ('StructureSize','<H=4'),
+ ('Reserved','<H=0'),
+ )
+
+class SMB2TreeDisconnect_Response(Structure):
+ structure = (
+ ('StructureSize','<H=4'),
+ ('Reserved','<H=0'),
+ )
+
+# SMB2_CREATE
+class SMB2Create(Structure):
+ SIZE = 56
+ structure = (
+ ('StructureSize','<H=57'),
+ ('SecurityFlags','<B=0'),
+ ('RequestedOplockLevel','<B=0'),
+ ('ImpersonationLevel','<L=0'),
+ ('SmbCreateFlags','<Q=0'),
+ ('Reserved','<Q=0'),
+ ('DesiredAccess','<L=0'),
+ ('FileAttributes','<L=0'),
+ ('ShareAccess','<L=0'),
+ ('CreateDisposition','<L=0'),
+ ('CreateOptions','<L=0'),
+ ('NameOffset','<H=(self.SIZE + 64 + len(self["AlignPad"]))'),
+ ('NameLength','<H=0'),
+ ('CreateContextsOffset','<L=0'),
+ ('CreateContextsLength','<L=0'),
+ ('_AlignPad','_-AlignPad','self["NameOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["CreateContextsLength"]+self["NameLength"]'),
+ ('Buffer',':'),
+ )
+ def __init__(self, data = None):
+ Structure.__init__(self,data)
+ if data is None:
+ self['AlignPad'] = ''
+
+class SMB2CreateContext(Structure):
+ structure = (
+ ('Next','<L=0'),
+ ('NameOffset','<H=0'),
+ ('NameLength','<H=0'),
+ ('Reserved','<H=0'),
+ ('DataOffset','<H=0'),
+ ('DataLength','<L=0'),
+ ('_Buffer','_-Buffer','self["DataLength"]+self["NameLength"]'),
+ ('Buffer',':'),
+ )
+
+class SMB2_FILEID(Structure):
+ structure = (
+ ('Persistent','<Q=0'),
+ ('Volatile','<Q=0'),
+ )
+
+class SMB2Create_Response(Structure):
+ structure = (
+ ('StructureSize','<H=89'),
+ ('OplockLevel','<B=0'),
+ ('Flags','<B=0'),
+ ('CreateAction','<L=0'),
+ ('CreationTime','<Q=0'),
+ ('LastAccessTime','<Q=0'),
+ ('LastWriteTime','<Q=0'),
+ ('ChangeTime','<Q=0'),
+ ('AllocationSize','<Q=0'),
+ ('EndOfFile','<Q=0'),
+ ('FileAttributes','<L=0'),
+ ('Reserved2','<L=0'),
+ ('FileID',':',SMB2_FILEID),
+ ('CreateContextsOffset','<L=0'),
+ ('CreateContextsLength','<L=0'),
+ ('_AlignPad','_-AlignPad','self["CreateContextsOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["CreateContextsLength"]'),
+ ('Buffer',':'),
+ )
+
+class FILE_FULL_EA_INFORMATION(Structure):
+ structure = (
+ ('NextEntryOffset','<L=0'),
+ ('Flags','<B=0'),
+ ('EaNameLength','<B=0'),
+ ('EaValueLength','<H=0'),
+ ('_EaName','_-EaName','self["EaNameLength"]'),
+ ('EaName',':'),
+ ('_EaValue','_-EaValue','self["EaValue"]'),
+ ('EaValue',':'),
+ )
+
+
+class SMB2_CREATE_DURABLE_HANDLE_RECONNECT(Structure):
+ structure = (
+ ('Data',':',SMB2_FILEID),
+ )
+
+class SMB2_CREATE_DURABLE_HANDLE_REQUEST(Structure):
+ structure = (
+ ('DurableRequest','16s=""'),
+ )
+
+class SMB2_CREATE_DURABLE_HANDLE_RESPONSE(Structure):
+ structure = (
+ ('Reserved','<Q=0'),
+ )
+
+class SMB2_CREATE_QUERY_MAXIMAL_ACCESS_REQUEST(Structure):
+ structure = (
+ ('Timestamp','<Q=0'),
+ )
+
+class SMB2_CREATE_QUERY_MAXIMAL_ACCESS_RESPONSE(Structure):
+ structure = (
+ ('QueryStatus','<L=0'),
+ ('MaximalAccess','<L=0'),
+ )
+
+class SMB2_CREATE_ALLOCATION_SIZE(Structure):
+ structure = (
+ ('AllocationSize','<Q=0'),
+ )
+
+class SMB2_CREATE_TIMEWARP_TOKEN(Structure):
+ structure = (
+ ('AllocationSize','<Q=0'),
+ )
+
+class SMB2_CREATE_REQUEST_LEASE(Structure):
+ structure = (
+ ('LeaseKey','16s=""'),
+ ('LeaseState','<L=0'),
+ ('LeaseFlags','<L=0'),
+ ('LeaseDuration','<Q=0'),
+ )
+
+SMB2_CREATE_RESPONSE_LEASE = SMB2_CREATE_REQUEST_LEASE
+
+class SMB2_CREATE_REQUEST_LEASE_V2(Structure):
+ structure = (
+ ('LeaseKey','16s=""'),
+ ('LeaseState','<L=0'),
+ ('Flags','<L=0'),
+ ('LeaseDuration','<Q=0'),
+ ('ParentLeaseKey','16s=""'),
+ ('Epoch','<H=0'),
+ ('Reserved','<H=0'),
+ )
+
+SMB2_CREATE_RESPONSE_LEASE_V2 = SMB2_CREATE_REQUEST_LEASE_V2
+
+class SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2(Structure):
+ structure = (
+ ('Timeout','<L=0'),
+ ('Flags','<L=0'),
+ ('Reserved','8s=""'),
+ ('CreateGuid','16s=""'),
+ )
+
+class SMB2_CREATE_DURABLE_HANDLE_RESPONSE_V2(Structure):
+ structure = (
+ ('Timeout','<L=0'),
+ ('Flags','<L=0'),
+ )
+
+class SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2(Structure):
+ structure = (
+ ('FileID',':', SMB2_FILEID),
+ ('CreateGuid','16s=""'),
+ ('Flags','<L=0'),
+ )
+
+class SMB2_CREATE_APP_INSTANCE_ID(Structure):
+ structure = (
+ ('StructureSize','<H=0'),
+ ('Reserved','<H=0'),
+ ('AppInstanceId','16s=""'),
+ )
+
+class SMB2_CREATE_QUERY_ON_DISK_ID(Structure):
+ structure = (
+ ('DiskIDBuffer','32s=""'),
+ )
+
+# Todo: Add Classes for
+#SMB2_CREATE_SD_BUFFER
+
+# SMB2_CLOSE
+class SMB2Close(Structure):
+ structure = (
+ ('StructureSize','<H=24'),
+ ('Flags','<H=0'),
+ ('Reserved','<L=0'),
+ ('FileID',':', SMB2_FILEID),
+ )
+
+class SMB2Close_Response(Structure):
+ structure = (
+ ('StructureSize','<H=60'),
+ ('Flags','<H=0'),
+ ('Reserved','<L=0'),
+ ('CreationTime','<Q=0'),
+ ('LastAccessTime','<Q=0'),
+ ('LastWriteTime','<Q=0'),
+ ('ChangeTime','<Q=0'),
+ ('AllocationSize','<Q=0'),
+ ('EndofFile','<Q=0'),
+ ('FileAttributes','<L=0'),
+ )
+
+# SMB2_FLUSH
+class SMB2Flush(Structure):
+ structure = (
+ ('StructureSize','<H=24'),
+ ('Reserved1','<H=0'),
+ ('Reserved2','<L=0'),
+ ('FileID',':',SMB2_FILEID),
+ )
+
+class SMB2Flush_Response(Structure):
+ structure = (
+ ('StructureSize','<H=4'),
+ ('Reserved','<H=0'),
+ )
+
+# SMB2_READ
+class SMB2Read(Structure):
+ SIZE = 48
+ structure = (
+ ('StructureSize','<H=49'),
+ ('Padding','<B=0'),
+ ('Reserved','<B=0'),
+ ('Length','<L=0'),
+ ('Offset','<Q=0'),
+ ('FileID',':',SMB2_FILEID),
+ ('MinimumCount','<L=0'),
+ ('Channel','<L=0'),
+ ('RemainingBytes','<L=0'),
+ ('ReadChannelInfoOffset','<H=0'),
+ ('ReadChannelInfoLength','<H=0'),
+ ('_AlignPad','_-AlignPad','self["ReadChannelInfoOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["ReadChannelInfoLength"]'),
+ ('Buffer',':=0'),
+ )
+ def __init__(self, data = None):
+ Structure.__init__(self,data)
+ if data is None:
+ self['AlignPad'] = ''
+
+
+class SMB2Read_Response(Structure):
+ structure = (
+ ('StructureSize','<H=17'),
+ ('DataOffset','<B=0'),
+ ('Reserved','<B=0'),
+ ('DataLength','<L=0'),
+ ('DataRemaining','<L=0'),
+ ('Reserved2','<L=0'),
+ ('_AlignPad','_-AlignPad','self["DataOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["DataLength"]'),
+ ('Buffer',':'),
+ )
+
+# SMB2_WRITE
+class SMB2Write(Structure):
+ SIZE = 48
+ structure = (
+ ('StructureSize','<H=49'),
+ ('DataOffset','<H=(self.SIZE + 64 + len(self["AlignPad"]))'),
+ ('Length','<L=0'),
+ ('Offset','<Q=0'),
+ ('FileID',':',SMB2_FILEID),
+ ('Channel','<L=0'),
+ ('RemainingBytes','<L=0'),
+ ('WriteChannelInfoOffset','<H=0'),
+ ('WriteChannelInfoLength','<H=0'),
+ ('_AlignPad','_-AlignPad','self["DataOffset"] + self["WriteChannelInfoOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('Flags','<L=0'),
+ ('_Buffer','_-Buffer','self["Length"]+self["WriteChannelInfoLength"]'),
+ ('Buffer',':'),
+ )
+ def __init__(self, data = None):
+ Structure.__init__(self,data)
+ if data is None:
+ self['AlignPad'] = ''
+
+
+class SMB2Write_Response(Structure):
+ structure = (
+ ('StructureSize','<H=17'),
+ ('Reserved','<H=0'),
+ ('Count','<L=0'),
+ ('Remaining','<L=0'),
+ ('WriteChannelInfoOffset','<H=0'),
+ ('WriteChannelInfoLength','<H=0'),
+ )
+
+class SMB2OplockBreakNotification(Structure):
+ structure = (
+ ('StructureSize','<H=24'),
+ ('OplockLevel','<B=0'),
+ ('Reserved','<B=0'),
+ ('Reserved2','<L=0'),
+ ('FileID',':',SMB2_FILEID),
+ )
+
+SMB2OplockBreakAcknowledgment = SMB2OplockBreakNotification
+SMB2OplockBreakResponse = SMB2OplockBreakNotification
+
+class SMB2LeaseBreakNotification(Structure):
+ structure = (
+ ('StructureSize','<H=44'),
+ ('NewEpoch','<H=0'),
+ ('Flags','<L=0'),
+ ('LeaseKey','16s=""'),
+ ('CurrentLeaseState','<L=0'),
+ ('NewLeaseState','<L=0'),
+ ('BreakReason','<L=0'),
+ ('AccessMaskHint','<L=0'),
+ ('ShareMaskHint','<L=0'),
+ )
+
+class SMB2LeaseBreakAcknowledgement(Structure):
+ structure = (
+ ('StructureSize','<H=36'),
+ ('Reserved','<H=0'),
+ ('Flags','<L=0'),
+ ('LeaseKey','16s=""'),
+ ('LeaseState','<L=0'),
+ ('LeaseDuration','<Q=0'),
+ )
+
+SMB2LeaseBreakResponse = SMB2LeaseBreakAcknowledgement
+
+# SMB2_LOCK
+class SMB2_LOCK_ELEMENT(Structure):
+ structure = (
+ ('Offset','<Q=0'),
+ ('Length','<Q=0'),
+ ('Flags','<L=0'),
+ ('Reserved','<L=0'),
+ )
+
+class SMB2Lock(Structure):
+ structure = (
+ ('StructureSize','<H=48'),
+ ('LockCount','<H=0'),
+ ('LockSequence','<L=0'),
+ ('FileID',':',SMB2_FILEID),
+ ('_Locks','_-Locks','self["LockCount"]*24'),
+ ('Locks',':'),
+ )
+
+class SMB2Lock_Response(Structure):
+ structure = (
+ ('StructureSize','<H=4'),
+ ('Reserved','<H=0'),
+ )
+
+
+# SMB2_ECHO
+class SMB2Echo(Structure):
+ structure = (
+ ('StructureSize','<H=4'),
+ ('Reserved','<H=0'),
+ )
+
+SMB2Echo_Response = SMB2Echo
+
+# SMB2_CANCEL`
+class SMB2Cancel(Structure):
+ structure = (
+ ('StructureSize','<H=4'),
+ ('Reserved','<H=0'),
+ )
+
+# SMB2_IOCTL
+class SMB2Ioctl(Structure):
+ SIZE = 56
+ structure = (
+ ('StructureSize','<H=57'),
+ ('Reserved','<H=0'),
+ ('CtlCode','<L=0'),
+ ('FileID',':',SMB2_FILEID),
+ ('InputOffset','<L=(self.SIZE + 64 + len(self["AlignPad"]))'),
+ ('InputCount','<L=0'),
+ ('MaxInputResponse','<L=0'),
+ ('OutputOffset','<L=(self.SIZE + 64 + len(self["AlignPad"]) + self["InputCount"])'),
+ ('OutputCount','<L=0'),
+ ('MaxOutputResponse','<L=0'),
+ ('Flags','<L=0'),
+ ('Reserved2','<L=0'),
+ #('_AlignPad','_-AlignPad','self["InputOffset"] + self["OutputOffset"] - (64 + self["StructureSize"] - 1)'),
+ #('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["InputCount"]+self["OutputCount"]'),
+ ('Buffer',':'),
+ )
+ def __init__(self, data = None):
+ Structure.__init__(self,data)
+ if data is None:
+ self['AlignPad'] = ''
+
+class FSCTL_PIPE_WAIT_STRUCTURE(Structure):
+ structure = (
+ ('Timeout','<q=0'),
+ ('NameLength','<L=0'),
+ ('TimeoutSpecified','<B=0'),
+ ('Padding','<B=0'),
+ ('_Name','_-Name','self["NameLength"]'),
+ ('Name',':'),
+ )
+
+class SRV_COPYCHUNK_COPY(Structure):
+ structure = (
+ ('SourceKey','24s=""'),
+ ('ChunkCount','<L=0'),
+ ('Reserved','<L=0'),
+ ('_Chunks','_-Chunks', 'self["ChunkCount"]*len(SRV_COPYCHUNK)'),
+ ('Chunks',':'),
+ )
+
+class SRV_COPYCHUNK(Structure):
+ structure = (
+ ('SourceOffset','<Q=0'),
+ ('TargetOffset','<Q=0'),
+ ('Length','<L=0'),
+ ('Reserved','<L=0'),
+ )
+
+class SRV_COPYCHUNK_RESPONSE(Structure):
+ structure = (
+ ('ChunksWritten','<L=0'),
+ ('ChunkBytesWritten','<L=0'),
+ ('TotalBytesWritten','<L=0'),
+ )
+
+class SRV_READ_HASH(Structure):
+ structure = (
+ ('HashType','<L=0'),
+ ('HashVersion','<L=0'),
+ ('HashRetrievalType','<L=0'),
+ ('Length','<L=0'),
+ ('Offset','<Q=0'),
+ )
+
+class NETWORK_RESILIENCY_REQUEST(Structure):
+ structure = (
+ ('Timeout','<L=0'),
+ ('Reserved','<L=0'),
+ )
+
+class VALIDATE_NEGOTIATE_INFO(Structure):
+ structure = (
+ ('Capabilities','<L=0'),
+ ('Guid','16s=""'),
+ ('SecurityMode','<H=0'),
+ #('DialectCount','<H=0'),
+ ('Dialects','<H*<H'),
+ )
+
+class SRV_SNAPSHOT_ARRAY(Structure):
+ structure = (
+ ('NumberOfSnapShots','<L=0'),
+ ('NumberOfSnapShotsReturned','<L=0'),
+ ('SnapShotArraySize','<L=0'),
+ ('_SnapShots','_-SnapShots','self["SnapShotArraySize"]'),
+ ('SnapShots',':'),
+ )
+
+class SRV_REQUEST_RESUME_KEY(Structure):
+ structure = (
+ ('ResumeKey','24s=""'),
+ ('ContextLength','<L=0'),
+ ('_Context','_-Context','self["ContextLength"]'),
+ ('Context',':'),
+ )
+
+class HASH_HEADER(Structure):
+ structure = (
+ ('HashType','<L=0'),
+ ('HashVersion','<L=0'),
+ ('SourceFileChangeTime','<Q=0'),
+ ('SourceFileSize','<Q=0'),
+ ('HashBlobLength','<L=0'),
+ ('HashBlobOffset','<L=0'),
+ ('Dirty','<H=0'),
+ ('SourceFileNameLength','<L=0'),
+ ('_SourceFileName','_-SourceFileName','self["SourceFileNameLength"]',),
+ ('SourceFileName',':'),
+ )
+
+class SRV_HASH_RETRIEVE_HASH_BASED(Structure):
+ structure = (
+ ('Offset','<Q=0'),
+ ('BufferLength','<L=0'),
+ ('Reserved','<L=0'),
+ ('_Buffer','_-Buffer','self["BufferLength"]'),
+ ('Buffer',':'),
+ )
+
+class SRV_HASH_RETRIEVE_FILE_BASED(Structure):
+ structure = (
+ ('FileDataOffset','<Q=0'),
+ ('FileDataLength','<Q=0'),
+ ('BufferLength','<L=0'),
+ ('Reserved','<L=0'),
+ ('_Buffer','_-Buffer','self["BufferLength"]'),
+ ('Buffer',':'),
+ )
+
+class NETWORK_INTERFACE_INFO(Structure):
+ structure = (
+ ('Next','<L=0'),
+ ('IfIndex','<L=0'),
+ ('Capability','<L=0'),
+ ('Reserved','<L=0'),
+ ('LinkSpeed','<Q=0'),
+ ('SockAddr_Storage','128s=""'),
+ )
+
+class SMB2Ioctl_Response(Structure):
+ structure = (
+ ('StructureSize','<H=49'),
+ ('Reserved','<H=0'),
+ ('CtlCode','<L=0'),
+ ('FileID',':',SMB2_FILEID),
+ ('InputOffset','<L=0'),
+ ('InputCount','<L=0'),
+ ('OutputOffset','<L=0'),
+ ('OutputCount','<L=0'),
+ ('Flags','<L=0'),
+ ('Reserved2','<L=0'),
+ ('_AlignPad','_-AlignPad','self["OutputOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["InputCount"]+self["OutputCount"]'),
+ ('Buffer',':'),
+ )
+
+# SMB2_QUERY_DIRECTORY
+class SMB2QueryDirectory(Structure):
+ SIZE = 32
+ structure = (
+ ('StructureSize','<H=33'),
+ ('FileInformationClass','<B=0'),
+ ('Flags','<B=0'),
+ ('FileIndex','<L=0'),
+ ('FileID',':',SMB2_FILEID),
+ ('FileNameOffset','<H=(self.SIZE + 64 + len(self["AlignPad"]))'),
+ ('FileNameLength','<H=0'),
+ ('OutputBufferLength','<L=0'),
+ ('_AlignPad','_-AlignPad','self["FileNameOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["FileNameLength"]'),
+ ('Buffer',':'),
+ )
+ def __init__(self, data = None):
+ Structure.__init__(self,data)
+ if data is None:
+ self['AlignPad'] = ''
+
+class SMB2QueryDirectory_Response(Structure):
+ structure = (
+ ('StructureSize','<H=9'),
+ ('OutputBufferOffset','<H=0'),
+ ('OutputBufferLength','<L=0'),
+ ('_AlignPad','_-AlignPad','self["OutputBufferOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["OutputBufferLength"]'),
+ ('Buffer',':'),
+ )
+
+# SMB2_CHANGE_NOTIFY
+class SMB2ChangeNotify(Structure):
+ structure = (
+ ('StructureSize','<H=32'),
+ ('Flags','<H=0'),
+ ('OutputBufferLength','<L=0'),
+ ('FileID',':',SMB2_FILEID),
+ ('CompletionFilter','<L=0'),
+ ('Reserved','<L=0'),
+ )
+
+class SMB2ChangeNotify_Response(Structure):
+ structure = (
+ ('StructureSize','<H=9'),
+ ('OutputBufferOffset','<H=0'),
+ ('OutputBufferLength','<L=0'),
+ ('_AlignPad','_-AlignPad','self["OutputBufferOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["OutputBufferLength"]'),
+ ('Buffer',':'),
+ )
+
+class FILE_NOTIFY_INFORMATION(Structure):
+ structure = (
+ ('NextEntryOffset','<L=0'),
+ ('Action','<L=0'),
+ ('FileNameLength','<L=0'),
+ ('_FileName','_-FileName','self["FileNameLength"]',),
+ ('FileName',':'),
+ )
+
+# SMB2_QUERY_INFO
+class SMB2QueryInfo(Structure):
+ SIZE = 40
+ structure = (
+ ('StructureSize','<H=41'),
+ ('InfoType','<B=0'),
+ ('FileInfoClass','<B=0'),
+ ('OutputBufferLength','<L=0'),
+ ('InputBufferOffset','<H=(self.SIZE + 64 + len(self["AlignPad"]))'),
+ ('Reserved','<H=0'),
+ ('InputBufferLength','<L=0'),
+ ('AdditionalInformation','<L=0'),
+ ('Flags','<L=0'),
+ ('FileID',':',SMB2_FILEID),
+ ('_AlignPad','_-AlignPad','self["InputBufferOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["InputBufferLength"]'),
+ ('Buffer',':'),
+ )
+ def __init__(self, data = None):
+ Structure.__init__(self,data)
+ if data is None:
+ self['AlignPad'] = ''
+
+
+class SMB2_QUERY_QUOTA_INFO(Structure):
+ structure = (
+ ('ReturnSingle','<B=0'),
+ ('RestartScan','<B=0'),
+ ('Reserved','<H=0'),
+ ('SidListLength','<L=0'),
+ ('StartSidLength','<L=0'),
+ ('StartSidOffset','<L=0'),
+ # ToDo: Check 2.2.37.1 here
+ ('SidBuffer',':'),
+ )
+
+class SMB2QueryInfo_Response(Structure):
+ structure = (
+ ('StructureSize','<H=9'),
+ ('OutputBufferOffset','<H=0'),
+ ('OutputBufferLength','<L=0'),
+ ('_AlignPad','_-AlignPad','self["OutputBufferOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["OutputBufferLength"]'),
+ ('Buffer',':'),
+ )
+
+# SMB2_SET_INFO
+class SMB2SetInfo(Structure):
+ SIZE = 32
+ structure = (
+ ('StructureSize','<H=33'),
+ ('InfoType','<B=0'),
+ ('FileInfoClass','<B=0'),
+ ('BufferLength','<L=0'),
+ ('BufferOffset','<H=(self.SIZE + 64 + len(self["AlignPad"]))'),
+ ('Reserved','<H=0'),
+ ('AdditionalInformation','<L=0'),
+ ('FileID',':',SMB2_FILEID),
+ ('_AlignPad','_-AlignPad','self["BufferOffset"] - (64 + self["StructureSize"] - 1)'),
+ ('AlignPad',':=""'),
+ ('_Buffer','_-Buffer','self["BufferLength"]'),
+ ('Buffer',':'),
+ )
+ def __init__(self, data = None):
+ Structure.__init__(self,data)
+ if data is None:
+ self['AlignPad'] = ''
+
+class SMB2SetInfo_Response(Structure):
+ structure = (
+ ('StructureSize','<H=2'),
+ )
+
+class FILE_RENAME_INFORMATION_TYPE_2(Structure):
+ structure = (
+ ('ReplaceIfExists','<B=0'),
+ ('Reserved','7s=""'),
+ ('RootDirectory','<Q=0'),
+ ('FileNameLength','<L=0'),
+ ('_FileName','_-FileName','self["FileNameLength"]'),
+ ('FileName',':'),
+ )
+
+class SMB2_TRANSFORM_HEADER(Structure):
+ structure = (
+ ('ProtocolID','"\xfdSMB'),
+ ('Signature','16s=""'),
+ ('Nonce','16s=""'),
+ ('OriginalMessageSize','<L=0'),
+ ('Reserved','<H=0'),
+ ('EncryptionAlgorithm','<H=0'),
+ ('SessionID','<Q=0'),
+ )
+
+# SMB2_FILE_INTERNAL_INFO
+class FileInternalInformation(Structure):
+ structure = (
+ ('IndexNumber','<q=0'),
+ )
diff --git a/tests/python_dependencies/impacket/smbserver.py b/tests/python_dependencies/impacket/smbserver.py
new file mode 100644
index 00000000..aa795e52
--- /dev/null
+++ b/tests/python_dependencies/impacket/smbserver.py
@@ -0,0 +1,4168 @@
+# Copyright (c) 2003-2016 CORE Security Technologies
+#
+# This software is provided under under a slightly modified version
+# of the Apache Software License. See the accompanying LICENSE file
+# for more information.
+#
+# Author: Alberto Solino (@agsolino)
+#
+# TODO:
+# [-] Functions should return NT error codes
+# [-] Handling errors in all situations, right now it's just raising exceptions.
+# [*] Standard authentication support
+# [ ] Organize the connectionData stuff
+# [*] Add capability to send a bad user ID if the user is not authenticated,
+# right now you can ask for any command without actually being authenticated
+# [ ] PATH TRAVERSALS EVERYWHERE.. BE WARNED!
+# [ ] Check the credentials.. now we're just letting everybody to log in.
+# [ ] Check error situation (now many places assume the right data is coming)
+# [ ] Implement IPC to the main process so the connectionData is on a single place
+# [ ] Hence.. implement locking
+# estamos en la B
+
+from __future__ import with_statement
+import calendar
+import socket
+import time
+import datetime
+import struct
+import ConfigParser
+import SocketServer
+import threading
+import logging
+import logging.config
+import ntpath
+import os
+import fnmatch
+import errno
+import sys
+import random
+import shutil
+from binascii import hexlify
+
+# For signing
+from impacket import smb, nmb, ntlm, uuid, LOG
+from impacket import smb3structs as smb2
+from impacket.spnego import SPNEGO_NegTokenInit, TypesMech, MechTypes, SPNEGO_NegTokenResp, ASN1_AID, ASN1_SUPPORTED_MECH
+from impacket.nt_errors import STATUS_NO_MORE_FILES, STATUS_NETWORK_NAME_DELETED, STATUS_INVALID_PARAMETER, \
+ STATUS_FILE_CLOSED, STATUS_MORE_PROCESSING_REQUIRED, STATUS_OBJECT_PATH_NOT_FOUND, STATUS_DIRECTORY_NOT_EMPTY, \
+ STATUS_FILE_IS_A_DIRECTORY, STATUS_NOT_IMPLEMENTED, STATUS_INVALID_HANDLE, STATUS_OBJECT_NAME_COLLISION, \
+ STATUS_NO_SUCH_FILE, STATUS_CANCELLED, STATUS_OBJECT_NAME_NOT_FOUND, STATUS_SUCCESS, STATUS_ACCESS_DENIED, \
+ STATUS_NOT_SUPPORTED, STATUS_INVALID_DEVICE_REQUEST, STATUS_FS_DRIVER_REQUIRED, STATUS_INVALID_INFO_CLASS
+
+# These ones not defined in nt_errors
+STATUS_SMB_BAD_UID = 0x005B0002
+STATUS_SMB_BAD_TID = 0x00050002
+
+# Utility functions
+# and general functions.
+# There are some common functions that can be accessed from more than one SMB
+# command (or either TRANSACTION). That's why I'm putting them here
+# TODO: Return NT ERROR Codes
+
+def outputToJohnFormat(challenge, username, domain, lmresponse, ntresponse):
+# We don't want to add a possible failure here, since this is an
+# extra bonus. We try, if it fails, returns nothing
+ ret_value = ''
+ try:
+ if len(ntresponse) > 24:
+ # Extended Security - NTLMv2
+ ret_value = {'hash_string':'%s::%s:%s:%s:%s' % (username.decode('utf-16le'), domain.decode('utf-16le'), hexlify(challenge), hexlify(ntresponse)[:32], hexlify(ntresponse)[32:]), 'hash_version':'ntlmv2'}
+ else:
+ # NTLMv1
+ ret_value = {'hash_string':'%s::%s:%s:%s:%s' % (username.decode('utf-16le'), domain.decode('utf-16le'), hexlify(lmresponse), hexlify(ntresponse), hexlify(challenge)), 'hash_version':'ntlm'}
+ except:
+ # Let's try w/o decoding Unicode
+ try:
+ if len(ntresponse) > 24:
+ # Extended Security - NTLMv2
+ ret_value = {'hash_string':'%s::%s:%s:%s:%s' % (username, domain, hexlify(challenge), hexlify(ntresponse)[:32], hexlify(ntresponse)[32:]), 'hash_version':'ntlmv2'}
+ else:
+ # NTLMv1
+ ret_value = {'hash_string':'%s::%s:%s:%s:%s' % (username, domain, hexlify(lmresponse), hexlify(ntresponse), hexlify(challenge)), 'hash_version':'ntlm'}
+ except Exception, e:
+ LOG.error("outputToJohnFormat: %s" % e)
+ pass
+
+ return ret_value
+
+def writeJohnOutputToFile(hash_string, hash_version, file_name):
+ fn_data = os.path.splitext(file_name)
+ if hash_version == "ntlmv2":
+ output_filename = fn_data[0] + "_ntlmv2" + fn_data[1]
+ else:
+ output_filename = fn_data[0] + "_ntlm" + fn_data[1]
+
+ with open(output_filename,"a") as f:
+ f.write(hash_string)
+ f.write('\n')
+
+
+def decodeSMBString( flags, text ):
+ if flags & smb.SMB.FLAGS2_UNICODE:
+ return text.decode('utf-16le')
+ else:
+ return text
+
+def encodeSMBString( flags, text ):
+ if flags & smb.SMB.FLAGS2_UNICODE:
+ return (text).encode('utf-16le')
+ else:
+ return text
+
+def getFileTime(t):
+ t *= 10000000
+ t += 116444736000000000
+ return t
+
+def getUnixTime(t):
+ t -= 116444736000000000
+ t /= 10000000
+ return t
+
+def getSMBDate(t):
+ # TODO: Fix this :P
+ d = datetime.date.fromtimestamp(t)
+ year = d.year - 1980
+ ret = (year << 8) + (d.month << 4) + d.day
+ return ret
+
+def getSMBTime(t):
+ # TODO: Fix this :P
+ d = datetime.datetime.fromtimestamp(t)
+ return (d.hour << 8) + (d.minute << 4) + d.second
+
+def getShares(connId, smbServer):
+ config = smbServer.getServerConfig()
+ sections = config.sections()
+ # Remove the global one
+ del(sections[sections.index('global')])
+ shares = {}
+ for i in sections:
+ shares[i] = dict(config.items(i))
+ return shares
+
+def searchShare(connId, share, smbServer):
+ config = smbServer.getServerConfig()
+ if config.has_section(share):
+ return dict(config.items(share))
+ else:
+ return None
+
+def openFile(path,fileName, accessMode, fileAttributes, openMode):
+ fileName = os.path.normpath(fileName.replace('\\','/'))
+ errorCode = 0
+ if len(fileName) > 0 and (fileName[0] == '/' or fileName[0] == '\\'):
+ # strip leading '/'
+ fileName = fileName[1:]
+ pathName = os.path.join(path,fileName)
+ mode = 0
+ # Check the Open Mode
+ if openMode & 0x10:
+ # If the file does not exist, create it.
+ mode = os.O_CREAT
+ else:
+ # If file does not exist, return an error
+ if os.path.exists(pathName) is not True:
+ errorCode = STATUS_NO_SUCH_FILE
+ return 0,mode, pathName, errorCode
+
+ if os.path.isdir(pathName) and (fileAttributes & smb.ATTR_DIRECTORY) == 0:
+ # Request to open a normal file and this is actually a directory
+ errorCode = STATUS_FILE_IS_A_DIRECTORY
+ return 0, mode, pathName, errorCode
+ # Check the Access Mode
+ if accessMode & 0x7 == 1:
+ mode |= os.O_WRONLY
+ elif accessMode & 0x7 == 2:
+ mode |= os.O_RDWR
+ else:
+ mode = os.O_RDONLY
+
+ try:
+ if sys.platform == 'win32':
+ mode |= os.O_BINARY
+ fid = os.open(pathName, mode)
+ except Exception, e:
+ LOG.error("openFile: %s,%s" % (pathName, mode) ,e)
+ fid = 0
+ errorCode = STATUS_ACCESS_DENIED
+
+ return fid, mode, pathName, errorCode
+
+def queryFsInformation(path, filename, level=0):
+
+ if isinstance(filename,unicode):
+ encoding = 'utf-16le'
+ flags = smb.SMB.FLAGS2_UNICODE
+ else:
+ encoding = 'ascii'
+ flags = 0
+
+ fileName = os.path.normpath(filename.replace('\\','/'))
+ if len(fileName) > 0 and (fileName[0] == '/' or fileName[0] == '\\'):
+ # strip leading '/'
+ fileName = fileName[1:]
+ pathName = os.path.join(path,fileName)
+ fileSize = os.path.getsize(pathName)
+ (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime) = os.stat(pathName)
+ if level == smb.SMB_QUERY_FS_ATTRIBUTE_INFO or level == smb2.SMB2_FILESYSTEM_ATTRIBUTE_INFO:
+ data = smb.SMBQueryFsAttributeInfo()
+ data['FileSystemAttributes'] = smb.FILE_CASE_SENSITIVE_SEARCH | smb.FILE_CASE_PRESERVED_NAMES
+ data['MaxFilenNameLengthInBytes'] = 255
+ data['LengthOfFileSystemName'] = len('XTFS')*2
+ data['FileSystemName'] = 'XTFS'.encode('utf-16le')
+ return data.getData()
+ elif level == smb.SMB_INFO_VOLUME:
+ data = smb.SMBQueryFsInfoVolume( flags = flags )
+ data['VolumeLabel'] = 'SHARE'.encode(encoding)
+ return data.getData()
+ elif level == smb.SMB_QUERY_FS_VOLUME_INFO or level == smb2.SMB2_FILESYSTEM_VOLUME_INFO:
+ data = smb.SMBQueryFsVolumeInfo()
+ data['VolumeLabel'] = ''
+ data['VolumeCreationTime'] = getFileTime(ctime)
+ return data.getData()
+ elif level == smb.SMB_QUERY_FS_SIZE_INFO:
+ data = smb.SMBQueryFsSizeInfo()
+ return data.getData()
+ elif level == smb.FILE_FS_FULL_SIZE_INFORMATION:
+ data = smb.SMBFileFsFullSizeInformation()
+ return data.getData()
+ elif level == smb.FILE_FS_SIZE_INFORMATION:
+ data = smb.FileFsSizeInformation()
+ return data.getData()
+ else:
+ lastWriteTime = mtime
+ attribs = 0
+ if os.path.isdir(pathName):
+ attribs |= smb.SMB_FILE_ATTRIBUTE_DIRECTORY
+ if os.path.isfile(pathName):
+ attribs |= smb.SMB_FILE_ATTRIBUTE_NORMAL
+ fileAttributes = attribs
+ return fileSize, lastWriteTime, fileAttributes
+
+def findFirst2(path, fileName, level, searchAttributes, isSMB2 = False):
+ # TODO: Depending on the level, this could be done much simpler
+
+ #print "FindFirs2 path:%s, filename:%s" % (path, fileName)
+ fileName = os.path.normpath(fileName.replace('\\','/'))
+ # Let's choose the right encoding depending on the request
+ if isinstance(fileName,unicode):
+ encoding = 'utf-16le'
+ flags = smb.SMB.FLAGS2_UNICODE
+ else:
+ encoding = 'ascii'
+ flags = 0
+
+ if len(fileName) > 0 and (fileName[0] == '/' or fileName[0] == '\\'):
+ # strip leading '/'
+ fileName = fileName[1:]
+
+ pathName = os.path.join(path,fileName)
+ files = []
+
+ if pathName.find('*') == -1 and pathName.find('?') == -1:
+ # No search patterns
+ pattern = ''
+ else:
+ pattern = os.path.basename(pathName)
+ dirName = os.path.dirname(pathName)
+
+ # Always add . and .. Not that important for Windows, but Samba whines if
+ # not present (for * search only)
+ if pattern == '*':
+ files.append(os.path.join(dirName,'.'))
+ files.append(os.path.join(dirName,'..'))
+
+ if pattern != '':
+ for file in os.listdir(dirName):
+ if fnmatch.fnmatch(file.lower(),pattern.lower()):
+ entry = os.path.join(dirName, file)
+ if os.path.isdir(entry):
+ if searchAttributes & smb.ATTR_DIRECTORY:
+ files.append(entry)
+ else:
+ files.append(entry)
+ else:
+ if os.path.exists(pathName):
+ files.append(pathName)
+
+ searchResult = []
+ searchCount = len(files)
+ errorCode = STATUS_SUCCESS
+
+ for i in files:
+ if level == smb.SMB_FIND_FILE_BOTH_DIRECTORY_INFO or level == smb2.SMB2_FILE_BOTH_DIRECTORY_INFO:
+ item = smb.SMBFindFileBothDirectoryInfo( flags = flags )
+ elif level == smb.SMB_FIND_FILE_DIRECTORY_INFO or level == smb2.SMB2_FILE_DIRECTORY_INFO:
+ item = smb.SMBFindFileDirectoryInfo( flags = flags )
+ elif level == smb.SMB_FIND_FILE_FULL_DIRECTORY_INFO or level == smb2.SMB2_FULL_DIRECTORY_INFO:
+ item = smb.SMBFindFileFullDirectoryInfo( flags = flags )
+ elif level == smb.SMB_FIND_INFO_STANDARD:
+ item = smb.SMBFindInfoStandard( flags = flags )
+ elif level == smb.SMB_FIND_FILE_ID_FULL_DIRECTORY_INFO or level == smb2.SMB2_FILE_ID_FULL_DIRECTORY_INFO:
+ item = smb.SMBFindFileIdFullDirectoryInfo( flags = flags )
+ elif level == smb.SMB_FIND_FILE_ID_BOTH_DIRECTORY_INFO or level == smb2.SMB2_FILE_ID_BOTH_DIRECTORY_INFO:
+ item = smb.SMBFindFileIdBothDirectoryInfo( flags = flags )
+ elif level == smb.SMB_FIND_FILE_NAMES_INFO or level == smb2.SMB2_FILE_NAMES_INFO:
+ item = smb.SMBFindFileNamesInfo( flags = flags )
+ else:
+ LOG.error("Wrong level %d!" % level)
+ return searchResult, searchCount, STATUS_NOT_SUPPORTED
+
+ (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime) = os.stat(i)
+ if os.path.isdir(i):
+ item['ExtFileAttributes'] = smb.ATTR_DIRECTORY
+ else:
+ item['ExtFileAttributes'] = smb.ATTR_NORMAL | smb.ATTR_ARCHIVE
+
+ item['FileName'] = os.path.basename(i).encode(encoding)
+
+ if level == smb.SMB_FIND_FILE_BOTH_DIRECTORY_INFO or level == smb.SMB_FIND_FILE_ID_BOTH_DIRECTORY_INFO or level == smb2.SMB2_FILE_ID_BOTH_DIRECTORY_INFO or level == smb2.SMB2_FILE_BOTH_DIRECTORY_INFO:
+ item['EaSize'] = 0
+ item['EndOfFile'] = size
+ item['AllocationSize'] = size
+ item['CreationTime'] = getFileTime(ctime)
+ item['LastAccessTime'] = getFileTime(atime)
+ item['LastWriteTime'] = getFileTime(mtime)
+ item['LastChangeTime'] = getFileTime(mtime)
+ item['ShortName'] = '\x00'*24
+ item['FileName'] = os.path.basename(i).encode(encoding)
+ padLen = (8-(len(item) % 8)) % 8
+ item['NextEntryOffset'] = len(item) + padLen
+ elif level == smb.SMB_FIND_FILE_DIRECTORY_INFO:
+ item['EndOfFile'] = size
+ item['AllocationSize'] = size
+ item['CreationTime'] = getFileTime(ctime)
+ item['LastAccessTime'] = getFileTime(atime)
+ item['LastWriteTime'] = getFileTime(mtime)
+ item['LastChangeTime'] = getFileTime(mtime)
+ item['FileName'] = os.path.basename(i).encode(encoding)
+ padLen = (8-(len(item) % 8)) % 8
+ item['NextEntryOffset'] = len(item) + padLen
+ elif level == smb.SMB_FIND_FILE_FULL_DIRECTORY_INFO or level == smb.SMB_FIND_FILE_ID_FULL_DIRECTORY_INFO or level == smb2.SMB2_FULL_DIRECTORY_INFO:
+ item['EaSize'] = 0
+ item['EndOfFile'] = size
+ item['AllocationSize'] = size
+ item['CreationTime'] = getFileTime(ctime)
+ item['LastAccessTime'] = getFileTime(atime)
+ item['LastWriteTime'] = getFileTime(mtime)
+ item['LastChangeTime'] = getFileTime(mtime)
+ padLen = (8-(len(item) % 8)) % 8
+ item['NextEntryOffset'] = len(item) + padLen
+ elif level == smb.SMB_FIND_INFO_STANDARD:
+ item['EaSize'] = size
+ item['CreationDate'] = getSMBDate(ctime)
+ item['CreationTime'] = getSMBTime(ctime)
+ item['LastAccessDate'] = getSMBDate(atime)
+ item['LastAccessTime'] = getSMBTime(atime)
+ item['LastWriteDate'] = getSMBDate(mtime)
+ item['LastWriteTime'] = getSMBTime(mtime)
+ searchResult.append(item)
+
+ # No more files
+ if (level >= smb.SMB_FIND_FILE_DIRECTORY_INFO or isSMB2 == True) and searchCount > 0:
+ searchResult[-1]['NextEntryOffset'] = 0
+
+ return searchResult, searchCount, errorCode
+
+def queryFileInformation(path, filename, level):
+ #print "queryFileInfo path: %s, filename: %s, level:0x%x" % (path,filename,level)
+ return queryPathInformation(path,filename, level)
+
+def queryPathInformation(path, filename, level):
+ # TODO: Depending on the level, this could be done much simpler
+ #print "queryPathInfo path: %s, filename: %s, level:0x%x" % (path,filename,level)
+ try:
+ errorCode = 0
+ fileName = os.path.normpath(filename.replace('\\','/'))
+ if len(fileName) > 0 and (fileName[0] == '/' or fileName[0] == '\\') and path != '':
+ # strip leading '/'
+ fileName = fileName[1:]
+ pathName = os.path.join(path,fileName)
+ if os.path.exists(pathName):
+ (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime) = os.stat(pathName)
+ if level == smb.SMB_QUERY_FILE_BASIC_INFO:
+ infoRecord = smb.SMBQueryFileBasicInfo()
+ infoRecord['CreationTime'] = getFileTime(ctime)
+ infoRecord['LastAccessTime'] = getFileTime(atime)
+ infoRecord['LastWriteTime'] = getFileTime(mtime)
+ infoRecord['LastChangeTime'] = getFileTime(mtime)
+ if os.path.isdir(pathName):
+ infoRecord['ExtFileAttributes'] = smb.ATTR_DIRECTORY
+ else:
+ infoRecord['ExtFileAttributes'] = smb.ATTR_NORMAL | smb.ATTR_ARCHIVE
+ elif level == smb.SMB_QUERY_FILE_STANDARD_INFO:
+ infoRecord = smb.SMBQueryFileStandardInfo()
+ infoRecord['AllocationSize'] = size
+ infoRecord['EndOfFile'] = size
+ if os.path.isdir(pathName):
+ infoRecord['Directory'] = 1
+ else:
+ infoRecord['Directory'] = 0
+ elif level == smb.SMB_QUERY_FILE_ALL_INFO or level == smb2.SMB2_FILE_ALL_INFO:
+ infoRecord = smb.SMBQueryFileAllInfo()
+ infoRecord['CreationTime'] = getFileTime(ctime)
+ infoRecord['LastAccessTime'] = getFileTime(atime)
+ infoRecord['LastWriteTime'] = getFileTime(mtime)
+ infoRecord['LastChangeTime'] = getFileTime(mtime)
+ if os.path.isdir(pathName):
+ infoRecord['ExtFileAttributes'] = smb.ATTR_DIRECTORY
+ else:
+ infoRecord['ExtFileAttributes'] = smb.ATTR_NORMAL | smb.ATTR_ARCHIVE
+ infoRecord['AllocationSize'] = size
+ infoRecord['EndOfFile'] = size
+ if os.path.isdir(pathName):
+ infoRecord['Directory'] = 1
+ else:
+ infoRecord['Directory'] = 0
+ infoRecord['FileName'] = filename.encode('utf-16le')
+ elif level == smb2.SMB2_FILE_NETWORK_OPEN_INFO:
+ infoRecord = smb.SMBFileNetworkOpenInfo()
+ infoRecord['CreationTime'] = getFileTime(ctime)
+ infoRecord['LastAccessTime'] = getFileTime(atime)
+ infoRecord['LastWriteTime'] = getFileTime(mtime)
+ infoRecord['ChangeTime'] = getFileTime(mtime)
+ infoRecord['AllocationSize'] = size
+ infoRecord['EndOfFile'] = size
+ if os.path.isdir(pathName):
+ infoRecord['FileAttributes'] = smb.ATTR_DIRECTORY
+ else:
+ infoRecord['FileAttributes'] = smb.ATTR_NORMAL | smb.ATTR_ARCHIVE
+ elif level == smb.SMB_QUERY_FILE_EA_INFO or level == smb2.SMB2_FILE_EA_INFO:
+ infoRecord = smb.SMBQueryFileEaInfo()
+ elif level == smb2.SMB2_FILE_STREAM_INFO:
+ infoRecord = smb.SMBFileStreamInformation()
+ else:
+ LOG.error('Unknown level for query path info! 0x%x' % level)
+ # UNSUPPORTED
+ return None, STATUS_NOT_SUPPORTED
+
+ return infoRecord, errorCode
+ else:
+ # NOT FOUND
+ return None, STATUS_OBJECT_NAME_NOT_FOUND
+ except Exception, e:
+ LOG.error('queryPathInfo: %s' % e)
+ raise
+
+def queryDiskInformation(path):
+# TODO: Do something useful here :)
+# For now we just return fake values
+ totalUnits = 65535
+ freeUnits = 65535
+ return totalUnits, freeUnits
+
+# Here we implement the NT transaction handlers
+class NTTRANSCommands:
+ def default(self, connId, smbServer, recvPacket, parameters, data, maxDataCount = 0):
+ pass
+
+# Here we implement the NT transaction handlers
+class TRANSCommands:
+ @staticmethod
+ def lanMan(connId, smbServer, recvPacket, parameters, data, maxDataCount = 0):
+ # Minimal [MS-RAP] implementation, just to return the shares
+ connData = smbServer.getConnectionData(connId)
+
+ respSetup = ''
+ respParameters = ''
+ respData = ''
+ errorCode = STATUS_SUCCESS
+ if struct.unpack('<H',parameters[:2])[0] == 0:
+ # NetShareEnum Request
+ netShareEnum = smb.SMBNetShareEnum(parameters)
+ if netShareEnum['InfoLevel'] == 1:
+ shares = getShares(connId, smbServer)
+ respParameters = smb.SMBNetShareEnumResponse()
+ respParameters['EntriesReturned'] = len(shares)
+ respParameters['EntriesAvailable'] = len(shares)
+ tailData = ''
+ for i in shares:
+ # NetShareInfo1 len == 20
+ entry = smb.NetShareInfo1()
+ entry['NetworkName'] = i + '\x00'*(13-len(i))
+ entry['Type'] = int(shares[i]['share type'])
+ # (beto) If offset == 0 it crashes explorer.exe on windows 7
+ entry['RemarkOffsetLow'] = 20 * len(shares) + len(tailData)
+ respData += entry.getData()
+ if shares[i].has_key('comment'):
+ tailData += shares[i]['comment'] + '\x00'
+ else:
+ tailData += '\x00'
+ respData += tailData
+ else:
+ # We don't support other info levels
+ errorCode = STATUS_NOT_SUPPORTED
+ elif struct.unpack('<H',parameters[:2])[0] == 13:
+ # NetrServerGetInfo Request
+ respParameters = smb.SMBNetServerGetInfoResponse()
+ netServerInfo = smb.SMBNetServerInfo1()
+ netServerInfo['ServerName'] = smbServer.getServerName()
+ respData = str(netServerInfo)
+ respParameters['TotalBytesAvailable'] = len(respData)
+ elif struct.unpack('<H',parameters[:2])[0] == 1:
+ # NetrShareGetInfo Request
+ request = smb.SMBNetShareGetInfo(parameters)
+ respParameters = smb.SMBNetShareGetInfoResponse()
+ shares = getShares(connId, smbServer)
+ share = shares[request['ShareName'].upper()]
+ shareInfo = smb.NetShareInfo1()
+ shareInfo['NetworkName'] = request['ShareName'].upper() + '\x00'
+ shareInfo['Type'] = int(share['share type'])
+ respData = shareInfo.getData()
+ if share.has_key('comment'):
+ shareInfo['RemarkOffsetLow'] = len(respData)
+ respData += share['comment'] + '\x00'
+ respParameters['TotalBytesAvailable'] = len(respData)
+
+ else:
+ # We don't know how to handle anything else
+ errorCode = STATUS_NOT_SUPPORTED
+
+ smbServer.setConnectionData(connId, connData)
+
+ return respSetup, respParameters, respData, errorCode
+
+ @staticmethod
+ def transactNamedPipe(connId, smbServer, recvPacket, parameters, data, maxDataCount = 0):
+ connData = smbServer.getConnectionData(connId)
+
+ respSetup = ''
+ respParameters = ''
+ respData = ''
+ errorCode = STATUS_SUCCESS
+ SMBCommand = smb.SMBCommand(recvPacket['Data'][0])
+ transParameters= smb.SMBTransaction_Parameters(SMBCommand['Parameters'])
+
+ # Extract the FID
+ fid = struct.unpack('<H', transParameters['Setup'][2:])[0]
+
+ if connData['OpenedFiles'].has_key(fid):
+ fileHandle = connData['OpenedFiles'][fid]['FileHandle']
+ if fileHandle != PIPE_FILE_DESCRIPTOR:
+ os.write(fileHandle,data)
+ respData = os.read(fileHandle,data)
+ else:
+ sock = connData['OpenedFiles'][fid]['Socket']
+ sock.send(data)
+ respData = sock.recv(maxDataCount)
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+
+ smbServer.setConnectionData(connId, connData)
+
+ return respSetup, respParameters, respData, errorCode
+
+# Here we implement the transaction2 handlers
+class TRANS2Commands:
+ # All these commands return setup, parameters, data, errorCode
+ @staticmethod
+ def setPathInformation(connId, smbServer, recvPacket, parameters, data, maxDataCount = 0):
+ connData = smbServer.getConnectionData(connId)
+
+ respSetup = ''
+ respParameters = ''
+ respData = ''
+ errorCode = STATUS_SUCCESS
+ setPathInfoParameters = smb.SMBSetPathInformation_Parameters(flags = recvPacket['Flags2'], data = parameters)
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ path = connData['ConnectedShares'][recvPacket['Tid']]['path']
+ fileName = decodeSMBString(recvPacket['Flags2'], setPathInfoParameters['FileName'])
+ fileName = os.path.normpath(fileName.replace('\\','/'))
+ if len(fileName) > 0 and (fileName[0] == '/' or fileName[0] == '\\') and path != '':
+ # strip leading '/'
+ fileName = fileName[1:]
+ pathName = os.path.join(path,fileName)
+ if os.path.exists(pathName):
+ informationLevel = setPathInfoParameters['InformationLevel']
+ if informationLevel == smb.SMB_SET_FILE_BASIC_INFO:
+ infoRecord = smb.SMBSetFileBasicInfo(data)
+ # Creation time won't be set, the other ones we play with.
+ atime = infoRecord['LastAccessTime']
+ if atime == 0:
+ atime = -1
+ else:
+ atime = getUnixTime(atime)
+ mtime = infoRecord['LastWriteTime']
+ if mtime == 0:
+ mtime = -1
+ else:
+ mtime = getUnixTime(mtime)
+ if mtime != -1 or atime != -1:
+ os.utime(pathName,(atime,mtime))
+ else:
+ smbServer.log('Unknown level for set path info! 0x%x' % setPathInfoParameters['InformationLevel'], logging.ERROR)
+ # UNSUPPORTED
+ errorCode = STATUS_NOT_SUPPORTED
+ else:
+ errorCode = STATUS_OBJECT_NAME_NOT_FOUND
+
+ if errorCode == STATUS_SUCCESS:
+ respParameters = smb.SMBSetPathInformationResponse_Parameters()
+
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+ smbServer.setConnectionData(connId, connData)
+
+ return respSetup, respParameters, respData, errorCode
+
+
+ @staticmethod
+ def setFileInformation(connId, smbServer, recvPacket, parameters, data, maxDataCount = 0):
+ connData = smbServer.getConnectionData(connId)
+
+ respSetup = ''
+ respParameters = ''
+ respData = ''
+ errorCode = STATUS_SUCCESS
+ setFileInfoParameters = smb.SMBSetFileInformation_Parameters(parameters)
+
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ if connData['OpenedFiles'].has_key(setFileInfoParameters['FID']):
+ fileName = connData['OpenedFiles'][setFileInfoParameters['FID']]['FileName']
+ informationLevel = setFileInfoParameters['InformationLevel']
+ if informationLevel == smb.SMB_SET_FILE_DISPOSITION_INFO:
+ infoRecord = smb.SMBSetFileDispositionInfo(parameters)
+ if infoRecord['DeletePending'] > 0:
+ # Mark this file for removal after closed
+ connData['OpenedFiles'][setFileInfoParameters['FID']]['DeleteOnClose'] = True
+ respParameters = smb.SMBSetFileInformationResponse_Parameters()
+ elif informationLevel == smb.SMB_SET_FILE_BASIC_INFO:
+ infoRecord = smb.SMBSetFileBasicInfo(data)
+ # Creation time won't be set, the other ones we play with.
+ atime = infoRecord['LastAccessTime']
+ if atime == 0:
+ atime = -1
+ else:
+ atime = getUnixTime(atime)
+ mtime = infoRecord['LastWriteTime']
+ if mtime == 0:
+ mtime = -1
+ else:
+ mtime = getUnixTime(mtime)
+ os.utime(fileName,(atime,mtime))
+ elif informationLevel == smb.SMB_SET_FILE_END_OF_FILE_INFO:
+ fileHandle = connData['OpenedFiles'][setFileInfoParameters['FID']]['FileHandle']
+ infoRecord = smb.SMBSetFileEndOfFileInfo(data)
+ if infoRecord['EndOfFile'] > 0:
+ os.lseek(fileHandle, infoRecord['EndOfFile']-1, 0)
+ os.write(fileHandle, '\x00')
+ else:
+ smbServer.log('Unknown level for set file info! 0x%x' % setFileInfoParameters['InformationLevel'], logging.ERROR)
+ # UNSUPPORTED
+ errorCode = STATUS_NOT_SUPPORTED
+ else:
+ errorCode = STATUS_NO_SUCH_FILE
+
+ if errorCode == STATUS_SUCCESS:
+ respParameters = smb.SMBSetFileInformationResponse_Parameters()
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+ smbServer.setConnectionData(connId, connData)
+
+ return respSetup, respParameters, respData, errorCode
+
+ @staticmethod
+ def queryFileInformation(connId, smbServer, recvPacket, parameters, data, maxDataCount = 0):
+ connData = smbServer.getConnectionData(connId)
+
+ respSetup = ''
+ respParameters = ''
+ respData = ''
+
+ queryFileInfoParameters = smb.SMBQueryFileInformation_Parameters(parameters)
+
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ if connData['OpenedFiles'].has_key(queryFileInfoParameters['FID']):
+ fileName = connData['OpenedFiles'][queryFileInfoParameters['FID']]['FileName']
+
+ infoRecord, errorCode = queryFileInformation('', fileName, queryFileInfoParameters['InformationLevel'])
+
+ if infoRecord is not None:
+ respParameters = smb.SMBQueryFileInformationResponse_Parameters()
+ respData = infoRecord
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+ smbServer.setConnectionData(connId, connData)
+
+ return respSetup, respParameters, respData, errorCode
+
+ @staticmethod
+ def queryPathInformation(connId, smbServer, recvPacket, parameters, data, maxDataCount = 0):
+ connData = smbServer.getConnectionData(connId)
+
+ respSetup = ''
+ respParameters = ''
+ respData = ''
+ errorCode = 0
+
+ queryPathInfoParameters = smb.SMBQueryPathInformation_Parameters(flags = recvPacket['Flags2'], data = parameters)
+
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ path = connData['ConnectedShares'][recvPacket['Tid']]['path']
+ try:
+ infoRecord, errorCode = queryPathInformation(path, decodeSMBString(recvPacket['Flags2'], queryPathInfoParameters['FileName']), queryPathInfoParameters['InformationLevel'])
+ except Exception, e:
+ smbServer.log("queryPathInformation: %s" % e,logging.ERROR)
+
+ if infoRecord is not None:
+ respParameters = smb.SMBQueryPathInformationResponse_Parameters()
+ respData = infoRecord
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+ smbServer.setConnectionData(connId, connData)
+
+ return respSetup, respParameters, respData, errorCode
+
+ @staticmethod
+ def queryFsInformation(connId, smbServer, recvPacket, parameters, data, maxDataCount = 0):
+ connData = smbServer.getConnectionData(connId)
+ errorCode = 0
+ # Get the Tid associated
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ data = queryFsInformation(connData['ConnectedShares'][recvPacket['Tid']]['path'], '', struct.unpack('<H',parameters)[0])
+
+ smbServer.setConnectionData(connId, connData)
+
+ return '','', data, errorCode
+
+ @staticmethod
+ def findNext2(connId, smbServer, recvPacket, parameters, data, maxDataCount):
+ connData = smbServer.getConnectionData(connId)
+
+ respSetup = ''
+ respParameters = ''
+ respData = ''
+ errorCode = STATUS_SUCCESS
+ findNext2Parameters = smb.SMBFindNext2_Parameters(flags = recvPacket['Flags2'], data = parameters)
+
+ sid = findNext2Parameters['SID']
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ if connData['SIDs'].has_key(sid):
+ searchResult = connData['SIDs'][sid]
+ respParameters = smb.SMBFindNext2Response_Parameters()
+ endOfSearch = 1
+ searchCount = 1
+ totalData = 0
+ for i in enumerate(searchResult):
+ data = i[1].getData()
+ lenData = len(data)
+ if (totalData+lenData) >= maxDataCount or (i[0]+1) >= findNext2Parameters['SearchCount']:
+ # We gotta stop here and continue on a find_next2
+ endOfSearch = 0
+ connData['SIDs'][sid] = searchResult[i[0]:]
+ respParameters['LastNameOffset'] = totalData
+ break
+ else:
+ searchCount +=1
+ respData += data
+ totalData += lenData
+
+ # Have we reached the end of the search or still stuff to send?
+ if endOfSearch > 0:
+ # Let's remove the SID from our ConnData
+ del(connData['SIDs'][sid])
+
+ respParameters['EndOfSearch'] = endOfSearch
+ respParameters['SearchCount'] = searchCount
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+ smbServer.setConnectionData(connId, connData)
+
+ return respSetup, respParameters, respData, errorCode
+
+ @staticmethod
+ def findFirst2(connId, smbServer, recvPacket, parameters, data, maxDataCount):
+ connData = smbServer.getConnectionData(connId)
+
+ respSetup = ''
+ respParameters = ''
+ respData = ''
+ findFirst2Parameters = smb.SMBFindFirst2_Parameters( recvPacket['Flags2'], data = parameters)
+
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ path = connData['ConnectedShares'][recvPacket['Tid']]['path']
+
+ searchResult, searchCount, errorCode = findFirst2(path,
+ decodeSMBString( recvPacket['Flags2'], findFirst2Parameters['FileName'] ),
+ findFirst2Parameters['InformationLevel'],
+ findFirst2Parameters['SearchAttributes'] )
+
+ respParameters = smb.SMBFindFirst2Response_Parameters()
+ endOfSearch = 1
+ sid = 0x80 # default SID
+ searchCount = 0
+ totalData = 0
+ for i in enumerate(searchResult):
+ #i[1].dump()
+ data = i[1].getData()
+ lenData = len(data)
+ if (totalData+lenData) >= maxDataCount or (i[0]+1) > findFirst2Parameters['SearchCount']:
+ # We gotta stop here and continue on a find_next2
+ endOfSearch = 0
+ # Simple way to generate a fid
+ if len(connData['SIDs']) == 0:
+ sid = 1
+ else:
+ sid = connData['SIDs'].keys()[-1] + 1
+ # Store the remaining search results in the ConnData SID
+ connData['SIDs'][sid] = searchResult[i[0]:]
+ respParameters['LastNameOffset'] = totalData
+ break
+ else:
+ searchCount +=1
+ respData += data
+
+ padLen = (8-(lenData % 8)) %8
+ respData += '\xaa'*padLen
+ totalData += lenData + padLen
+
+ respParameters['SID'] = sid
+ respParameters['EndOfSearch'] = endOfSearch
+ respParameters['SearchCount'] = searchCount
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+ smbServer.setConnectionData(connId, connData)
+
+ return respSetup, respParameters, respData, errorCode
+
+# Here we implement the commands handlers
+class SMBCommands:
+
+ @staticmethod
+ def smbTransaction(connId, smbServer, SMBCommand, recvPacket, transCommands):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(recvPacket['Command'])
+
+ transParameters= smb.SMBTransaction_Parameters(SMBCommand['Parameters'])
+
+ # Do the stuff
+ if transParameters['ParameterCount'] != transParameters['TotalParameterCount']:
+ # TODO: Handle partial parameters
+ raise Exception("Unsupported partial parameters in TRANSACT2!")
+ else:
+ transData = smb.SMBTransaction_SData(flags = recvPacket['Flags2'])
+ # Standard says servers shouldn't trust Parameters and Data comes
+ # in order, so we have to parse the offsets, ugly
+
+ paramCount = transParameters['ParameterCount']
+ transData['Trans_ParametersLength'] = paramCount
+ dataCount = transParameters['DataCount']
+ transData['Trans_DataLength'] = dataCount
+ transData.fromString(SMBCommand['Data'])
+ if transParameters['ParameterOffset'] > 0:
+ paramOffset = transParameters['ParameterOffset'] - 63 - transParameters['SetupLength']
+ transData['Trans_Parameters'] = SMBCommand['Data'][paramOffset:paramOffset+paramCount]
+ else:
+ transData['Trans_Parameters'] = ''
+
+ if transParameters['DataOffset'] > 0:
+ dataOffset = transParameters['DataOffset'] - 63 - transParameters['SetupLength']
+ transData['Trans_Data'] = SMBCommand['Data'][dataOffset:dataOffset + dataCount]
+ else:
+ transData['Trans_Data'] = ''
+
+ # Call the handler for this TRANSACTION
+ if transParameters['SetupCount'] == 0:
+ # No subcommand, let's play with the Name
+ command = decodeSMBString(recvPacket['Flags2'],transData['Name'])
+ else:
+ command = struct.unpack('<H', transParameters['Setup'][:2])[0]
+
+ if transCommands.has_key(command):
+ # Call the TRANS subcommand
+ setup = ''
+ parameters = ''
+ data = ''
+ try:
+ setup, parameters, data, errorCode = transCommands[command](connId,
+ smbServer,
+ recvPacket,
+ transData['Trans_Parameters'],
+ transData['Trans_Data'],
+ transParameters['MaxDataCount'])
+ except Exception, e:
+ #print 'Transaction: %s' % e,e
+ smbServer.log('Transaction: (%r,%s)' % (command, e), logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ #raise
+
+ if setup == '' and parameters == '' and data == '':
+ # Something wen't wrong
+ respParameters = ''
+ respData = ''
+ else:
+ # Build the answer
+ data = str(data)
+ remainingData = len(data)
+ parameters = str(parameters)
+ remainingParameters = len(parameters)
+ commands = []
+ dataDisplacement = 0
+ while remainingData > 0 or remainingParameters > 0:
+ respSMBCommand = smb.SMBCommand(recvPacket['Command'])
+ respParameters = smb.SMBTransactionResponse_Parameters()
+ respData = smb.SMBTransaction2Response_Data()
+
+ respParameters['TotalParameterCount'] = len(parameters)
+ respParameters['ParameterCount'] = len(parameters)
+ respData['Trans_ParametersLength'] = len(parameters)
+ respParameters['TotalDataCount'] = len(data)
+ respParameters['DataDisplacement'] = dataDisplacement
+
+ # TODO: Do the same for parameters
+ if len(data) > transParameters['MaxDataCount']:
+ # Answer doesn't fit in this packet
+ LOG.debug("Lowering answer from %d to %d" % (len(data),transParameters['MaxDataCount']) )
+ respParameters['DataCount'] = transParameters['MaxDataCount']
+ else:
+ respParameters['DataCount'] = len(data)
+
+ respData['Trans_DataLength'] = respParameters['DataCount']
+ respParameters['SetupCount'] = len(setup)
+ respParameters['Setup'] = setup
+ # TODO: Make sure we're calculating the pad right
+ if len(parameters) > 0:
+ #padLen = 4 - (55 + len(setup)) % 4
+ padLen = (4 - (55 + len(setup)) % 4 ) % 4
+ padBytes = '\xFF' * padLen
+ respData['Pad1'] = padBytes
+ respParameters['ParameterOffset'] = 55 + len(setup) + padLen
+ else:
+ padLen = 0
+ respParameters['ParameterOffset'] = 0
+ respData['Pad1'] = ''
+
+ if len(data) > 0:
+ #pad2Len = 4 - (55 + len(setup) + padLen + len(parameters)) % 4
+ pad2Len = (4 - (55 + len(setup) + padLen + len(parameters)) % 4) % 4
+ respData['Pad2'] = '\xFF' * pad2Len
+ respParameters['DataOffset'] = 55 + len(setup) + padLen + len(parameters) + pad2Len
+ else:
+ respParameters['DataOffset'] = 0
+ respData['Pad2'] = ''
+
+ respData['Trans_Parameters'] = parameters[:respParameters['ParameterCount']]
+ respData['Trans_Data'] = data[:respParameters['DataCount']]
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+
+ data = data[respParameters['DataCount']:]
+ remainingData -= respParameters['DataCount']
+ dataDisplacement += respParameters['DataCount'] + 1
+
+ parameters = parameters[respParameters['ParameterCount']:]
+ remainingParameters -= respParameters['ParameterCount']
+ commands.append(respSMBCommand)
+
+ smbServer.setConnectionData(connId, connData)
+ return commands, None, errorCode
+
+ else:
+ smbServer.log("Unsupported Transact command %r" % command, logging.ERROR)
+ respParameters = ''
+ respData = ''
+ errorCode = STATUS_NOT_IMPLEMENTED
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+
+ @staticmethod
+ def smbNTTransact(connId, smbServer, SMBCommand, recvPacket, transCommands):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(recvPacket['Command'])
+
+ NTTransParameters= smb.SMBNTTransaction_Parameters(SMBCommand['Parameters'])
+ # Do the stuff
+ if NTTransParameters['ParameterCount'] != NTTransParameters['TotalParameterCount']:
+ # TODO: Handle partial parameters
+ raise Exception("Unsupported partial parameters in NTTrans!")
+ else:
+ NTTransData = smb.SMBNTTransaction_Data()
+ # Standard says servers shouldn't trust Parameters and Data comes
+ # in order, so we have to parse the offsets, ugly
+
+ paramCount = NTTransParameters['ParameterCount']
+ NTTransData['NT_Trans_ParametersLength'] = paramCount
+ dataCount = NTTransParameters['DataCount']
+ NTTransData['NT_Trans_DataLength'] = dataCount
+
+ if NTTransParameters['ParameterOffset'] > 0:
+ paramOffset = NTTransParameters['ParameterOffset'] - 73 - NTTransParameters['SetupLength']
+ NTTransData['NT_Trans_Parameters'] = SMBCommand['Data'][paramOffset:paramOffset+paramCount]
+ else:
+ NTTransData['NT_Trans_Parameters'] = ''
+
+ if NTTransParameters['DataOffset'] > 0:
+ dataOffset = NTTransParameters['DataOffset'] - 73 - NTTransParameters['SetupLength']
+ NTTransData['NT_Trans_Data'] = SMBCommand['Data'][dataOffset:dataOffset + dataCount]
+ else:
+ NTTransData['NT_Trans_Data'] = ''
+
+ # Call the handler for this TRANSACTION
+ command = NTTransParameters['Function']
+ if transCommands.has_key(command):
+ # Call the NT TRANS subcommand
+ setup = ''
+ parameters = ''
+ data = ''
+ try:
+ setup, parameters, data, errorCode = transCommands[command](connId,
+ smbServer,
+ recvPacket,
+ NTTransData['NT_Trans_Parameters'],
+ NTTransData['NT_Trans_Data'],
+ NTTransParameters['MaxDataCount'])
+ except Exception, e:
+ smbServer.log('NTTransaction: (0x%x,%s)' % (command, e), logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ #raise
+
+ if setup == '' and parameters == '' and data == '':
+ # Something wen't wrong
+ respParameters = ''
+ respData = ''
+ if errorCode == STATUS_SUCCESS:
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ # Build the answer
+ data = str(data)
+ remainingData = len(data)
+ parameters = str(parameters)
+ remainingParameters = len(parameters)
+ commands = []
+ dataDisplacement = 0
+ while remainingData > 0 or remainingParameters > 0:
+ respSMBCommand = smb.SMBCommand(recvPacket['Command'])
+ respParameters = smb.SMBNTTransactionResponse_Parameters()
+ respData = smb.SMBNTTransactionResponse_Data()
+
+ respParameters['TotalParameterCount'] = len(parameters)
+ respParameters['ParameterCount'] = len(parameters)
+ respData['Trans_ParametersLength'] = len(parameters)
+ respParameters['TotalDataCount'] = len(data)
+ respParameters['DataDisplacement'] = dataDisplacement
+ # TODO: Do the same for parameters
+ if len(data) > NTTransParameters['MaxDataCount']:
+ # Answer doesn't fit in this packet
+ LOG.debug("Lowering answer from %d to %d" % (len(data),NTTransParameters['MaxDataCount']) )
+ respParameters['DataCount'] = NTTransParameters['MaxDataCount']
+ else:
+ respParameters['DataCount'] = len(data)
+
+ respData['NT_Trans_DataLength'] = respParameters['DataCount']
+ respParameters['SetupCount'] = len(setup)
+ respParameters['Setup'] = setup
+ # TODO: Make sure we're calculating the pad right
+ if len(parameters) > 0:
+ #padLen = 4 - (71 + len(setup)) % 4
+ padLen = (4 - (73 + len(setup)) % 4 ) % 4
+ padBytes = '\xFF' * padLen
+ respData['Pad1'] = padBytes
+ respParameters['ParameterOffset'] = 73 + len(setup) + padLen
+ else:
+ padLen = 0
+ respParameters['ParameterOffset'] = 0
+ respData['Pad1'] = ''
+
+ if len(data) > 0:
+ #pad2Len = 4 - (71 + len(setup) + padLen + len(parameters)) % 4
+ pad2Len = (4 - (73 + len(setup) + padLen + len(parameters)) % 4) % 4
+ respData['Pad2'] = '\xFF' * pad2Len
+ respParameters['DataOffset'] = 73 + len(setup) + padLen + len(parameters) + pad2Len
+ else:
+ respParameters['DataOffset'] = 0
+ respData['Pad2'] = ''
+
+ respData['NT_Trans_Parameters'] = parameters[:respParameters['ParameterCount']]
+ respData['NT_Trans_Data'] = data[:respParameters['DataCount']]
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+
+ data = data[respParameters['DataCount']:]
+ remainingData -= respParameters['DataCount']
+ dataDisplacement += respParameters['DataCount'] + 1
+
+ parameters = parameters[respParameters['ParameterCount']:]
+ remainingParameters -= respParameters['ParameterCount']
+ commands.append(respSMBCommand)
+
+ smbServer.setConnectionData(connId, connData)
+ return commands, None, errorCode
+
+ else:
+ #smbServer.log("Unsupported NTTransact command 0x%x" % command, logging.ERROR)
+ respParameters = ''
+ respData = ''
+ errorCode = STATUS_NOT_IMPLEMENTED
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+
+ @staticmethod
+ def smbTransaction2(connId, smbServer, SMBCommand, recvPacket, transCommands):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(recvPacket['Command'])
+
+ trans2Parameters= smb.SMBTransaction2_Parameters(SMBCommand['Parameters'])
+
+ # Do the stuff
+ if trans2Parameters['ParameterCount'] != trans2Parameters['TotalParameterCount']:
+ # TODO: Handle partial parameters
+ #print "Unsupported partial parameters in TRANSACT2!"
+ raise Exception("Unsupported partial parameters in TRANSACT2!")
+ else:
+ trans2Data = smb.SMBTransaction2_Data()
+ # Standard says servers shouldn't trust Parameters and Data comes
+ # in order, so we have to parse the offsets, ugly
+
+ paramCount = trans2Parameters['ParameterCount']
+ trans2Data['Trans_ParametersLength'] = paramCount
+ dataCount = trans2Parameters['DataCount']
+ trans2Data['Trans_DataLength'] = dataCount
+
+ if trans2Parameters['ParameterOffset'] > 0:
+ paramOffset = trans2Parameters['ParameterOffset'] - 63 - trans2Parameters['SetupLength']
+ trans2Data['Trans_Parameters'] = SMBCommand['Data'][paramOffset:paramOffset+paramCount]
+ else:
+ trans2Data['Trans_Parameters'] = ''
+
+ if trans2Parameters['DataOffset'] > 0:
+ dataOffset = trans2Parameters['DataOffset'] - 63 - trans2Parameters['SetupLength']
+ trans2Data['Trans_Data'] = SMBCommand['Data'][dataOffset:dataOffset + dataCount]
+ else:
+ trans2Data['Trans_Data'] = ''
+
+ # Call the handler for this TRANSACTION
+ command = struct.unpack('<H', trans2Parameters['Setup'])[0]
+ if transCommands.has_key(command):
+ # Call the TRANS2 subcommand
+ try:
+ setup, parameters, data, errorCode = transCommands[command](connId,
+ smbServer,
+ recvPacket,
+ trans2Data['Trans_Parameters'],
+ trans2Data['Trans_Data'],
+ trans2Parameters['MaxDataCount'])
+ except Exception, e:
+ smbServer.log('Transaction2: (0x%x,%s)' % (command, e), logging.ERROR)
+ #import traceback
+ #traceback.print_exc()
+ raise
+
+ if setup == '' and parameters == '' and data == '':
+ # Something wen't wrong
+ respParameters = ''
+ respData = ''
+ else:
+ # Build the answer
+ data = str(data)
+ remainingData = len(data)
+ parameters = str(parameters)
+ remainingParameters = len(parameters)
+ commands = []
+ dataDisplacement = 0
+ while remainingData > 0 or remainingParameters > 0:
+ respSMBCommand = smb.SMBCommand(recvPacket['Command'])
+ respParameters = smb.SMBTransaction2Response_Parameters()
+ respData = smb.SMBTransaction2Response_Data()
+
+ respParameters['TotalParameterCount'] = len(parameters)
+ respParameters['ParameterCount'] = len(parameters)
+ respData['Trans_ParametersLength'] = len(parameters)
+ respParameters['TotalDataCount'] = len(data)
+ respParameters['DataDisplacement'] = dataDisplacement
+ # TODO: Do the same for parameters
+ if len(data) > trans2Parameters['MaxDataCount']:
+ # Answer doesn't fit in this packet
+ LOG.debug("Lowering answer from %d to %d" % (len(data),trans2Parameters['MaxDataCount']) )
+ respParameters['DataCount'] = trans2Parameters['MaxDataCount']
+ else:
+ respParameters['DataCount'] = len(data)
+
+ respData['Trans_DataLength'] = respParameters['DataCount']
+ respParameters['SetupCount'] = len(setup)
+ respParameters['Setup'] = setup
+ # TODO: Make sure we're calculating the pad right
+ if len(parameters) > 0:
+ #padLen = 4 - (55 + len(setup)) % 4
+ padLen = (4 - (55 + len(setup)) % 4 ) % 4
+ padBytes = '\xFF' * padLen
+ respData['Pad1'] = padBytes
+ respParameters['ParameterOffset'] = 55 + len(setup) + padLen
+ else:
+ padLen = 0
+ respParameters['ParameterOffset'] = 0
+ respData['Pad1'] = ''
+
+ if len(data) > 0:
+ #pad2Len = 4 - (55 + len(setup) + padLen + len(parameters)) % 4
+ pad2Len = (4 - (55 + len(setup) + padLen + len(parameters)) % 4) % 4
+ respData['Pad2'] = '\xFF' * pad2Len
+ respParameters['DataOffset'] = 55 + len(setup) + padLen + len(parameters) + pad2Len
+ else:
+ respParameters['DataOffset'] = 0
+ respData['Pad2'] = ''
+
+ respData['Trans_Parameters'] = parameters[:respParameters['ParameterCount']]
+ respData['Trans_Data'] = data[:respParameters['DataCount']]
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+
+ data = data[respParameters['DataCount']:]
+ remainingData -= respParameters['DataCount']
+ dataDisplacement += respParameters['DataCount'] + 1
+
+ parameters = parameters[respParameters['ParameterCount']:]
+ remainingParameters -= respParameters['ParameterCount']
+ commands.append(respSMBCommand)
+
+ smbServer.setConnectionData(connId, connData)
+ return commands, None, errorCode
+
+ else:
+ smbServer.log("Unsupported Transact/2 command 0x%x" % command, logging.ERROR)
+ respParameters = ''
+ respData = ''
+ errorCode = STATUS_NOT_IMPLEMENTED
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComLockingAndX(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_LOCKING_ANDX)
+ respParameters = ''
+ respData = ''
+
+ # I'm actually doing nothing.. just make MacOS happy ;)
+ errorCode = STATUS_SUCCESS
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+
+ @staticmethod
+ def smbComClose(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_CLOSE)
+ respParameters = ''
+ respData = ''
+
+ comClose = smb.SMBClose_Parameters(SMBCommand['Parameters'])
+
+ if connData['OpenedFiles'].has_key(comClose['FID']):
+ errorCode = STATUS_SUCCESS
+ fileHandle = connData['OpenedFiles'][comClose['FID']]['FileHandle']
+ try:
+ if fileHandle == PIPE_FILE_DESCRIPTOR:
+ connData['OpenedFiles'][comClose['FID']]['Socket'].close()
+ elif fileHandle != VOID_FILE_DESCRIPTOR:
+ os.close(fileHandle)
+ except Exception, e:
+ smbServer.log("comClose %s" % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ # Check if the file was marked for removal
+ if connData['OpenedFiles'][comClose['FID']]['DeleteOnClose'] is True:
+ try:
+ os.remove(connData['OpenedFiles'][comClose['FID']]['FileName'])
+ except Exception, e:
+ smbServer.log("comClose %s" % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ del(connData['OpenedFiles'][comClose['FID']])
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+
+ if errorCode > 0:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComWrite(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_WRITE)
+ respParameters = smb.SMBWriteResponse_Parameters()
+ respData = ''
+
+ comWriteParameters = smb.SMBWrite_Parameters(SMBCommand['Parameters'])
+ comWriteData = smb.SMBWrite_Data(SMBCommand['Data'])
+
+ if connData['OpenedFiles'].has_key(comWriteParameters['Fid']):
+ fileHandle = connData['OpenedFiles'][comWriteParameters['Fid']]['FileHandle']
+ errorCode = STATUS_SUCCESS
+ try:
+ if fileHandle != PIPE_FILE_DESCRIPTOR:
+ # TODO: Handle big size files
+ # If we're trying to write past the file end we just skip the write call (Vista does this)
+ if os.lseek(fileHandle, 0, 2) >= comWriteParameters['Offset']:
+ os.lseek(fileHandle,comWriteParameters['Offset'],0)
+ os.write(fileHandle,comWriteData['Data'])
+ else:
+ sock = connData['OpenedFiles'][comWriteParameters['Fid']]['Socket']
+ sock.send(comWriteData['Data'])
+ respParameters['Count'] = comWriteParameters['Count']
+ except Exception, e:
+ smbServer.log('smbComWrite: %s' % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+
+
+ if errorCode > 0:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComFlush(connId, smbServer, SMBCommand,recvPacket ):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_FLUSH)
+ respParameters = ''
+ respData = ''
+
+ comFlush = smb.SMBFlush_Parameters(SMBCommand['Parameters'])
+
+ if connData['OpenedFiles'].has_key(comFlush['FID']):
+ errorCode = STATUS_SUCCESS
+ fileHandle = connData['OpenedFiles'][comFlush['FID']]['FileHandle']
+ try:
+ os.fsync(fileHandle)
+ except Exception, e:
+ smbServer.log("comFlush %s" % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+
+ if errorCode > 0:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+
+ @staticmethod
+ def smbComCreateDirectory(connId, smbServer, SMBCommand,recvPacket ):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_CREATE_DIRECTORY)
+ respParameters = ''
+ respData = ''
+
+ comCreateDirectoryData= smb.SMBCreateDirectory_Data(flags = recvPacket['Flags2'], data = SMBCommand['Data'])
+
+ # Get the Tid associated
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ errorCode = STATUS_SUCCESS
+ path = connData['ConnectedShares'][recvPacket['Tid']]['path']
+ fileName = os.path.normpath(decodeSMBString(recvPacket['Flags2'],comCreateDirectoryData['DirectoryName']).replace('\\','/'))
+ if len(fileName) > 0:
+ if fileName[0] == '/' or fileName[0] == '\\':
+ # strip leading '/'
+ fileName = fileName[1:]
+ pathName = os.path.join(path,fileName)
+ if os.path.exists(pathName):
+ errorCode = STATUS_OBJECT_NAME_COLLISION
+
+ # TODO: More checks here in the future.. Specially when we support
+ # user access
+ else:
+ try:
+ os.mkdir(pathName)
+ except Exception, e:
+ smbServer.log("smbComCreateDirectory: %s" % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+
+ if errorCode > 0:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComRename(connId, smbServer, SMBCommand, recvPacket ):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_RENAME)
+ respParameters = ''
+ respData = ''
+
+ comRenameData = smb.SMBRename_Data(flags = recvPacket['Flags2'], data = SMBCommand['Data'])
+ # Get the Tid associated
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ errorCode = STATUS_SUCCESS
+ path = connData['ConnectedShares'][recvPacket['Tid']]['path']
+ oldFileName = os.path.normpath(decodeSMBString(recvPacket['Flags2'],comRenameData['OldFileName']).replace('\\','/'))
+ newFileName = os.path.normpath(decodeSMBString(recvPacket['Flags2'],comRenameData['NewFileName']).replace('\\','/'))
+ if len(oldFileName) > 0 and (oldFileName[0] == '/' or oldFileName[0] == '\\'):
+ # strip leading '/'
+ oldFileName = oldFileName[1:]
+ oldPathName = os.path.join(path,oldFileName)
+ if len(newFileName) > 0 and (newFileName[0] == '/' or newFileName[0] == '\\'):
+ # strip leading '/'
+ newFileName = newFileName[1:]
+ newPathName = os.path.join(path,newFileName)
+
+ if os.path.exists(oldPathName) is not True:
+ errorCode = STATUS_NO_SUCH_FILE
+
+ # TODO: More checks here in the future.. Specially when we support
+ # user access
+ else:
+ try:
+ os.rename(oldPathName,newPathName)
+ except OSError, e:
+ smbServer.log("smbComRename: %s" % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+
+ if errorCode > 0:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComDelete(connId, smbServer, SMBCommand, recvPacket ):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_DELETE)
+ respParameters = ''
+ respData = ''
+
+ comDeleteData = smb.SMBDelete_Data(flags = recvPacket['Flags2'], data = SMBCommand['Data'])
+
+ # Get the Tid associated
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ errorCode = STATUS_SUCCESS
+ path = connData['ConnectedShares'][recvPacket['Tid']]['path']
+ fileName = os.path.normpath(decodeSMBString(recvPacket['Flags2'],comDeleteData['FileName']).replace('\\','/'))
+ if len(fileName) > 0 and (fileName[0] == '/' or fileName[0] == '\\'):
+ # strip leading '/'
+ fileName = fileName[1:]
+ pathName = os.path.join(path,fileName)
+ if os.path.exists(pathName) is not True:
+ errorCode = STATUS_NO_SUCH_FILE
+
+ # TODO: More checks here in the future.. Specially when we support
+ # user access
+ else:
+ try:
+ os.remove(pathName)
+ except OSError, e:
+ smbServer.log("smbComDelete: %s" % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+ if errorCode > 0:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+
+ @staticmethod
+ def smbComDeleteDirectory(connId, smbServer, SMBCommand, recvPacket ):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_DELETE_DIRECTORY)
+ respParameters = ''
+ respData = ''
+
+ comDeleteDirectoryData= smb.SMBDeleteDirectory_Data(flags = recvPacket['Flags2'], data = SMBCommand['Data'])
+
+ # Get the Tid associated
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ errorCode = STATUS_SUCCESS
+ path = connData['ConnectedShares'][recvPacket['Tid']]['path']
+ fileName = os.path.normpath(decodeSMBString(recvPacket['Flags2'],comDeleteDirectoryData['DirectoryName']).replace('\\','/'))
+ if len(fileName) > 0 and (fileName[0] == '/' or fileName[0] == '\\'):
+ # strip leading '/'
+ fileName = fileName[1:]
+ pathName = os.path.join(path,fileName)
+ if os.path.exists(pathName) is not True:
+ errorCode = STATUS_NO_SUCH_FILE
+
+ # TODO: More checks here in the future.. Specially when we support
+ # user access
+ else:
+ try:
+ os.rmdir(pathName)
+ except OSError, e:
+ smbServer.log("smbComDeleteDirectory: %s" % e,logging.ERROR)
+ if e.errno == errno.ENOTEMPTY:
+ errorCode = STATUS_DIRECTORY_NOT_EMPTY
+ else:
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+ if errorCode > 0:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+
+ @staticmethod
+ def smbComWriteAndX(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_WRITE_ANDX)
+ respParameters = smb.SMBWriteAndXResponse_Parameters()
+ respData = ''
+
+ if SMBCommand['WordCount'] == 0x0C:
+ writeAndX = smb.SMBWriteAndX_Parameters_Short(SMBCommand['Parameters'])
+ writeAndXData = smb.SMBWriteAndX_Data_Short()
+ else:
+ writeAndX = smb.SMBWriteAndX_Parameters(SMBCommand['Parameters'])
+ writeAndXData = smb.SMBWriteAndX_Data()
+ writeAndXData['DataLength'] = writeAndX['DataLength']
+ writeAndXData['DataOffset'] = writeAndX['DataOffset']
+ writeAndXData.fromString(SMBCommand['Data'])
+
+
+ if connData['OpenedFiles'].has_key(writeAndX['Fid']):
+ fileHandle = connData['OpenedFiles'][writeAndX['Fid']]['FileHandle']
+ errorCode = STATUS_SUCCESS
+ try:
+ if fileHandle != PIPE_FILE_DESCRIPTOR:
+ offset = writeAndX['Offset']
+ if writeAndX.fields.has_key('HighOffset'):
+ offset += (writeAndX['HighOffset'] << 32)
+ # If we're trying to write past the file end we just skip the write call (Vista does this)
+ if os.lseek(fileHandle, 0, 2) >= offset:
+ os.lseek(fileHandle,offset,0)
+ os.write(fileHandle,writeAndXData['Data'])
+ else:
+ sock = connData['OpenedFiles'][writeAndX['Fid']]['Socket']
+ sock.send(writeAndXData['Data'])
+
+ respParameters['Count'] = writeAndX['DataLength']
+ respParameters['Available']= 0xff
+ except Exception, e:
+ smbServer.log('smbComWriteAndx: %s' % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+
+ if errorCode > 0:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComRead(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_READ)
+ respParameters = smb.SMBReadResponse_Parameters()
+ respData = smb.SMBReadResponse_Data()
+
+ comReadParameters = smb.SMBRead_Parameters(SMBCommand['Parameters'])
+
+ if connData['OpenedFiles'].has_key(comReadParameters['Fid']):
+ fileHandle = connData['OpenedFiles'][comReadParameters['Fid']]['FileHandle']
+ errorCode = STATUS_SUCCESS
+ try:
+ if fileHandle != PIPE_FILE_DESCRIPTOR:
+ # TODO: Handle big size files
+ os.lseek(fileHandle,comReadParameters['Offset'],0)
+ content = os.read(fileHandle,comReadParameters['Count'])
+ else:
+ sock = connData['OpenedFiles'][comReadParameters['Fid']]['Socket']
+ content = sock.recv(comReadParameters['Count'])
+ respParameters['Count'] = len(content)
+ respData['DataLength'] = len(content)
+ respData['Data'] = content
+ except Exception, e:
+ smbServer.log('smbComRead: %s ' % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+
+ if errorCode > 0:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComReadAndX(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_READ_ANDX)
+ respParameters = smb.SMBReadAndXResponse_Parameters()
+ respData = ''
+
+ if SMBCommand['WordCount'] == 0x0A:
+ readAndX = smb.SMBReadAndX_Parameters2(SMBCommand['Parameters'])
+ else:
+ readAndX = smb.SMBReadAndX_Parameters(SMBCommand['Parameters'])
+
+ if connData['OpenedFiles'].has_key(readAndX['Fid']):
+ fileHandle = connData['OpenedFiles'][readAndX['Fid']]['FileHandle']
+ errorCode = 0
+ try:
+ if fileHandle != PIPE_FILE_DESCRIPTOR:
+ offset = readAndX['Offset']
+ if readAndX.fields.has_key('HighOffset'):
+ offset += (readAndX['HighOffset'] << 32)
+ os.lseek(fileHandle,offset,0)
+ content = os.read(fileHandle,readAndX['MaxCount'])
+ else:
+ sock = connData['OpenedFiles'][readAndX['Fid']]['Socket']
+ content = sock.recv(readAndX['MaxCount'])
+ respParameters['Remaining'] = 0xffff
+ respParameters['DataCount'] = len(content)
+ respParameters['DataOffset'] = 59
+ respParameters['DataCount_Hi'] = 0
+ respData = content
+ except Exception, e:
+ smbServer.log('smbComReadAndX: %s ' % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+
+ if errorCode > 0:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbQueryInformation(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_QUERY_INFORMATION)
+ respParameters = smb.SMBQueryInformationResponse_Parameters()
+ respData = ''
+
+ queryInformation= smb.SMBQueryInformation_Data(flags = recvPacket['Flags2'], data = SMBCommand['Data'])
+
+ # Get the Tid associated
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ fileSize, lastWriteTime, fileAttributes = queryFsInformation(
+ connData['ConnectedShares'][recvPacket['Tid']]['path'],
+ decodeSMBString(recvPacket['Flags2'],queryInformation['FileName']))
+
+ respParameters['FileSize'] = fileSize
+ respParameters['LastWriteTime'] = lastWriteTime
+ respParameters['FileAttributes'] = fileAttributes
+ errorCode = STATUS_SUCCESS
+ else:
+ # STATUS_SMB_BAD_TID
+ errorCode = STATUS_SMB_BAD_TID
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbQueryInformationDisk(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_QUERY_INFORMATION_DISK)
+ respParameters = smb.SMBQueryInformationDiskResponse_Parameters()
+ respData = ''
+
+ # Get the Tid associated
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ totalUnits, freeUnits = queryDiskInformation(
+ connData['ConnectedShares'][recvPacket['Tid']]['path'])
+
+ respParameters['TotalUnits'] = totalUnits
+ respParameters['BlocksPerUnit'] = 1
+ respParameters['BlockSize'] = 1
+ respParameters['FreeUnits'] = freeUnits
+ errorCode = STATUS_SUCCESS
+ else:
+ # STATUS_SMB_BAD_TID
+ respData = ''
+ respParameters = ''
+ errorCode = STATUS_SMB_BAD_TID
+
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComEcho(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_ECHO)
+ respParameters = smb.SMBEchoResponse_Parameters()
+ respData = smb.SMBEchoResponse_Data()
+
+ echoData = smb.SMBEcho_Data(SMBCommand['Data'])
+
+ respParameters['SequenceNumber'] = 1
+ respData['Data'] = echoData['Data']
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+
+ errorCode = STATUS_SUCCESS
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComTreeDisconnect(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_TREE_DISCONNECT)
+
+ # Check if the Tid matches the Tid trying to disconnect
+ respParameters = ''
+ respData = ''
+
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ smbServer.log("Disconnecting Share(%d:%s)" % (recvPacket['Tid'],connData['ConnectedShares'][recvPacket['Tid']]['shareName']))
+ del(connData['ConnectedShares'][recvPacket['Tid']])
+ errorCode = STATUS_SUCCESS
+ else:
+ # STATUS_SMB_BAD_TID
+ errorCode = STATUS_SMB_BAD_TID
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComLogOffAndX(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_LOGOFF_ANDX)
+
+ # Check if the Uid matches the user trying to logoff
+ respParameters = ''
+ respData = ''
+ if recvPacket['Uid'] != connData['Uid']:
+ # STATUS_SMB_BAD_UID
+ errorCode = STATUS_SMB_BAD_UID
+ else:
+ errorCode = STATUS_SUCCESS
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ connData['Uid'] = 0
+
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComQueryInformation2(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_QUERY_INFORMATION2)
+ respParameters = smb.SMBQueryInformation2Response_Parameters()
+ respData = ''
+
+ queryInformation2 = smb.SMBQueryInformation2_Parameters(SMBCommand['Parameters'])
+ errorCode = 0xFF
+ if connData['OpenedFiles'].has_key(queryInformation2['Fid']):
+ errorCode = STATUS_SUCCESS
+ pathName = connData['OpenedFiles'][queryInformation2['Fid']]['FileName']
+ try:
+ (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime) = os.stat(pathName)
+ respParameters['CreateDate'] = getSMBDate(ctime)
+ respParameters['CreationTime'] = getSMBTime(ctime)
+ respParameters['LastAccessDate'] = getSMBDate(atime)
+ respParameters['LastAccessTime'] = getSMBTime(atime)
+ respParameters['LastWriteDate'] = getSMBDate(mtime)
+ respParameters['LastWriteTime'] = getSMBTime(mtime)
+ respParameters['FileDataSize'] = size
+ respParameters['FileAllocationSize'] = size
+ attribs = 0
+ if os.path.isdir(pathName):
+ attribs = smb.SMB_FILE_ATTRIBUTE_DIRECTORY
+ if os.path.isfile(pathName):
+ attribs = smb.SMB_FILE_ATTRIBUTE_NORMAL
+ respParameters['FileAttributes'] = attribs
+ except Exception, e:
+ smbServer.log('smbComQueryInformation2 %s' % e,logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+
+ if errorCode > 0:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComNtCreateAndX(connId, smbServer, SMBCommand, recvPacket):
+ # TODO: Fully implement this
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_NT_CREATE_ANDX)
+ respParameters = smb.SMBNtCreateAndXResponse_Parameters()
+ respData = ''
+
+ ntCreateAndXParameters = smb.SMBNtCreateAndX_Parameters(SMBCommand['Parameters'])
+ ntCreateAndXData = smb.SMBNtCreateAndX_Data( flags = recvPacket['Flags2'], data = SMBCommand['Data'])
+
+ #if ntCreateAndXParameters['CreateFlags'] & 0x10: # NT_CREATE_REQUEST_EXTENDED_RESPONSE
+ # respParameters = smb.SMBNtCreateAndXExtendedResponse_Parameters()
+ # respParameters['VolumeGUID'] = '\x00'
+
+ # Get the Tid associated
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ # If we have a rootFid, the path is relative to that fid
+ errorCode = STATUS_SUCCESS
+ if ntCreateAndXParameters['RootFid'] > 0:
+ path = connData['OpenedFiles'][ntCreateAndXParameters['RootFid']]['FileName']
+ LOG.debug("RootFid present %s!" % path)
+ else:
+ if connData['ConnectedShares'][recvPacket['Tid']].has_key('path'):
+ path = connData['ConnectedShares'][recvPacket['Tid']]['path']
+ else:
+ path = 'NONE'
+ errorCode = STATUS_ACCESS_DENIED
+
+ deleteOnClose = False
+
+ fileName = os.path.normpath(decodeSMBString(recvPacket['Flags2'],ntCreateAndXData['FileName']).replace('\\','/'))
+ if len(fileName) > 0 and (fileName[0] == '/' or fileName[0] == '\\'):
+ # strip leading '/'
+ fileName = fileName[1:]
+ pathName = os.path.join(path,fileName)
+ createDisposition = ntCreateAndXParameters['Disposition']
+ mode = 0
+
+ if createDisposition == smb.FILE_SUPERSEDE:
+ mode |= os.O_TRUNC | os.O_CREAT
+ elif createDisposition & smb.FILE_OVERWRITE_IF == smb.FILE_OVERWRITE_IF:
+ mode |= os.O_TRUNC | os.O_CREAT
+ elif createDisposition & smb.FILE_OVERWRITE == smb.FILE_OVERWRITE:
+ if os.path.exists(pathName) is True:
+ mode |= os.O_TRUNC
+ else:
+ errorCode = STATUS_NO_SUCH_FILE
+ elif createDisposition & smb.FILE_OPEN_IF == smb.FILE_OPEN_IF:
+ if os.path.exists(pathName) is True:
+ mode |= os.O_TRUNC
+ else:
+ mode |= os.O_TRUNC | os.O_CREAT
+ elif createDisposition & smb.FILE_CREATE == smb.FILE_CREATE:
+ if os.path.exists(pathName) is True:
+ errorCode = STATUS_OBJECT_NAME_COLLISION
+ else:
+ mode |= os.O_CREAT
+ elif createDisposition & smb.FILE_OPEN == smb.FILE_OPEN:
+ if os.path.exists(pathName) is not True and smbServer.getRegisteredNamedPipes().has_key(unicode(pathName)) is not True:
+ errorCode = STATUS_NO_SUCH_FILE
+
+ if errorCode == STATUS_SUCCESS:
+ desiredAccess = ntCreateAndXParameters['AccessMask']
+ if (desiredAccess & smb.FILE_READ_DATA) or (desiredAccess & smb.GENERIC_READ):
+ mode |= os.O_RDONLY
+ if (desiredAccess & smb.FILE_WRITE_DATA) or (desiredAccess & smb.GENERIC_WRITE):
+ if (desiredAccess & smb.FILE_READ_DATA) or (desiredAccess & smb.GENERIC_READ):
+ mode |= os.O_RDWR #| os.O_APPEND
+ else:
+ mode |= os.O_WRONLY #| os.O_APPEND
+ if desiredAccess & smb.GENERIC_ALL:
+ mode |= os.O_RDWR #| os.O_APPEND
+
+ createOptions = ntCreateAndXParameters['CreateOptions']
+ if mode & os.O_CREAT == os.O_CREAT:
+ if createOptions & smb.FILE_DIRECTORY_FILE == smb.FILE_DIRECTORY_FILE:
+ try:
+ # Let's create the directory
+ os.mkdir(pathName)
+ mode = os.O_RDONLY
+ except Exception, e:
+ smbServer.log("NTCreateAndX: %s,%s,%s" % (pathName,mode,e),logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ if createOptions & smb.FILE_NON_DIRECTORY_FILE == smb.FILE_NON_DIRECTORY_FILE:
+ # If the file being opened is a directory, the server MUST fail the request with
+ # STATUS_FILE_IS_A_DIRECTORY in the Status field of the SMB Header in the server
+ # response.
+ if os.path.isdir(pathName) is True:
+ errorCode = STATUS_FILE_IS_A_DIRECTORY
+
+ if createOptions & smb.FILE_DELETE_ON_CLOSE == smb.FILE_DELETE_ON_CLOSE:
+ deleteOnClose = True
+
+ if errorCode == STATUS_SUCCESS:
+ try:
+ if os.path.isdir(pathName) and sys.platform == 'win32':
+ fid = VOID_FILE_DESCRIPTOR
+ else:
+ if sys.platform == 'win32':
+ mode |= os.O_BINARY
+ if smbServer.getRegisteredNamedPipes().has_key(unicode(pathName)):
+ fid = PIPE_FILE_DESCRIPTOR
+ sock = socket.socket()
+ sock.connect(smbServer.getRegisteredNamedPipes()[unicode(pathName)])
+ else:
+ fid = os.open(pathName, mode)
+ except Exception, e:
+ smbServer.log("NTCreateAndX: %s,%s,%s" % (pathName,mode,e),logging.ERROR)
+ #print e
+ fid = 0
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+ if errorCode == STATUS_SUCCESS:
+ # Simple way to generate a fid
+ if len(connData['OpenedFiles']) == 0:
+ fakefid = 1
+ else:
+ fakefid = connData['OpenedFiles'].keys()[-1] + 1
+ respParameters['Fid'] = fakefid
+ respParameters['CreateAction'] = createDisposition
+ if fid == PIPE_FILE_DESCRIPTOR:
+ respParameters['FileAttributes'] = 0x80
+ respParameters['IsDirectory'] = 0
+ respParameters['CreateTime'] = 0
+ respParameters['LastAccessTime'] = 0
+ respParameters['LastWriteTime'] = 0
+ respParameters['LastChangeTime'] = 0
+ respParameters['AllocationSize'] = 4096
+ respParameters['EndOfFile'] = 0
+ respParameters['FileType'] = 2
+ respParameters['IPCState'] = 0x5ff
+ else:
+ if os.path.isdir(pathName):
+ respParameters['FileAttributes'] = smb.SMB_FILE_ATTRIBUTE_DIRECTORY
+ respParameters['IsDirectory'] = 1
+ else:
+ respParameters['IsDirectory'] = 0
+ respParameters['FileAttributes'] = ntCreateAndXParameters['FileAttributes']
+ # Let's get this file's information
+ respInfo, errorCode = queryPathInformation('',pathName,level= smb.SMB_QUERY_FILE_ALL_INFO)
+ if errorCode == STATUS_SUCCESS:
+ respParameters['CreateTime'] = respInfo['CreationTime']
+ respParameters['LastAccessTime'] = respInfo['LastAccessTime']
+ respParameters['LastWriteTime'] = respInfo['LastWriteTime']
+ respParameters['LastChangeTime'] = respInfo['LastChangeTime']
+ respParameters['FileAttributes'] = respInfo['ExtFileAttributes']
+ respParameters['AllocationSize'] = respInfo['AllocationSize']
+ respParameters['EndOfFile'] = respInfo['EndOfFile']
+ else:
+ respParameters = ''
+ respData = ''
+
+ if errorCode == STATUS_SUCCESS:
+ # Let's store the fid for the connection
+ # smbServer.log('Create file %s, mode:0x%x' % (pathName, mode))
+ connData['OpenedFiles'][fakefid] = {}
+ connData['OpenedFiles'][fakefid]['FileHandle'] = fid
+ connData['OpenedFiles'][fakefid]['FileName'] = pathName
+ connData['OpenedFiles'][fakefid]['DeleteOnClose'] = deleteOnClose
+ if fid == PIPE_FILE_DESCRIPTOR:
+ connData['OpenedFiles'][fakefid]['Socket'] = sock
+ else:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComOpenAndX(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_OPEN_ANDX)
+ respParameters = smb.SMBOpenAndXResponse_Parameters()
+ respData = ''
+
+ openAndXParameters = smb.SMBOpenAndX_Parameters(SMBCommand['Parameters'])
+ openAndXData = smb.SMBOpenAndX_Data( flags = recvPacket['Flags2'], data = SMBCommand['Data'])
+
+ # Get the Tid associated
+ if connData['ConnectedShares'].has_key(recvPacket['Tid']):
+ path = connData['ConnectedShares'][recvPacket['Tid']]['path']
+ openedFile, mode, pathName, errorCode = openFile(path,
+ decodeSMBString(recvPacket['Flags2'],openAndXData['FileName']),
+ openAndXParameters['DesiredAccess'],
+ openAndXParameters['FileAttributes'],
+ openAndXParameters['OpenMode'])
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+ if errorCode == STATUS_SUCCESS:
+ # Simple way to generate a fid
+ fid = len(connData['OpenedFiles']) + 1
+ if len(connData['OpenedFiles']) == 0:
+ fid = 1
+ else:
+ fid = connData['OpenedFiles'].keys()[-1] + 1
+ respParameters['Fid'] = fid
+ if mode & os.O_CREAT:
+ # File did not exist and was created
+ respParameters['Action'] = 0x2
+ elif mode & os.O_RDONLY:
+ # File existed and was opened
+ respParameters['Action'] = 0x1
+ elif mode & os.O_APPEND:
+ # File existed and was opened
+ respParameters['Action'] = 0x1
+ else:
+ # File existed and was truncated
+ respParameters['Action'] = 0x3
+
+ # Let's store the fid for the connection
+ #smbServer.log('Opening file %s' % pathName)
+ connData['OpenedFiles'][fid] = {}
+ connData['OpenedFiles'][fid]['FileHandle'] = openedFile
+ connData['OpenedFiles'][fid]['FileName'] = pathName
+ connData['OpenedFiles'][fid]['DeleteOnClose'] = False
+ else:
+ respParameters = ''
+ respData = ''
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComTreeConnectAndX(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ resp = smb.NewSMBPacket()
+ resp['Flags1'] = smb.SMB.FLAGS1_REPLY
+ resp['Flags2'] = smb.SMB.FLAGS2_EXTENDED_SECURITY | smb.SMB.FLAGS2_NT_STATUS | smb.SMB.FLAGS2_LONG_NAMES | recvPacket['Flags2'] & smb.SMB.FLAGS2_UNICODE
+
+ resp['Tid'] = recvPacket['Tid']
+ resp['Mid'] = recvPacket['Mid']
+ resp['Pid'] = connData['Pid']
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_TREE_CONNECT_ANDX)
+ respParameters = smb.SMBTreeConnectAndXResponse_Parameters()
+ respData = smb.SMBTreeConnectAndXResponse_Data()
+
+ treeConnectAndXParameters = smb.SMBTreeConnectAndX_Parameters(SMBCommand['Parameters'])
+
+ if treeConnectAndXParameters['Flags'] & 0x8:
+ respParameters = smb.SMBTreeConnectAndXExtendedResponse_Parameters()
+
+ treeConnectAndXData = smb.SMBTreeConnectAndX_Data( flags = recvPacket['Flags2'] )
+ treeConnectAndXData['_PasswordLength'] = treeConnectAndXParameters['PasswordLength']
+ treeConnectAndXData.fromString(SMBCommand['Data'])
+
+ errorCode = STATUS_SUCCESS
+
+ ## Process here the request, does the share exist?
+ UNCOrShare = decodeSMBString(recvPacket['Flags2'], treeConnectAndXData['Path'])
+
+ # Is this a UNC?
+ if ntpath.ismount(UNCOrShare):
+ path = UNCOrShare.split('\\')[3]
+ else:
+ path = ntpath.basename(UNCOrShare)
+
+ share = searchShare(connId, path, smbServer)
+ if share is not None:
+ # Simple way to generate a Tid
+ if len(connData['ConnectedShares']) == 0:
+ tid = 1
+ else:
+ tid = connData['ConnectedShares'].keys()[-1] + 1
+ connData['ConnectedShares'][tid] = share
+ connData['ConnectedShares'][tid]['shareName'] = path
+ resp['Tid'] = tid
+ #smbServer.log("Connecting Share(%d:%s)" % (tid,path))
+ else:
+ smbServer.log("TreeConnectAndX not found %s" % path, logging.ERROR)
+ errorCode = STATUS_OBJECT_PATH_NOT_FOUND
+ resp['ErrorCode'] = errorCode >> 16
+ resp['ErrorClass'] = errorCode & 0xff
+ ##
+ respParameters['OptionalSupport'] = smb.SMB.SMB_SUPPORT_SEARCH_BITS
+
+ if path == 'IPC$':
+ respData['Service'] = 'IPC'
+ else:
+ respData['Service'] = path
+ respData['PadLen'] = 0
+ respData['NativeFileSystem'] = encodeSMBString(recvPacket['Flags2'], 'NTFS' )
+
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+
+ resp['Uid'] = connData['Uid']
+ resp.addCommand(respSMBCommand)
+ smbServer.setConnectionData(connId, connData)
+
+ return None, [resp], errorCode
+
+ @staticmethod
+ def smbComSessionSetupAndX(connId, smbServer, SMBCommand, recvPacket):
+ connData = smbServer.getConnectionData(connId, checkStatus = False)
+
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_SESSION_SETUP_ANDX)
+
+ # From [MS-SMB]
+ # When extended security is being used (see section 3.2.4.2.4), the
+ # request MUST take the following form
+ # [..]
+ # WordCount (1 byte): The value of this field MUST be 0x0C.
+ if SMBCommand['WordCount'] == 12:
+ # Extended security. Here we deal with all SPNEGO stuff
+ respParameters = smb.SMBSessionSetupAndX_Extended_Response_Parameters()
+ respData = smb.SMBSessionSetupAndX_Extended_Response_Data(flags = recvPacket['Flags2'])
+ sessionSetupParameters = smb.SMBSessionSetupAndX_Extended_Parameters(SMBCommand['Parameters'])
+ sessionSetupData = smb.SMBSessionSetupAndX_Extended_Data()
+ sessionSetupData['SecurityBlobLength'] = sessionSetupParameters['SecurityBlobLength']
+ sessionSetupData.fromString(SMBCommand['Data'])
+ connData['Capabilities'] = sessionSetupParameters['Capabilities']
+
+ rawNTLM = False
+ if struct.unpack('B',sessionSetupData['SecurityBlob'][0])[0] == ASN1_AID:
+ # NEGOTIATE packet
+ blob = SPNEGO_NegTokenInit(sessionSetupData['SecurityBlob'])
+ token = blob['MechToken']
+ if len(blob['MechTypes'][0]) > 0:
+ # Is this GSSAPI NTLM or something else we don't support?
+ mechType = blob['MechTypes'][0]
+ if mechType != TypesMech['NTLMSSP - Microsoft NTLM Security Support Provider']:
+ # Nope, do we know it?
+ if MechTypes.has_key(mechType):
+ mechStr = MechTypes[mechType]
+ else:
+ mechStr = hexlify(mechType)
+ smbServer.log("Unsupported MechType '%s'" % mechStr, logging.CRITICAL)
+ # We don't know the token, we answer back again saying
+ # we just support NTLM.
+ # ToDo: Build this into a SPNEGO_NegTokenResp()
+ respToken = '\xa1\x15\x30\x13\xa0\x03\x0a\x01\x03\xa1\x0c\x06\x0a\x2b\x06\x01\x04\x01\x82\x37\x02\x02\x0a'
+ respParameters['SecurityBlobLength'] = len(respToken)
+ respData['SecurityBlobLength'] = respParameters['SecurityBlobLength']
+ respData['SecurityBlob'] = respToken
+ respData['NativeOS'] = encodeSMBString(recvPacket['Flags2'], smbServer.getServerOS())
+ respData['NativeLanMan'] = encodeSMBString(recvPacket['Flags2'], smbServer.getServerOS())
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+ return [respSMBCommand], None, STATUS_MORE_PROCESSING_REQUIRED
+
+ elif struct.unpack('B',sessionSetupData['SecurityBlob'][0])[0] == ASN1_SUPPORTED_MECH:
+ # AUTH packet
+ blob = SPNEGO_NegTokenResp(sessionSetupData['SecurityBlob'])
+ token = blob['ResponseToken']
+ else:
+ # No GSSAPI stuff, raw NTLMSSP
+ rawNTLM = True
+ token = sessionSetupData['SecurityBlob']
+
+ # Here we only handle NTLMSSP, depending on what stage of the
+ # authentication we are, we act on it
+ messageType = struct.unpack('<L',token[len('NTLMSSP\x00'):len('NTLMSSP\x00')+4])[0]
+
+ if messageType == 0x01:
+ # NEGOTIATE_MESSAGE
+ negotiateMessage = ntlm.NTLMAuthNegotiate()
+ negotiateMessage.fromString(token)
+ # Let's store it in the connection data
+ connData['NEGOTIATE_MESSAGE'] = negotiateMessage
+ # Let's build the answer flags
+ # TODO: Parse all the flags. With this we're leaving some clients out
+
+ ansFlags = 0
+
+ if negotiateMessage['flags'] & ntlm.NTLMSSP_NEGOTIATE_56:
+ ansFlags |= ntlm.NTLMSSP_NEGOTIATE_56
+ if negotiateMessage['flags'] & ntlm.NTLMSSP_NEGOTIATE_128:
+ ansFlags |= ntlm.NTLMSSP_NEGOTIATE_128
+ if negotiateMessage['flags'] & ntlm.NTLMSSP_NEGOTIATE_KEY_EXCH:
+ ansFlags |= ntlm.NTLMSSP_NEGOTIATE_KEY_EXCH
+ if negotiateMessage['flags'] & ntlm.NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY:
+ ansFlags |= ntlm.NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
+ if negotiateMessage['flags'] & ntlm.NTLMSSP_NEGOTIATE_UNICODE:
+ ansFlags |= ntlm.NTLMSSP_NEGOTIATE_UNICODE
+ if negotiateMessage['flags'] & ntlm.NTLM_NEGOTIATE_OEM:
+ ansFlags |= ntlm.NTLM_NEGOTIATE_OEM
+
+ ansFlags |= ntlm.NTLMSSP_NEGOTIATE_VERSION | ntlm.NTLMSSP_NEGOTIATE_TARGET_INFO | ntlm.NTLMSSP_TARGET_TYPE_SERVER | ntlm.NTLMSSP_NEGOTIATE_NTLM | ntlm.NTLMSSP_REQUEST_TARGET
+
+ # Generate the AV_PAIRS
+ av_pairs = ntlm.AV_PAIRS()
+ # TODO: Put the proper data from SMBSERVER config
+ av_pairs[ntlm.NTLMSSP_AV_HOSTNAME] = av_pairs[ntlm.NTLMSSP_AV_DNS_HOSTNAME] = smbServer.getServerName().encode('utf-16le')
+ av_pairs[ntlm.NTLMSSP_AV_DOMAINNAME] = av_pairs[ntlm.NTLMSSP_AV_DNS_DOMAINNAME] = smbServer.getServerDomain().encode('utf-16le')
+ av_pairs[ntlm.NTLMSSP_AV_TIME] = struct.pack('<q', (116444736000000000 + calendar.timegm(time.gmtime()) * 10000000) )
+
+ challengeMessage = ntlm.NTLMAuthChallenge()
+ challengeMessage['flags'] = ansFlags
+ challengeMessage['domain_len'] = len(smbServer.getServerDomain().encode('utf-16le'))
+ challengeMessage['domain_max_len'] = challengeMessage['domain_len']
+ challengeMessage['domain_offset'] = 40 + 16
+ challengeMessage['challenge'] = smbServer.getSMBChallenge()
+ challengeMessage['domain_name'] = smbServer.getServerDomain().encode('utf-16le')
+ challengeMessage['TargetInfoFields_len'] = len(av_pairs)
+ challengeMessage['TargetInfoFields_max_len'] = len(av_pairs)
+ challengeMessage['TargetInfoFields'] = av_pairs
+ challengeMessage['TargetInfoFields_offset'] = 40 + 16 + len(challengeMessage['domain_name'])
+ challengeMessage['Version'] = '\xff'*8
+ challengeMessage['VersionLen'] = 8
+
+ if rawNTLM is False:
+ respToken = SPNEGO_NegTokenResp()
+ # accept-incomplete. We want more data
+ respToken['NegResult'] = '\x01'
+ respToken['SupportedMech'] = TypesMech['NTLMSSP - Microsoft NTLM Security Support Provider']
+
+ respToken['ResponseToken'] = challengeMessage.getData()
+ else:
+ respToken = challengeMessage
+
+ # Setting the packet to STATUS_MORE_PROCESSING
+ errorCode = STATUS_MORE_PROCESSING_REQUIRED
+ # Let's set up an UID for this connection and store it
+ # in the connection's data
+ # Picking a fixed value
+ # TODO: Manage more UIDs for the same session
+ connData['Uid'] = 10
+ # Let's store it in the connection data
+ connData['CHALLENGE_MESSAGE'] = challengeMessage
+
+ elif messageType == 0x02:
+ # CHALLENGE_MESSAGE
+ raise Exception('Challenge Message raise, not implemented!')
+ elif messageType == 0x03:
+ # AUTHENTICATE_MESSAGE, here we deal with authentication
+ authenticateMessage = ntlm.NTLMAuthChallengeResponse()
+ authenticateMessage.fromString(token)
+ smbServer.log("AUTHENTICATE_MESSAGE (%s\\%s,%s)" % (authenticateMessage['domain_name'], authenticateMessage['user_name'], authenticateMessage['host_name']))
+ # TODO: Check the credentials! Now granting permissions
+
+ respToken = SPNEGO_NegTokenResp()
+ # accept-completed
+ respToken['NegResult'] = '\x00'
+
+ # Status SUCCESS
+ errorCode = STATUS_SUCCESS
+ smbServer.log('User %s\\%s authenticated successfully' % (authenticateMessage['user_name'], authenticateMessage['host_name']))
+ # Let's store it in the connection data
+ connData['AUTHENTICATE_MESSAGE'] = authenticateMessage
+ try:
+ jtr_dump_path = smbServer.getJTRdumpPath()
+ ntlm_hash_data = outputToJohnFormat( connData['CHALLENGE_MESSAGE']['challenge'], authenticateMessage['user_name'], authenticateMessage['domain_name'], authenticateMessage['lanman'], authenticateMessage['ntlm'] )
+ smbServer.log(ntlm_hash_data['hash_string'])
+ if jtr_dump_path is not '':
+ writeJohnOutputToFile(ntlm_hash_data['hash_string'], ntlm_hash_data['hash_version'], jtr_dump_path)
+ except:
+ smbServer.log("Could not write NTLM Hashes to the specified JTR_Dump_Path %s" % jtr_dump_path)
+ else:
+ raise Exception("Unknown NTLMSSP MessageType %d" % messageType)
+
+ respParameters['SecurityBlobLength'] = len(respToken)
+ respData['SecurityBlobLength'] = respParameters['SecurityBlobLength']
+ respData['SecurityBlob'] = respToken.getData()
+
+ else:
+ # Process Standard Security
+ respParameters = smb.SMBSessionSetupAndXResponse_Parameters()
+ respData = smb.SMBSessionSetupAndXResponse_Data()
+ sessionSetupParameters = smb.SMBSessionSetupAndX_Parameters(SMBCommand['Parameters'])
+ sessionSetupData = smb.SMBSessionSetupAndX_Data()
+ sessionSetupData['AnsiPwdLength'] = sessionSetupParameters['AnsiPwdLength']
+ sessionSetupData['UnicodePwdLength'] = sessionSetupParameters['UnicodePwdLength']
+ sessionSetupData.fromString(SMBCommand['Data'])
+ connData['Capabilities'] = sessionSetupParameters['Capabilities']
+ # Do the verification here, for just now we grant access
+ # TODO: Manage more UIDs for the same session
+ errorCode = STATUS_SUCCESS
+ connData['Uid'] = 10
+ respParameters['Action'] = 0
+ smbServer.log('User %s\\%s authenticated successfully (basic)' % (sessionSetupData['PrimaryDomain'], sessionSetupData['Account']))
+ try:
+ jtr_dump_path = smbServer.getJTRdumpPath()
+ ntlm_hash_data = outputToJohnFormat( '', sessionSetupData['Account'], sessionSetupData['PrimaryDomain'], sessionSetupData['AnsiPwd'], sessionSetupData['UnicodePwd'] )
+ smbServer.log(ntlm_hash_data['hash_string'])
+ if jtr_dump_path is not '':
+ writeJohnOutputToFile(ntlm_hash_data['hash_string'], ntlm_hash_data['hash_version'], jtr_dump_path)
+ except:
+ smbServer.log("Could not write NTLM Hashes to the specified JTR_Dump_Path %s" % jtr_dump_path)
+
+ respData['NativeOS'] = encodeSMBString(recvPacket['Flags2'], smbServer.getServerOS())
+ respData['NativeLanMan'] = encodeSMBString(recvPacket['Flags2'], smbServer.getServerOS())
+ respSMBCommand['Parameters'] = respParameters
+ respSMBCommand['Data'] = respData
+
+ # From now on, the client can ask for other commands
+ connData['Authenticated'] = True
+ # For now, just switching to nobody
+ #os.setregid(65534,65534)
+ #os.setreuid(65534,65534)
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smbComNegotiate(connId, smbServer, SMBCommand, recvPacket ):
+ connData = smbServer.getConnectionData(connId, checkStatus = False)
+ connData['Pid'] = recvPacket['Pid']
+
+ SMBCommand = smb.SMBCommand(recvPacket['Data'][0])
+ respSMBCommand = smb.SMBCommand(smb.SMB.SMB_COM_NEGOTIATE)
+
+ resp = smb.NewSMBPacket()
+ resp['Flags1'] = smb.SMB.FLAGS1_REPLY
+ resp['Pid'] = connData['Pid']
+ resp['Tid'] = recvPacket['Tid']
+ resp['Mid'] = recvPacket['Mid']
+
+ # TODO: We support more dialects, and parse them accordingly
+ dialects = SMBCommand['Data'].split('\x02')
+ try:
+ index = dialects.index('NT LM 0.12\x00') - 1
+ # Let's fill the data for NTLM
+ if recvPacket['Flags2'] & smb.SMB.FLAGS2_EXTENDED_SECURITY:
+ resp['Flags2'] = smb.SMB.FLAGS2_EXTENDED_SECURITY | smb.SMB.FLAGS2_NT_STATUS | smb.SMB.FLAGS2_UNICODE
+ #resp['Flags2'] = smb.SMB.FLAGS2_EXTENDED_SECURITY | smb.SMB.FLAGS2_NT_STATUS
+ _dialects_data = smb.SMBExtended_Security_Data()
+ _dialects_data['ServerGUID'] = 'A'*16
+ blob = SPNEGO_NegTokenInit()
+ blob['MechTypes'] = [TypesMech['NTLMSSP - Microsoft NTLM Security Support Provider']]
+ _dialects_data['SecurityBlob'] = blob.getData()
+
+ _dialects_parameters = smb.SMBExtended_Security_Parameters()
+ _dialects_parameters['Capabilities'] = smb.SMB.CAP_EXTENDED_SECURITY | smb.SMB.CAP_USE_NT_ERRORS | smb.SMB.CAP_NT_SMBS | smb.SMB.CAP_UNICODE
+ _dialects_parameters['ChallengeLength'] = 0
+
+ else:
+ resp['Flags2'] = smb.SMB.FLAGS2_NT_STATUS | smb.SMB.FLAGS2_UNICODE
+ _dialects_parameters = smb.SMBNTLMDialect_Parameters()
+ _dialects_data= smb.SMBNTLMDialect_Data()
+ _dialects_data['Payload'] = ''
+ if connData.has_key('EncryptionKey'):
+ _dialects_data['Challenge'] = connData['EncryptionKey']
+ _dialects_parameters['ChallengeLength'] = len(str(_dialects_data))
+ else:
+ # TODO: Handle random challenges, now one that can be used with rainbow tables
+ _dialects_data['Challenge'] = '\x11\x22\x33\x44\x55\x66\x77\x88'
+ _dialects_parameters['ChallengeLength'] = 8
+ _dialects_parameters['Capabilities'] = smb.SMB.CAP_USE_NT_ERRORS | smb.SMB.CAP_NT_SMBS
+
+ # Let's see if we need to support RPC_REMOTE_APIS
+ config = smbServer.getServerConfig()
+ if config.has_option('global','rpc_apis'):
+ if config.getboolean('global', 'rpc_apis') is True:
+ _dialects_parameters['Capabilities'] |= smb.SMB.CAP_RPC_REMOTE_APIS
+
+ _dialects_parameters['DialectIndex'] = index
+ _dialects_parameters['SecurityMode'] = smb.SMB.SECURITY_AUTH_ENCRYPTED | smb.SMB.SECURITY_SHARE_USER
+ _dialects_parameters['MaxMpxCount'] = 1
+ _dialects_parameters['MaxNumberVcs'] = 1
+ _dialects_parameters['MaxBufferSize'] = 64000
+ _dialects_parameters['MaxRawSize'] = 65536
+ _dialects_parameters['SessionKey'] = 0
+ _dialects_parameters['LowDateTime'] = 0
+ _dialects_parameters['HighDateTime'] = 0
+ _dialects_parameters['ServerTimeZone'] = 0
+
+
+ respSMBCommand['Data'] = _dialects_data
+ respSMBCommand['Parameters'] = _dialects_parameters
+ connData['_dialects_data'] = _dialects_data
+ connData['_dialects_parameters'] = _dialects_parameters
+
+ except Exception, e:
+ # No NTLM throw an error
+ smbServer.log('smbComNegotiate: %s' % e, logging.ERROR)
+ respSMBCommand['Data'] = struct.pack('<H',0xffff)
+
+
+ smbServer.setConnectionData(connId, connData)
+
+ resp.addCommand(respSMBCommand)
+
+ return None, [resp], STATUS_SUCCESS
+
+ @staticmethod
+ def default(connId, smbServer, SMBCommand, recvPacket):
+ # By default we return an SMB Packet with error not implemented
+ smbServer.log("Not implemented command: 0x%x" % recvPacket['Command'],logging.DEBUG)
+ packet = smb.NewSMBPacket()
+ packet['Flags1'] = smb.SMB.FLAGS1_REPLY
+ packet['Flags2'] = smb.SMB.FLAGS2_NT_STATUS
+ packet['Command'] = recvPacket['Command']
+ packet['Pid'] = recvPacket['Pid']
+ packet['Tid'] = recvPacket['Tid']
+ packet['Mid'] = recvPacket['Mid']
+ packet['Uid'] = recvPacket['Uid']
+ packet['Data'] = '\x00\x00\x00'
+ errorCode = STATUS_NOT_IMPLEMENTED
+ packet['ErrorCode'] = errorCode >> 16
+ packet['ErrorClass'] = errorCode & 0xff
+
+ return None, [packet], errorCode
+
+class SMB2Commands:
+ @staticmethod
+ def smb2Negotiate(connId, smbServer, recvPacket, isSMB1 = False):
+ connData = smbServer.getConnectionData(connId, checkStatus = False)
+
+ respPacket = smb2.SMB2Packet()
+ respPacket['Flags'] = smb2.SMB2_FLAGS_SERVER_TO_REDIR
+ respPacket['Status'] = STATUS_SUCCESS
+ respPacket['CreditRequestResponse'] = 1
+ respPacket['Command'] = smb2.SMB2_NEGOTIATE
+ respPacket['SessionID'] = 0
+ if isSMB1 is False:
+ respPacket['MessageID'] = recvPacket['MessageID']
+ else:
+ respPacket['MessageID'] = 0
+ respPacket['TreeID'] = 0
+
+
+ respSMBCommand = smb2.SMB2Negotiate_Response()
+
+ respSMBCommand['SecurityMode'] = 1
+ if isSMB1 is True:
+ # Let's first parse the packet to see if the client supports SMB2
+ SMBCommand = smb.SMBCommand(recvPacket['Data'][0])
+
+ dialects = SMBCommand['Data'].split('\x02')
+ if 'SMB 2.002\x00' in dialects or 'SMB 2.???\x00' in dialects:
+ respSMBCommand['DialectRevision'] = smb2.SMB2_DIALECT_002
+ else:
+ # Client does not support SMB2 fallbacking
+ raise Exception('SMB2 not supported, fallbacking')
+ else:
+ respSMBCommand['DialectRevision'] = smb2.SMB2_DIALECT_002
+ respSMBCommand['ServerGuid'] = 'A'*16
+ respSMBCommand['Capabilities'] = 0
+ respSMBCommand['MaxTransactSize'] = 65536
+ respSMBCommand['MaxReadSize'] = 65536
+ respSMBCommand['MaxWriteSize'] = 65536
+ respSMBCommand['SystemTime'] = getFileTime(calendar.timegm(time.gmtime()))
+ respSMBCommand['ServerStartTime'] = getFileTime(calendar.timegm(time.gmtime()))
+ respSMBCommand['SecurityBufferOffset'] = 0x80
+
+ blob = SPNEGO_NegTokenInit()
+ blob['MechTypes'] = [TypesMech['NTLMSSP - Microsoft NTLM Security Support Provider']]
+
+ respSMBCommand['Buffer'] = blob.getData()
+ respSMBCommand['SecurityBufferLength'] = len(respSMBCommand['Buffer'])
+
+ respPacket['Data'] = respSMBCommand
+
+ smbServer.setConnectionData(connId, connData)
+
+ return None, [respPacket], STATUS_SUCCESS
+
+ @staticmethod
+ def smb2SessionSetup(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId, checkStatus = False)
+
+ respSMBCommand = smb2.SMB2SessionSetup_Response()
+
+ sessionSetupData = smb2.SMB2SessionSetup(recvPacket['Data'])
+
+ connData['Capabilities'] = sessionSetupData['Capabilities']
+
+ securityBlob = sessionSetupData['Buffer']
+
+ rawNTLM = False
+ if struct.unpack('B',securityBlob[0])[0] == ASN1_AID:
+ # NEGOTIATE packet
+ blob = SPNEGO_NegTokenInit(securityBlob)
+ token = blob['MechToken']
+ if len(blob['MechTypes'][0]) > 0:
+ # Is this GSSAPI NTLM or something else we don't support?
+ mechType = blob['MechTypes'][0]
+ if mechType != TypesMech['NTLMSSP - Microsoft NTLM Security Support Provider']:
+ # Nope, do we know it?
+ if MechTypes.has_key(mechType):
+ mechStr = MechTypes[mechType]
+ else:
+ mechStr = hexlify(mechType)
+ smbServer.log("Unsupported MechType '%s'" % mechStr, logging.CRITICAL)
+ # We don't know the token, we answer back again saying
+ # we just support NTLM.
+ # ToDo: Build this into a SPNEGO_NegTokenResp()
+ respToken = '\xa1\x15\x30\x13\xa0\x03\x0a\x01\x03\xa1\x0c\x06\x0a\x2b\x06\x01\x04\x01\x82\x37\x02\x02\x0a'
+ respSMBCommand['SecurityBufferOffset'] = 0x48
+ respSMBCommand['SecurityBufferLength'] = len(respToken)
+ respSMBCommand['Buffer'] = respToken
+
+ return [respSMBCommand], None, STATUS_MORE_PROCESSING_REQUIRED
+ elif struct.unpack('B',securityBlob[0])[0] == ASN1_SUPPORTED_MECH:
+ # AUTH packet
+ blob = SPNEGO_NegTokenResp(securityBlob)
+ token = blob['ResponseToken']
+ else:
+ # No GSSAPI stuff, raw NTLMSSP
+ rawNTLM = True
+ token = securityBlob
+
+ # Here we only handle NTLMSSP, depending on what stage of the
+ # authentication we are, we act on it
+ messageType = struct.unpack('<L',token[len('NTLMSSP\x00'):len('NTLMSSP\x00')+4])[0]
+
+ if messageType == 0x01:
+ # NEGOTIATE_MESSAGE
+ negotiateMessage = ntlm.NTLMAuthNegotiate()
+ negotiateMessage.fromString(token)
+ # Let's store it in the connection data
+ connData['NEGOTIATE_MESSAGE'] = negotiateMessage
+ # Let's build the answer flags
+ # TODO: Parse all the flags. With this we're leaving some clients out
+
+ ansFlags = 0
+
+ if negotiateMessage['flags'] & ntlm.NTLMSSP_NEGOTIATE_56:
+ ansFlags |= ntlm.NTLMSSP_NEGOTIATE_56
+ if negotiateMessage['flags'] & ntlm.NTLMSSP_NEGOTIATE_128:
+ ansFlags |= ntlm.NTLMSSP_NEGOTIATE_128
+ if negotiateMessage['flags'] & ntlm.NTLMSSP_NEGOTIATE_KEY_EXCH:
+ ansFlags |= ntlm.NTLMSSP_NEGOTIATE_KEY_EXCH
+ if negotiateMessage['flags'] & ntlm.NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY:
+ ansFlags |= ntlm.NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
+ if negotiateMessage['flags'] & ntlm.NTLMSSP_NEGOTIATE_UNICODE:
+ ansFlags |= ntlm.NTLMSSP_NEGOTIATE_UNICODE
+ if negotiateMessage['flags'] & ntlm.NTLM_NEGOTIATE_OEM:
+ ansFlags |= ntlm.NTLM_NEGOTIATE_OEM
+
+ ansFlags |= ntlm.NTLMSSP_NEGOTIATE_VERSION | ntlm.NTLMSSP_NEGOTIATE_TARGET_INFO | ntlm.NTLMSSP_TARGET_TYPE_SERVER | ntlm.NTLMSSP_NEGOTIATE_NTLM | ntlm.NTLMSSP_REQUEST_TARGET
+
+ # Generate the AV_PAIRS
+ av_pairs = ntlm.AV_PAIRS()
+ # TODO: Put the proper data from SMBSERVER config
+ av_pairs[ntlm.NTLMSSP_AV_HOSTNAME] = av_pairs[ntlm.NTLMSSP_AV_DNS_HOSTNAME] = smbServer.getServerName().encode('utf-16le')
+ av_pairs[ntlm.NTLMSSP_AV_DOMAINNAME] = av_pairs[ntlm.NTLMSSP_AV_DNS_DOMAINNAME] = smbServer.getServerDomain().encode('utf-16le')
+ av_pairs[ntlm.NTLMSSP_AV_TIME] = struct.pack('<q', (116444736000000000 + calendar.timegm(time.gmtime()) * 10000000) )
+
+ challengeMessage = ntlm.NTLMAuthChallenge()
+ challengeMessage['flags'] = ansFlags
+ challengeMessage['domain_len'] = len(smbServer.getServerDomain().encode('utf-16le'))
+ challengeMessage['domain_max_len'] = challengeMessage['domain_len']
+ challengeMessage['domain_offset'] = 40 + 16
+ challengeMessage['challenge'] = smbServer.getSMBChallenge()
+ challengeMessage['domain_name'] = smbServer.getServerDomain().encode('utf-16le')
+ challengeMessage['TargetInfoFields_len'] = len(av_pairs)
+ challengeMessage['TargetInfoFields_max_len'] = len(av_pairs)
+ challengeMessage['TargetInfoFields'] = av_pairs
+ challengeMessage['TargetInfoFields_offset'] = 40 + 16 + len(challengeMessage['domain_name'])
+ challengeMessage['Version'] = '\xff'*8
+ challengeMessage['VersionLen'] = 8
+
+ if rawNTLM is False:
+ respToken = SPNEGO_NegTokenResp()
+ # accept-incomplete. We want more data
+ respToken['NegResult'] = '\x01'
+ respToken['SupportedMech'] = TypesMech['NTLMSSP - Microsoft NTLM Security Support Provider']
+
+ respToken['ResponseToken'] = challengeMessage.getData()
+ else:
+ respToken = challengeMessage
+
+ # Setting the packet to STATUS_MORE_PROCESSING
+ errorCode = STATUS_MORE_PROCESSING_REQUIRED
+ # Let's set up an UID for this connection and store it
+ # in the connection's data
+ # Picking a fixed value
+ # TODO: Manage more UIDs for the same session
+ connData['Uid'] = random.randint(1,0xffffffff)
+ # Let's store it in the connection data
+ connData['CHALLENGE_MESSAGE'] = challengeMessage
+
+ elif messageType == 0x02:
+ # CHALLENGE_MESSAGE
+ raise Exception('Challenge Message raise, not implemented!')
+ elif messageType == 0x03:
+ # AUTHENTICATE_MESSAGE, here we deal with authentication
+ authenticateMessage = ntlm.NTLMAuthChallengeResponse()
+ authenticateMessage.fromString(token)
+ smbServer.log("AUTHENTICATE_MESSAGE (%s\\%s,%s)" % (authenticateMessage['domain_name'], authenticateMessage['user_name'], authenticateMessage['host_name']))
+ # TODO: Check the credentials! Now granting permissions
+
+ respToken = SPNEGO_NegTokenResp()
+ # accept-completed
+ respToken['NegResult'] = '\x00'
+
+ # Status SUCCESS
+ errorCode = STATUS_SUCCESS
+ smbServer.log('User %s\\%s authenticated successfully' % (authenticateMessage['user_name'], authenticateMessage['host_name']))
+ # Let's store it in the connection data
+ connData['AUTHENTICATE_MESSAGE'] = authenticateMessage
+ try:
+ jtr_dump_path = smbServer.getJTRdumpPath()
+ ntlm_hash_data = outputToJohnFormat( connData['CHALLENGE_MESSAGE']['challenge'], authenticateMessage['user_name'], authenticateMessage['domain_name'], authenticateMessage['lanman'], authenticateMessage['ntlm'] )
+ smbServer.log(ntlm_hash_data['hash_string'])
+ if jtr_dump_path is not '':
+ writeJohnOutputToFile(ntlm_hash_data['hash_string'], ntlm_hash_data['hash_version'], jtr_dump_path)
+ except:
+ smbServer.log("Could not write NTLM Hashes to the specified JTR_Dump_Path %s" % jtr_dump_path)
+ respSMBCommand['SessionFlags'] = 1
+ else:
+ raise Exception("Unknown NTLMSSP MessageType %d" % messageType)
+
+ respSMBCommand['SecurityBufferOffset'] = 0x48
+ respSMBCommand['SecurityBufferLength'] = len(respToken)
+ respSMBCommand['Buffer'] = respToken.getData()
+
+ # From now on, the client can ask for other commands
+ connData['Authenticated'] = True
+ # For now, just switching to nobody
+ #os.setregid(65534,65534)
+ #os.setreuid(65534,65534)
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smb2TreeConnect(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respPacket = smb2.SMB2Packet()
+ respPacket['Flags'] = smb2.SMB2_FLAGS_SERVER_TO_REDIR
+ respPacket['Status'] = STATUS_SUCCESS
+ respPacket['CreditRequestResponse'] = 1
+ respPacket['Command'] = recvPacket['Command']
+ respPacket['SessionID'] = connData['Uid']
+ respPacket['Reserved'] = recvPacket['Reserved']
+ respPacket['MessageID'] = recvPacket['MessageID']
+ respPacket['TreeID'] = recvPacket['TreeID']
+
+ respSMBCommand = smb2.SMB2TreeConnect_Response()
+
+ treeConnectRequest = smb2.SMB2TreeConnect(recvPacket['Data'])
+
+ errorCode = STATUS_SUCCESS
+
+ ## Process here the request, does the share exist?
+ path = str(recvPacket)[treeConnectRequest['PathOffset']:][:treeConnectRequest['PathLength']]
+ UNCOrShare = path.decode('utf-16le')
+
+ # Is this a UNC?
+ if ntpath.ismount(UNCOrShare):
+ path = UNCOrShare.split('\\')[3]
+ else:
+ path = ntpath.basename(UNCOrShare)
+
+ share = searchShare(connId, path.upper(), smbServer)
+ if share is not None:
+ # Simple way to generate a Tid
+ if len(connData['ConnectedShares']) == 0:
+ tid = 1
+ else:
+ tid = connData['ConnectedShares'].keys()[-1] + 1
+ connData['ConnectedShares'][tid] = share
+ connData['ConnectedShares'][tid]['shareName'] = path
+ respPacket['TreeID'] = tid
+ smbServer.log("Connecting Share(%d:%s)" % (tid,path))
+ else:
+ smbServer.log("SMB2_TREE_CONNECT not found %s" % path, logging.ERROR)
+ errorCode = STATUS_OBJECT_PATH_NOT_FOUND
+ respPacket['Status'] = errorCode
+ ##
+
+ if path == 'IPC$':
+ respSMBCommand['ShareType'] = smb2.SMB2_SHARE_TYPE_PIPE
+ respSMBCommand['ShareFlags'] = 0x30
+ else:
+ respSMBCommand['ShareType'] = smb2.SMB2_SHARE_TYPE_DISK
+ respSMBCommand['ShareFlags'] = 0x0
+
+ respSMBCommand['Capabilities'] = 0
+ respSMBCommand['MaximalAccess'] = 0x000f01ff
+
+ respPacket['Data'] = respSMBCommand
+
+ smbServer.setConnectionData(connId, connData)
+
+ return None, [respPacket], errorCode
+
+ @staticmethod
+ def smb2Create(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb2.SMB2Create_Response()
+
+ ntCreateRequest = smb2.SMB2Create(recvPacket['Data'])
+
+ respSMBCommand['Buffer'] = '\x00'
+ # Get the Tid associated
+ if connData['ConnectedShares'].has_key(recvPacket['TreeID']):
+ # If we have a rootFid, the path is relative to that fid
+ errorCode = STATUS_SUCCESS
+ if connData['ConnectedShares'][recvPacket['TreeID']].has_key('path'):
+ path = connData['ConnectedShares'][recvPacket['TreeID']]['path']
+ else:
+ path = 'NONE'
+ errorCode = STATUS_ACCESS_DENIED
+
+ deleteOnClose = False
+
+ fileName = os.path.normpath(ntCreateRequest['Buffer'][:ntCreateRequest['NameLength']].decode('utf-16le').replace('\\','/'))
+ if len(fileName) > 0 and (fileName[0] == '/' or fileName[0] == '\\'):
+ # strip leading '/'
+ fileName = fileName[1:]
+ pathName = os.path.join(path,fileName)
+ createDisposition = ntCreateRequest['CreateDisposition']
+ mode = 0
+
+ if createDisposition == smb2.FILE_SUPERSEDE:
+ mode |= os.O_TRUNC | os.O_CREAT
+ elif createDisposition & smb2.FILE_OVERWRITE_IF == smb2.FILE_OVERWRITE_IF:
+ mode |= os.O_TRUNC | os.O_CREAT
+ elif createDisposition & smb2.FILE_OVERWRITE == smb2.FILE_OVERWRITE:
+ if os.path.exists(pathName) is True:
+ mode |= os.O_TRUNC
+ else:
+ errorCode = STATUS_NO_SUCH_FILE
+ elif createDisposition & smb2.FILE_OPEN_IF == smb2.FILE_OPEN_IF:
+ if os.path.exists(pathName) is True:
+ mode |= os.O_TRUNC
+ else:
+ mode |= os.O_TRUNC | os.O_CREAT
+ elif createDisposition & smb2.FILE_CREATE == smb2.FILE_CREATE:
+ if os.path.exists(pathName) is True:
+ errorCode = STATUS_OBJECT_NAME_COLLISION
+ else:
+ mode |= os.O_CREAT
+ elif createDisposition & smb2.FILE_OPEN == smb2.FILE_OPEN:
+ if os.path.exists(pathName) is not True and smbServer.getRegisteredNamedPipes().has_key(unicode(pathName)) is not True:
+ errorCode = STATUS_NO_SUCH_FILE
+
+ if errorCode == STATUS_SUCCESS:
+ desiredAccess = ntCreateRequest['DesiredAccess']
+ if (desiredAccess & smb2.FILE_READ_DATA) or (desiredAccess & smb2.GENERIC_READ):
+ mode |= os.O_RDONLY
+ if (desiredAccess & smb2.FILE_WRITE_DATA) or (desiredAccess & smb2.GENERIC_WRITE):
+ if (desiredAccess & smb2.FILE_READ_DATA) or (desiredAccess & smb2.GENERIC_READ):
+ mode |= os.O_RDWR #| os.O_APPEND
+ else:
+ mode |= os.O_WRONLY #| os.O_APPEND
+ if desiredAccess & smb2.GENERIC_ALL:
+ mode |= os.O_RDWR #| os.O_APPEND
+
+ createOptions = ntCreateRequest['CreateOptions']
+ if mode & os.O_CREAT == os.O_CREAT:
+ if createOptions & smb2.FILE_DIRECTORY_FILE == smb2.FILE_DIRECTORY_FILE:
+ try:
+ # Let's create the directory
+ os.mkdir(pathName)
+ mode = os.O_RDONLY
+ except Exception, e:
+ smbServer.log("SMB2_CREATE: %s,%s,%s" % (pathName,mode,e),logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ if createOptions & smb2.FILE_NON_DIRECTORY_FILE == smb2.FILE_NON_DIRECTORY_FILE:
+ # If the file being opened is a directory, the server MUST fail the request with
+ # STATUS_FILE_IS_A_DIRECTORY in the Status field of the SMB Header in the server
+ # response.
+ if os.path.isdir(pathName) is True:
+ errorCode = STATUS_FILE_IS_A_DIRECTORY
+
+ if createOptions & smb2.FILE_DELETE_ON_CLOSE == smb2.FILE_DELETE_ON_CLOSE:
+ deleteOnClose = True
+
+ if errorCode == STATUS_SUCCESS:
+ try:
+ if os.path.isdir(pathName) and sys.platform == 'win32':
+ fid = VOID_FILE_DESCRIPTOR
+ else:
+ if sys.platform == 'win32':
+ mode |= os.O_BINARY
+ if smbServer.getRegisteredNamedPipes().has_key(unicode(pathName)):
+ fid = PIPE_FILE_DESCRIPTOR
+ sock = socket.socket()
+ sock.connect(smbServer.getRegisteredNamedPipes()[unicode(pathName)])
+ else:
+ fid = os.open(pathName, mode)
+ except Exception, e:
+ smbServer.log("SMB2_CREATE: %s,%s,%s" % (pathName,mode,e),logging.ERROR)
+ #print e
+ fid = 0
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+ if errorCode == STATUS_SUCCESS:
+ # Simple way to generate a fid
+ fakefid = uuid.generate()
+
+ respSMBCommand['FileID'] = fakefid
+ respSMBCommand['CreateAction'] = createDisposition
+
+ if fid == PIPE_FILE_DESCRIPTOR:
+ respSMBCommand['CreationTime'] = 0
+ respSMBCommand['LastAccessTime'] = 0
+ respSMBCommand['LastWriteTime'] = 0
+ respSMBCommand['ChangeTime'] = 0
+ respSMBCommand['AllocationSize'] = 4096
+ respSMBCommand['EndOfFile'] = 0
+ respSMBCommand['FileAttributes'] = 0x80
+
+ else:
+ if os.path.isdir(pathName):
+ respSMBCommand['FileAttributes'] = smb.SMB_FILE_ATTRIBUTE_DIRECTORY
+ else:
+ respSMBCommand['FileAttributes'] = ntCreateRequest['FileAttributes']
+ # Let's get this file's information
+ respInfo, errorCode = queryPathInformation('',pathName,level= smb.SMB_QUERY_FILE_ALL_INFO)
+ if errorCode == STATUS_SUCCESS:
+ respSMBCommand['CreationTime'] = respInfo['CreationTime']
+ respSMBCommand['LastAccessTime'] = respInfo['LastAccessTime']
+ respSMBCommand['LastWriteTime'] = respInfo['LastWriteTime']
+ respSMBCommand['LastChangeTime'] = respInfo['LastChangeTime']
+ respSMBCommand['FileAttributes'] = respInfo['ExtFileAttributes']
+ respSMBCommand['AllocationSize'] = respInfo['AllocationSize']
+ respSMBCommand['EndOfFile'] = respInfo['EndOfFile']
+
+ if errorCode == STATUS_SUCCESS:
+ # Let's store the fid for the connection
+ # smbServer.log('Create file %s, mode:0x%x' % (pathName, mode))
+ connData['OpenedFiles'][fakefid] = {}
+ connData['OpenedFiles'][fakefid]['FileHandle'] = fid
+ connData['OpenedFiles'][fakefid]['FileName'] = pathName
+ connData['OpenedFiles'][fakefid]['DeleteOnClose'] = deleteOnClose
+ connData['OpenedFiles'][fakefid]['Open'] = {}
+ connData['OpenedFiles'][fakefid]['Open']['EnumerationLocation'] = 0
+ connData['OpenedFiles'][fakefid]['Open']['EnumerationSearchPattern'] = ''
+ if fid == PIPE_FILE_DESCRIPTOR:
+ connData['OpenedFiles'][fakefid]['Socket'] = sock
+ else:
+ respSMBCommand = smb2.SMB2Error()
+
+ if errorCode == STATUS_SUCCESS:
+ connData['LastRequest']['SMB2_CREATE'] = respSMBCommand
+ smbServer.setConnectionData(connId, connData)
+
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smb2Close(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb2.SMB2Close_Response()
+
+ closeRequest = smb2.SMB2Close(recvPacket['Data'])
+
+ if str(closeRequest['FileID']) == '\xff'*16:
+ # Let's take the data from the lastRequest
+ if connData['LastRequest'].has_key('SMB2_CREATE'):
+ fileID = connData['LastRequest']['SMB2_CREATE']['FileID']
+ else:
+ fileID = str(closeRequest['FileID'])
+ else:
+ fileID = str(closeRequest['FileID'])
+
+ if connData['OpenedFiles'].has_key(fileID):
+ errorCode = STATUS_SUCCESS
+ fileHandle = connData['OpenedFiles'][fileID]['FileHandle']
+ pathName = connData['OpenedFiles'][fileID]['FileName']
+ infoRecord = None
+ try:
+ if fileHandle == PIPE_FILE_DESCRIPTOR:
+ connData['OpenedFiles'][fileID]['Socket'].close()
+ elif fileHandle != VOID_FILE_DESCRIPTOR:
+ os.close(fileHandle)
+ infoRecord, errorCode = queryFileInformation(os.path.dirname(pathName), os.path.basename(pathName), smb2.SMB2_FILE_NETWORK_OPEN_INFO)
+ except Exception, e:
+ smbServer.log("SMB2_CLOSE %s" % e, logging.ERROR)
+ errorCode = STATUS_INVALID_HANDLE
+ else:
+ # Check if the file was marked for removal
+ if connData['OpenedFiles'][fileID]['DeleteOnClose'] is True:
+ try:
+ if os.path.isdir(pathName):
+ shutil.rmtree(connData['OpenedFiles'][fileID]['FileName'])
+ else:
+ os.remove(connData['OpenedFiles'][fileID]['FileName'])
+ except Exception, e:
+ smbServer.log("SMB2_CLOSE %s" % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+
+ # Now fill out the response
+ if infoRecord is not None:
+ respSMBCommand['CreationTime'] = infoRecord['CreationTime']
+ respSMBCommand['LastAccessTime'] = infoRecord['LastAccessTime']
+ respSMBCommand['LastWriteTime'] = infoRecord['LastWriteTime']
+ respSMBCommand['ChangeTime'] = infoRecord['ChangeTime']
+ respSMBCommand['AllocationSize'] = infoRecord['AllocationSize']
+ respSMBCommand['EndofFile'] = infoRecord['EndOfFile']
+ respSMBCommand['FileAttributes'] = infoRecord['FileAttributes']
+ if errorCode == STATUS_SUCCESS:
+ del(connData['OpenedFiles'][fileID])
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smb2QueryInfo(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb2.SMB2QueryInfo_Response()
+
+ queryInfo = smb2.SMB2QueryInfo(recvPacket['Data'])
+
+ errorCode = STATUS_SUCCESS
+
+ respSMBCommand['OutputBufferOffset'] = 0x48
+ respSMBCommand['Buffer'] = '\x00'
+
+ if str(queryInfo['FileID']) == '\xff'*16:
+ # Let's take the data from the lastRequest
+ if connData['LastRequest'].has_key('SMB2_CREATE'):
+ fileID = connData['LastRequest']['SMB2_CREATE']['FileID']
+ else:
+ fileID = str(queryInfo['FileID'])
+ else:
+ fileID = str(queryInfo['FileID'])
+
+ if connData['ConnectedShares'].has_key(recvPacket['TreeID']):
+ if connData['OpenedFiles'].has_key(fileID):
+ fileName = connData['OpenedFiles'][fileID]['FileName']
+
+ if queryInfo['InfoType'] == smb2.SMB2_0_INFO_FILE:
+ if queryInfo['FileInfoClass'] == smb2.SMB2_FILE_INTERNAL_INFO:
+ # No need to call queryFileInformation, we have the data here
+ infoRecord = smb2.FileInternalInformation()
+ infoRecord['IndexNumber'] = fileID
+ else:
+ infoRecord, errorCode = queryFileInformation(os.path.dirname(fileName), os.path.basename(fileName), queryInfo['FileInfoClass'])
+ elif queryInfo['InfoType'] == smb2.SMB2_0_INFO_FILESYSTEM:
+ infoRecord = queryFsInformation(os.path.dirname(fileName), os.path.basename(fileName), queryInfo['FileInfoClass'])
+ elif queryInfo['InfoType'] == smb2.SMB2_0_INFO_SECURITY:
+ # Failing for now, until we support it
+ infoRecord = None
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ smbServer.log("queryInfo not supported (%x)" % queryInfo['InfoType'], logging.ERROR)
+
+ if infoRecord is not None:
+ respSMBCommand['OutputBufferLength'] = len(infoRecord)
+ respSMBCommand['Buffer'] = infoRecord
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smb2SetInfo(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb2.SMB2SetInfo_Response()
+
+ setInfo = smb2.SMB2SetInfo(recvPacket['Data'])
+
+ errorCode = STATUS_SUCCESS
+
+ if str(setInfo['FileID']) == '\xff'*16:
+ # Let's take the data from the lastRequest
+ if connData['LastRequest'].has_key('SMB2_CREATE'):
+ fileID = connData['LastRequest']['SMB2_CREATE']['FileID']
+ else:
+ fileID = str(setInfo['FileID'])
+ else:
+ fileID = str(setInfo['FileID'])
+
+ if connData['ConnectedShares'].has_key(recvPacket['TreeID']):
+ path = connData['ConnectedShares'][recvPacket['TreeID']]['path']
+ if connData['OpenedFiles'].has_key(fileID):
+ pathName = connData['OpenedFiles'][fileID]['FileName']
+
+ if setInfo['InfoType'] == smb2.SMB2_0_INFO_FILE:
+ # The file information is being set
+ informationLevel = setInfo['FileInfoClass']
+ if informationLevel == smb2.SMB2_FILE_DISPOSITION_INFO:
+ infoRecord = smb.SMBSetFileDispositionInfo(setInfo['Buffer'])
+ if infoRecord['DeletePending'] > 0:
+ # Mark this file for removal after closed
+ connData['OpenedFiles'][fileID]['DeleteOnClose'] = True
+ elif informationLevel == smb2.SMB2_FILE_BASIC_INFO:
+ infoRecord = smb.SMBSetFileBasicInfo(setInfo['Buffer'])
+ # Creation time won't be set, the other ones we play with.
+ atime = infoRecord['LastWriteTime']
+ if atime == 0:
+ atime = -1
+ else:
+ atime = getUnixTime(atime)
+ mtime = infoRecord['ChangeTime']
+ if mtime == 0:
+ mtime = -1
+ else:
+ mtime = getUnixTime(mtime)
+ if atime > 0 and mtime > 0:
+ os.utime(pathName,(atime,mtime))
+ elif informationLevel == smb2.SMB2_FILE_END_OF_FILE_INFO:
+ fileHandle = connData['OpenedFiles'][fileID]['FileHandle']
+ infoRecord = smb.SMBSetFileEndOfFileInfo(setInfo['Buffer'])
+ if infoRecord['EndOfFile'] > 0:
+ os.lseek(fileHandle, infoRecord['EndOfFile']-1, 0)
+ os.write(fileHandle, '\x00')
+ elif informationLevel == smb2.SMB2_FILE_RENAME_INFO:
+ renameInfo = smb2.FILE_RENAME_INFORMATION_TYPE_2(setInfo['Buffer'])
+ newPathName = os.path.join(path,renameInfo['FileName'].decode('utf-16le').replace('\\', '/'))
+ if renameInfo['ReplaceIfExists'] == 0 and os.path.exists(newPathName):
+ return [smb2.SMB2Error()], None, STATUS_OBJECT_NAME_COLLISION
+ try:
+ os.rename(pathName,newPathName)
+ connData['OpenedFiles'][fileID]['FileName'] = newPathName
+ except Exception, e:
+ smbServer.log("smb2SetInfo: %s" % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ smbServer.log('Unknown level for set file info! 0x%x' % informationLevel, logging.ERROR)
+ # UNSUPPORTED
+ errorCode = STATUS_NOT_SUPPORTED
+ #elif setInfo['InfoType'] == smb2.SMB2_0_INFO_FILESYSTEM:
+ # # The underlying object store information is being set.
+ # setInfo = queryFsInformation('/', fileName, queryInfo['FileInfoClass'])
+ #elif setInfo['InfoType'] == smb2.SMB2_0_INFO_SECURITY:
+ # # The security information is being set.
+ # # Failing for now, until we support it
+ # infoRecord = None
+ # errorCode = STATUS_ACCESS_DENIED
+ #elif setInfo['InfoType'] == smb2.SMB2_0_INFO_QUOTA:
+ # # The underlying object store quota information is being set.
+ # setInfo = queryFsInformation('/', fileName, queryInfo['FileInfoClass'])
+ else:
+ smbServer.log("setInfo not supported (%x)" % setInfo['InfoType'], logging.ERROR)
+
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+ else:
+ errorCode = STATUS_SMB_BAD_TID
+
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smb2Write(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb2.SMB2Write_Response()
+ writeRequest = smb2.SMB2Write(recvPacket['Data'])
+
+ respSMBCommand['Buffer'] = '\x00'
+
+ if str(writeRequest['FileID']) == '\xff'*16:
+ # Let's take the data from the lastRequest
+ if connData['LastRequest'].has_key('SMB2_CREATE'):
+ fileID = connData['LastRequest']['SMB2_CREATE']['FileID']
+ else:
+ fileID = str(writeRequest['FileID'])
+ else:
+ fileID = str(writeRequest['FileID'])
+
+ if connData['OpenedFiles'].has_key(fileID):
+ fileHandle = connData['OpenedFiles'][fileID]['FileHandle']
+ errorCode = STATUS_SUCCESS
+ try:
+ if fileHandle != PIPE_FILE_DESCRIPTOR:
+ offset = writeRequest['Offset']
+ # If we're trying to write past the file end we just skip the write call (Vista does this)
+ if os.lseek(fileHandle, 0, 2) >= offset:
+ os.lseek(fileHandle,offset,0)
+ os.write(fileHandle,writeRequest['Buffer'])
+ else:
+ sock = connData['OpenedFiles'][fileID]['Socket']
+ sock.send(writeRequest['Buffer'])
+
+ respSMBCommand['Count'] = writeRequest['Length']
+ respSMBCommand['Remaining']= 0xff
+ except Exception, e:
+ smbServer.log('SMB2_WRITE: %s' % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smb2Read(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb2.SMB2Read_Response()
+ readRequest = smb2.SMB2Read(recvPacket['Data'])
+
+ respSMBCommand['Buffer'] = '\x00'
+
+ if str(readRequest['FileID']) == '\xff'*16:
+ # Let's take the data from the lastRequest
+ if connData['LastRequest'].has_key('SMB2_CREATE'):
+ fileID = connData['LastRequest']['SMB2_CREATE']['FileID']
+ else:
+ fileID = str(readRequest['FileID'])
+ else:
+ fileID = str(readRequest['FileID'])
+
+ if connData['OpenedFiles'].has_key(fileID):
+ fileHandle = connData['OpenedFiles'][fileID]['FileHandle']
+ errorCode = 0
+ try:
+ if fileHandle != PIPE_FILE_DESCRIPTOR:
+ offset = readRequest['Offset']
+ os.lseek(fileHandle,offset,0)
+ content = os.read(fileHandle,readRequest['Length'])
+ else:
+ sock = connData['OpenedFiles'][fileID]['Socket']
+ content = sock.recv(readRequest['Length'])
+
+ respSMBCommand['DataOffset'] = 0x50
+ respSMBCommand['DataLength'] = len(content)
+ respSMBCommand['DataRemaining']= 0
+ respSMBCommand['Buffer'] = content
+ except Exception, e:
+ smbServer.log('SMB2_READ: %s ' % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smb2Flush(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb2.SMB2Flush_Response()
+ flushRequest = smb2.SMB2Flush(recvPacket['Data'])
+
+ if connData['OpenedFiles'].has_key(str(flushRequest['FileID'])):
+ fileHandle = connData['OpenedFiles'][str(flushRequest['FileID'])]['FileHandle']
+ errorCode = STATUS_SUCCESS
+ try:
+ os.fsync(fileHandle)
+ except Exception, e:
+ smbServer.log("SMB2_FLUSH %s" % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_INVALID_HANDLE
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+
+ @staticmethod
+ def smb2QueryDirectory(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+ respSMBCommand = smb2.SMB2QueryDirectory_Response()
+ queryDirectoryRequest = smb2.SMB2QueryDirectory(recvPacket['Data'])
+
+ respSMBCommand['Buffer'] = '\x00'
+
+ # The server MUST locate the tree connection, as specified in section 3.3.5.2.11.
+ if connData['ConnectedShares'].has_key(recvPacket['TreeID']) is False:
+ return [smb2.SMB2Error()], None, STATUS_NETWORK_NAME_DELETED
+
+ # Next, the server MUST locate the open for the directory to be queried
+ # If no open is found, the server MUST fail the request with STATUS_FILE_CLOSED
+ if str(queryDirectoryRequest['FileID']) == '\xff'*16:
+ # Let's take the data from the lastRequest
+ if connData['LastRequest'].has_key('SMB2_CREATE'):
+ fileID = connData['LastRequest']['SMB2_CREATE']['FileID']
+ else:
+ fileID = str(queryDirectoryRequest['FileID'])
+ else:
+ fileID = str(queryDirectoryRequest['FileID'])
+
+ if connData['OpenedFiles'].has_key(fileID) is False:
+ return [smb2.SMB2Error()], None, STATUS_FILE_CLOSED
+
+ # If the open is not an open to a directory, the request MUST be failed
+ # with STATUS_INVALID_PARAMETER.
+ if os.path.isdir(connData['OpenedFiles'][fileID]['FileName']) is False:
+ return [smb2.SMB2Error()], None, STATUS_INVALID_PARAMETER
+
+ # If any other information class is specified in the FileInformationClass
+ # field of the SMB2 QUERY_DIRECTORY Request, the server MUST fail the
+ # operation with STATUS_INVALID_INFO_CLASS.
+ if queryDirectoryRequest['FileInformationClass'] not in (
+ smb2.FILE_DIRECTORY_INFORMATION, smb2.FILE_FULL_DIRECTORY_INFORMATION, smb2.FILEID_FULL_DIRECTORY_INFORMATION,
+ smb2.FILE_BOTH_DIRECTORY_INFORMATION, smb2.FILEID_BOTH_DIRECTORY_INFORMATION, smb2.FILENAMES_INFORMATION):
+ return [smb2.SMB2Error()], None, STATUS_INVALID_INFO_CLASS
+
+ # If SMB2_REOPEN is set in the Flags field of the SMB2 QUERY_DIRECTORY
+ # Request, the server SHOULD<326> set Open.EnumerationLocation to 0
+ # and Open.EnumerationSearchPattern to an empty string.
+ if queryDirectoryRequest['Flags'] & smb2.SMB2_REOPEN:
+ connData['OpenedFiles'][fileID]['Open']['EnumerationLocation'] = 0
+ connData['OpenedFiles'][fileID]['Open']['EnumerationSearchPattern'] = ''
+
+ # If SMB2_RESTART_SCANS is set in the Flags field of the SMB2
+ # QUERY_DIRECTORY Request, the server MUST set
+ # Open.EnumerationLocation to 0.
+ if queryDirectoryRequest['Flags'] & smb2.SMB2_RESTART_SCANS:
+ connData['OpenedFiles'][fileID]['Open']['EnumerationLocation'] = 0
+
+ # If Open.EnumerationLocation is 0 and Open.EnumerationSearchPattern
+ # is an empty string, then Open.EnumerationSearchPattern MUST be set
+ # to the search pattern specified in the SMB2 QUERY_DIRECTORY by
+ # FileNameOffset and FileNameLength. If FileNameLength is 0, the server
+ # SHOULD<327> set Open.EnumerationSearchPattern as "*" to search all entries.
+
+ pattern = queryDirectoryRequest['Buffer'].decode('utf-16le')
+ if connData['OpenedFiles'][fileID]['Open']['EnumerationLocation'] == 0 and \
+ connData['OpenedFiles'][fileID]['Open']['EnumerationSearchPattern'] == '':
+ if pattern == '':
+ pattern = '*'
+ connData['OpenedFiles'][fileID]['Open']['EnumerationSearchPattern'] = pattern
+
+ # If SMB2_INDEX_SPECIFIED is set and FileNameLength is not zero,
+ # the server MUST set Open.EnumerationSearchPattern to the search pattern
+ # specified in the request by FileNameOffset and FileNameLength.
+ if queryDirectoryRequest['Flags'] & smb2.SMB2_INDEX_SPECIFIED and \
+ queryDirectoryRequest['FileNameLength'] > 0:
+ connData['OpenedFiles'][fileID]['Open']['EnumerationSearchPattern'] = pattern
+
+ pathName = os.path.join(os.path.normpath(connData['OpenedFiles'][fileID]['FileName']),pattern)
+ searchResult, searchCount, errorCode = findFirst2(os.path.dirname(pathName),
+ os.path.basename(pathName),
+ queryDirectoryRequest['FileInformationClass'],
+ smb.ATTR_DIRECTORY, isSMB2 = True )
+
+ if errorCode != STATUS_SUCCESS:
+ return [smb2.SMB2Error()], None, errorCode
+
+ if searchCount > 2 and pattern == '*':
+ # strip . and ..
+ searchCount -= 2
+ searchResult = searchResult[2:]
+
+ if searchCount == 0 and connData['OpenedFiles'][fileID]['Open']['EnumerationLocation'] == 0:
+ return [smb2.SMB2Error()], None, STATUS_NO_SUCH_FILE
+
+ if connData['OpenedFiles'][fileID]['Open']['EnumerationLocation'] < 0:
+ return [smb2.SMB2Error()], None, STATUS_NO_MORE_FILES
+
+ totalData = 0
+ respData = ''
+ for nItem in range(connData['OpenedFiles'][fileID]['Open']['EnumerationLocation'], searchCount):
+ connData['OpenedFiles'][fileID]['Open']['EnumerationLocation'] += 1
+ if queryDirectoryRequest['Flags'] & smb2.SL_RETURN_SINGLE_ENTRY:
+ # If single entry is requested we must clear the NextEntryOffset
+ searchResult[nItem]['NextEntryOffset'] = 0
+ data = searchResult[nItem].getData()
+ lenData = len(data)
+ padLen = (8-(lenData % 8)) %8
+
+ if (totalData+lenData) >= queryDirectoryRequest['OutputBufferLength']:
+ connData['OpenedFiles'][fileID]['Open']['EnumerationLocation'] -= 1
+ break
+ else:
+ respData += data + '\x00'*padLen
+ totalData += lenData + padLen
+
+ if queryDirectoryRequest['Flags'] & smb2.SL_RETURN_SINGLE_ENTRY:
+ break
+
+ if connData['OpenedFiles'][fileID]['Open']['EnumerationLocation'] >= searchCount:
+ connData['OpenedFiles'][fileID]['Open']['EnumerationLocation'] = -1
+
+ respSMBCommand['OutputBufferOffset'] = 0x48
+ respSMBCommand['OutputBufferLength'] = totalData
+ respSMBCommand['Buffer'] = respData
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smb2ChangeNotify(connId, smbServer, recvPacket):
+
+ return [smb2.SMB2Error()], None, STATUS_NOT_SUPPORTED
+
+ @staticmethod
+ def smb2Echo(connId, smbServer, recvPacket):
+
+ respSMBCommand = smb2.SMB2Echo_Response()
+
+ return [respSMBCommand], None, STATUS_SUCCESS
+
+ @staticmethod
+ def smb2TreeDisconnect(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb2.SMB2TreeDisconnect_Response()
+
+ if connData['ConnectedShares'].has_key(recvPacket['TreeID']):
+ smbServer.log("Disconnecting Share(%d:%s)" % (recvPacket['TreeID'],connData['ConnectedShares'][recvPacket['TreeID']]['shareName']))
+ del(connData['ConnectedShares'][recvPacket['TreeID']])
+ errorCode = STATUS_SUCCESS
+ else:
+ # STATUS_SMB_BAD_TID
+ errorCode = STATUS_SMB_BAD_TID
+
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smb2Logoff(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb2.SMB2Logoff_Response()
+
+ if recvPacket['SessionID'] != connData['Uid']:
+ # STATUS_SMB_BAD_UID
+ errorCode = STATUS_SMB_BAD_UID
+ else:
+ errorCode = STATUS_SUCCESS
+
+ connData['Uid'] = 0
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smb2Ioctl(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb2.SMB2Ioctl_Response()
+ ioctlRequest = smb2.SMB2Ioctl(recvPacket['Data'])
+
+ ioctls = smbServer.getIoctls()
+ if ioctls.has_key(ioctlRequest['CtlCode']):
+ outputData, errorCode = ioctls[ioctlRequest['CtlCode']](connId, smbServer, ioctlRequest)
+ if errorCode == STATUS_SUCCESS:
+ respSMBCommand['CtlCode'] = ioctlRequest['CtlCode']
+ respSMBCommand['FileID'] = ioctlRequest['FileID']
+ respSMBCommand['InputOffset'] = 0
+ respSMBCommand['InputCount'] = 0
+ respSMBCommand['OutputOffset'] = 0x70
+ respSMBCommand['OutputCount'] = len(outputData)
+ respSMBCommand['Flags'] = 0
+ respSMBCommand['Buffer'] = outputData
+ else:
+ respSMBCommand = outputData
+ else:
+ smbServer.log("Ioctl not implemented command: 0x%x" % ioctlRequest['CtlCode'],logging.DEBUG)
+ errorCode = STATUS_INVALID_DEVICE_REQUEST
+ respSMBCommand = smb2.SMB2Error()
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smb2Lock(connId, smbServer, recvPacket):
+ connData = smbServer.getConnectionData(connId)
+
+ respSMBCommand = smb2.SMB2Lock_Response()
+
+ # I'm actually doing nothing.. just make MacOS happy ;)
+ errorCode = STATUS_SUCCESS
+
+ smbServer.setConnectionData(connId, connData)
+ return [respSMBCommand], None, errorCode
+
+ @staticmethod
+ def smb2Cancel(connId, smbServer, recvPacket):
+ # I'm actually doing nothing
+ return [smb2.SMB2Error()], None, STATUS_CANCELLED
+
+ @staticmethod
+ def default(connId, smbServer, recvPacket):
+ # By default we return an SMB Packet with error not implemented
+ smbServer.log("Not implemented command: 0x%x" % recvPacket['Command'],logging.DEBUG)
+ return [smb2.SMB2Error()], None, STATUS_NOT_SUPPORTED
+
+class Ioctls:
+ @staticmethod
+ def fsctlDfsGetReferrals(connId, smbServer, ioctlRequest):
+ return smb2.SMB2Error(), STATUS_FS_DRIVER_REQUIRED
+
+ @staticmethod
+ def fsctlPipeTransceive(connId, smbServer, ioctlRequest):
+ connData = smbServer.getConnectionData(connId)
+
+ ioctlResponse = ''
+
+ if connData['OpenedFiles'].has_key(str(ioctlRequest['FileID'])):
+ fileHandle = connData['OpenedFiles'][str(ioctlRequest['FileID'])]['FileHandle']
+ errorCode = STATUS_SUCCESS
+ try:
+ if fileHandle != PIPE_FILE_DESCRIPTOR:
+ errorCode = STATUS_INVALID_DEVICE_REQUEST
+ else:
+ sock = connData['OpenedFiles'][str(ioctlRequest['FileID'])]['Socket']
+ sock.sendall(ioctlRequest['Buffer'])
+ ioctlResponse = sock.recv(ioctlRequest['MaxOutputResponse'])
+ except Exception, e:
+ smbServer.log('fsctlPipeTransceive: %s ' % e, logging.ERROR)
+ errorCode = STATUS_ACCESS_DENIED
+ else:
+ errorCode = STATUS_INVALID_DEVICE_REQUEST
+
+ smbServer.setConnectionData(connId, connData)
+ return ioctlResponse, errorCode
+
+ @staticmethod
+ def fsctlValidateNegotiateInfo(connId, smbServer, ioctlRequest):
+ connData = smbServer.getConnectionData(connId)
+
+ errorCode = STATUS_SUCCESS
+
+ validateNegotiateInfo = smb2.VALIDATE_NEGOTIATE_INFO(ioctlRequest['Buffer'])
+ validateNegotiateInfo['Capabilities'] = 0
+ validateNegotiateInfo['Guid'] = 'A'*16
+ validateNegotiateInfo['SecurityMode'] = 1
+ validateNegotiateInfo['Dialects'] = (smb2.SMB2_DIALECT_002,)
+
+ smbServer.setConnectionData(connId, connData)
+ return validateNegotiateInfo.getData(), errorCode
+
+
+class SMBSERVERHandler(SocketServer.BaseRequestHandler):
+ def __init__(self, request, client_address, server, select_poll = False):
+ self.__SMB = server
+ self.__ip, self.__port = client_address
+ self.__request = request
+ self.__connId = threading.currentThread().getName()
+ self.__timeOut = 60*5
+ self.__select_poll = select_poll
+ #self.__connId = os.getpid()
+ SocketServer.BaseRequestHandler.__init__(self, request, client_address, server)
+
+ def handle(self):
+ self.__SMB.log("Incoming connection (%s,%d)" % (self.__ip, self.__port))
+ self.__SMB.addConnection(self.__connId, self.__ip, self.__port)
+ while True:
+ try:
+ # Firt of all let's get the NETBIOS packet
+ session = nmb.NetBIOSTCPSession(self.__SMB.getServerName(),'HOST', self.__ip, sess_port = self.__port, sock = self.__request, select_poll = self.__select_poll)
+ try:
+ p = session.recv_packet(self.__timeOut)
+ except nmb.NetBIOSTimeout:
+ raise
+ except nmb.NetBIOSError:
+ break
+
+ if p.get_type() == nmb.NETBIOS_SESSION_REQUEST:
+ # Someone is requesting a session, we're gonna accept them all :)
+ _, rn, my = p.get_trailer().split(' ')
+ remote_name = nmb.decode_name('\x20'+rn)
+ myname = nmb.decode_name('\x20'+my)
+ self.__SMB.log("NetBIOS Session request (%s,%s,%s)" % (self.__ip, remote_name[1].strip(), myname[1]))
+ r = nmb.NetBIOSSessionPacket()
+ r.set_type(nmb.NETBIOS_SESSION_POSITIVE_RESPONSE)
+ r.set_trailer(p.get_trailer())
+ self.__request.send(r.rawData())
+ else:
+ resp = self.__SMB.processRequest(self.__connId, p.get_trailer())
+ # Send all the packets recevied. Except for big transactions this should be
+ # a single packet
+ for i in resp:
+ session.send_packet(str(i))
+ except Exception, e:
+ self.__SMB.log("Handle: %s" % e)
+ #import traceback
+ #traceback.print_exc()
+ break
+
+ def finish(self):
+ # Thread/process is dying, we should tell the main SMB thread to remove all this thread data
+ self.__SMB.log("Closing down connection (%s,%d)" % (self.__ip, self.__port))
+ self.__SMB.removeConnection(self.__connId)
+ return SocketServer.BaseRequestHandler.finish(self)
+
+class SMBSERVER(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
+#class SMBSERVER(SocketServer.ForkingMixIn, SocketServer.TCPServer):
+ def __init__(self, server_address, handler_class=SMBSERVERHandler, config_parser = None):
+ SocketServer.TCPServer.allow_reuse_address = True
+ SocketServer.TCPServer.__init__(self, server_address, handler_class)
+
+ # Server name and OS to be presented whenever is necessary
+ self.__serverName = ''
+ self.__serverOS = ''
+ self.__serverDomain = ''
+ self.__challenge = ''
+ self.__log = None
+
+ # Our ConfigParser data
+ self.__serverConfig = config_parser
+
+ # Our credentials to be used during the server's lifetime
+ self.__credentials = {}
+
+ # Our log file
+ self.__logFile = ''
+
+ # Registered Named Pipes, format is PipeName,Socket
+ self.__registeredNamedPipes = {}
+
+ # JTR dump path
+ self.__jtr_dump_path = ''
+
+ # SMB2 Support flag = default not active
+ self.__SMB2Support = False
+
+ # Our list of commands we will answer, by default the NOT IMPLEMENTED one
+ self.__smbCommandsHandler = SMBCommands()
+ self.__smbTrans2Handler = TRANS2Commands()
+ self.__smbTransHandler = TRANSCommands()
+ self.__smbNTTransHandler = NTTRANSCommands()
+ self.__smb2CommandsHandler = SMB2Commands()
+ self.__IoctlHandler = Ioctls()
+
+ self.__smbNTTransCommands = {
+ # NT IOCTL, can't find doc for this
+ 0xff :self.__smbNTTransHandler.default
+ }
+
+ self.__smbTransCommands = {
+'\\PIPE\\LANMAN' :self.__smbTransHandler.lanMan,
+smb.SMB.TRANS_TRANSACT_NMPIPE :self.__smbTransHandler.transactNamedPipe,
+ }
+ self.__smbTrans2Commands = {
+ smb.SMB.TRANS2_FIND_FIRST2 :self.__smbTrans2Handler.findFirst2,
+ smb.SMB.TRANS2_FIND_NEXT2 :self.__smbTrans2Handler.findNext2,
+ smb.SMB.TRANS2_QUERY_FS_INFORMATION :self.__smbTrans2Handler.queryFsInformation,
+ smb.SMB.TRANS2_QUERY_PATH_INFORMATION :self.__smbTrans2Handler.queryPathInformation,
+ smb.SMB.TRANS2_QUERY_FILE_INFORMATION :self.__smbTrans2Handler.queryFileInformation,
+ smb.SMB.TRANS2_SET_FILE_INFORMATION :self.__smbTrans2Handler.setFileInformation,
+ smb.SMB.TRANS2_SET_PATH_INFORMATION :self.__smbTrans2Handler.setPathInformation
+ }
+
+ self.__smbCommands = {
+ #smb.SMB.SMB_COM_FLUSH: self.__smbCommandsHandler.smbComFlush,
+ smb.SMB.SMB_COM_CREATE_DIRECTORY: self.__smbCommandsHandler.smbComCreateDirectory,
+ smb.SMB.SMB_COM_DELETE_DIRECTORY: self.__smbCommandsHandler.smbComDeleteDirectory,
+ smb.SMB.SMB_COM_RENAME: self.__smbCommandsHandler.smbComRename,
+ smb.SMB.SMB_COM_DELETE: self.__smbCommandsHandler.smbComDelete,
+ smb.SMB.SMB_COM_NEGOTIATE: self.__smbCommandsHandler.smbComNegotiate,
+ smb.SMB.SMB_COM_SESSION_SETUP_ANDX: self.__smbCommandsHandler.smbComSessionSetupAndX,
+ smb.SMB.SMB_COM_LOGOFF_ANDX: self.__smbCommandsHandler.smbComLogOffAndX,
+ smb.SMB.SMB_COM_TREE_CONNECT_ANDX: self.__smbCommandsHandler.smbComTreeConnectAndX,
+ smb.SMB.SMB_COM_TREE_DISCONNECT: self.__smbCommandsHandler.smbComTreeDisconnect,
+ smb.SMB.SMB_COM_ECHO: self.__smbCommandsHandler.smbComEcho,
+ smb.SMB.SMB_COM_QUERY_INFORMATION: self.__smbCommandsHandler.smbQueryInformation,
+ smb.SMB.SMB_COM_TRANSACTION2: self.__smbCommandsHandler.smbTransaction2,
+ smb.SMB.SMB_COM_TRANSACTION: self.__smbCommandsHandler.smbTransaction,
+ # Not needed for now
+ smb.SMB.SMB_COM_NT_TRANSACT: self.__smbCommandsHandler.smbNTTransact,
+ smb.SMB.SMB_COM_QUERY_INFORMATION_DISK: self.__smbCommandsHandler.smbQueryInformationDisk,
+ smb.SMB.SMB_COM_OPEN_ANDX: self.__smbCommandsHandler.smbComOpenAndX,
+ smb.SMB.SMB_COM_QUERY_INFORMATION2: self.__smbCommandsHandler.smbComQueryInformation2,
+ smb.SMB.SMB_COM_READ_ANDX: self.__smbCommandsHandler.smbComReadAndX,
+ smb.SMB.SMB_COM_READ: self.__smbCommandsHandler.smbComRead,
+ smb.SMB.SMB_COM_WRITE_ANDX: self.__smbCommandsHandler.smbComWriteAndX,
+ smb.SMB.SMB_COM_WRITE: self.__smbCommandsHandler.smbComWrite,
+ smb.SMB.SMB_COM_CLOSE: self.__smbCommandsHandler.smbComClose,
+ smb.SMB.SMB_COM_LOCKING_ANDX: self.__smbCommandsHandler.smbComLockingAndX,
+ smb.SMB.SMB_COM_NT_CREATE_ANDX: self.__smbCommandsHandler.smbComNtCreateAndX,
+ 0xFF: self.__smbCommandsHandler.default
+}
+
+ self.__smb2Ioctls = {
+ smb2.FSCTL_DFS_GET_REFERRALS: self.__IoctlHandler.fsctlDfsGetReferrals,
+# smb2.FSCTL_PIPE_PEEK: self.__IoctlHandler.fsctlPipePeek,
+# smb2.FSCTL_PIPE_WAIT: self.__IoctlHandler.fsctlPipeWait,
+ smb2.FSCTL_PIPE_TRANSCEIVE: self.__IoctlHandler.fsctlPipeTransceive,
+# smb2.FSCTL_SRV_COPYCHUNK: self.__IoctlHandler.fsctlSrvCopyChunk,
+# smb2.FSCTL_SRV_ENUMERATE_SNAPSHOTS: self.__IoctlHandler.fsctlSrvEnumerateSnapshots,
+# smb2.FSCTL_SRV_REQUEST_RESUME_KEY: self.__IoctlHandler.fsctlSrvRequestResumeKey,
+# smb2.FSCTL_SRV_READ_HASH: self.__IoctlHandler.fsctlSrvReadHash,
+# smb2.FSCTL_SRV_COPYCHUNK_WRITE: self.__IoctlHandler.fsctlSrvCopyChunkWrite,
+# smb2.FSCTL_LMR_REQUEST_RESILIENCY: self.__IoctlHandler.fsctlLmrRequestResiliency,
+# smb2.FSCTL_QUERY_NETWORK_INTERFACE_INFO: self.__IoctlHandler.fsctlQueryNetworkInterfaceInfo,
+# smb2.FSCTL_SET_REPARSE_POINT: self.__IoctlHandler.fsctlSetReparsePoint,
+# smb2.FSCTL_DFS_GET_REFERRALS_EX: self.__IoctlHandler.fsctlDfsGetReferralsEx,
+# smb2.FSCTL_FILE_LEVEL_TRIM: self.__IoctlHandler.fsctlFileLevelTrim,
+ smb2.FSCTL_VALIDATE_NEGOTIATE_INFO: self.__IoctlHandler.fsctlValidateNegotiateInfo,
+}
+
+ self.__smb2Commands = {
+ smb2.SMB2_NEGOTIATE: self.__smb2CommandsHandler.smb2Negotiate,
+ smb2.SMB2_SESSION_SETUP: self.__smb2CommandsHandler.smb2SessionSetup,
+ smb2.SMB2_LOGOFF: self.__smb2CommandsHandler.smb2Logoff,
+ smb2.SMB2_TREE_CONNECT: self.__smb2CommandsHandler.smb2TreeConnect,
+ smb2.SMB2_TREE_DISCONNECT: self.__smb2CommandsHandler.smb2TreeDisconnect,
+ smb2.SMB2_CREATE: self.__smb2CommandsHandler.smb2Create,
+ smb2.SMB2_CLOSE: self.__smb2CommandsHandler.smb2Close,
+ smb2.SMB2_FLUSH: self.__smb2CommandsHandler.smb2Flush,
+ smb2.SMB2_READ: self.__smb2CommandsHandler.smb2Read,
+ smb2.SMB2_WRITE: self.__smb2CommandsHandler.smb2Write,
+ smb2.SMB2_LOCK: self.__smb2CommandsHandler.smb2Lock,
+ smb2.SMB2_IOCTL: self.__smb2CommandsHandler.smb2Ioctl,
+ smb2.SMB2_CANCEL: self.__smb2CommandsHandler.smb2Cancel,
+ smb2.SMB2_ECHO: self.__smb2CommandsHandler.smb2Echo,
+ smb2.SMB2_QUERY_DIRECTORY: self.__smb2CommandsHandler.smb2QueryDirectory,
+ smb2.SMB2_CHANGE_NOTIFY: self.__smb2CommandsHandler.smb2ChangeNotify,
+ smb2.SMB2_QUERY_INFO: self.__smb2CommandsHandler.smb2QueryInfo,
+ smb2.SMB2_SET_INFO: self.__smb2CommandsHandler.smb2SetInfo,
+# smb2.SMB2_OPLOCK_BREAK: self.__smb2CommandsHandler.smb2SessionSetup,
+ 0xFF: self.__smb2CommandsHandler.default
+}
+
+ # List of active connections
+ self.__activeConnections = {}
+
+ def getIoctls(self):
+ return self.__smb2Ioctls
+
+ def getCredentials(self):
+ return self.__credentials
+
+ def removeConnection(self, name):
+ try:
+ del(self.__activeConnections[name])
+ except:
+ pass
+ self.log("Remaining connections %s" % self.__activeConnections.keys())
+
+ def addConnection(self, name, ip, port):
+ self.__activeConnections[name] = {}
+ # Let's init with some know stuff we will need to have
+ # TODO: Document what's in there
+ #print "Current Connections", self.__activeConnections.keys()
+ self.__activeConnections[name]['PacketNum'] = 0
+ self.__activeConnections[name]['ClientIP'] = ip
+ self.__activeConnections[name]['ClientPort'] = port
+ self.__activeConnections[name]['Uid'] = 0
+ self.__activeConnections[name]['ConnectedShares'] = {}
+ self.__activeConnections[name]['OpenedFiles'] = {}
+ # SID results for findfirst2
+ self.__activeConnections[name]['SIDs'] = {}
+ self.__activeConnections[name]['LastRequest'] = {}
+
+ def getActiveConnections(self):
+ return self.__activeConnections
+
+ def setConnectionData(self, connId, data):
+ self.__activeConnections[connId] = data
+ #print "setConnectionData"
+ #print self.__activeConnections
+
+ def getConnectionData(self, connId, checkStatus = True):
+ conn = self.__activeConnections[connId]
+ if checkStatus is True:
+ if conn.has_key('Authenticated') is not True:
+ # Can't keep going further
+ raise Exception("User not Authenticated!")
+ return conn
+
+ def getRegisteredNamedPipes(self):
+ return self.__registeredNamedPipes
+
+ def registerNamedPipe(self, pipeName, address):
+ self.__registeredNamedPipes[unicode(pipeName)] = address
+ return True
+
+ def unregisterNamedPipe(self, pipeName):
+ if self.__registeredNamedPipes.has_key(pipeName):
+ del(self.__registeredNamedPipes[unicode(pipeName)])
+ return True
+ return False
+
+ def unregisterTransaction(self, transCommand):
+ if self.__smbTransCommands.has_key(transCommand):
+ del(self.__smbTransCommands[transCommand])
+
+ def hookTransaction(self, transCommand, callback):
+ # If you call this function, callback will replace
+ # the current Transaction sub command.
+ # (don't get confused with the Transaction smbCommand)
+ # If the transaction sub command doesn't not exist, it is added
+ # If the transaction sub command exists, it returns the original function # replaced
+ #
+ # callback MUST be declared as:
+ # callback(connId, smbServer, recvPacket, parameters, data, maxDataCount=0)
+ #
+ # WHERE:
+ #
+ # connId : the connection Id, used to grab/update information about
+ # the current connection
+ # smbServer : the SMBServer instance available for you to ask
+ # configuration data
+ # recvPacket : the full SMBPacket that triggered this command
+ # parameters : the transaction parameters
+ # data : the transaction data
+ # maxDataCount: the max amount of data that can be transfered agreed
+ # with the client
+ #
+ # and MUST return:
+ # respSetup, respParameters, respData, errorCode
+ #
+ # WHERE:
+ #
+ # respSetup: the setup response of the transaction
+ # respParameters: the parameters response of the transaction
+ # respData: the data reponse of the transaction
+ # errorCode: the NT error code
+
+ if self.__smbTransCommands.has_key(transCommand):
+ originalCommand = self.__smbTransCommands[transCommand]
+ else:
+ originalCommand = None
+
+ self.__smbTransCommands[transCommand] = callback
+ return originalCommand
+
+ def unregisterTransaction2(self, transCommand):
+ if self.__smbTrans2Commands.has_key(transCommand):
+ del(self.__smbTrans2Commands[transCommand])
+
+ def hookTransaction2(self, transCommand, callback):
+ # Here we should add to __smbTrans2Commands
+ # Same description as Transaction
+ if self.__smbTrans2Commands.has_key(transCommand):
+ originalCommand = self.__smbTrans2Commands[transCommand]
+ else:
+ originalCommand = None
+
+ self.__smbTrans2Commands[transCommand] = callback
+ return originalCommand
+
+ def unregisterNTTransaction(self, transCommand):
+ if self.__smbNTTransCommands.has_key(transCommand):
+ del(self.__smbNTTransCommands[transCommand])
+
+ def hookNTTransaction(self, transCommand, callback):
+ # Here we should add to __smbNTTransCommands
+ # Same description as Transaction
+ if self.__smbNTTransCommands.has_key(transCommand):
+ originalCommand = self.__smbNTTransCommands[transCommand]
+ else:
+ originalCommand = None
+
+ self.__smbNTTransCommands[transCommand] = callback
+ return originalCommand
+
+ def unregisterSmbCommand(self, smbCommand):
+ if self.__smbCommands.has_key(smbCommand):
+ del(self.__smbCommands[smbCommand])
+
+ def hookSmbCommand(self, smbCommand, callback):
+ # Here we should add to self.__smbCommands
+ # If you call this function, callback will replace
+ # the current smbCommand.
+ # If smbCommand doesn't not exist, it is added
+ # If SMB command exists, it returns the original function replaced
+ #
+ # callback MUST be declared as:
+ # callback(connId, smbServer, SMBCommand, recvPacket)
+ #
+ # WHERE:
+ #
+ # connId : the connection Id, used to grab/update information about
+ # the current connection
+ # smbServer : the SMBServer instance available for you to ask
+ # configuration data
+ # SMBCommand: the SMBCommand itself, with its data and parameters.
+ # Check smb.py:SMBCommand() for a reference
+ # recvPacket: the full SMBPacket that triggered this command
+ #
+ # and MUST return:
+ # <list of respSMBCommands>, <list of packets>, errorCode
+ # <list of packets> has higher preference over commands, in case you
+ # want to change the whole packet
+ # errorCode: the NT error code
+ #
+ # For SMB_COM_TRANSACTION2, SMB_COM_TRANSACTION and SMB_COM_NT_TRANSACT
+ # the callback function is slightly different:
+ #
+ # callback(connId, smbServer, SMBCommand, recvPacket, transCommands)
+ #
+ # WHERE:
+ #
+ # transCommands: a list of transaction subcommands already registered
+ #
+
+ if self.__smbCommands.has_key(smbCommand):
+ originalCommand = self.__smbCommands[smbCommand]
+ else:
+ originalCommand = None
+
+ self.__smbCommands[smbCommand] = callback
+ return originalCommand
+
+ def unregisterSmb2Command(self, smb2Command):
+ if self.__smb2Commands.has_key(smb2Command):
+ del(self.__smb2Commands[smb2Command])
+
+ def hookSmb2Command(self, smb2Command, callback):
+ if self.__smb2Commands.has_key(smb2Command):
+ originalCommand = self.__smb2Commands[smb2Command]
+ else:
+ originalCommand = None
+
+ self.__smb2Commands[smb2Command] = callback
+ return originalCommand
+
+ def log(self, msg, level=logging.INFO):
+ self.__log.log(level,msg)
+
+ def getServerName(self):
+ return self.__serverName
+
+ def getServerOS(self):
+ return self.__serverOS
+
+ def getServerDomain(self):
+ return self.__serverDomain
+
+ def getSMBChallenge(self):
+ return self.__challenge
+
+ def getServerConfig(self):
+ return self.__serverConfig
+
+ def setServerConfig(self, config):
+ self.__serverConfig = config
+
+ def getJTRdumpPath(self):
+ return self.__jtr_dump_path
+
+ def verify_request(self, request, client_address):
+ # TODO: Control here the max amount of processes we want to launch
+ # returning False, closes the connection
+ return True
+
+ def processRequest(self, connId, data):
+
+ # TODO: Process batched commands.
+ isSMB2 = False
+ SMBCommand = None
+ try:
+ packet = smb.NewSMBPacket(data = data)
+ SMBCommand = smb.SMBCommand(packet['Data'][0])
+ except:
+ # Maybe a SMB2 packet?
+ packet = smb2.SMB2Packet(data = data)
+ isSMB2 = True
+
+ # We might have compound requests
+ compoundedPacketsResponse = []
+ compoundedPackets = []
+ try:
+ # Search out list of implemented commands
+ # We provide them with:
+ # connId : representing the data for this specific connection
+ # self : the SMBSERVER if they want to ask data to it
+ # SMBCommand : the SMBCommand they are expecting to process
+ # packet : the received packet itself, in case they need more data than the actual command
+ # Only for Transactions
+ # transCommand: a list of transaction subcommands
+ # We expect to get:
+ # respCommands: a list of answers for the commands processed
+ # respPacket : if the commands chose to directly craft packet/s, we use this and not the previous
+ # this MUST be a list
+ # errorCode : self explanatory
+ if isSMB2 is False:
+ if packet['Command'] == smb.SMB.SMB_COM_TRANSACTION2:
+ respCommands, respPackets, errorCode = self.__smbCommands[packet['Command']](
+ connId,
+ self,
+ SMBCommand,
+ packet,
+ self.__smbTrans2Commands)
+ elif packet['Command'] == smb.SMB.SMB_COM_NT_TRANSACT:
+ respCommands, respPackets, errorCode = self.__smbCommands[packet['Command']](
+ connId,
+ self,
+ SMBCommand,
+ packet,
+ self.__smbNTTransCommands)
+ elif packet['Command'] == smb.SMB.SMB_COM_TRANSACTION:
+ respCommands, respPackets, errorCode = self.__smbCommands[packet['Command']](
+ connId,
+ self,
+ SMBCommand,
+ packet,
+ self.__smbTransCommands)
+ else:
+ if self.__smbCommands.has_key(packet['Command']):
+ if self.__SMB2Support is True:
+ if packet['Command'] == smb.SMB.SMB_COM_NEGOTIATE:
+ try:
+ respCommands, respPackets, errorCode = self.__smb2Commands[smb2.SMB2_NEGOTIATE](connId, self, packet, True)
+ isSMB2 = True
+ except Exception, e:
+ self.log('SMB2_NEGOTIATE: %s' % e, logging.ERROR)
+ # If something went wrong, let's fallback to SMB1
+ respCommands, respPackets, errorCode = self.__smbCommands[packet['Command']](
+ connId,
+ self,
+ SMBCommand,
+ packet)
+ #self.__SMB2Support = False
+ pass
+ else:
+ respCommands, respPackets, errorCode = self.__smbCommands[packet['Command']](
+ connId,
+ self,
+ SMBCommand,
+ packet)
+ else:
+ respCommands, respPackets, errorCode = self.__smbCommands[packet['Command']](
+ connId,
+ self,
+ SMBCommand,
+ packet)
+ else:
+ respCommands, respPackets, errorCode = self.__smbCommands[255](connId, self, SMBCommand, packet)
+
+ compoundedPacketsResponse.append((respCommands, respPackets, errorCode))
+ compoundedPackets.append(packet)
+
+ else:
+ done = False
+ while not done:
+ if self.__smb2Commands.has_key(packet['Command']):
+ if self.__SMB2Support is True:
+ respCommands, respPackets, errorCode = self.__smb2Commands[packet['Command']](
+ connId,
+ self,
+ packet)
+ else:
+ respCommands, respPackets, errorCode = self.__smb2Commands[255](connId, self, packet)
+ else:
+ respCommands, respPackets, errorCode = self.__smb2Commands[255](connId, self, packet)
+ # Let's store the result for this compounded packet
+ compoundedPacketsResponse.append((respCommands, respPackets, errorCode))
+ compoundedPackets.append(packet)
+ if packet['NextCommand'] != 0:
+ data = data[packet['NextCommand']:]
+ packet = smb2.SMB2Packet(data = data)
+ else:
+ done = True
+
+ except Exception, e:
+ #import traceback
+ #traceback.print_exc()
+ # Something wen't wrong, defaulting to Bad user ID
+ self.log('processRequest (0x%x,%s)' % (packet['Command'],e), logging.ERROR)
+ raise
+
+ # We prepare the response packet to commands don't need to bother about that.
+ connData = self.getConnectionData(connId, False)
+
+ # Force reconnection loop.. This is just a test.. client will send me back credentials :)
+ #connData['PacketNum'] += 1
+ #if connData['PacketNum'] == 15:
+ # connData['PacketNum'] = 0
+ # # Something wen't wrong, defaulting to Bad user ID
+ # self.log('Sending BAD USER ID!', logging.ERROR)
+ # #raise
+ # packet['Flags1'] |= smb.SMB.FLAGS1_REPLY
+ # packet['Flags2'] = 0
+ # errorCode = STATUS_SMB_BAD_UID
+ # packet['ErrorCode'] = errorCode >> 16
+ # packet['ErrorClass'] = errorCode & 0xff
+ # return [packet]
+
+ self.setConnectionData(connId, connData)
+
+ packetsToSend = []
+ for packetNum in range(len(compoundedPacketsResponse)):
+ respCommands, respPackets, errorCode = compoundedPacketsResponse[packetNum]
+ packet = compoundedPackets[packetNum]
+ if respPackets is None:
+ for respCommand in respCommands:
+ if isSMB2 is False:
+ respPacket = smb.NewSMBPacket()
+ respPacket['Flags1'] = smb.SMB.FLAGS1_REPLY
+
+ # TODO this should come from a per session configuration
+ respPacket['Flags2'] = smb.SMB.FLAGS2_EXTENDED_SECURITY | smb.SMB.FLAGS2_NT_STATUS | smb.SMB.FLAGS2_LONG_NAMES | packet['Flags2'] & smb.SMB.FLAGS2_UNICODE
+ #respPacket['Flags2'] = smb.SMB.FLAGS2_EXTENDED_SECURITY | smb.SMB.FLAGS2_NT_STATUS | smb.SMB.FLAGS2_LONG_NAMES
+ #respPacket['Flags1'] = 0x98
+ #respPacket['Flags2'] = 0xc807
+
+
+ respPacket['Tid'] = packet['Tid']
+ respPacket['Mid'] = packet['Mid']
+ respPacket['Pid'] = packet['Pid']
+ respPacket['Uid'] = connData['Uid']
+
+ respPacket['ErrorCode'] = errorCode >> 16
+ respPacket['_reserved'] = errorCode >> 8 & 0xff
+ respPacket['ErrorClass'] = errorCode & 0xff
+ respPacket.addCommand(respCommand)
+
+ packetsToSend.append(respPacket)
+ else:
+ respPacket = smb2.SMB2Packet()
+ respPacket['Flags'] = smb2.SMB2_FLAGS_SERVER_TO_REDIR
+ if packetNum > 0:
+ respPacket['Flags'] |= smb2.SMB2_FLAGS_RELATED_OPERATIONS
+ respPacket['Status'] = errorCode
+ respPacket['CreditRequestResponse'] = packet['CreditRequestResponse']
+ respPacket['Command'] = packet['Command']
+ respPacket['CreditCharge'] = packet['CreditCharge']
+ #respPacket['CreditCharge'] = 0
+ respPacket['Reserved'] = packet['Reserved']
+ respPacket['SessionID'] = connData['Uid']
+ respPacket['MessageID'] = packet['MessageID']
+ respPacket['TreeID'] = packet['TreeID']
+ respPacket['Data'] = str(respCommand)
+ packetsToSend.append(respPacket)
+ else:
+ # The SMBCommand took care of building the packet
+ packetsToSend = respPackets
+
+ if isSMB2 is True:
+ # Let's build a compound answer
+ finalData = ''
+ i = 0
+ for i in range(len(packetsToSend)-1):
+ packet = packetsToSend[i]
+ # Align to 8-bytes
+ padLen = (8 - (len(packet) % 8) ) % 8
+ packet['NextCommand'] = len(packet) + padLen
+ finalData += str(packet) + padLen*'\x00'
+
+ # Last one
+ finalData += str(packetsToSend[len(packetsToSend)-1])
+ packetsToSend = [finalData]
+
+ # We clear the compound requests
+ connData['LastRequest'] = {}
+
+ return packetsToSend
+
+ def processConfigFile(self, configFile = None):
+ # TODO: Do a real config parser
+ if self.__serverConfig is None:
+ if configFile is None:
+ configFile = 'smb.conf'
+ self.__serverConfig = ConfigParser.ConfigParser()
+ self.__serverConfig.read(configFile)
+
+ self.__serverName = self.__serverConfig.get('global','server_name')
+ self.__serverOS = self.__serverConfig.get('global','server_os')
+ self.__serverDomain = self.__serverConfig.get('global','server_domain')
+ self.__logFile = self.__serverConfig.get('global','log_file')
+ if self.__serverConfig.has_option('global', 'challenge'):
+ self.__challenge = self.__serverConfig.get('global', 'challenge')
+ else:
+ self.__challenge = 'A'*8
+
+ if self.__serverConfig.has_option("global", "jtr_dump_path"):
+ self.__jtr_dump_path = self.__serverConfig.get("global", "jtr_dump_path")
+
+ if self.__serverConfig.has_option("global", "SMB2Support"):
+ self.__SMB2Support = self.__serverConfig.getboolean("global","SMB2Support")
+ else:
+ self.__SMB2Support = False
+
+ if self.__logFile != 'None':
+ logging.basicConfig(filename = self.__logFile,
+ level = logging.DEBUG,
+ format="%(asctime)s: %(levelname)s: %(message)s",
+ datefmt = '%m/%d/%Y %I:%M:%S %p')
+ self.__log = LOG
+
+ # Process the credentials
+ credentials_fname = self.__serverConfig.get('global','credentials_file')
+ if credentials_fname is not "":
+ cred = open(credentials_fname)
+ line = cred.readline()
+ while line:
+ name, domain, lmhash, nthash = line.split(':')
+ self.__credentials[name] = (domain, lmhash, nthash.strip('\r\n'))
+ line = cred.readline()
+ cred.close()
+ self.log('Config file parsed')
+
+# For windows platforms, opening a directory is not an option, so we set a void FD
+VOID_FILE_DESCRIPTOR = -1
+PIPE_FILE_DESCRIPTOR = -2
diff --git a/tests/python_dependencies/impacket/spnego.py b/tests/python_dependencies/impacket/spnego.py
new file mode 100644
index 00000000..f177d18f
--- /dev/null
+++ b/tests/python_dependencies/impacket/spnego.py
@@ -0,0 +1,372 @@
+# Copyright (c) 2003-2016 CORE Security Technologies
+#
+# This software is provided under under a slightly modified version
+# of the Apache Software License. See the accompanying LICENSE file
+# for more information.
+#
+# Author: Alberto Solino (beto@coresecurity.com)
+#
+# Description:
+# SPNEGO functions used by SMB, SMB2/3 and DCERPC
+#
+
+from struct import pack, unpack, calcsize
+
+############### GSS Stuff ################
+GSS_API_SPNEGO_UUID = '\x2b\x06\x01\x05\x05\x02'
+ASN1_SEQUENCE = 0x30
+ASN1_AID = 0x60
+ASN1_OID = 0x06
+ASN1_OCTET_STRING = 0x04
+ASN1_MECH_TYPE = 0xa0
+ASN1_MECH_TOKEN = 0xa2
+ASN1_SUPPORTED_MECH = 0xa1
+ASN1_RESPONSE_TOKEN = 0xa2
+ASN1_ENUMERATED = 0x0a
+MechTypes = {
+'+\x06\x01\x04\x01\x827\x02\x02\x1e': 'SNMPv2-SMI::enterprises.311.2.2.30',
+'+\x06\x01\x04\x01\x827\x02\x02\n': 'NTLMSSP - Microsoft NTLM Security Support Provider',
+'*\x86H\x82\xf7\x12\x01\x02\x02': 'MS KRB5 - Microsoft Kerberos 5',
+'*\x86H\x86\xf7\x12\x01\x02\x02': 'KRB5 - Kerberos 5',
+'*\x86H\x86\xf7\x12\x01\x02\x02\x03': 'KRB5 - Kerberos 5 - User to User'
+}
+TypesMech = dict((v,k) for k, v in MechTypes.iteritems())
+
+def asn1encode(data = ''):
+ #res = asn1.SEQUENCE(str).encode()
+ #import binascii
+ #print '\nalex asn1encode str: %s\n' % binascii.hexlify(str)
+ if 0 <= len(data) <= 0x7F:
+ res = pack('B', len(data)) + data
+ elif 0x80 <= len(data) <= 0xFF:
+ res = pack('BB', 0x81, len(data)) + data
+ elif 0x100 <= len(data) <= 0xFFFF:
+ res = pack('!BH', 0x82, len(data)) + data
+ elif 0x10000 <= len(data) <= 0xffffff:
+ res = pack('!BBH', 0x83, len(data) >> 16, len(data) & 0xFFFF) + data
+ elif 0x1000000 <= len(data) <= 0xffffffff:
+ res = pack('!BL', 0x84, len(data)) + data
+ else:
+ raise Exception('Error in asn1encode')
+ return str(res)
+
+def asn1decode(data = ''):
+ len1 = unpack('B', data[:1])[0]
+ data = data[1:]
+ if len1 == 0x81:
+ pad = calcsize('B')
+ len2 = unpack('B',data[:pad])[0]
+ data = data[pad:]
+ ans = data[:len2]
+ elif len1 == 0x82:
+ pad = calcsize('H')
+ len2 = unpack('!H', data[:pad])[0]
+ data = data[pad:]
+ ans = data[:len2]
+ elif len1 == 0x83:
+ pad = calcsize('B') + calcsize('!H')
+ len2, len3 = unpack('!BH', data[:pad])
+ data = data[pad:]
+ ans = data[:len2 << 16 + len3]
+ elif len1 == 0x84:
+ pad = calcsize('!L')
+ len2 = unpack('!L', data[:pad])[0]
+ data = data[pad:]
+ ans = data[:len2]
+ # 1 byte length, string <= 0x7F
+ else:
+ pad = 0
+ ans = data[:len1]
+ return ans, len(ans)+pad+1
+
+class GSSAPI:
+# Generic GSSAPI Header Format
+ def __init__(self, data = None):
+ self.fields = {}
+ self['UUID'] = GSS_API_SPNEGO_UUID
+ if data:
+ self.fromString(data)
+ pass
+
+ def __setitem__(self,key,value):
+ self.fields[key] = value
+
+ def __getitem__(self, key):
+ return self.fields[key]
+
+ def __delitem__(self, key):
+ del self.fields[key]
+
+ def __len__(self):
+ return len(self.getData())
+
+ def __str__(self):
+ return len(self.getData())
+
+ def fromString(self, data = None):
+ # Manual parse of the GSSAPI Header Format
+ # It should be something like
+ # AID = 0x60 TAG, BER Length
+ # OID = 0x06 TAG
+ # GSSAPI OID
+ # UUID data (BER Encoded)
+ # Payload
+ next_byte = unpack('B',data[:1])[0]
+ if next_byte != ASN1_AID:
+ raise Exception('Unknown AID=%x' % next_byte)
+ data = data[1:]
+ decode_data, total_bytes = asn1decode(data)
+ # Now we should have a OID tag
+ next_byte = unpack('B',decode_data[:1])[0]
+ if next_byte != ASN1_OID:
+ raise Exception('OID tag not found %x' % next_byte)
+ decode_data = decode_data[1:]
+ # Now the OID contents, should be SPNEGO UUID
+ uuid, total_bytes = asn1decode(decode_data)
+ self['OID'] = uuid
+ # the rest should be the data
+ self['Payload'] = decode_data[total_bytes:]
+ #pass
+
+ def dump(self):
+ for i in self.fields.keys():
+ print "%s: {%r}" % (i,self[i])
+
+ def getData(self):
+ ans = pack('B',ASN1_AID)
+ ans += asn1encode(
+ pack('B',ASN1_OID) +
+ asn1encode(self['UUID']) +
+ self['Payload'] )
+ return ans
+
+class SPNEGO_NegTokenResp:
+ # http://tools.ietf.org/html/rfc4178#page-9
+ # NegTokenResp ::= SEQUENCE {
+ # negState [0] ENUMERATED {
+ # accept-completed (0),
+ # accept-incomplete (1),
+ # reject (2),
+ # request-mic (3)
+ # } OPTIONAL,
+ # -- REQUIRED in the first reply from the target
+ # supportedMech [1] MechType OPTIONAL,
+ # -- present only in the first reply from the target
+ # responseToken [2] OCTET STRING OPTIONAL,
+ # mechListMIC [3] OCTET STRING OPTIONAL,
+ # ...
+ # }
+ # This structure is not prepended by a GSS generic header!
+ SPNEGO_NEG_TOKEN_RESP = 0xa1
+ SPNEGO_NEG_TOKEN_TARG = 0xa0
+
+ def __init__(self, data = None):
+ self.fields = {}
+ if data:
+ self.fromString(data)
+ pass
+
+ def __setitem__(self,key,value):
+ self.fields[key] = value
+
+ def __getitem__(self, key):
+ return self.fields[key]
+
+ def __delitem__(self, key):
+ del self.fields[key]
+
+ def __len__(self):
+ return len(self.getData())
+
+ def __str__(self):
+ return len(self.getData())
+
+ def fromString(self, data = 0):
+ payload = data
+ next_byte = unpack('B', payload[:1])[0]
+ if next_byte != SPNEGO_NegTokenResp.SPNEGO_NEG_TOKEN_RESP:
+ raise Exception('NegTokenResp not found %x' % next_byte)
+ payload = payload[1:]
+ decode_data, total_bytes = asn1decode(payload)
+ next_byte = unpack('B', decode_data[:1])[0]
+ if next_byte != ASN1_SEQUENCE:
+ raise Exception('SEQUENCE tag not found %x' % next_byte)
+ decode_data = decode_data[1:]
+ decode_data, total_bytes = asn1decode(decode_data)
+ next_byte = unpack('B',decode_data[:1])[0]
+
+ if next_byte != ASN1_MECH_TYPE:
+ # MechType not found, could be an AUTH answer
+ if next_byte != ASN1_RESPONSE_TOKEN:
+ raise Exception('MechType/ResponseToken tag not found %x' % next_byte)
+ else:
+ decode_data2 = decode_data[1:]
+ decode_data2, total_bytes = asn1decode(decode_data2)
+ next_byte = unpack('B', decode_data2[:1])[0]
+ if next_byte != ASN1_ENUMERATED:
+ raise Exception('Enumerated tag not found %x' % next_byte)
+ item, total_bytes2 = asn1decode(decode_data)
+ self['NegResult'] = item
+ decode_data = decode_data[1:]
+ decode_data = decode_data[total_bytes:]
+
+ # Do we have more data?
+ if len(decode_data) == 0:
+ return
+
+ next_byte = unpack('B', decode_data[:1])[0]
+ if next_byte != ASN1_SUPPORTED_MECH:
+ if next_byte != ASN1_RESPONSE_TOKEN:
+ raise Exception('Supported Mech/ResponseToken tag not found %x' % next_byte)
+ else:
+ decode_data2 = decode_data[1:]
+ decode_data2, total_bytes = asn1decode(decode_data2)
+ next_byte = unpack('B', decode_data2[:1])[0]
+ if next_byte != ASN1_OID:
+ raise Exception('OID tag not found %x' % next_byte)
+ decode_data2 = decode_data2[1:]
+ item, total_bytes2 = asn1decode(decode_data2)
+ self['SuportedMech'] = item
+
+ decode_data = decode_data[1:]
+ decode_data = decode_data[total_bytes:]
+ next_byte = unpack('B', decode_data[:1])[0]
+ if next_byte != ASN1_RESPONSE_TOKEN:
+ raise Exception('Response token tag not found %x' % next_byte)
+
+ decode_data = decode_data[1:]
+ decode_data, total_bytes = asn1decode(decode_data)
+ next_byte = unpack('B', decode_data[:1])[0]
+ if next_byte != ASN1_OCTET_STRING:
+ raise Exception('Octet string token tag not found %x' % next_byte)
+ decode_data = decode_data[1:]
+ decode_data, total_bytes = asn1decode(decode_data)
+ self['ResponseToken'] = decode_data
+
+ def dump(self):
+ for i in self.fields.keys():
+ print "%s: {%r}" % (i,self[i])
+
+ def getData(self):
+ ans = pack('B',SPNEGO_NegTokenResp.SPNEGO_NEG_TOKEN_RESP)
+ if self.fields.has_key('NegResult') and self.fields.has_key('SupportedMech'):
+ # Server resp
+ ans += asn1encode(
+ pack('B', ASN1_SEQUENCE) +
+ asn1encode(
+ pack('B',SPNEGO_NegTokenResp.SPNEGO_NEG_TOKEN_TARG) +
+ asn1encode(
+ pack('B',ASN1_ENUMERATED) +
+ asn1encode( self['NegResult'] )) +
+ pack('B',ASN1_SUPPORTED_MECH) +
+ asn1encode(
+ pack('B',ASN1_OID) +
+ asn1encode(self['SupportedMech'])) +
+ pack('B',ASN1_RESPONSE_TOKEN ) +
+ asn1encode(
+ pack('B', ASN1_OCTET_STRING) + asn1encode(self['ResponseToken']))))
+ elif self.fields.has_key('NegResult'):
+ # Server resp
+ ans += asn1encode(
+ pack('B', ASN1_SEQUENCE) +
+ asn1encode(
+ pack('B', SPNEGO_NegTokenResp.SPNEGO_NEG_TOKEN_TARG) +
+ asn1encode(
+ pack('B',ASN1_ENUMERATED) +
+ asn1encode( self['NegResult'] ))))
+ else:
+ # Client resp
+ ans += asn1encode(
+ pack('B', ASN1_SEQUENCE) +
+ asn1encode(
+ pack('B', ASN1_RESPONSE_TOKEN) +
+ asn1encode(
+ pack('B', ASN1_OCTET_STRING) + asn1encode(self['ResponseToken']))))
+ return ans
+
+class SPNEGO_NegTokenInit(GSSAPI):
+ # http://tools.ietf.org/html/rfc4178#page-8
+ # NegTokeInit :: = SEQUENCE {
+ # mechTypes [0] MechTypeList,
+ # reqFlags [1] ContextFlags OPTIONAL,
+ # mechToken [2] OCTET STRING OPTIONAL,
+ # mechListMIC [3] OCTET STRING OPTIONAL,
+ # }
+ SPNEGO_NEG_TOKEN_INIT = 0xa0
+ def fromString(self, data = 0):
+ GSSAPI.fromString(self, data)
+ payload = self['Payload']
+ next_byte = unpack('B', payload[:1])[0]
+ if next_byte != SPNEGO_NegTokenInit.SPNEGO_NEG_TOKEN_INIT:
+ raise Exception('NegTokenInit not found %x' % next_byte)
+ payload = payload[1:]
+ decode_data, total_bytes = asn1decode(payload)
+ # Now we should have a SEQUENCE Tag
+ next_byte = unpack('B', decode_data[:1])[0]
+ if next_byte != ASN1_SEQUENCE:
+ raise Exception('SEQUENCE tag not found %x' % next_byte)
+ decode_data = decode_data[1:]
+ decode_data, total_bytes2 = asn1decode(decode_data)
+ next_byte = unpack('B',decode_data[:1])[0]
+ if next_byte != ASN1_MECH_TYPE:
+ raise Exception('MechType tag not found %x' % next_byte)
+ decode_data = decode_data[1:]
+ remaining_data = decode_data
+ decode_data, total_bytes3 = asn1decode(decode_data)
+ next_byte = unpack('B', decode_data[:1])[0]
+ if next_byte != ASN1_SEQUENCE:
+ raise Exception('SEQUENCE tag not found %x' % next_byte)
+ decode_data = decode_data[1:]
+ decode_data, total_bytes4 = asn1decode(decode_data)
+ # And finally we should have the MechTypes
+ self['MechTypes'] = []
+ while decode_data:
+ next_byte = unpack('B', decode_data[:1])[0]
+ if next_byte != ASN1_OID:
+ # Not a valid OID, there must be something else we won't unpack
+ break
+ decode_data = decode_data[1:]
+ item, total_bytes = asn1decode(decode_data)
+ self['MechTypes'].append(item)
+ decode_data = decode_data[total_bytes:]
+
+ # Do we have MechTokens as well?
+ decode_data = remaining_data[total_bytes3:]
+ if len(decode_data) > 0:
+ next_byte = unpack('B', decode_data[:1])[0]
+ if next_byte == ASN1_MECH_TOKEN:
+ # We have tokens in here!
+ decode_data = decode_data[1:]
+ decode_data, total_bytes = asn1decode(decode_data)
+ next_byte = unpack('B', decode_data[:1])[0]
+ if next_byte == ASN1_OCTET_STRING:
+ decode_data = decode_data[1:]
+ decode_data, total_bytes = asn1decode(decode_data)
+ self['MechToken'] = decode_data
+
+ def getData(self):
+ mechTypes = ''
+ for i in self['MechTypes']:
+ mechTypes += pack('B', ASN1_OID)
+ mechTypes += asn1encode(i)
+
+ mechToken = ''
+ # Do we have tokens to send?
+ if self.fields.has_key('MechToken'):
+ mechToken = pack('B', ASN1_MECH_TOKEN) + asn1encode(
+ pack('B', ASN1_OCTET_STRING) + asn1encode(
+ self['MechToken']))
+
+ ans = pack('B',SPNEGO_NegTokenInit.SPNEGO_NEG_TOKEN_INIT)
+ ans += asn1encode(
+ pack('B', ASN1_SEQUENCE) +
+ asn1encode(
+ pack('B', ASN1_MECH_TYPE) +
+ asn1encode(
+ pack('B', ASN1_SEQUENCE) +
+ asn1encode(mechTypes)) + mechToken ))
+
+
+ self['Payload'] = ans
+ return GSSAPI.getData(self)
+
diff --git a/tests/python_dependencies/impacket/structure.py b/tests/python_dependencies/impacket/structure.py
new file mode 100644
index 00000000..7a04117f
--- /dev/null
+++ b/tests/python_dependencies/impacket/structure.py
@@ -0,0 +1,743 @@
+# Copyright (c) 2003-2016 CORE Security Technologies
+#
+# This software is provided under under a slightly modified version
+# of the Apache Software License. See the accompanying LICENSE file
+# for more information.
+#
+
+from struct import pack, unpack, calcsize
+
+class Structure:
+ """ sublcasses can define commonHdr and/or structure.
+ each of them is an tuple of either two: (fieldName, format) or three: (fieldName, ':', class) fields.
+ [it can't be a dictionary, because order is important]
+
+ where format specifies how the data in the field will be converted to/from bytes (string)
+ class is the class to use when unpacking ':' fields.
+
+ each field can only contain one value (or an array of values for *)
+ i.e. struct.pack('Hl',1,2) is valid, but format specifier 'Hl' is not (you must use 2 dfferent fields)
+
+ format specifiers:
+ specifiers from module pack can be used with the same format
+ see struct.__doc__ (pack/unpack is finally called)
+ x [padding byte]
+ c [character]
+ b [signed byte]
+ B [unsigned byte]
+ h [signed short]
+ H [unsigned short]
+ l [signed long]
+ L [unsigned long]
+ i [signed integer]
+ I [unsigned integer]
+ q [signed long long (quad)]
+ Q [unsigned long long (quad)]
+ s [string (array of chars), must be preceded with length in format specifier, padded with zeros]
+ p [pascal string (includes byte count), must be preceded with length in format specifier, padded with zeros]
+ f [float]
+ d [double]
+ = [native byte ordering, size and alignment]
+ @ [native byte ordering, standard size and alignment]
+ ! [network byte ordering]
+ < [little endian]
+ > [big endian]
+
+ usual printf like specifiers can be used (if started with %)
+ [not recommeneded, there is no why to unpack this]
+
+ %08x will output an 8 bytes hex
+ %s will output a string
+ %s\\x00 will output a NUL terminated string
+ %d%d will output 2 decimal digits (against the very same specification of Structure)
+ ...
+
+ some additional format specifiers:
+ : just copy the bytes from the field into the output string (input may be string, other structure, or anything responding to __str__()) (for unpacking, all what's left is returned)
+ z same as :, but adds a NUL byte at the end (asciiz) (for unpacking the first NUL byte is used as terminator) [asciiz string]
+ u same as z, but adds two NUL bytes at the end (after padding to an even size with NULs). (same for unpacking) [unicode string]
+ w DCE-RPC/NDR string (it's a macro for [ '<L=(len(field)+1)/2','"\\x00\\x00\\x00\\x00','<L=(len(field)+1)/2',':' ]
+ ?-field length of field named 'field', formated as specified with ? ('?' may be '!H' for example). The input value overrides the real length
+ ?1*?2 array of elements. Each formated as '?2', the number of elements in the array is stored as specified by '?1' (?1 is optional, or can also be a constant (number), for unpacking)
+ 'xxxx literal xxxx (field's value doesn't change the output. quotes must not be closed or escaped)
+ "xxxx literal xxxx (field's value doesn't change the output. quotes must not be closed or escaped)
+ _ will not pack the field. Accepts a third argument, which is an unpack code. See _Test_UnpackCode for an example
+ ?=packcode will evaluate packcode in the context of the structure, and pack the result as specified by ?. Unpacking is made plain
+ ?&fieldname "Address of field fieldname".
+ For packing it will simply pack the id() of fieldname. Or use 0 if fieldname doesn't exists.
+ For unpacking, it's used to know weather fieldname has to be unpacked or not, i.e. by adding a & field you turn another field (fieldname) in an optional field.
+
+ """
+ commonHdr = ()
+ structure = ()
+ debug = 0
+
+ def __init__(self, data = None, alignment = 0):
+ if not hasattr(self, 'alignment'):
+ self.alignment = alignment
+
+ self.fields = {}
+ self.rawData = data
+ if data is not None:
+ self.fromString(data)
+ else:
+ self.data = None
+
+ @classmethod
+ def fromFile(self, file):
+ answer = self()
+ answer.fromString(file.read(len(answer)))
+ return answer
+
+ def setAlignment(self, alignment):
+ self.alignment = alignment
+
+ def setData(self, data):
+ self.data = data
+
+ def packField(self, fieldName, format = None):
+ if self.debug:
+ print "packField( %s | %s )" % (fieldName, format)
+
+ if format is None:
+ format = self.formatForField(fieldName)
+
+ if self.fields.has_key(fieldName):
+ ans = self.pack(format, self.fields[fieldName], field = fieldName)
+ else:
+ ans = self.pack(format, None, field = fieldName)
+
+ if self.debug:
+ print "\tanswer %r" % ans
+
+ return ans
+
+ def getData(self):
+ if self.data is not None:
+ return self.data
+ data = ''
+ for field in self.commonHdr+self.structure:
+ try:
+ data += self.packField(field[0], field[1])
+ except Exception, e:
+ if self.fields.has_key(field[0]):
+ e.args += ("When packing field '%s | %s | %r' in %s" % (field[0], field[1], self[field[0]], self.__class__),)
+ else:
+ e.args += ("When packing field '%s | %s' in %s" % (field[0], field[1], self.__class__),)
+ raise
+ if self.alignment:
+ if len(data) % self.alignment:
+ data += ('\x00'*self.alignment)[:-(len(data) % self.alignment)]
+
+ #if len(data) % self.alignment: data += ('\x00'*self.alignment)[:-(len(data) % self.alignment)]
+ return data
+
+ def fromString(self, data):
+ self.rawData = data
+ for field in self.commonHdr+self.structure:
+ if self.debug:
+ print "fromString( %s | %s | %r )" % (field[0], field[1], data)
+ size = self.calcUnpackSize(field[1], data, field[0])
+ if self.debug:
+ print " size = %d" % size
+ dataClassOrCode = str
+ if len(field) > 2:
+ dataClassOrCode = field[2]
+ try:
+ self[field[0]] = self.unpack(field[1], data[:size], dataClassOrCode = dataClassOrCode, field = field[0])
+ except Exception,e:
+ e.args += ("When unpacking field '%s | %s | %r[:%d]'" % (field[0], field[1], data, size),)
+ raise
+
+ size = self.calcPackSize(field[1], self[field[0]], field[0])
+ if self.alignment and size % self.alignment:
+ size += self.alignment - (size % self.alignment)
+ data = data[size:]
+
+ return self
+
+ def __setitem__(self, key, value):
+ self.fields[key] = value
+ self.data = None # force recompute
+
+ def __getitem__(self, key):
+ return self.fields[key]
+
+ def __delitem__(self, key):
+ del self.fields[key]
+
+ def __str__(self):
+ return self.getData()
+
+ def __len__(self):
+ # XXX: improve
+ return len(self.getData())
+
+ def pack(self, format, data, field = None):
+ if self.debug:
+ print " pack( %s | %r | %s)" % (format, data, field)
+
+ if field:
+ addressField = self.findAddressFieldFor(field)
+ if (addressField is not None) and (data is None):
+ return ''
+
+ # void specifier
+ if format[:1] == '_':
+ return ''
+
+ # quote specifier
+ if format[:1] == "'" or format[:1] == '"':
+ return format[1:]
+
+ # code specifier
+ two = format.split('=')
+ if len(two) >= 2:
+ try:
+ return self.pack(two[0], data)
+ except:
+ fields = {'self':self}
+ fields.update(self.fields)
+ return self.pack(two[0], eval(two[1], {}, fields))
+
+ # address specifier
+ two = format.split('&')
+ if len(two) == 2:
+ try:
+ return self.pack(two[0], data)
+ except:
+ if (self.fields.has_key(two[1])) and (self[two[1]] is not None):
+ return self.pack(two[0], id(self[two[1]]) & ((1<<(calcsize(two[0])*8))-1) )
+ else:
+ return self.pack(two[0], 0)
+
+ # length specifier
+ two = format.split('-')
+ if len(two) == 2:
+ try:
+ return self.pack(two[0],data)
+ except:
+ return self.pack(two[0], self.calcPackFieldSize(two[1]))
+
+ # array specifier
+ two = format.split('*')
+ if len(two) == 2:
+ answer = ''
+ for each in data:
+ answer += self.pack(two[1], each)
+ if two[0]:
+ if two[0].isdigit():
+ if int(two[0]) != len(data):
+ raise Exception, "Array field has a constant size, and it doesn't match the actual value"
+ else:
+ return self.pack(two[0], len(data))+answer
+ return answer
+
+ # "printf" string specifier
+ if format[:1] == '%':
+ # format string like specifier
+ return format % data
+
+ # asciiz specifier
+ if format[:1] == 'z':
+ return str(data)+'\0'
+
+ # unicode specifier
+ if format[:1] == 'u':
+ return str(data)+'\0\0' + (len(data) & 1 and '\0' or '')
+
+ # DCE-RPC/NDR string specifier
+ if format[:1] == 'w':
+ if len(data) == 0:
+ data = '\0\0'
+ elif len(data) % 2:
+ data += '\0'
+ l = pack('<L', len(data)/2)
+ return '%s\0\0\0\0%s%s' % (l,l,data)
+
+ if data is None:
+ raise Exception, "Trying to pack None"
+
+ # literal specifier
+ if format[:1] == ':':
+ return str(data)
+
+ # struct like specifier
+ return pack(format, data)
+
+ def unpack(self, format, data, dataClassOrCode = str, field = None):
+ if self.debug:
+ print " unpack( %s | %r )" % (format, data)
+
+ if field:
+ addressField = self.findAddressFieldFor(field)
+ if addressField is not None:
+ if not self[addressField]:
+ return
+
+ # void specifier
+ if format[:1] == '_':
+ if dataClassOrCode != str:
+ fields = {'self':self, 'inputDataLeft':data}
+ fields.update(self.fields)
+ return eval(dataClassOrCode, {}, fields)
+ else:
+ return None
+
+ # quote specifier
+ if format[:1] == "'" or format[:1] == '"':
+ answer = format[1:]
+ if answer != data:
+ raise Exception, "Unpacked data doesn't match constant value '%r' should be '%r'" % (data, answer)
+ return answer
+
+ # address specifier
+ two = format.split('&')
+ if len(two) == 2:
+ return self.unpack(two[0],data)
+
+ # code specifier
+ two = format.split('=')
+ if len(two) >= 2:
+ return self.unpack(two[0],data)
+
+ # length specifier
+ two = format.split('-')
+ if len(two) == 2:
+ return self.unpack(two[0],data)
+
+ # array specifier
+ two = format.split('*')
+ if len(two) == 2:
+ answer = []
+ sofar = 0
+ if two[0].isdigit():
+ number = int(two[0])
+ elif two[0]:
+ sofar += self.calcUnpackSize(two[0], data)
+ number = self.unpack(two[0], data[:sofar])
+ else:
+ number = -1
+
+ while number and sofar < len(data):
+ nsofar = sofar + self.calcUnpackSize(two[1],data[sofar:])
+ answer.append(self.unpack(two[1], data[sofar:nsofar], dataClassOrCode))
+ number -= 1
+ sofar = nsofar
+ return answer
+
+ # "printf" string specifier
+ if format[:1] == '%':
+ # format string like specifier
+ return format % data
+
+ # asciiz specifier
+ if format == 'z':
+ if data[-1] != '\x00':
+ raise Exception, ("%s 'z' field is not NUL terminated: %r" % (field, data))
+ return data[:-1] # remove trailing NUL
+
+ # unicode specifier
+ if format == 'u':
+ if data[-2:] != '\x00\x00':
+ raise Exception, ("%s 'u' field is not NUL-NUL terminated: %r" % (field, data))
+ return data[:-2] # remove trailing NUL
+
+ # DCE-RPC/NDR string specifier
+ if format == 'w':
+ l = unpack('<L', data[:4])[0]
+ return data[12:12+l*2]
+
+ # literal specifier
+ if format == ':':
+ return dataClassOrCode(data)
+
+ # struct like specifier
+ return unpack(format, data)[0]
+
+ def calcPackSize(self, format, data, field = None):
+# # print " calcPackSize %s:%r" % (format, data)
+ if field:
+ addressField = self.findAddressFieldFor(field)
+ if addressField is not None:
+ if not self[addressField]:
+ return 0
+
+ # void specifier
+ if format[:1] == '_':
+ return 0
+
+ # quote specifier
+ if format[:1] == "'" or format[:1] == '"':
+ return len(format)-1
+
+ # address specifier
+ two = format.split('&')
+ if len(two) == 2:
+ return self.calcPackSize(two[0], data)
+
+ # code specifier
+ two = format.split('=')
+ if len(two) >= 2:
+ return self.calcPackSize(two[0], data)
+
+ # length specifier
+ two = format.split('-')
+ if len(two) == 2:
+ return self.calcPackSize(two[0], data)
+
+ # array specifier
+ two = format.split('*')
+ if len(two) == 2:
+ answer = 0
+ if two[0].isdigit():
+ if int(two[0]) != len(data):
+ raise Exception, "Array field has a constant size, and it doesn't match the actual value"
+ elif two[0]:
+ answer += self.calcPackSize(two[0], len(data))
+
+ for each in data:
+ answer += self.calcPackSize(two[1], each)
+ return answer
+
+ # "printf" string specifier
+ if format[:1] == '%':
+ # format string like specifier
+ return len(format % data)
+
+ # asciiz specifier
+ if format[:1] == 'z':
+ return len(data)+1
+
+ # asciiz specifier
+ if format[:1] == 'u':
+ l = len(data)
+ return l + (l & 1 and 3 or 2)
+
+ # DCE-RPC/NDR string specifier
+ if format[:1] == 'w':
+ l = len(data)
+ return 12+l+l % 2
+
+ # literal specifier
+ if format[:1] == ':':
+ return len(data)
+
+ # struct like specifier
+ return calcsize(format)
+
+ def calcUnpackSize(self, format, data, field = None):
+ if self.debug:
+ print " calcUnpackSize( %s | %s | %r)" % (field, format, data)
+
+ # void specifier
+ if format[:1] == '_':
+ return 0
+
+ addressField = self.findAddressFieldFor(field)
+ if addressField is not None:
+ if not self[addressField]:
+ return 0
+
+ try:
+ lengthField = self.findLengthFieldFor(field)
+ return self[lengthField]
+ except:
+ pass
+
+ # XXX: Try to match to actual values, raise if no match
+
+ # quote specifier
+ if format[:1] == "'" or format[:1] == '"':
+ return len(format)-1
+
+ # address specifier
+ two = format.split('&')
+ if len(two) == 2:
+ return self.calcUnpackSize(two[0], data)
+
+ # code specifier
+ two = format.split('=')
+ if len(two) >= 2:
+ return self.calcUnpackSize(two[0], data)
+
+ # length specifier
+ two = format.split('-')
+ if len(two) == 2:
+ return self.calcUnpackSize(two[0], data)
+
+ # array specifier
+ two = format.split('*')
+ if len(two) == 2:
+ answer = 0
+ if two[0]:
+ if two[0].isdigit():
+ number = int(two[0])
+ else:
+ answer += self.calcUnpackSize(two[0], data)
+ number = self.unpack(two[0], data[:answer])
+
+ while number:
+ number -= 1
+ answer += self.calcUnpackSize(two[1], data[answer:])
+ else:
+ while answer < len(data):
+ answer += self.calcUnpackSize(two[1], data[answer:])
+ return answer
+
+ # "printf" string specifier
+ if format[:1] == '%':
+ raise Exception, "Can't guess the size of a printf like specifier for unpacking"
+
+ # asciiz specifier
+ if format[:1] == 'z':
+ return data.index('\x00')+1
+
+ # asciiz specifier
+ if format[:1] == 'u':
+ l = data.index('\x00\x00')
+ return l + (l & 1 and 3 or 2)
+
+ # DCE-RPC/NDR string specifier
+ if format[:1] == 'w':
+ l = unpack('<L', data[:4])[0]
+ return 12+l*2
+
+ # literal specifier
+ if format[:1] == ':':
+ return len(data)
+
+ # struct like specifier
+ return calcsize(format)
+
+ def calcPackFieldSize(self, fieldName, format = None):
+ if format is None:
+ format = self.formatForField(fieldName)
+
+ return self.calcPackSize(format, self[fieldName])
+
+ def formatForField(self, fieldName):
+ for field in self.commonHdr+self.structure:
+ if field[0] == fieldName:
+ return field[1]
+ raise Exception, ("Field %s not found" % fieldName)
+
+ def findAddressFieldFor(self, fieldName):
+ descriptor = '&%s' % fieldName
+ l = len(descriptor)
+ for field in self.commonHdr+self.structure:
+ if field[1][-l:] == descriptor:
+ return field[0]
+ return None
+
+ def findLengthFieldFor(self, fieldName):
+ descriptor = '-%s' % fieldName
+ l = len(descriptor)
+ for field in self.commonHdr+self.structure:
+ if field[1][-l:] == descriptor:
+ return field[0]
+ return None
+
+ def zeroValue(self, format):
+ two = format.split('*')
+ if len(two) == 2:
+ if two[0].isdigit():
+ return (self.zeroValue(two[1]),)*int(two[0])
+
+ if not format.find('*') == -1: return ()
+ if 's' in format: return ''
+ if format in ['z',':','u']: return ''
+ if format == 'w': return '\x00\x00'
+
+ return 0
+
+ def clear(self):
+ for field in self.commonHdr + self.structure:
+ self[field[0]] = self.zeroValue(field[1])
+
+ def dump(self, msg = None, indent = 0):
+ if msg is None: msg = self.__class__.__name__
+ ind = ' '*indent
+ print "\n%s" % msg
+ fixedFields = []
+ for field in self.commonHdr+self.structure:
+ i = field[0]
+ if i in self.fields:
+ fixedFields.append(i)
+ if isinstance(self[i], Structure):
+ self[i].dump('%s%s:{' % (ind,i), indent = indent + 4)
+ print "%s}" % ind
+ else:
+ print "%s%s: {%r}" % (ind,i,self[i])
+ # Do we have remaining fields not defined in the structures? let's
+ # print them
+ remainingFields = list(set(self.fields) - set(fixedFields))
+ for i in remainingFields:
+ if isinstance(self[i], Structure):
+ self[i].dump('%s%s:{' % (ind,i), indent = indent + 4)
+ print "%s}" % ind
+ else:
+ print "%s%s: {%r}" % (ind,i,self[i])
+
+
+class _StructureTest:
+ alignment = 0
+ def create(self,data = None):
+ if data is not None:
+ return self.theClass(data, alignment = self.alignment)
+ else:
+ return self.theClass(alignment = self.alignment)
+
+ def run(self):
+ print
+ print "-"*70
+ testName = self.__class__.__name__
+ print "starting test: %s....." % testName
+ a = self.create()
+ self.populate(a)
+ a.dump("packing.....")
+ a_str = str(a)
+ print "packed: %r" % a_str
+ print "unpacking....."
+ b = self.create(a_str)
+ b.dump("unpacked.....")
+ print "repacking....."
+ b_str = str(b)
+ if b_str != a_str:
+ print "ERROR: original packed and repacked don't match"
+ print "packed: %r" % b_str
+
+class _Test_simple(_StructureTest):
+ class theClass(Structure):
+ commonHdr = ()
+ structure = (
+ ('int1', '!L'),
+ ('len1','!L-z1'),
+ ('arr1','B*<L'),
+ ('z1', 'z'),
+ ('u1','u'),
+ ('', '"COCA'),
+ ('len2','!H-:1'),
+ ('', '"COCA'),
+ (':1', ':'),
+ ('int3','>L'),
+ ('code1','>L=len(arr1)*2+0x1000'),
+ )
+
+ def populate(self, a):
+ a['default'] = 'hola'
+ a['int1'] = 0x3131
+ a['int3'] = 0x45444342
+ a['z1'] = 'hola'
+ a['u1'] = 'hola'.encode('utf_16_le')
+ a[':1'] = ':1234:'
+ a['arr1'] = (0x12341234,0x88990077,0x41414141)
+ # a['len1'] = 0x42424242
+
+class _Test_fixedLength(_Test_simple):
+ def populate(self, a):
+ _Test_simple.populate(self, a)
+ a['len1'] = 0x42424242
+
+class _Test_simple_aligned4(_Test_simple):
+ alignment = 4
+
+class _Test_nested(_StructureTest):
+ class theClass(Structure):
+ class _Inner(Structure):
+ structure = (('data', 'z'),)
+
+ structure = (
+ ('nest1', ':', _Inner),
+ ('nest2', ':', _Inner),
+ ('int', '<L'),
+ )
+
+ def populate(self, a):
+ a['nest1'] = _Test_nested.theClass._Inner()
+ a['nest2'] = _Test_nested.theClass._Inner()
+ a['nest1']['data'] = 'hola manola'
+ a['nest2']['data'] = 'chau loco'
+ a['int'] = 0x12345678
+
+class _Test_Optional(_StructureTest):
+ class theClass(Structure):
+ structure = (
+ ('pName','<L&Name'),
+ ('pList','<L&List'),
+ ('Name','w'),
+ ('List','<H*<L'),
+ )
+
+ def populate(self, a):
+ a['Name'] = 'Optional test'
+ a['List'] = (1,2,3,4)
+
+class _Test_Optional_sparse(_Test_Optional):
+ def populate(self, a):
+ _Test_Optional.populate(self, a)
+ del a['Name']
+
+class _Test_AsciiZArray(_StructureTest):
+ class theClass(Structure):
+ structure = (
+ ('head','<L'),
+ ('array','B*z'),
+ ('tail','<L'),
+ )
+
+ def populate(self, a):
+ a['head'] = 0x1234
+ a['tail'] = 0xabcd
+ a['array'] = ('hola','manola','te traje')
+
+class _Test_UnpackCode(_StructureTest):
+ class theClass(Structure):
+ structure = (
+ ('leni','<L=len(uno)*2'),
+ ('cuchi','_-uno','leni/2'),
+ ('uno',':'),
+ ('dos',':'),
+ )
+
+ def populate(self, a):
+ a['uno'] = 'soy un loco!'
+ a['dos'] = 'que haces fiera'
+
+class _Test_AAA(_StructureTest):
+ class theClass(Structure):
+ commonHdr = ()
+ structure = (
+ ('iv', '!L=((init_vector & 0xFFFFFF) << 8) | ((pad & 0x3f) << 2) | (keyid & 3)'),
+ ('init_vector', '_','(iv >> 8)'),
+ ('pad', '_','((iv >>2) & 0x3F)'),
+ ('keyid', '_','( iv & 0x03 )'),
+ ('dataLen', '_-data', 'len(inputDataLeft)-4'),
+ ('data',':'),
+ ('icv','>L'),
+ )
+
+ def populate(self, a):
+ a['init_vector']=0x01020304
+ #a['pad']=int('01010101',2)
+ a['pad']=int('010101',2)
+ a['keyid']=0x07
+ a['data']="\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9"
+ a['icv'] = 0x05060708
+ #a['iv'] = 0x01020304
+
+if __name__ == '__main__':
+ _Test_simple().run()
+
+ try:
+ _Test_fixedLength().run()
+ except:
+ print "cannot repack because length is bogus"
+
+ _Test_simple_aligned4().run()
+ _Test_nested().run()
+ _Test_Optional().run()
+ _Test_Optional_sparse().run()
+ _Test_AsciiZArray().run()
+ _Test_UnpackCode().run()
+ _Test_AAA().run()
diff --git a/tests/python_dependencies/impacket/uuid.py b/tests/python_dependencies/impacket/uuid.py
new file mode 100644
index 00000000..fb4d7b3a
--- /dev/null
+++ b/tests/python_dependencies/impacket/uuid.py
@@ -0,0 +1,68 @@
+# Copyright (c) 2003-2016 CORE Security Technologies
+#
+# This software is provided under under a slightly modified version
+# of the Apache Software License. See the accompanying LICENSE file
+# for more information.
+#
+# Description:
+# Generate UUID compliant with http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt.
+# A different, much simpler (not necessarily better) algorithm is used.
+#
+# Author:
+# Javier Kohen (jkohen)
+#
+
+import re
+
+from random import randrange
+from struct import pack, unpack
+
+def generate():
+ # UHm... crappy Python has an maximum integer of 2**31-1.
+ top = (1L<<31)-1
+ return pack("IIII", randrange(top), randrange(top), randrange(top), randrange(top))
+
+def bin_to_string(uuid):
+ uuid1, uuid2, uuid3 = unpack('<LHH', uuid[:8])
+ uuid4, uuid5, uuid6 = unpack('>HHL', uuid[8:16])
+ return '%08X-%04X-%04X-%04X-%04X%08X' % (uuid1, uuid2, uuid3, uuid4, uuid5, uuid6)
+
+def string_to_bin(uuid):
+ matches = re.match('([\dA-Fa-f]{8})-([\dA-Fa-f]{4})-([\dA-Fa-f]{4})-([\dA-Fa-f]{4})-([\dA-Fa-f]{4})([\dA-Fa-f]{8})', uuid)
+ (uuid1, uuid2, uuid3, uuid4, uuid5, uuid6) = map(lambda x: long(x, 16), matches.groups())
+ uuid = pack('<LHH', uuid1, uuid2, uuid3)
+ uuid += pack('>HHL', uuid4, uuid5, uuid6)
+ return uuid
+
+def stringver_to_bin(s):
+ (maj,min) = s.split('.')
+ return pack('<H',int(maj)) + pack('<H',int(min))
+
+def uuidtup_to_bin(tup):
+ if len(tup) != 2: return
+ return string_to_bin(tup[0]) + stringver_to_bin(tup[1])
+
+def bin_to_uuidtup(bin):
+ assert len(bin) == 20
+ uuidstr = bin_to_string(bin[:16])
+ maj, min = unpack("<HH", bin[16:])
+ return uuidstr, "%d.%d" % (maj, min)
+
+#input: string
+#output: tuple (uuid,version)
+#if version is not found in the input string "1.0" is returned
+#example:
+# "00000000-0000-0000-0000-000000000000 3.0" returns ('00000000-0000-0000-0000-000000000000','3.0')
+# "10000000-2000-3000-4000-500000000000 version 3.0" returns ('00000000-0000-0000-0000-000000000000','3.0')
+# "10000000-2000-3000-4000-500000000000 v 3.0" returns ('00000000-0000-0000-0000-000000000000','3.0')
+# "10000000-2000-3000-4000-500000000000" returns ('00000000-0000-0000-0000-000000000000','1.0')
+def string_to_uuidtup(s):
+ g = re.search("([A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}).*?([0-9]{1,5}\.[0-9]{1,5})",s+" 1.0")
+ if g:
+ (u,v) = g.groups()
+ return (u,v)
+ return
+
+def uuidtup_to_string(tup):
+ uuid, (maj, min) = tup
+ return "%s v%d.%d" % (uuid, maj, min)
diff --git a/tests/python_dependencies/impacket/version.py b/tests/python_dependencies/impacket/version.py
new file mode 100644
index 00000000..badd4a8a
--- /dev/null
+++ b/tests/python_dependencies/impacket/version.py
@@ -0,0 +1,12 @@
+# Copyright (c) 2003-2016 CORE Security Technologies
+#
+# This software is provided under under a slightly modified version
+# of the Apache Software License. See the accompanying LICENSE file
+# for more information.
+#
+
+VER_MAJOR = "0"
+VER_MINOR = "9.15"
+
+BANNER = "Impacket v%s.%s - Copyright 2002-2016 Core Security Technologies\n" % (VER_MAJOR,VER_MINOR)
+
diff --git a/tests/rtspserver.pl b/tests/rtspserver.pl
index bddccb91..02d2f9f9 100755
--- a/tests/rtspserver.pl
+++ b/tests/rtspserver.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -37,7 +37,7 @@ use serverhelp qw(
my $verbose = 0; # set to 1 for debugging
my $port = 8990; # just a default
my $ipvnum = 4; # default IP version of rtsp server
-my $idnum = 1; # dafault rtsp server instance number
+my $idnum = 1; # default rtsp server instance number
my $proto = 'rtsp'; # protocol the rtsp server speaks
my $pidfile; # rtsp server pid file
my $logfile; # rtsp server log file
diff --git a/tests/runtests.1 b/tests/runtests.1
index 5576b2fd..a250aa53 100644
--- a/tests/runtests.1
+++ b/tests/runtests.1
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -20,7 +20,8 @@
.\" *
.\" **************************************************************************
.\"
-.TH runtests.pl 1 "2 Feb 2010" "Curl 7.20.0" "runtests"
+.TH runtests.pl 1 "May 05, 2017" "Curl 7.55.0" "runtests"
+
.SH NAME
runtests.pl \- run one or more test cases
.SH SYNOPSIS
@@ -76,6 +77,8 @@ Prints out all files in "log/" to stdout when a test case fails. Very
practical when used in the automated and distributed tests since then the
people checking the failures and the reasons for them might not have physical
access to the machine and logs.
+.IP "-R"
+Run the tests in a scrambled, or randomized, order instead of sequentially.
.IP "-r"
Display run time statistics. (Requires Perl Time::HiRes module)
.IP "-rf"
diff --git a/tests/runtests.html b/tests/runtests.html
deleted file mode 100644
index 7dcde484..00000000
--- a/tests/runtests.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html><head>
-<title>runtests.pl man page</title>
-<meta name="generator" content="roffit">
-<STYLE type="text/css">
-pre {
- overflow: auto;
- margin: 0;
-}
-
-P.level0, pre.level0 {
- padding-left: 2em;
-}
-
-P.level1, pre.level1 {
- padding-left: 4em;
-}
-
-P.level2, pre.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">runtests.pl - run one or more test cases <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">runtests.pl [options] [test number] [!test number] [key word] [!key word]</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0"><span Class="emphasis">runtests.pl</span> runs one, several or all the existing test cases in curl's test suite. It is often called from the root Makefile of the curl package with 'make test'. <a name="TEST"></a><h2 class="nroffsh">TEST NUMBER</h2>
-<p class="level0">If no test case number is given, all existing tests that the script can find will be considered for running. You can specify single test cases to run, space-separated, like "1 3 5 7 11", and you can specify a range like "45 to 67". You can also specify only the tests you don't want to run by listing the numbers with a leading exclamation point, like "!66".
-<p class="level0">It is also possible to specify tests to skip based on a key word describing the test. These are specified with a leading exclamation point and the key word or phrase, like "!HTTP NTLM auth". Likewise, tests to run can be specified simply by specifying the unadorned key words, like "FTPS". Remember that the exclamation marks and spaces will need to be quoted somehow when entered at many command shells. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="-a"></a><span class="nroffip">-a</span>
-<p class="level1">Continue running the rest of the test cases even if one test fails. By default, the test script stops as soon as an error is detected.
-<p class="level0"><a name="-bN"></a><span class="nroffip">-bN</span>
-<p class="level1">Use N as the base TCP/UDP port number on which to start the test servers.
-<p class="level0"><a name="-c"></a><span class="nroffip">-c &lt;curl&gt;</span>
-<p class="level1">Provide a path to a custom curl binary to run the tests with. Default is the curl executable in the build tree.
-<p class="level0"><a name="-d"></a><span class="nroffip">-d</span>
-<p class="level1">Enable protocol debug: have the servers display protocol output.
-<p class="level0"><a name="-e"></a><span class="nroffip">-e</span>
-<p class="level1">Run the test event-based (if possible). This will make runtests invoke curl with --test-event option. This option only works if both curl and libcurl were built debug-enabled.
-<p class="level0"><a name="-g"></a><span class="nroffip">-g</span>
-<p class="level1">Run the given test(s) with gdb. This is best used on a single test case and curl built --disable-shared. This then fires up gdb with command line set to run the specified test case. Simply (set a break-point and) type 'run' to start.
-<p class="level0"><a name="-h"></a><span class="nroffip">-h</span>
-<p class="level1">Displays a help text about this program's command line options.
-<p class="level0"><a name="-k"></a><span class="nroffip">-k</span>
-<p class="level1">Keep output and log files in log/ after a test run, even if no error was detected. Useful for debugging.
-<p class="level0"><a name="-l"></a><span class="nroffip">-l</span>
-<p class="level1">Lists all test case names.
-<p class="level0"><a name="-n"></a><span class="nroffip">-n</span>
-<p class="level1">Disable the check for and use of valgrind.
-<p class="level0"><a name="-p"></a><span class="nroffip">-p</span>
-<p class="level1">Prints out all files in "log/" to stdout when a test case fails. Very practical when used in the automated and distributed tests since then the people checking the failures and the reasons for them might not have physical access to the machine and logs.
-<p class="level0"><a name="-r"></a><span class="nroffip">-r</span>
-<p class="level1">Display run time statistics. (Requires Perl Time::HiRes module)
-<p class="level0"><a name="-rf"></a><span class="nroffip">-rf</span>
-<p class="level1">Display full run time statistics. (Requires Perl Time::HiRes module)
-<p class="level0"><a name="-s"></a><span class="nroffip">-s</span>
-<p class="level1">Shorter output. Speaks less than default.
-<p class="level0"><a name="-tnum"></a><span class="nroffip">-t[num]</span>
-<p class="level1">Selects a <span Class="bold">torture</span> test for the given tests. This makes runtests.pl first run the tests once and count the number of memory allocations made. It then reruns the test that number of times, each time forcing one of the allocations to fail until all allocs have been tested. By setting <span Class="emphasis">num</span> you can force the allocation with that number to be set to fail at once instead of looping through everyone, which is very handy when debugging and then often in combination with <a class="emphasis" href="#-g">-g</a>.
-<p class="level0"><a name="-v"></a><span class="nroffip">-v</span>
-<p class="level1">Enable verbose output. Speaks more than default.
-<p class="level0"><a name="-vc"></a><span class="nroffip">-vc &lt;curl&gt;</span>
-<p class="level1">Provide a path to a custom curl binary to run when verifying that the servers running are indeed our test servers. Default is the curl executable in the build tree. <a name="RUNNING"></a><h2 class="nroffsh">RUNNING TESTS</h2>
-<p class="level0">Many tests have conditions that must be met before the test case can run fine. They could depend on built-in features in libcurl or features present in the operating system or even in third-party libraries that curl may or may not use.
-<p class="level0">The test script checks most of these by itself to determine when it is safe to attempt to run each test. Those which cannot be run due to failed requirements will simply be skipped and listed at the completion of all test cases. In some unusual configurations, the test script cannot make the correct determination for all tests. In these cases, the problematic tests can be skipped using the "!keyword" skip feature documented earlier. <a name="WRITING"></a><h2 class="nroffsh">WRITING TESTS</h2>
-<p class="level0">The simplest way to write test cases is to start with a similar existing test, save it with a new number and then adjust it to fit. There's an attempt to document the test case file format in the tests/FILEFORMAT. <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/tests/runtests.pdf b/tests/runtests.pdf
deleted file mode 100644
index 692e11dc..00000000
--- a/tests/runtests.pdf
+++ /dev/null
Binary files differ
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 583ba3b7..065df7c5 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -145,6 +145,10 @@ my $HTTPPROXYPORT; # HTTP proxy port, when using CONNECT
my $HTTPPIPEPORT; # HTTP pipelining port
my $HTTPUNIXPATH; # HTTP server Unix domain socket path
my $HTTP2PORT; # HTTP/2 server port
+my $DICTPORT; # DICT server port
+my $SMBPORT; # SMB server port
+my $SMBSPORT; # SMBS server port
+my $NEGTELNETPORT; # TELNET server port with negotiation
my $srcdir = $ENV{'srcdir'} || '.';
my $CURL="../src/curl".exe_ext(); # what curl executable to run on the tests
@@ -194,7 +198,7 @@ my $pwd = getcwd(); # current working directory
my $start;
my $ftpchecktime=1; # time it took to verify our test FTP server
-
+my $scrambleorder;
my $stunnel = checkcmd("stunnel4") || checkcmd("tstunnel") || checkcmd("stunnel");
my $valgrind = checktestcmd("valgrind");
my $valgrind_logfile="--logfile";
@@ -378,7 +382,8 @@ sub init_serverpidfile_hash {
}
}
}
- for my $proto (('tftp', 'sftp', 'socks', 'ssh', 'rtsp', 'gopher', 'httptls')) {
+ for my $proto (('tftp', 'sftp', 'socks', 'ssh', 'rtsp', 'gopher', 'httptls',
+ 'dict', 'smb', 'smbs', 'telnet')) {
for my $ipvnum ((4, 6)) {
for my $idnum ((1, 2)) {
my $serv = servername_id($proto, $ipvnum, $idnum);
@@ -1119,6 +1124,128 @@ sub verifysocks {
}
#######################################################################
+# Verify that the server that runs on $ip, $port is our server. This also
+# implies that we can speak with it, as there might be occasions when the
+# server runs fine but we cannot talk to it ("Failed to connect to ::1: Can't
+# assign requested address")
+#
+sub verifysmb {
+ my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
+ my $server = servername_id($proto, $ipvnum, $idnum);
+ my $pid = 0;
+ my $time=time();
+ my $extra="";
+
+ my $verifylog = "$LOGDIR/".
+ servername_canon($proto, $ipvnum, $idnum) .'_verify.log';
+ unlink($verifylog) if(-f $verifylog);
+
+ my $flags = "--max-time $server_response_maxtime ";
+ $flags .= "--silent ";
+ $flags .= "--verbose ";
+ $flags .= "--globoff ";
+ $flags .= "-u 'curltest:curltest' ";
+ $flags .= $extra;
+ $flags .= "\"$proto://$ip:$port/SERVER/verifiedserver\"";
+
+ my $cmd = "$VCURL $flags 2>$verifylog";
+
+ # check if this is our server running on this port:
+ logmsg "RUN: $cmd\n" if($verbose);
+ my @data = runclientoutput($cmd);
+
+ my $res = $? >> 8; # rotate the result
+ if($res & 128) {
+ logmsg "RUN: curl command died with a coredump\n";
+ return -1;
+ }
+
+ foreach my $line (@data) {
+ if($line =~ /WE ROOLZ: (\d+)/) {
+ # this is our test server with a known pid!
+ $pid = 0+$1;
+ last;
+ }
+ }
+ if($pid <= 0 && @data && $data[0]) {
+ # this is not a known server
+ logmsg "RUN: Unknown server on our $server port: $port\n";
+ return 0;
+ }
+ # we can/should use the time it took to verify the server as a measure
+ # on how fast/slow this host is.
+ my $took = int(0.5+time()-$time);
+
+ if($verbose) {
+ logmsg "RUN: Verifying our test $server server took $took seconds\n";
+ }
+ $ftpchecktime = $took>=1?$took:1; # make sure it never is below 1
+
+ return $pid;
+}
+
+#######################################################################
+# Verify that the server that runs on $ip, $port is our server. This also
+# implies that we can speak with it, as there might be occasions when the
+# server runs fine but we cannot talk to it ("Failed to connect to ::1: Can't
+# assign requested address")
+#
+sub verifytelnet {
+ my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
+ my $server = servername_id($proto, $ipvnum, $idnum);
+ my $pid = 0;
+ my $time=time();
+ my $extra="";
+
+ my $verifylog = "$LOGDIR/".
+ servername_canon($proto, $ipvnum, $idnum) .'_verify.log';
+ unlink($verifylog) if(-f $verifylog);
+
+ my $flags = "--max-time $server_response_maxtime ";
+ $flags .= "--silent ";
+ $flags .= "--verbose ";
+ $flags .= "--globoff ";
+ $flags .= "--upload-file - ";
+ $flags .= $extra;
+ $flags .= "\"$proto://$ip:$port\"";
+
+ my $cmd = "echo 'verifiedserver' | $VCURL $flags 2>$verifylog";
+
+ # check if this is our server running on this port:
+ logmsg "RUN: $cmd\n" if($verbose);
+ my @data = runclientoutput($cmd);
+
+ my $res = $? >> 8; # rotate the result
+ if($res & 128) {
+ logmsg "RUN: curl command died with a coredump\n";
+ return -1;
+ }
+
+ foreach my $line (@data) {
+ if($line =~ /WE ROOLZ: (\d+)/) {
+ # this is our test server with a known pid!
+ $pid = 0+$1;
+ last;
+ }
+ }
+ if($pid <= 0 && @data && $data[0]) {
+ # this is not a known server
+ logmsg "RUN: Unknown server on our $server port: $port\n";
+ return 0;
+ }
+ # we can/should use the time it took to verify the server as a measure
+ # on how fast/slow this host is.
+ my $took = int(0.5+time()-$time);
+
+ if($verbose) {
+ logmsg "RUN: Verifying our test $server server took $took seconds\n";
+ }
+
+ return $pid;
+}
+
+
+#######################################################################
# Verify that the server that runs on $ip, $port is our server.
# Retry over several seconds before giving up. The ssh server in
# particular can take a long time to start if it needs to generate
@@ -1143,7 +1270,10 @@ my %protofunc = ('http' => \&verifyhttp,
'ssh' => \&verifyssh,
'socks' => \&verifysocks,
'gopher' => \&verifyhttp,
- 'httptls' => \&verifyhttptls);
+ 'httptls' => \&verifyhttptls,
+ 'dict' => \&verifyftp,
+ 'smb' => \&verifysmb,
+ 'telnet' => \&verifytelnet);
sub verifyserver {
my ($proto, $ipvnum, $idnum, $ip, $port) = @_;
@@ -1227,6 +1357,7 @@ sub runhttp2server {
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
$flags .= "--port $HTTP2PORT ";
+ $flags .= "--connect $HOSTIP:$HTTPPORT ";
$flags .= $verbose_flag if($debugprotocol);
my $cmd = "$exe $flags";
@@ -2164,6 +2295,235 @@ sub runsocksserver {
}
#######################################################################
+# start the dict server
+#
+sub rundictserver {
+ my ($verbose, $alt, $port) = @_;
+ my $proto = "dict";
+ my $ip = $HOSTIP;
+ my $ipvnum = 4;
+ my $idnum = 1;
+ my $server;
+ my $srvrname;
+ my $pidfile;
+ my $logfile;
+ my $flags = "";
+
+ if($alt eq "ipv6") {
+ # No IPv6
+ }
+
+ $server = servername_id($proto, $ipvnum, $idnum);
+
+ $pidfile = $serverpidfile{$server};
+
+ # don't retry if the server doesn't work
+ if ($doesntrun{$pidfile}) {
+ return (0,0);
+ }
+
+ my $pid = processexists($pidfile);
+ if($pid > 0) {
+ stopserver($server, "$pid");
+ }
+ unlink($pidfile) if(-f $pidfile);
+
+ $srvrname = servername_str($proto, $ipvnum, $idnum);
+
+ $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
+
+ $flags .= "--verbose 1 " if($debugprotocol);
+ $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
+ $flags .= "--id $idnum " if($idnum > 1);
+ $flags .= "--port $port --srcdir \"$srcdir\"";
+
+ my $cmd = "$srcdir/dictserver.py $flags";
+ my ($dictpid, $pid2) = startnew($cmd, $pidfile, 15, 0);
+
+ if($dictpid <= 0 || !pidexists($dictpid)) {
+ # it is NOT alive
+ logmsg "RUN: failed to start the $srvrname server\n";
+ stopserver($server, "$pid2");
+ displaylogs($testnumcheck);
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
+ }
+
+ # Server is up. Verify that we can speak to it.
+ my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
+ if(!$pid3) {
+ logmsg "RUN: $srvrname server failed verification\n";
+ # failed to talk to it properly. Kill the server and return failure
+ stopserver($server, "$dictpid $pid2");
+ displaylogs($testnumcheck);
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
+ }
+ $pid2 = $pid3;
+
+ if($verbose) {
+ logmsg "RUN: $srvrname server is now running PID $dictpid\n";
+ }
+
+ sleep(1);
+
+ return ($dictpid, $pid2);
+}
+
+#######################################################################
+# start the SMB server
+#
+sub runsmbserver {
+ my ($verbose, $alt, $port) = @_;
+ my $proto = "smb";
+ my $ip = $HOSTIP;
+ my $ipvnum = 4;
+ my $idnum = 1;
+ my $server;
+ my $srvrname;
+ my $pidfile;
+ my $logfile;
+ my $flags = "";
+
+ if($alt eq "ipv6") {
+ # No IPv6
+ }
+
+ $server = servername_id($proto, $ipvnum, $idnum);
+
+ $pidfile = $serverpidfile{$server};
+
+ # don't retry if the server doesn't work
+ if ($doesntrun{$pidfile}) {
+ return (0,0);
+ }
+
+ my $pid = processexists($pidfile);
+ if($pid > 0) {
+ stopserver($server, "$pid");
+ }
+ unlink($pidfile) if(-f $pidfile);
+
+ $srvrname = servername_str($proto, $ipvnum, $idnum);
+
+ $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
+
+ $flags .= "--verbose 1 " if($debugprotocol);
+ $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
+ $flags .= "--id $idnum " if($idnum > 1);
+ $flags .= "--port $port --srcdir \"$srcdir\"";
+
+ my $cmd = "$srcdir/smbserver.py $flags";
+ my ($smbpid, $pid2) = startnew($cmd, $pidfile, 15, 0);
+
+ if($smbpid <= 0 || !pidexists($smbpid)) {
+ # it is NOT alive
+ logmsg "RUN: failed to start the $srvrname server\n";
+ stopserver($server, "$pid2");
+ displaylogs($testnumcheck);
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
+ }
+
+ # Server is up. Verify that we can speak to it.
+ my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
+ if(!$pid3) {
+ logmsg "RUN: $srvrname server failed verification\n";
+ # failed to talk to it properly. Kill the server and return failure
+ stopserver($server, "$smbpid $pid2");
+ displaylogs($testnumcheck);
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
+ }
+ $pid2 = $pid3;
+
+ if($verbose) {
+ logmsg "RUN: $srvrname server is now running PID $smbpid\n";
+ }
+
+ sleep(1);
+
+ return ($smbpid, $pid2);
+}
+
+#######################################################################
+# start the telnet server
+#
+sub runnegtelnetserver {
+ my ($verbose, $alt, $port) = @_;
+ my $proto = "telnet";
+ my $ip = $HOSTIP;
+ my $ipvnum = 4;
+ my $idnum = 1;
+ my $server;
+ my $srvrname;
+ my $pidfile;
+ my $logfile;
+ my $flags = "";
+
+ if($alt eq "ipv6") {
+ # No IPv6
+ }
+
+ $server = servername_id($proto, $ipvnum, $idnum);
+
+ $pidfile = $serverpidfile{$server};
+
+ # don't retry if the server doesn't work
+ if ($doesntrun{$pidfile}) {
+ return (0,0);
+ }
+
+ my $pid = processexists($pidfile);
+ if($pid > 0) {
+ stopserver($server, "$pid");
+ }
+ unlink($pidfile) if(-f $pidfile);
+
+ $srvrname = servername_str($proto, $ipvnum, $idnum);
+
+ $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
+
+ $flags .= "--verbose 1 " if($debugprotocol);
+ $flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
+ $flags .= "--id $idnum " if($idnum > 1);
+ $flags .= "--port $port --srcdir \"$srcdir\"";
+
+ my $cmd = "$srcdir/negtelnetserver.py $flags";
+ my ($ntelpid, $pid2) = startnew($cmd, $pidfile, 15, 0);
+
+ if($ntelpid <= 0 || !pidexists($ntelpid)) {
+ # it is NOT alive
+ logmsg "RUN: failed to start the $srvrname server\n";
+ stopserver($server, "$pid2");
+ displaylogs($testnumcheck);
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
+ }
+
+ # Server is up. Verify that we can speak to it.
+ my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
+ if(!$pid3) {
+ logmsg "RUN: $srvrname server failed verification\n";
+ # failed to talk to it properly. Kill the server and return failure
+ stopserver($server, "$ntelpid $pid2");
+ displaylogs($testnumcheck);
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
+ }
+ $pid2 = $pid3;
+
+ if($verbose) {
+ logmsg "RUN: $srvrname server is now running PID $ntelpid\n";
+ }
+
+ sleep(1);
+
+ return ($ntelpid, $pid2);
+}
+
+
+#######################################################################
# Single shot http and gopher server responsiveness test. This should only
# be used to verify that a server present in %run hash is still functional
#
@@ -2411,6 +2771,7 @@ sub checksystem {
}
elsif ($libcurl =~ /securetransport/i) {
$has_darwinssl=1;
+ $has_sslpinning=1;
$ssllib="DarwinSSL";
}
elsif ($libcurl =~ /BoringSSL/i) {
@@ -2683,7 +3044,7 @@ sub checksystem {
}
logmsg sprintf("\n* GOPHER/%d ", $GOPHERPORT);
if($gopher_ipv6) {
- logmsg sprintf("GOPHER-IPv6/%d", $GOPHERPORT);
+ logmsg sprintf("GOPHER-IPv6/%d", $GOPHER6PORT);
}
logmsg sprintf("\n* SSH/%d ", $SSHPORT);
logmsg sprintf("SOCKS/%d ", $SOCKSPORT);
@@ -2760,6 +3121,13 @@ sub subVariables {
$$thing =~ s/%TFTP6PORT/$TFTP6PORT/g;
$$thing =~ s/%TFTPPORT/$TFTPPORT/g;
+ $$thing =~ s/%DICTPORT/$DICTPORT/g;
+
+ $$thing =~ s/%SMBPORT/$SMBPORT/g;
+ $$thing =~ s/%SMBSPORT/$SMBSPORT/g;
+
+ $$thing =~ s/%NEGTELNETPORT/$NEGTELNETPORT/g;
+
# server Unix domain socket paths
$$thing =~ s/%HTTPUNIXPATH/$HTTPUNIXPATH/g;
@@ -2794,7 +3162,7 @@ sub subVariables {
# HTTP2
- $$thing =~ s/%H2CVER/$h2cver/g;
+ $$thing =~ s/%H2CVER/$h2cver/g;
}
sub fixarray {
@@ -3037,6 +3405,11 @@ sub singletest {
next;
}
}
+ elsif($1 eq "threaded-resolver") {
+ if($has_threadedres) {
+ next;
+ }
+ }
elsif($1 eq "PSL") {
if($has_psl) {
next;
@@ -3183,6 +3556,11 @@ sub singletest {
next;
}
}
+ elsif($1 eq "threaded-resolver") {
+ if(!$has_threadedres) {
+ next;
+ }
+ }
else {
next;
}
@@ -3278,11 +3656,6 @@ sub singletest {
}
if(!$why) {
- # TODO:
- # Add a precheck cache. If a precheck command was already invoked
- # exactly like this, then use the previous result to speed up
- # successive test invokes!
-
my @precheck = getpart("client", "precheck");
if(@precheck) {
$cmd = $precheck[0];
@@ -3332,31 +3705,12 @@ sub singletest {
}
logmsg sprintf("test %04d...", $testnum) if(!$automakestyle);
- # extract the reply data
- my @reply = getpart("reply", "data");
- my @replycheck = getpart("reply", "datacheck");
-
my %replyattr = getpartattr("reply", "data");
- my %replycheckattr = getpartattr("reply", "datacheck");
-
- if (@replycheck) {
- # we use this file instead to check the final output against
- # get the mode attribute
- my $filemode=$replycheckattr{'mode'};
- if($filemode && ($filemode eq "text") && $has_textaware) {
- # text mode when running on windows: fix line endings
- map s/\r\n/\n/g, @replycheck;
- map s/\n/\r\n/g, @replycheck;
- }
- if($replycheckattr{'nonewline'}) {
- # Yes, we must cut off the final newline from the final line
- # of the datacheck
- chomp($replycheck[$#replycheck]);
- }
-
- for my $partsuffix (('1', '2', '3', '4')) {
+ my @reply;
+ if (partexists("reply", "datacheck")) {
+ for my $partsuffix (('', '1', '2', '3', '4')) {
my @replycheckpart = getpart("reply", "datacheck".$partsuffix);
- if(@replycheckpart || partexists("reply", "datacheck".$partsuffix) ) {
+ if(@replycheckpart) {
my %replycheckpartattr = getpartattr("reply", "datacheck".$partsuffix);
# get the mode attribute
my $filemode=$replycheckpartattr{'mode'};
@@ -3370,13 +3724,13 @@ sub singletest {
# of the datacheck
chomp($replycheckpart[$#replycheckpart]);
}
- push(@replycheck, @replycheckpart);
+ push(@reply, @replycheckpart);
}
}
-
- @reply=@replycheck;
}
else {
+ # check against the data section
+ @reply = getpart("reply", "data");
# get the mode attribute
my $filemode=$replyattr{'mode'};
if($filemode && ($filemode eq "text") && $has_textaware) {
@@ -3616,21 +3970,6 @@ sub singletest {
my $dumped_core;
my $cmdres;
- # Apr 2007: precommand isn't being used and could be removed
- my @precommand= getpart("client", "precommand");
- if($precommand[0]) {
- # this is pure perl to eval!
- my $code = join("", @precommand);
- eval $code;
- if($@) {
- logmsg "perl: $code\n";
- logmsg "precommand: $@";
- stopservers($verbose);
- timestampskippedevents($testnum);
- return -1;
- }
- }
-
if($gdbthis) {
my $gdbinit = "$TESTDIR/gdbinit$testnum";
open(GDBCMD, ">$LOGDIR/gdbcmd");
@@ -3792,7 +4131,7 @@ sub singletest {
# run the postcheck command
my @postcheck= getpart("client", "postcheck");
if(@postcheck) {
- $cmd = $postcheck[0];
+ $cmd = join("", @postcheck);
chomp $cmd;
subVariables \$cmd;
if($cmd) {
@@ -4143,7 +4482,7 @@ sub singletest {
$timevrfyend{$testnum} = Time::HiRes::time() if($timestats);
return 1;
}
- my @e = valgrindparse($srcdir, $feature{'SSL'}, "$LOGDIR/$vgfile");
+ my @e = valgrindparse("$LOGDIR/$vgfile");
if(@e && $e[0]) {
if($automakestyle) {
logmsg "FAIL: $testnum - $testname - valgrind\n";
@@ -4613,7 +4952,7 @@ sub startservers {
return "failed starting socks5 server";
}
elsif(($sshdid =~ /OpenSSH/) && ($sshdvernum < 370)) {
- # Need OpenSSH 3.7 for socks5 - http://www.openssh.com/txt/release-3.7
+ # Need OpenSSH 3.7 for socks5 - https://www.openssh.com/txt/release-3.7
logmsg "$sshdverstr insufficient; socks5 tests need at least OpenSSH 3.7\n";
return "failed starting socks5 server";
}
@@ -4640,6 +4979,41 @@ sub startservers {
$run{'http-unix'}="$pid $pid2";
}
}
+ elsif($what eq "dict") {
+ if(!$run{'dict'}) {
+ ($pid, $pid2) = rundictserver($verbose, "", $DICTPORT);
+ if($pid <= 0) {
+ return "failed starting DICT server";
+ }
+ logmsg sprintf ("* pid DICT => %d %d\n", $pid, $pid2)
+ if($verbose);
+ $run{'dict'}="$pid $pid2";
+ }
+ }
+ elsif($what eq "smb") {
+ if(!$run{'smb'}) {
+ ($pid, $pid2) = runsmbserver($verbose, "", $SMBPORT);
+ if($pid <= 0) {
+ return "failed starting SMB server";
+ }
+ logmsg sprintf ("* pid SMB => %d %d\n", $pid, $pid2)
+ if($verbose);
+ $run{'dict'}="$pid $pid2";
+ }
+ }
+ elsif($what eq "telnet") {
+ if(!$run{'telnet'}) {
+ ($pid, $pid2) = runnegtelnetserver($verbose,
+ "",
+ $NEGTELNETPORT);
+ if($pid <= 0) {
+ return "failed starting neg TELNET server";
+ }
+ logmsg sprintf ("* pid neg TELNET => %d %d\n", $pid, $pid2)
+ if($verbose);
+ $run{'dict'}="$pid $pid2";
+ }
+ }
elsif($what eq "none") {
logmsg "* starts no server\n" if ($verbose);
}
@@ -4869,6 +5243,10 @@ while(@ARGV) {
# have the servers display protocol output
$debugprotocol=1;
}
+ elsif($ARGV[0] eq "-e") {
+ # run the tests cases event based if possible
+ $run_event_based=1;
+ }
elsif ($ARGV[0] eq "-g") {
# run this test with gdb
$gdbthis=1;
@@ -4891,6 +5269,10 @@ while(@ARGV) {
# no valgrind
undef $valgrind;
}
+ elsif ($ARGV[0] eq "-R") {
+ # execute in scrambled order
+ $scrambleorder=1;
+ }
elsif($ARGV[0] =~ /^-t(.*)/) {
# torture
$torture=1;
@@ -4906,10 +5288,6 @@ while(@ARGV) {
# continue anyway, even if a test fail
$anyway=1;
}
- elsif($ARGV[0] eq "-e") {
- # run the tests cases event based if possible
- $run_event_based=1;
- }
elsif($ARGV[0] eq "-p") {
$postmortem=1;
}
@@ -4957,6 +5335,7 @@ Usage: runtests.pl [options] [test selection(s)]
-bN use base port number N for test servers (default $base)
-c path use this curl executable
-d display server debug info
+ -e event-based execution
-g run the test case with gdb
-gw run the test case with gdb as a windowed application
-h this help text
@@ -4964,6 +5343,7 @@ Usage: runtests.pl [options] [test selection(s)]
-l list all test case names/descriptions
-n no valgrind
-p print log file contents when a test fails
+ -R scrambled order
-r run time statistics
-rf full run time statistics
-s short output
@@ -5093,6 +5473,10 @@ $HTTPTLS6PORT = $base++; # HTTP TLS (non-stunnel) IPv6 server port
$HTTPPROXYPORT = $base++; # HTTP proxy port, when using CONNECT
$HTTPPIPEPORT = $base++; # HTTP pipelining port
$HTTP2PORT = $base++; # HTTP/2 port
+$DICTPORT = $base++; # DICT port
+$SMBPORT = $base++; # SMB port
+$SMBSPORT = $base++; # SMBS port
+$NEGTELNETPORT = $base++; # TELNET port with negotiation
$HTTPUNIXPATH = 'http.sock'; # HTTP server Unix domain socket path
#######################################################################
@@ -5187,6 +5571,23 @@ else {
$TESTCASES = $verified;
}
+if($scrambleorder) {
+ # scramble the order of the test cases
+ my @rand;
+ while($TESTCASES) {
+ my @all = split(/ +/, $TESTCASES);
+ if(!$all[0]) {
+ # if the first is blank, shift away it
+ shift @all;
+ }
+ my $r = rand @all;
+ push @rand, $all[$r];
+ $all[$r]="";
+ $TESTCASES = join(" ", @all);
+ }
+ $TESTCASES = join(" ", @rand);
+}
+
#######################################################################
# Start the command line log
#
diff --git a/tests/secureserver.pl b/tests/secureserver.pl
index 3a7443c4..c897ee5f 100755
--- a/tests/secureserver.pl
+++ b/tests/secureserver.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -63,7 +63,7 @@ my $pidfile; # stunnel pid file
my $logfile; # stunnel log file
my $loglevel = 5; # stunnel log level
my $ipvnum = 4; # default IP version of stunneled server
-my $idnum = 1; # dafault stunneled server instance number
+my $idnum = 1; # default stunneled server instance number
my $proto = 'https'; # default secure server protocol
my $conffile; # stunnel configuration file
my $capath; # certificate chain PEM folder
@@ -172,7 +172,7 @@ while(@ARGV) {
}
#***************************************************************************
-# Initialize command line option dependant variables
+# Initialize command line option dependent variables
#
if(!$pidfile) {
$pidfile = "$path/". server_pidfilename($proto, $ipvnum, $idnum);
@@ -181,7 +181,7 @@ if(!$logfile) {
$logfile = server_logfilename($logdir, $proto, $ipvnum, $idnum);
}
-$conffile = "$path/stunnel.conf";
+$conffile = "$path/${proto}_stunnel.conf";
$capath = abs_path($path);
$certfile = "$srcdir/". ($stuncert?"certs/$stuncert":"stunnel.pem");
diff --git a/tests/server/CMakeLists.txt b/tests/server/CMakeLists.txt
index 00f5242f..cfc1434c 100644
--- a/tests/server/CMakeLists.txt
+++ b/tests/server/CMakeLists.txt
@@ -1,5 +1,9 @@
set(TARGET_LABEL_PREFIX "Test server ")
+if(MSVC)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127 /wd4306")
+endif()
+
function(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
add_executable( ${TEST_NAME} ${ARGN} )
string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
@@ -7,7 +11,7 @@ function(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
include_directories(
${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
- ${CURL_BINARY_DIR}/include # To be able to reach "curl/curlbuild.h"
+ ${CURL_BINARY_DIR}/include # To be able to reach "curl/curl.h"
)
if(USE_ARES)
include_directories(${CARES_INCLUDE_DIR})
diff --git a/tests/server/Makefile.am b/tests/server/Makefile.am
index e274c01a..f2067f2e 100644
--- a/tests/server/Makefile.am
+++ b/tests/server/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -26,8 +26,6 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# being currently built and tested are searched before the library which
# might possibly already be installed in the system.
#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
@@ -35,17 +33,13 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# $(top_srcdir)/ares is for in-tree c-ares's external include files
if USE_EMBEDDED_ARES
-AM_CPPFLAGS = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
+AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
-I$(top_builddir)/ares \
-I$(top_srcdir)/ares
else
-AM_CPPFLAGS = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
+AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib
endif
@@ -64,3 +58,8 @@ EXTRA_DIST = base64.pl Makefile.inc CMakeLists.txt
checksrc:
@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
+
+if CURLDEBUG
+# for debug builds, we scan the sources on all regular make invokes
+all-local: checksrc
+endif
diff --git a/tests/server/Makefile.in b/tests/server/Makefile.in
index 79819752..fa3a9acb 100644
--- a/tests/server/Makefile.in
+++ b/tests/server/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -94,7 +94,8 @@ noinst_PROGRAMS = getpart$(EXEEXT) resolve$(EXEEXT) rtspd$(EXEEXT) \
fake_ntlm$(EXEEXT)
subdir = tests/server
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \
+ $(top_srcdir)/m4/curl-compilers.m4 \
$(top_srcdir)/m4/curl-confopts.m4 \
$(top_srcdir)/m4/curl-functions.m4 \
$(top_srcdir)/m4/curl-openssl.m4 \
@@ -115,8 +116,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
@@ -321,6 +321,12 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
+CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
+CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
+CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -360,6 +366,8 @@ ENABLE_SHARED = @ENABLE_SHARED@
ENABLE_STATIC = @ENABLE_STATIC@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GCOV = @GCOV@
+GENHTML = @GENHTML@
GREP = @GREP@
HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
@@ -372,6 +380,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPV6_ENABLED = @IPV6_ENABLED@
+LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_LIBS = @LIBCURL_LIBS@
@@ -507,7 +516,7 @@ top_srcdir = @top_srcdir@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -522,9 +531,7 @@ top_srcdir = @top_srcdir@
#
###########################################################################
AUTOMAKE_OPTIONS = foreign nostdinc
-@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_srcdir)/include \
@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \
@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib $(am__append_1)
@@ -533,16 +540,12 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# being currently built and tested are searched before the library which
# might possibly already be installed in the system.
#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files
-@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_srcdir)/include \
@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \
@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \
@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \
@@ -1986,7 +1989,8 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
-all-am: Makefile $(PROGRAMS)
+@CURLDEBUG_FALSE@all-local:
+all-am: Makefile $(PROGRAMS) all-local
installdirs:
install: install-am
install-exec: install-exec-am
@@ -2093,9 +2097,9 @@ uninstall-am:
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
- ctags-am distclean distclean-compile distclean-generic \
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \
+ clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
@@ -2113,6 +2117,9 @@ uninstall-am:
checksrc:
@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
+# for debug builds, we scan the sources on all regular make invokes
+@CURLDEBUG_TRUE@all-local: checksrc
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/tests/server/fake_ntlm.c b/tests/server/fake_ntlm.c
index 87118b31..0d1b3e1b 100644
--- a/tests/server/fake_ntlm.c
+++ b/tests/server/fake_ntlm.c
@@ -37,11 +37,9 @@
/* include memdebug.h last */
#include "memdebug.h"
-#ifndef DEFAULT_LOGFILE
-#define DEFAULT_LOGFILE "log/fake_ntlm.log"
-#endif
+#define LOGFILE "log/fake_ntlm%d.log"
-const char *serverlogfile = DEFAULT_LOGFILE;
+const char *serverlogfile;
/*
* Returns an allocated buffer with printable representation of input
@@ -111,6 +109,7 @@ static char *printable(char *inbuf, size_t inlength)
int main(int argc, char *argv[])
{
char buf[1024];
+ char logfilename[256];
FILE *stream;
char *filename;
int error;
@@ -120,9 +119,9 @@ int main(int argc, char *argv[])
long testnum;
const char *env;
int arg = 1;
- char *helper_user = (char *)"unknown";
- char *helper_proto = (char *)"unknown";
- char *helper_domain = (char *)"unknown";
+ const char *helper_user = "unknown";
+ const char *helper_proto = "unknown";
+ const char *helper_domain = "unknown";
bool use_cached_creds = FALSE;
char *msgbuf;
@@ -158,25 +157,29 @@ int main(int argc, char *argv[])
}
}
- logmsg("fake_ntlm (user: %s) (proto: %s) (domain: %s) (cached creds: %s)",
- helper_user, helper_proto, helper_domain,
- (use_cached_creds) ? "yes" : "no");
-
env = getenv("CURL_NTLM_AUTH_TESTNUM");
if(env) {
char *endptr;
long lnum = strtol(env, &endptr, 10);
if((endptr != env + strlen(env)) || (lnum < 1L)) {
- logmsg("Test number not valid in CURL_NTLM_AUTH_TESTNUM");
+ fprintf(stderr, "Test number not valid in CURL_NTLM_AUTH_TESTNUM");
exit(1);
}
testnum = lnum;
}
else {
- logmsg("Test number not specified in CURL_NTLM_AUTH_TESTNUM");
+ fprintf(stderr, "Test number not specified in CURL_NTLM_AUTH_TESTNUM");
exit(1);
}
+ /* logmsg cannot be used until this file name is set */
+ snprintf(logfilename, sizeof(logfilename), LOGFILE, testnum);
+ serverlogfile = logfilename;
+
+ logmsg("fake_ntlm (user: %s) (proto: %s) (domain: %s) (cached creds: %s)",
+ helper_user, helper_proto, helper_domain,
+ (use_cached_creds) ? "yes" : "no");
+
env = getenv("CURL_NTLM_AUTH_SRCDIR");
if(env) {
path = env;
@@ -276,5 +279,6 @@ int main(int argc, char *argv[])
exit(1);
}
}
+ logmsg("Exit");
return 1;
}
diff --git a/tests/server/getpart.c b/tests/server/getpart.c
index 25758bd4..bb8351bc 100644
--- a/tests/server/getpart.c
+++ b/tests/server/getpart.c
@@ -190,7 +190,7 @@ static int appenddata(char **dst_buf, /* dest buffer */
static int decodedata(char **buf, /* dest buffer */
size_t *len) /* dest buffer data length */
{
- int error = 0;
+ CURLcode error = CURLE_OK;
unsigned char *buf64 = NULL;
size_t src_len = 0;
@@ -198,7 +198,7 @@ static int decodedata(char **buf, /* dest buffer */
return GPE_OK;
/* base64 decode the given buffer */
- error = (int) Curl_base64_decode(*buf, &buf64, &src_len);
+ error = Curl_base64_decode(*buf, &buf64, &src_len);
if(error)
return GPE_OUT_OF_MEMORY;
diff --git a/tests/server/resolve.c b/tests/server/resolve.c
index 206245ab..34f14e06 100644
--- a/tests/server/resolve.c
+++ b/tests/server/resolve.c
@@ -107,16 +107,8 @@ int main(int argc, char *argv[])
atexit(win32_cleanup);
#endif
- if(!use_ipv6) {
- /* gethostbyname() resolve */
- struct hostent *he;
-
- he = gethostbyname(host);
-
- rc = !he;
- }
- else {
#ifdef ENABLE_IPV6
+ if(use_ipv6) {
/* Check that the system has IPv6 enabled before checking the resolver */
curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0);
if(s == CURL_SOCKET_BAD)
@@ -125,28 +117,38 @@ int main(int argc, char *argv[])
else {
sclose(s);
}
+ }
- if(rc == 0) {
- /* getaddrinfo() resolve */
- struct addrinfo *ai;
- struct addrinfo hints;
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = PF_INET6;
- hints.ai_socktype = SOCK_STREAM;
- hints.ai_flags = AI_CANONNAME;
- /* Use parenthesis around functions to stop them from being replaced by
- the macro in memdebug.h */
- rc = (getaddrinfo)(host, "80", &hints, &ai);
- if(rc == 0)
- (freeaddrinfo)(ai);
- }
-
+ if(rc == 0) {
+ /* getaddrinfo() resolve */
+ struct addrinfo *ai;
+ struct addrinfo hints;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = use_ipv6 ? PF_INET6 : PF_INET;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_CANONNAME;
+ /* Use parenthesis around functions to stop them from being replaced by
+ the macro in memdebug.h */
+ rc = (getaddrinfo)(host, "80", &hints, &ai);
+ if(rc == 0)
+ (freeaddrinfo)(ai);
+ }
#else
+ if(use_ipv6) {
puts("IPv6 support has been disabled in this program");
return 1;
-#endif
}
+ else {
+ /* gethostbyname() resolve */
+ struct hostent *he;
+
+ he = gethostbyname(host);
+
+ rc = !he;
+ }
+#endif
+
if(rc)
printf("Resolving %s '%s' didn't work\n", ipv_inuse, host);
diff --git a/tests/server/rtspd.c b/tests/server/rtspd.c
index ea231da3..120d65d5 100644
--- a/tests/server/rtspd.c
+++ b/tests/server/rtspd.c
@@ -1190,13 +1190,15 @@ int main(int argc, char *argv[])
int wrotepidfile = 0;
int flag;
unsigned short port = DEFAULT_PORT;
- char *pidname= (char *)".rtsp.pid";
+ const char *pidname = ".rtsp.pid";
struct httprequest req;
int rc;
int error;
int arg=1;
long pid;
+ memset(&req, 0, sizeof(req));
+
while(argc>arg) {
if(!strcmp("--version", argv[arg])) {
printf("rtspd IPv4%s"
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index 78588d3a..6695d848 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -405,7 +405,8 @@ static ssize_t fullwrite(int filedes, const void *buffer, size_t nbytes)
ssize_t nwrite = 0;
do {
- wc = write(filedes, (unsigned char *)buffer + nwrite, nbytes - nwrite);
+ wc = write(filedes, (const unsigned char *)buffer + nwrite,
+ nbytes - nwrite);
if(got_exit_signal) {
logmsg("signalled to die");
@@ -548,7 +549,7 @@ static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter)
free(data);
}
else
- return -1;
+ return (DWORD)-1;
/* retrieve the type of file to wait on */
type = GetFileType(handle);
@@ -1338,7 +1339,7 @@ int main(int argc, char *argv[])
curl_socket_t sock = CURL_SOCKET_BAD;
curl_socket_t msgsock = CURL_SOCKET_BAD;
int wrotepidfile = 0;
- char *pidname= (char *)".sockfilt.pid";
+ const char *pidname = ".sockfilt.pid";
bool juggle_again;
int rc;
int error;
diff --git a/tests/server/sws.c b/tests/server/sws.c
index c4125a0a..bff30f21 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -130,7 +130,7 @@ static curl_socket_t all_sockets[MAX_SOCKETS];
static size_t num_sockets = 0;
static int ProcessRequest(struct httprequest *req);
-static void storerequest(char *reqbuf, size_t totalsize);
+static void storerequest(const char *reqbuf, size_t totalsize);
#define DEFAULT_PORT 8999
@@ -602,6 +602,14 @@ static int ProcessRequest(struct httprequest *req)
}
if(req->testno == DOCNUMBER_NOTHING) {
+ /* check for a Testno: header with the test case number */
+ char *testno = strstr(line, "\nTestno: ");
+ if(testno) {
+ req->testno = strtol(&testno[9], NULL, 10);
+ logmsg("Found test number %d in Testno: header!", req->testno);
+ }
+ }
+ if(req->testno == DOCNUMBER_NOTHING) {
/* Still no test case number. Try to get the the number off the last dot
instead, IE we consider the TLD to be the test number. Test 123 can
then be written as "example.com.123". */
@@ -843,7 +851,7 @@ static int ProcessRequest(struct httprequest *req)
}
/* store the entire request in a file */
-static void storerequest(char *reqbuf, size_t totalsize)
+static void storerequest(const char *reqbuf, size_t totalsize)
{
int res;
int error = 0;
@@ -1194,20 +1202,24 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
responsesize = count;
do {
- /* Ok, we send no more than 200 bytes at a time, just to make sure that
+ /* Ok, we send no more than N bytes at a time, just to make sure that
larger chunks are split up so that the client will need to do multiple
recv() calls to get it and thus we exercise that code better */
size_t num = count;
- if(num > 200)
- num = 200;
+ if(num > 20)
+ num = 20;
+
+ retry:
written = swrite(sock, buffer, num);
if(written < 0) {
+ if((EWOULDBLOCK == SOCKERRNO) || (EAGAIN == SOCKERRNO)) {
+ wait_ms(10);
+ goto retry;
+ }
sendfailure = TRUE;
break;
}
- else {
- logmsg("Sent off %zd bytes", written);
- }
+
/* write to file as well */
fwrite(buffer, 1, (size_t)written, dump);
@@ -1482,7 +1494,7 @@ static void http_connect(curl_socket_t *infdp,
maxfd = clientfd[i];
}
if(poll_client_wr[i] && toc[i]) {
- /* unless told not to do so, monitor writeability
+ /* unless told not to do so, monitor writability
if there is data ready to be sent to client */
FD_SET(clientfd[i], &output);
if(clientfd[i] > maxfd)
@@ -1498,7 +1510,7 @@ static void http_connect(curl_socket_t *infdp,
maxfd = serverfd[i];
}
if(poll_server_wr[i] && tos[i]) {
- /* unless told not to do so, monitor writeability
+ /* unless told not to do so, monitor writability
if there is data ready to be sent to server */
FD_SET(serverfd[i], &output);
if(serverfd[i] > maxfd)
@@ -1591,7 +1603,7 @@ static void http_connect(curl_socket_t *infdp,
/* ---------------------------------------------------------- */
- /* react to tunnel endpoint readable/writeable notifications */
+ /* react to tunnel endpoint readable/writable notifications */
for(i = 0; i <= max_tunnel_idx; i++) {
size_t len;
if(clientfd[i] != CURL_SOCKET_BAD) {
@@ -1887,7 +1899,7 @@ static int service_connection(curl_socket_t msgsock, struct httprequest *req,
while(!req->done_processing) {
int rc = get_request(msgsock, req);
if(rc <= 0) {
- /* Nothing further to read now (possibly because the socket was closed */
+ /* Nothing further to read now, possibly because the socket was closed */
return rc;
}
}
@@ -1958,7 +1970,7 @@ int main(int argc, char *argv[])
const char *unix_socket = NULL;
bool unlink_socket = false;
#endif
- char *pidname= (char *)".http.pid";
+ const char *pidname = ".http.pid";
struct httprequest req;
int rc = 0;
int error;
@@ -2248,7 +2260,7 @@ int main(int argc, char *argv[])
if(got_exit_signal)
goto sws_cleanup;
- /* Set up for select*/
+ /* Set up for select */
FD_ZERO(&input);
FD_ZERO(&output);
@@ -2274,7 +2286,7 @@ int main(int argc, char *argv[])
goto sws_cleanup;
if(rc == 0) {
- /* Timed out - try again*/
+ /* Timed out - try again */
continue;
}
@@ -2308,7 +2320,7 @@ int main(int argc, char *argv[])
if(req.connmon) {
const char *keepopen="[DISCONNECT]\n";
- storerequest((char *)keepopen, strlen(keepopen));
+ storerequest(keepopen, strlen(keepopen));
}
if(!req.open)
diff --git a/tests/server/testpart.c b/tests/server/testpart.c
index f3a70c7c..79869e21 100644
--- a/tests/server/testpart.c
+++ b/tests/server/testpart.c
@@ -23,8 +23,7 @@
#include "getpart.h"
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
/* include memdebug.h last */
#include "memdebug.h"
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index c8667437..df01eb78 100644
--- a/tests/server/tftpd.c
+++ b/tests/server/tftpd.c
@@ -199,8 +199,8 @@ static curl_socklen_t fromlen;
static curl_socket_t peer = CURL_SOCKET_BAD;
-static int timeout;
-static int maxtimeout = 5 * TIMEOUT;
+static unsigned int timeout;
+static unsigned int maxtimeout = 5 * TIMEOUT;
#ifdef ENABLE_IPV6
static bool use_ipv6 = FALSE;
@@ -208,7 +208,7 @@ static bool use_ipv6 = FALSE;
static const char *ipv_inuse = "IPv4";
const char *serverlogfile = DEFAULT_LOGFILE;
-static char *pidname= (char *)".tftpd.pid";
+static const char *pidname = ".tftpd.pid";
static int serverlogslocked = 0;
static int wrotepidfile = 0;
@@ -217,7 +217,7 @@ static sigjmp_buf timeoutbuf;
#endif
#if defined(HAVE_ALARM) && defined(SIGALRM)
-static int rexmtval = TIMEOUT;
+static const unsigned int rexmtval = TIMEOUT;
#endif
/* do-nothing macro replacement for systems which lack siginterrupt() */
@@ -960,7 +960,7 @@ static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size)
#ifdef USE_WINSOCK
DWORD recvtimeout, recvtimeoutbak;
#endif
- char *option = (char *)"mode"; /* mode is implicit */
+ const char *option = "mode"; /* mode is implicit */
int toggle = 1;
/* Open request dump file. */
diff --git a/tests/server/util.c b/tests/server/util.c
index 8465cd9c..42e58534 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -34,10 +34,13 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
-#ifdef HAVE_SYS_POLL_H
-#include <sys/poll.h>
-#elif defined(HAVE_POLL_H)
+#ifdef HAVE_POLL_H
#include <poll.h>
+#elif defined(HAVE_SYS_POLL_H)
+#include <sys/poll.h>
+#endif
+#ifdef __MINGW32__
+#include <w32api.h>
#endif
#define ENABLE_CURLX_PRINTF
@@ -55,9 +58,14 @@
#define EINVAL 22 /* errno.h value */
#endif
+/* MinGW with w32api version < 3.6 declared in6addr_any as extern,
+ but lacked the definition */
#if defined(ENABLE_IPV6) && defined(__MINGW32__)
+#if (__W32API_MAJOR_VERSION < 3) || \
+ ((__W32API_MAJOR_VERSION == 3) && (__W32API_MINOR_VERSION < 6))
const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
-#endif
+#endif /* w32api < 3.6 */
+#endif /* ENABLE_IPV6 && __MINGW32__*/
/* This function returns a pointer to STATIC memory. It converts the given
* binary lump to a hex formatted string usable for output in logs or
@@ -92,7 +100,7 @@ void logmsg(const char *msg, ...)
char buffer[2048 + 1];
FILE *logfp;
int error;
- struct timeval tv;
+ struct curltime tv;
time_t sec;
struct tm *now;
char timebuf[20];
@@ -205,7 +213,7 @@ int wait_ms(int timeout_ms)
#ifndef HAVE_POLL_FINE
struct timeval pending_tv;
#endif
- struct timeval initial_tv;
+ struct curltime initial_tv;
int pending_ms;
int error;
#endif
diff --git a/tests/serverhelp.pm b/tests/serverhelp.pm
index d6a06508..a83a1258 100644
--- a/tests/serverhelp.pm
+++ b/tests/serverhelp.pm
@@ -105,7 +105,7 @@ sub servername_str {
$proto = uc($proto) if($proto);
die "unsupported protocol: '$proto'" unless($proto &&
- ($proto =~ /^(((FTP|HTTP|HTTP\/2|IMAP|POP3|SMTP|HTTP-PIPE)S?)|(TFTP|SFTP|SOCKS|SSH|RTSP|GOPHER|HTTPTLS))$/));
+ ($proto =~ /^(((FTP|HTTP|HTTP\/2|IMAP|POP3|SMTP|HTTP-PIPE)S?)|(TFTP|SFTP|SOCKS|SSH|RTSP|GOPHER|HTTPTLS|DICT|SMB|SMBS|TELNET))$/));
$ipver = (not $ipver) ? 'ipv4' : lc($ipver);
die "unsupported IP version: '$ipver'" unless($ipver &&
diff --git a/tests/smbserver.py b/tests/smbserver.py
new file mode 100755
index 00000000..195ae395
--- /dev/null
+++ b/tests/smbserver.py
@@ -0,0 +1,377 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.haxx.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+"""Server for testing SMB"""
+
+from __future__ import (absolute_import, division, print_function)
+# unicode_literals)
+import argparse
+import ConfigParser
+import os
+import sys
+import logging
+import tempfile
+
+# Import our curl test data helper
+import curl_test_data
+
+# This saves us having to set up the PYTHONPATH explicitly
+deps_dir = os.path.join(os.path.dirname(__file__), "python_dependencies")
+sys.path.append(deps_dir)
+from impacket import smbserver as imp_smbserver
+from impacket import smb as imp_smb
+from impacket.nt_errors import (STATUS_ACCESS_DENIED, STATUS_SUCCESS,
+ STATUS_NO_SUCH_FILE)
+
+log = logging.getLogger(__name__)
+SERVER_MAGIC = "SERVER_MAGIC"
+TESTS_MAGIC = "TESTS_MAGIC"
+VERIFIED_REQ = "verifiedserver"
+VERIFIED_RSP = b"WE ROOLZ: {pid}\n"
+
+
+def smbserver(options):
+ """Start up a TCP SMB server that serves forever
+
+ """
+ if options.pidfile:
+ pid = os.getpid()
+ with open(options.pidfile, "w") as f:
+ f.write("{0}".format(pid))
+
+ # Here we write a mini config for the server
+ smb_config = ConfigParser.ConfigParser()
+ smb_config.add_section("global")
+ smb_config.set("global", "server_name", "SERVICE")
+ smb_config.set("global", "server_os", "UNIX")
+ smb_config.set("global", "server_domain", "WORKGROUP")
+ smb_config.set("global", "log_file", "")
+ smb_config.set("global", "credentials_file", "")
+
+ # We need a share which allows us to test that the server is running
+ smb_config.add_section("SERVER")
+ smb_config.set("SERVER", "comment", "server function")
+ smb_config.set("SERVER", "read only", "yes")
+ smb_config.set("SERVER", "share type", "0")
+ smb_config.set("SERVER", "path", SERVER_MAGIC)
+
+ # Have a share for tests. These files will be autogenerated from the
+ # test input.
+ smb_config.add_section("TESTS")
+ smb_config.set("TESTS", "comment", "tests")
+ smb_config.set("TESTS", "read only", "yes")
+ smb_config.set("TESTS", "share type", "0")
+ smb_config.set("TESTS", "path", TESTS_MAGIC)
+
+ if not options.srcdir or not os.path.isdir(options.srcdir):
+ raise ScriptException("--srcdir is mandatory")
+
+ test_data_dir = os.path.join(options.srcdir, "data")
+
+ smb_server = TestSmbServer(("127.0.0.1", options.port),
+ config_parser=smb_config,
+ test_data_directory=test_data_dir)
+ log.info("[SMB] setting up SMB server on port %s", options.port)
+ smb_server.processConfigFile()
+ smb_server.serve_forever()
+ return 0
+
+
+class TestSmbServer(imp_smbserver.SMBSERVER):
+ """
+ Test server for SMB which subclasses the impacket SMBSERVER and provides
+ test functionality.
+ """
+
+ def __init__(self,
+ address,
+ config_parser=None,
+ test_data_directory=None):
+ imp_smbserver.SMBSERVER.__init__(self,
+ address,
+ config_parser=config_parser)
+
+ # Set up a test data object so we can get test data later.
+ self.ctd = curl_test_data.TestData(test_data_directory)
+
+ # Override smbComNtCreateAndX so we can pretend to have files which
+ # don't exist.
+ self.hookSmbCommand(imp_smb.SMB.SMB_COM_NT_CREATE_ANDX,
+ self.create_and_x)
+
+ def create_and_x(self, conn_id, smb_server, smb_command, recv_packet):
+ """
+ Our version of smbComNtCreateAndX looks for special test files and
+ fools the rest of the framework into opening them as if they were
+ normal files.
+ """
+ conn_data = smb_server.getConnectionData(conn_id)
+
+ # Wrap processing in a try block which allows us to throw SmbException
+ # to control the flow.
+ try:
+ ncax_parms = imp_smb.SMBNtCreateAndX_Parameters(
+ smb_command["Parameters"])
+
+ path = self.get_share_path(conn_data,
+ ncax_parms["RootFid"],
+ recv_packet["Tid"])
+ log.info("[SMB] Requested share path: %s", path)
+
+ disposition = ncax_parms["Disposition"]
+ log.debug("[SMB] Requested disposition: %s", disposition)
+
+ # Currently we only support reading files.
+ if disposition != imp_smb.FILE_OPEN:
+ raise SmbException(STATUS_ACCESS_DENIED,
+ "Only support reading files")
+
+ # Check to see if the path we were given is actually a
+ # magic path which needs generating on the fly.
+ if path not in [SERVER_MAGIC, TESTS_MAGIC]:
+ # Pass the command onto the original handler.
+ return imp_smbserver.SMBCommands.smbComNtCreateAndX(conn_id,
+ smb_server,
+ smb_command,
+ recv_packet)
+
+ flags2 = recv_packet["Flags2"]
+ ncax_data = imp_smb.SMBNtCreateAndX_Data(flags=flags2,
+ data=smb_command[
+ "Data"])
+ requested_file = imp_smbserver.decodeSMBString(
+ flags2,
+ ncax_data["FileName"])
+ log.debug("[SMB] User requested file '%s'", requested_file)
+
+ if path == SERVER_MAGIC:
+ fid, full_path = self.get_server_path(requested_file)
+ else:
+ assert (path == TESTS_MAGIC)
+ fid, full_path = self.get_test_path(requested_file)
+
+ resp_parms = imp_smb.SMBNtCreateAndXResponse_Parameters()
+ resp_data = ""
+
+ # Simple way to generate a fid
+ if len(conn_data["OpenedFiles"]) == 0:
+ fakefid = 1
+ else:
+ fakefid = conn_data["OpenedFiles"].keys()[-1] + 1
+ resp_parms["Fid"] = fakefid
+ resp_parms["CreateAction"] = disposition
+
+ if os.path.isdir(path):
+ resp_parms[
+ "FileAttributes"] = imp_smb.SMB_FILE_ATTRIBUTE_DIRECTORY
+ resp_parms["IsDirectory"] = 1
+ else:
+ resp_parms["IsDirectory"] = 0
+ resp_parms["FileAttributes"] = ncax_parms["FileAttributes"]
+
+ # Get this file's information
+ resp_info, error_code = imp_smbserver.queryPathInformation(
+ "", full_path, level=imp_smb.SMB_QUERY_FILE_ALL_INFO)
+
+ if error_code != STATUS_SUCCESS:
+ raise SmbException(error_code, "Failed to query path info")
+
+ resp_parms["CreateTime"] = resp_info["CreationTime"]
+ resp_parms["LastAccessTime"] = resp_info[
+ "LastAccessTime"]
+ resp_parms["LastWriteTime"] = resp_info["LastWriteTime"]
+ resp_parms["LastChangeTime"] = resp_info[
+ "LastChangeTime"]
+ resp_parms["FileAttributes"] = resp_info[
+ "ExtFileAttributes"]
+ resp_parms["AllocationSize"] = resp_info[
+ "AllocationSize"]
+ resp_parms["EndOfFile"] = resp_info["EndOfFile"]
+
+ # Let's store the fid for the connection
+ # smbServer.log("Create file %s, mode:0x%x" % (pathName, mode))
+ conn_data["OpenedFiles"][fakefid] = {}
+ conn_data["OpenedFiles"][fakefid]["FileHandle"] = fid
+ conn_data["OpenedFiles"][fakefid]["FileName"] = path
+ conn_data["OpenedFiles"][fakefid]["DeleteOnClose"] = False
+
+ except SmbException as s:
+ log.debug("[SMB] SmbException hit: %s", s)
+ error_code = s.error_code
+ resp_parms = ""
+ resp_data = ""
+
+ resp_cmd = imp_smb.SMBCommand(imp_smb.SMB.SMB_COM_NT_CREATE_ANDX)
+ resp_cmd["Parameters"] = resp_parms
+ resp_cmd["Data"] = resp_data
+ smb_server.setConnectionData(conn_id, conn_data)
+
+ return [resp_cmd], None, error_code
+
+ def get_share_path(self, conn_data, root_fid, tid):
+ conn_shares = conn_data["ConnectedShares"]
+
+ if tid in conn_shares:
+ if root_fid > 0:
+ # If we have a rootFid, the path is relative to that fid
+ path = conn_data["OpenedFiles"][root_fid]["FileName"]
+ log.debug("RootFid present %s!" % path)
+ else:
+ if "path" in conn_shares[tid]:
+ path = conn_shares[tid]["path"]
+ else:
+ raise SmbException(STATUS_ACCESS_DENIED,
+ "Connection share had no path")
+ else:
+ raise SmbException(imp_smbserver.STATUS_SMB_BAD_TID,
+ "TID was invalid")
+
+ return path
+
+ def get_server_path(self, requested_filename):
+ log.debug("[SMB] Get server path '%s'", requested_filename)
+
+ if requested_filename not in [VERIFIED_REQ]:
+ raise SmbException(STATUS_NO_SUCH_FILE, "Couldn't find the file")
+
+ fid, filename = tempfile.mkstemp()
+ log.debug("[SMB] Created %s (%d) for storing '%s'",
+ filename, fid, requested_filename)
+
+ contents = ""
+
+ if requested_filename == VERIFIED_REQ:
+ log.debug("[SMB] Verifying server is alive")
+ contents = VERIFIED_RSP.format(pid=os.getpid())
+
+ self.write_to_fid(fid, contents)
+ return fid, filename
+
+ def write_to_fid(self, fid, contents):
+ # Write the contents to file descriptor
+ os.write(fid, contents)
+ os.fsync(fid)
+
+ # Rewind the file to the beginning so a read gets us the contents
+ os.lseek(fid, 0, os.SEEK_SET)
+
+ def get_test_path(self, requested_filename):
+ log.info("[SMB] Get reply data from 'test%s'", requested_filename)
+
+ fid, filename = tempfile.mkstemp()
+ log.debug("[SMB] Created %s (%d) for storing test '%s'",
+ filename, fid, requested_filename)
+
+ try:
+ contents = self.ctd.get_test_data(requested_filename)
+ self.write_to_fid(fid, contents)
+ return fid, filename
+
+ except Exception:
+ log.exception("Failed to make test file")
+ raise SmbException(STATUS_NO_SUCH_FILE, "Failed to make test file")
+
+
+class SmbException(Exception):
+ def __init__(self, error_code, error_message):
+ super(SmbException, self).__init__(error_message)
+ self.error_code = error_code
+
+
+class ScriptRC(object):
+ """Enum for script return codes"""
+ SUCCESS = 0
+ FAILURE = 1
+ EXCEPTION = 2
+
+
+class ScriptException(Exception):
+ pass
+
+
+def get_options():
+ parser = argparse.ArgumentParser()
+
+ parser.add_argument("--port", action="store", default=9017,
+ type=int, help="port to listen on")
+ parser.add_argument("--verbose", action="store", type=int, default=0,
+ help="verbose output")
+ parser.add_argument("--pidfile", action="store",
+ help="file name for the PID")
+ parser.add_argument("--logfile", action="store",
+ help="file name for the log")
+ parser.add_argument("--srcdir", action="store", help="test directory")
+ parser.add_argument("--id", action="store", help="server ID")
+ parser.add_argument("--ipv4", action="store_true", default=0,
+ help="IPv4 flag")
+
+ return parser.parse_args()
+
+
+def setup_logging(options):
+ """
+ Set up logging from the command line options
+ """
+ root_logger = logging.getLogger()
+ add_stdout = False
+
+ formatter = logging.Formatter("%(asctime)s %(levelname)-5.5s %(message)s")
+
+ # Write out to a logfile
+ if options.logfile:
+ handler = logging.FileHandler(options.logfile, mode="w")
+ handler.setFormatter(formatter)
+ handler.setLevel(logging.DEBUG)
+ root_logger.addHandler(handler)
+ else:
+ # The logfile wasn't specified. Add a stdout logger.
+ add_stdout = True
+
+ if options.verbose:
+ # Add a stdout logger as well in verbose mode
+ root_logger.setLevel(logging.DEBUG)
+ add_stdout = True
+ else:
+ root_logger.setLevel(logging.INFO)
+
+ if add_stdout:
+ stdout_handler = logging.StreamHandler(sys.stdout)
+ stdout_handler.setFormatter(formatter)
+ stdout_handler.setLevel(logging.DEBUG)
+ root_logger.addHandler(stdout_handler)
+
+
+if __name__ == '__main__':
+ # Get the options from the user.
+ options = get_options()
+
+ # Setup logging using the user options
+ setup_logging(options)
+
+ # Run main script.
+ try:
+ rc = smbserver(options)
+ except Exception as e:
+ log.exception(e)
+ rc = ScriptRC.EXCEPTION
+
+ log.info("[SMB] Returning %d", rc)
+ sys.exit(rc)
diff --git a/tests/sshserver.pl b/tests/sshserver.pl
index 3ebf8e67..9b3d122f 100755
--- a/tests/sshserver.pl
+++ b/tests/sshserver.pl
@@ -84,7 +84,7 @@ my $port = 8999; # our default SCP/SFTP server port
my $socksport = $port + 1; # our default SOCKS4/5 server port
my $listenaddr = '127.0.0.1'; # default address on which to listen
my $ipvnum = 4; # default IP version of listener address
-my $idnum = 1; # dafault ssh daemon instance number
+my $idnum = 1; # default ssh daemon instance number
my $proto = 'ssh'; # protocol the ssh daemon speaks
my $path = getcwd(); # current working directory
my $logdir = $path .'/log'; # directory for log files
diff --git a/tests/testcurl.1 b/tests/testcurl.1
index ee07d64f..22c7026d 100644
--- a/tests/testcurl.1
+++ b/tests/testcurl.1
@@ -20,7 +20,8 @@
.\" *
.\" **************************************************************************
.\"
-.TH testcurl.pl 1 "24 Mar 2010" "Curl 7.20.1" "testcurl"
+.TH testcurl.pl 1 "October 22, 2016" "Curl 7.55.0" "testcurl"
+
.SH NAME
testcurl.pl \- (automatically) test curl
.SH SYNOPSIS
diff --git a/tests/testcurl.html b/tests/testcurl.html
deleted file mode 100644
index 73d38cf7..00000000
--- a/tests/testcurl.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html><head>
-<title>testcurl.pl man page</title>
-<meta name="generator" content="roffit">
-<STYLE type="text/css">
-pre {
- overflow: auto;
- margin: 0;
-}
-
-P.level0, pre.level0 {
- padding-left: 2em;
-}
-
-P.level1, pre.level1 {
- padding-left: 4em;
-}
-
-P.level2, pre.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">testcurl.pl - (automatically) test curl <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">testcurl.pl [options] [dir] &gt; output</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0"><span Class="emphasis">testcurl.pl</span> is the master script to use for automatic testing of curl off git or daily snapshots. It is written for the purpose of being run from a crontab job or similar at a regular interval. The output is suitable to be mailed to curl-autocompile@haxx.se to be dealt with automatically (make sure the subject includes the word "autobuild" as the mail gets silently discarded otherwise). The most current build status (with a reasonable backlog) will be published on the curl site, at <a href="https://curl.haxx.se/dev/builds.html">https://curl.haxx.se/dev/builds.html</a>
-<p class="level0"><span Class="emphasis">options</span> may be omitted. See <span Class="emphasis">--setup</span> for what happens then.
-<p class="level0"><span Class="emphasis">dir</span> is a curl source dir, possibly a daily snapshot one. Using this will make testcurl.pl skip the 'buildconf' stage and thus it removes the dependency on automake, autoconf, libtool, GNU m4 and possibly a few other things.
-<p class="level0">testcurl.pl will run 'buildconf' (or similar), run configure, build curl and libcurl in a separate build directory and then run 'make test' to test the fresh build. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="--configureoptions"></a><span class="nroffip">--configure=[options]</span>
-<p class="level1">Configure options passed to configure.
-<p class="level0"><a name="--crosscompile"></a><span class="nroffip">--crosscompile</span>
-<p class="level1">This is a cross-compile. Makes <span Class="emphasis">testcurl.pl</span> skip a few things.
-<p class="level0"><a name="--descdesc"></a><span class="nroffip">--desc=[desc]</span>
-<p class="level1">Description of your test system. Displayed on the build summary page on the weba site.
-<p class="level0"><a name="--emailemail"></a><span class="nroffip">--email=[email]</span>
-<p class="level1">Set email address to report as. Displayed in the build logs on the site.
-<p class="level0"><a name="--mktarballcommand"></a><span class="nroffip">--mktarball=[command]</span>
-<p class="level1">Generic command to run after completed test.
-<p class="level0"><a name="--namename"></a><span class="nroffip">--name=[name]</span>
-<p class="level1">Set name to report as. Displayed in the build summary on the site.
-<p class="level0"><a name="--nobuildconf"></a><span class="nroffip">--nobuildconf</span>
-<p class="level1">Don't run buildconf. Useful when many builds use the same source tree, as then only one need to do this. Also, if multiple processes run tests simultaneously on the same source tree (like several hosts on a NFS mounted dir), simultaneous buildconf invokes may cause problems. (Added in 7.14.1)
-<p class="level0"><a name="--nogitpull"></a><span class="nroffip">--nogitpull</span>
-<p class="level1">Don't update from git even though it is a git tree. Useful to still be able to test even though your network is down, or similar.
-<p class="level0"><a name="--runtestoptsoptions"></a><span class="nroffip">--runtestopts=[options]</span>
-<p class="level1">Options that is passed to the runtests.pl script. Useful for disabling valgrind by force, and similar.
-<p class="level0"><a name="--setupfile"></a><span class="nroffip">--setup=[file name]</span>
-<p class="level1">File name to read setup from (deprecated). The old style of providing info. If info is missing when testcurl.pl is started, it will prompt you and then store the info in a 'setup' file, which it will look for on each invoke. Use <span Class="emphasis">--name</span>, <span Class="emphasis">--email</span>, <span Class="emphasis">--configure</span> and <span Class="emphasis">--desc</span> instead.
-<p class="level0"><a name="--targetyour"></a><span class="nroffip">--target=[your os]</span>
-<p class="level1">Specify your target environment. Recognized strings include 'vc', 'mingw32', 'borland' and 'netware'. <a name="INITIAL"></a><h2 class="nroffsh">INITIAL SETUP</h2>
-<p class="level0">First you make a checkout from git (or you write a script that downloads daily snapshots automatically, find inspiration in <a href="https://curl.haxx.se/dev/autocurl.txt">https://curl.haxx.se/dev/autocurl.txt</a> ):
-<p class="level0"><pre class="level0">
-&nbsp; $ mkdir daily-curl
-&nbsp; $ cd daily-curl
-&nbsp; $ git clone https://github.com/curl/curl.git
-</pre>
-
-<p class="level0">
-<p class="level0">With the curl sources checked out, or downloaded, you can start testing right away. If you want to use <span Class="emphasis">testcurl.pl</span> without command line arguments and to have it store and remember the config in its 'setup' file, then start it manually now and fill in the answers to the questions it prompts you for:
-<p class="level0"><pre class="level0">
-&nbsp; $ ./curl/tests/testcurl.pl
-</pre>
-
-<p class="level0">
-<p class="level0">Now you are ready to go. If you let the script run, it will perform a full cycle and spit out lots of output. Mail us that output as described above. <a name="CRONTAB"></a><h2 class="nroffsh">CRONTAB EXAMPLE</h2>
-<p class="level0">The crontab could include something like this:
-<p class="level0"><pre class="level0">
-#35; autobuild curl:
-0 4 * * * cd daily-curl && ./testit.sh
-</pre>
-
-<p class="level0">
-<p class="level0">Where testit.sh is a shell script that could look similar to this:
-<p class="level0"><pre class="level0">
-mail="mail -s autobuild curl-autocompile@haxx.se"
-name="--name=whoami"
-email="--email=iamme@nowhere"
-desc='"--desc=supermachine Turbo 2000"'
-testprog="perl ./curl/tests/testcurl.pl $name $email $desc"
-opts1="--configure=--enable-debug"
-opts2="--configure=--enable-ipv6"
-&nbsp;
-&#35; run first test
-$testprog $opts1 | $mail
-&nbsp;
-&#35; run second test
-$testprog $opts2 | $mail
-<p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/tests/testcurl.pdf b/tests/testcurl.pdf
deleted file mode 100644
index e691666a..00000000
--- a/tests/testcurl.pdf
+++ /dev/null
Binary files differ
diff --git a/tests/testcurl.pl b/tests/testcurl.pl
index dc35a026..9749bc7d 100755
--- a/tests/testcurl.pl
+++ b/tests/testcurl.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -588,7 +588,6 @@ if ($configurebuild) {
elsif ($^O eq 'linux') {
system("cp -afr $CURLDIR/* .");
system("cp -af $CURLDIR/Makefile.dist Makefile");
- system("cp -af $CURLDIR/include/curl/curlbuild.h.dist ./include/curl/curlbuild.h");
system("$make -i -C lib -f Makefile.$targetos prebuild");
system("$make -i -C src -f Makefile.$targetos prebuild");
if (-d "$CURLDIR/ares") {
@@ -609,20 +608,6 @@ if(-f "./libcurl.pc") {
}
}
-if(-f "./include/curl/curlbuild.h") {
- logit_spaced "display include/curl/curlbuild.h";
- if(open(F, "<./include/curl/curlbuild.h")) {
- while(<F>) {
- my $ll = $_;
- print $ll if(($ll =~ /^ *# *define *CURL_/) && ($ll !~ /__CURL_CURLBUILD_H/));
- }
- close(F);
- }
-}
-else {
- mydie "no curlbuild.h created/found";
-}
-
logit_spaced "display lib/$confheader";
open(F, "lib/$confheader") or die "lib/$confheader: $!";
while (<F>) {
diff --git a/tests/tftpserver.pl b/tests/tftpserver.pl
index a4c4e47c..8c84111b 100755
--- a/tests/tftpserver.pl
+++ b/tests/tftpserver.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -37,7 +37,7 @@ use serverhelp qw(
my $verbose = 0; # set to 1 for debugging
my $port = 8997; # just a default
my $ipvnum = 4; # default IP version of tftp server
-my $idnum = 1; # dafault tftp server instance number
+my $idnum = 1; # default tftp server instance number
my $proto = 'tftp'; # protocol the tftp server speaks
my $pidfile; # tftp server pid file
my $logfile; # tftp server log file
diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt
index 14589d68..a2999121 100644
--- a/tests/unit/CMakeLists.txt
+++ b/tests/unit/CMakeLists.txt
@@ -29,7 +29,7 @@ include_directories(
${CURL_SOURCE_DIR}/tests/libtest
${CURL_SOURCE_DIR}/src
${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
- ${CURL_BINARY_DIR}/include # To be able to reach "curl/curlbuild.h"
+ ${CURL_BINARY_DIR}/include # To be able to reach "curl/curl.h"
)
foreach(_testfile ${UT_SRC})
diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am
index 7075f8c3..61b72c0d 100644
--- a/tests/unit/Makefile.am
+++ b/tests/unit/Makefile.am
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -26,8 +26,6 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# being currently built and tested are searched before the library which
# might possibly already be installed in the system.
#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
@@ -35,9 +33,7 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# $(top_srcdir)/ares is for in-tree c-ares's external include files
if USE_EMBEDDED_ARES
-AM_CPPFLAGS = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
+AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/src \
@@ -45,9 +41,7 @@ AM_CPPFLAGS = -I$(top_builddir)/include/curl \
-I$(top_builddir)/ares \
-I$(top_srcdir)/ares
else
-AM_CPPFLAGS = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
+AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/src \
@@ -63,9 +57,6 @@ LDADD = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la \
@LDFLAGS@ @LIBCURL_LIBS@
-DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
- $(top_builddir)/lib/libcurlu.la
-
AM_CPPFLAGS += -DCURL_STATICLIB -DUNITTESTS
# Makefile.inc provides neat definitions
diff --git a/tests/unit/Makefile.in b/tests/unit/Makefile.in
index cb00b4f0..5390e29d 100644
--- a/tests/unit/Makefile.in
+++ b/tests/unit/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -93,7 +93,8 @@ host_triplet = @host@
@BUILD_UNITTESTS_TRUE@noinst_PROGRAMS = $(am__EXEEXT_1)
subdir = tests/unit
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \
+ $(top_srcdir)/m4/curl-compilers.m4 \
$(top_srcdir)/m4/curl-confopts.m4 \
$(top_srcdir)/m4/curl-functions.m4 \
$(top_srcdir)/m4/curl-openssl.m4 \
@@ -114,17 +115,17 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__EXEEXT_1 = unit1300$(EXEEXT) unit1301$(EXEEXT) unit1302$(EXEEXT) \
unit1303$(EXEEXT) unit1304$(EXEEXT) unit1305$(EXEEXT) \
unit1307$(EXEEXT) unit1308$(EXEEXT) unit1309$(EXEEXT) \
- unit1330$(EXEEXT) unit1394$(EXEEXT) unit1395$(EXEEXT) \
- unit1396$(EXEEXT) unit1397$(EXEEXT) unit1398$(EXEEXT) \
- unit1600$(EXEEXT) unit1601$(EXEEXT) unit1602$(EXEEXT) \
- unit1603$(EXEEXT) unit1604$(EXEEXT) unit1605$(EXEEXT)
+ unit1323$(EXEEXT) unit1330$(EXEEXT) unit1394$(EXEEXT) \
+ unit1395$(EXEEXT) unit1396$(EXEEXT) unit1397$(EXEEXT) \
+ unit1398$(EXEEXT) unit1399$(EXEEXT) unit1600$(EXEEXT) \
+ unit1601$(EXEEXT) unit1602$(EXEEXT) unit1603$(EXEEXT) \
+ unit1604$(EXEEXT) unit1605$(EXEEXT) unit1606$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
am__dirstamp = $(am__leading_dot)dirstamp
am__objects_1 = ../libtest/unit1300-first.$(OBJEXT)
@@ -185,79 +186,97 @@ unit1309_OBJECTS = $(am_unit1309_OBJECTS)
unit1309_LDADD = $(LDADD)
unit1309_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la
-am__objects_10 = ../libtest/unit1330-first.$(OBJEXT)
-am_unit1330_OBJECTS = unit1330-unit1330.$(OBJEXT) $(am__objects_10)
+am__objects_10 = ../libtest/unit1323-first.$(OBJEXT)
+am_unit1323_OBJECTS = unit1323-unit1323.$(OBJEXT) $(am__objects_10)
+unit1323_OBJECTS = $(am_unit1323_OBJECTS)
+unit1323_LDADD = $(LDADD)
+unit1323_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+ $(top_builddir)/lib/libcurlu.la
+am__objects_11 = ../libtest/unit1330-first.$(OBJEXT)
+am_unit1330_OBJECTS = unit1330-unit1330.$(OBJEXT) $(am__objects_11)
unit1330_OBJECTS = $(am_unit1330_OBJECTS)
unit1330_LDADD = $(LDADD)
unit1330_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la
-am__objects_11 = ../libtest/unit1394-first.$(OBJEXT)
-am_unit1394_OBJECTS = unit1394-unit1394.$(OBJEXT) $(am__objects_11)
+am__objects_12 = ../libtest/unit1394-first.$(OBJEXT)
+am_unit1394_OBJECTS = unit1394-unit1394.$(OBJEXT) $(am__objects_12)
unit1394_OBJECTS = $(am_unit1394_OBJECTS)
unit1394_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
unit1394_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(unit1394_LDFLAGS) $(LDFLAGS) -o $@
-am__objects_12 = ../libtest/unit1395-first.$(OBJEXT)
-am_unit1395_OBJECTS = unit1395-unit1395.$(OBJEXT) $(am__objects_12)
+am__objects_13 = ../libtest/unit1395-first.$(OBJEXT)
+am_unit1395_OBJECTS = unit1395-unit1395.$(OBJEXT) $(am__objects_13)
unit1395_OBJECTS = $(am_unit1395_OBJECTS)
unit1395_LDADD = $(LDADD)
unit1395_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la
-am__objects_13 = ../libtest/unit1396-first.$(OBJEXT)
-am_unit1396_OBJECTS = unit1396-unit1396.$(OBJEXT) $(am__objects_13)
+am__objects_14 = ../libtest/unit1396-first.$(OBJEXT)
+am_unit1396_OBJECTS = unit1396-unit1396.$(OBJEXT) $(am__objects_14)
unit1396_OBJECTS = $(am_unit1396_OBJECTS)
unit1396_LDADD = $(LDADD)
unit1396_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la
-am__objects_14 = ../libtest/unit1397-first.$(OBJEXT)
-am_unit1397_OBJECTS = unit1397-unit1397.$(OBJEXT) $(am__objects_14)
+am__objects_15 = ../libtest/unit1397-first.$(OBJEXT)
+am_unit1397_OBJECTS = unit1397-unit1397.$(OBJEXT) $(am__objects_15)
unit1397_OBJECTS = $(am_unit1397_OBJECTS)
unit1397_LDADD = $(LDADD)
unit1397_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la
-am__objects_15 = ../libtest/unit1398-first.$(OBJEXT)
-am_unit1398_OBJECTS = unit1398-unit1398.$(OBJEXT) $(am__objects_15)
+am__objects_16 = ../libtest/unit1398-first.$(OBJEXT)
+am_unit1398_OBJECTS = unit1398-unit1398.$(OBJEXT) $(am__objects_16)
unit1398_OBJECTS = $(am_unit1398_OBJECTS)
unit1398_LDADD = $(LDADD)
unit1398_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la
-am__objects_16 = ../libtest/unit1600-first.$(OBJEXT)
-am_unit1600_OBJECTS = unit1600-unit1600.$(OBJEXT) $(am__objects_16)
+am__objects_17 = ../libtest/unit1399-first.$(OBJEXT)
+am_unit1399_OBJECTS = unit1399-unit1399.$(OBJEXT) $(am__objects_17)
+unit1399_OBJECTS = $(am_unit1399_OBJECTS)
+unit1399_LDADD = $(LDADD)
+unit1399_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+ $(top_builddir)/lib/libcurlu.la
+am__objects_18 = ../libtest/unit1600-first.$(OBJEXT)
+am_unit1600_OBJECTS = unit1600-unit1600.$(OBJEXT) $(am__objects_18)
unit1600_OBJECTS = $(am_unit1600_OBJECTS)
unit1600_LDADD = $(LDADD)
unit1600_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la
-am__objects_17 = ../libtest/unit1601-first.$(OBJEXT)
-am_unit1601_OBJECTS = unit1601-unit1601.$(OBJEXT) $(am__objects_17)
+am__objects_19 = ../libtest/unit1601-first.$(OBJEXT)
+am_unit1601_OBJECTS = unit1601-unit1601.$(OBJEXT) $(am__objects_19)
unit1601_OBJECTS = $(am_unit1601_OBJECTS)
unit1601_LDADD = $(LDADD)
unit1601_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la
-am__objects_18 = ../libtest/unit1602-first.$(OBJEXT)
-am_unit1602_OBJECTS = unit1602-unit1602.$(OBJEXT) $(am__objects_18)
+am__objects_20 = ../libtest/unit1602-first.$(OBJEXT)
+am_unit1602_OBJECTS = unit1602-unit1602.$(OBJEXT) $(am__objects_20)
unit1602_OBJECTS = $(am_unit1602_OBJECTS)
unit1602_LDADD = $(LDADD)
unit1602_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la
-am__objects_19 = ../libtest/unit1603-first.$(OBJEXT)
-am_unit1603_OBJECTS = unit1603-unit1603.$(OBJEXT) $(am__objects_19)
+am__objects_21 = ../libtest/unit1603-first.$(OBJEXT)
+am_unit1603_OBJECTS = unit1603-unit1603.$(OBJEXT) $(am__objects_21)
unit1603_OBJECTS = $(am_unit1603_OBJECTS)
unit1603_LDADD = $(LDADD)
unit1603_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la
-am__objects_20 = ../libtest/unit1604-first.$(OBJEXT)
-am_unit1604_OBJECTS = unit1604-unit1604.$(OBJEXT) $(am__objects_20)
+am__objects_22 = ../libtest/unit1604-first.$(OBJEXT)
+am_unit1604_OBJECTS = unit1604-unit1604.$(OBJEXT) $(am__objects_22)
unit1604_OBJECTS = $(am_unit1604_OBJECTS)
unit1604_LDADD = $(LDADD)
unit1604_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la
-am__objects_21 = ../libtest/unit1605-first.$(OBJEXT)
-am_unit1605_OBJECTS = unit1605-unit1605.$(OBJEXT) $(am__objects_21)
+am__objects_23 = ../libtest/unit1605-first.$(OBJEXT)
+am_unit1605_OBJECTS = unit1605-unit1605.$(OBJEXT) $(am__objects_23)
unit1605_OBJECTS = $(am_unit1605_OBJECTS)
unit1605_LDADD = $(LDADD)
unit1605_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la
+am__objects_24 = ../libtest/unit1606-first.$(OBJEXT)
+am_unit1606_OBJECTS = unit1606-unit1606.$(OBJEXT) $(am__objects_24)
+unit1606_OBJECTS = $(am_unit1606_OBJECTS)
+unit1606_LDADD = $(LDADD)
+unit1606_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
+ $(top_builddir)/lib/libcurlu.la
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -295,18 +314,20 @@ am__v_CCLD_1 =
SOURCES = $(unit1300_SOURCES) $(unit1301_SOURCES) $(unit1302_SOURCES) \
$(unit1303_SOURCES) $(unit1304_SOURCES) $(unit1305_SOURCES) \
$(unit1307_SOURCES) $(unit1308_SOURCES) $(unit1309_SOURCES) \
- $(unit1330_SOURCES) $(unit1394_SOURCES) $(unit1395_SOURCES) \
- $(unit1396_SOURCES) $(unit1397_SOURCES) $(unit1398_SOURCES) \
- $(unit1600_SOURCES) $(unit1601_SOURCES) $(unit1602_SOURCES) \
- $(unit1603_SOURCES) $(unit1604_SOURCES) $(unit1605_SOURCES)
+ $(unit1323_SOURCES) $(unit1330_SOURCES) $(unit1394_SOURCES) \
+ $(unit1395_SOURCES) $(unit1396_SOURCES) $(unit1397_SOURCES) \
+ $(unit1398_SOURCES) $(unit1399_SOURCES) $(unit1600_SOURCES) \
+ $(unit1601_SOURCES) $(unit1602_SOURCES) $(unit1603_SOURCES) \
+ $(unit1604_SOURCES) $(unit1605_SOURCES) $(unit1606_SOURCES)
DIST_SOURCES = $(unit1300_SOURCES) $(unit1301_SOURCES) \
$(unit1302_SOURCES) $(unit1303_SOURCES) $(unit1304_SOURCES) \
$(unit1305_SOURCES) $(unit1307_SOURCES) $(unit1308_SOURCES) \
- $(unit1309_SOURCES) $(unit1330_SOURCES) $(unit1394_SOURCES) \
- $(unit1395_SOURCES) $(unit1396_SOURCES) $(unit1397_SOURCES) \
- $(unit1398_SOURCES) $(unit1600_SOURCES) $(unit1601_SOURCES) \
- $(unit1602_SOURCES) $(unit1603_SOURCES) $(unit1604_SOURCES) \
- $(unit1605_SOURCES)
+ $(unit1309_SOURCES) $(unit1323_SOURCES) $(unit1330_SOURCES) \
+ $(unit1394_SOURCES) $(unit1395_SOURCES) $(unit1396_SOURCES) \
+ $(unit1397_SOURCES) $(unit1398_SOURCES) $(unit1399_SOURCES) \
+ $(unit1600_SOURCES) $(unit1601_SOURCES) $(unit1602_SOURCES) \
+ $(unit1603_SOURCES) $(unit1604_SOURCES) $(unit1605_SOURCES) \
+ $(unit1606_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -348,6 +369,12 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@
+CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@
+CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@
+CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@
+CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@
+CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
@@ -387,6 +414,8 @@ ENABLE_SHARED = @ENABLE_SHARED@
ENABLE_STATIC = @ENABLE_STATIC@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GCOV = @GCOV@
+GENHTML = @GENHTML@
GREP = @GREP@
HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
@@ -399,6 +428,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPV6_ENABLED = @IPV6_ENABLED@
+LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_LIBS = @LIBCURL_LIBS@
@@ -534,7 +564,7 @@ top_srcdir = @top_srcdir@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -549,9 +579,7 @@ top_srcdir = @top_srcdir@
#
###########################################################################
AUTOMAKE_OPTIONS = foreign nostdinc
-@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \
-@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_srcdir)/include \
@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \
@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib \
@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/src \
@@ -563,16 +591,12 @@ AUTOMAKE_OPTIONS = foreign nostdinc
# being currently built and tested are searched before the library which
# might possibly already be installed in the system.
#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files
-@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \
-@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \
+@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_srcdir)/include \
@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \
@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \
@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/src \
@@ -585,9 +609,6 @@ LDADD = $(top_builddir)/src/libcurltool.la \
$(top_builddir)/lib/libcurlu.la \
@LDFLAGS@ @LIBCURL_LIBS@
-DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
- $(top_builddir)/lib/libcurlu.la
-
UNITFILES = curlcheck.h \
../libtest/test.h \
../libtest/first.c
@@ -595,8 +616,10 @@ UNITFILES = curlcheck.h \
# These are all unit test programs
UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307 \
- unit1308 unit1309 unit1330 unit1394 unit1395 unit1396 unit1397 unit1398 \
- unit1600 unit1601 unit1602 unit1603 unit1604 unit1605
+ unit1308 unit1309 unit1323 \
+ unit1330 unit1394 unit1395 unit1396 unit1397 unit1398 \
+ unit1399 \
+ unit1600 unit1601 unit1602 unit1603 unit1604 unit1605 unit1606
unit1300_SOURCES = unit1300.c $(UNITFILES)
unit1300_CPPFLAGS = $(AM_CPPFLAGS)
@@ -616,6 +639,8 @@ unit1308_SOURCES = unit1308.c $(UNITFILES)
unit1308_CPPFLAGS = $(AM_CPPFLAGS)
unit1309_SOURCES = unit1309.c $(UNITFILES)
unit1309_CPPFLAGS = $(AM_CPPFLAGS)
+unit1323_SOURCES = unit1323.c $(UNITFILES)
+unit1323_CPPFLAGS = $(AM_CPPFLAGS)
unit1330_SOURCES = unit1330.c $(UNITFILES)
unit1330_CPPFLAGS = $(AM_CPPFLAGS)
unit1394_SOURCES = unit1394.c $(UNITFILES)
@@ -631,6 +656,8 @@ unit1397_SOURCES = unit1397.c $(UNITFILES)
unit1397_CPPFLAGS = $(AM_CPPFLAGS)
unit1398_SOURCES = unit1398.c $(UNITFILES)
unit1398_CPPFLAGS = $(AM_CPPFLAGS)
+unit1399_SOURCES = unit1399.c $(UNITFILES)
+unit1399_CPPFLAGS = $(AM_CPPFLAGS)
unit1600_SOURCES = unit1600.c $(UNITFILES)
unit1600_CPPFLAGS = $(AM_CPPFLAGS)
unit1601_SOURCES = unit1601.c $(UNITFILES)
@@ -643,6 +670,8 @@ unit1604_SOURCES = unit1604.c $(UNITFILES)
unit1604_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
unit1605_SOURCES = unit1605.c $(UNITFILES)
unit1605_CPPFLAGS = $(AM_CPPFLAGS)
+unit1606_SOURCES = unit1606.c $(UNITFILES)
+unit1606_CPPFLAGS = $(AM_CPPFLAGS)
all: all-am
.SUFFIXES:
@@ -746,6 +775,12 @@ unit1308$(EXEEXT): $(unit1308_OBJECTS) $(unit1308_DEPENDENCIES) $(EXTRA_unit1308
unit1309$(EXEEXT): $(unit1309_OBJECTS) $(unit1309_DEPENDENCIES) $(EXTRA_unit1309_DEPENDENCIES)
@rm -f unit1309$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(unit1309_OBJECTS) $(unit1309_LDADD) $(LIBS)
+../libtest/unit1323-first.$(OBJEXT): ../libtest/$(am__dirstamp) \
+ ../libtest/$(DEPDIR)/$(am__dirstamp)
+
+unit1323$(EXEEXT): $(unit1323_OBJECTS) $(unit1323_DEPENDENCIES) $(EXTRA_unit1323_DEPENDENCIES)
+ @rm -f unit1323$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(unit1323_OBJECTS) $(unit1323_LDADD) $(LIBS)
../libtest/unit1330-first.$(OBJEXT): ../libtest/$(am__dirstamp) \
../libtest/$(DEPDIR)/$(am__dirstamp)
@@ -782,6 +817,12 @@ unit1397$(EXEEXT): $(unit1397_OBJECTS) $(unit1397_DEPENDENCIES) $(EXTRA_unit1397
unit1398$(EXEEXT): $(unit1398_OBJECTS) $(unit1398_DEPENDENCIES) $(EXTRA_unit1398_DEPENDENCIES)
@rm -f unit1398$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(unit1398_OBJECTS) $(unit1398_LDADD) $(LIBS)
+../libtest/unit1399-first.$(OBJEXT): ../libtest/$(am__dirstamp) \
+ ../libtest/$(DEPDIR)/$(am__dirstamp)
+
+unit1399$(EXEEXT): $(unit1399_OBJECTS) $(unit1399_DEPENDENCIES) $(EXTRA_unit1399_DEPENDENCIES)
+ @rm -f unit1399$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(unit1399_OBJECTS) $(unit1399_LDADD) $(LIBS)
../libtest/unit1600-first.$(OBJEXT): ../libtest/$(am__dirstamp) \
../libtest/$(DEPDIR)/$(am__dirstamp)
@@ -818,6 +859,12 @@ unit1604$(EXEEXT): $(unit1604_OBJECTS) $(unit1604_DEPENDENCIES) $(EXTRA_unit1604
unit1605$(EXEEXT): $(unit1605_OBJECTS) $(unit1605_DEPENDENCIES) $(EXTRA_unit1605_DEPENDENCIES)
@rm -f unit1605$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(unit1605_OBJECTS) $(unit1605_LDADD) $(LIBS)
+../libtest/unit1606-first.$(OBJEXT): ../libtest/$(am__dirstamp) \
+ ../libtest/$(DEPDIR)/$(am__dirstamp)
+
+unit1606$(EXEEXT): $(unit1606_OBJECTS) $(unit1606_DEPENDENCIES) $(EXTRA_unit1606_DEPENDENCIES)
+ @rm -f unit1606$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(unit1606_OBJECTS) $(unit1606_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -835,18 +882,21 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1307-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1308-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1309-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1323-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1330-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1394-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1395-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1396-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1397-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1398-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1399-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1600-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1601-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1602-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1603-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1604-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1605-first.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1606-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1300-unit1300.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1301-unit1301.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1302-unit1302.Po@am__quote@
@@ -856,18 +906,21 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1307-unit1307.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1308-unit1308.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1309-unit1309.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1323-unit1323.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1330-unit1330.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1394-unit1394.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1395-unit1395.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1396-unit1396.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1397-unit1397.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1398-unit1398.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1399-unit1399.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1600-unit1600.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1601-unit1601.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1602-unit1602.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1603-unit1603.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1604-unit1604.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1605-unit1605.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1606-unit1606.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -1145,6 +1198,34 @@ unit1309-unit1309.obj: unit1309.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1309_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1309-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+unit1323-unit1323.o: unit1323.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1323_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1323-unit1323.o -MD -MP -MF $(DEPDIR)/unit1323-unit1323.Tpo -c -o unit1323-unit1323.o `test -f 'unit1323.c' || echo '$(srcdir)/'`unit1323.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unit1323-unit1323.Tpo $(DEPDIR)/unit1323-unit1323.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unit1323.c' object='unit1323-unit1323.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1323_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1323-unit1323.o `test -f 'unit1323.c' || echo '$(srcdir)/'`unit1323.c
+
+unit1323-unit1323.obj: unit1323.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1323_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1323-unit1323.obj -MD -MP -MF $(DEPDIR)/unit1323-unit1323.Tpo -c -o unit1323-unit1323.obj `if test -f 'unit1323.c'; then $(CYGPATH_W) 'unit1323.c'; else $(CYGPATH_W) '$(srcdir)/unit1323.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unit1323-unit1323.Tpo $(DEPDIR)/unit1323-unit1323.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unit1323.c' object='unit1323-unit1323.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1323_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1323-unit1323.obj `if test -f 'unit1323.c'; then $(CYGPATH_W) 'unit1323.c'; else $(CYGPATH_W) '$(srcdir)/unit1323.c'; fi`
+
+../libtest/unit1323-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1323_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../libtest/unit1323-first.o -MD -MP -MF ../libtest/$(DEPDIR)/unit1323-first.Tpo -c -o ../libtest/unit1323-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libtest/$(DEPDIR)/unit1323-first.Tpo ../libtest/$(DEPDIR)/unit1323-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libtest/first.c' object='../libtest/unit1323-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1323_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1323-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+../libtest/unit1323-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1323_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../libtest/unit1323-first.obj -MD -MP -MF ../libtest/$(DEPDIR)/unit1323-first.Tpo -c -o ../libtest/unit1323-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libtest/$(DEPDIR)/unit1323-first.Tpo ../libtest/$(DEPDIR)/unit1323-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libtest/first.c' object='../libtest/unit1323-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1323_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1323-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
unit1330-unit1330.o: unit1330.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1330_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1330-unit1330.o -MD -MP -MF $(DEPDIR)/unit1330-unit1330.Tpo -c -o unit1330-unit1330.o `test -f 'unit1330.c' || echo '$(srcdir)/'`unit1330.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unit1330-unit1330.Tpo $(DEPDIR)/unit1330-unit1330.Po
@@ -1313,6 +1394,34 @@ unit1398-unit1398.obj: unit1398.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1398_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1398-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+unit1399-unit1399.o: unit1399.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1399_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1399-unit1399.o -MD -MP -MF $(DEPDIR)/unit1399-unit1399.Tpo -c -o unit1399-unit1399.o `test -f 'unit1399.c' || echo '$(srcdir)/'`unit1399.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unit1399-unit1399.Tpo $(DEPDIR)/unit1399-unit1399.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unit1399.c' object='unit1399-unit1399.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1399_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1399-unit1399.o `test -f 'unit1399.c' || echo '$(srcdir)/'`unit1399.c
+
+unit1399-unit1399.obj: unit1399.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1399_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1399-unit1399.obj -MD -MP -MF $(DEPDIR)/unit1399-unit1399.Tpo -c -o unit1399-unit1399.obj `if test -f 'unit1399.c'; then $(CYGPATH_W) 'unit1399.c'; else $(CYGPATH_W) '$(srcdir)/unit1399.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unit1399-unit1399.Tpo $(DEPDIR)/unit1399-unit1399.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unit1399.c' object='unit1399-unit1399.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1399_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1399-unit1399.obj `if test -f 'unit1399.c'; then $(CYGPATH_W) 'unit1399.c'; else $(CYGPATH_W) '$(srcdir)/unit1399.c'; fi`
+
+../libtest/unit1399-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1399_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../libtest/unit1399-first.o -MD -MP -MF ../libtest/$(DEPDIR)/unit1399-first.Tpo -c -o ../libtest/unit1399-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libtest/$(DEPDIR)/unit1399-first.Tpo ../libtest/$(DEPDIR)/unit1399-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libtest/first.c' object='../libtest/unit1399-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1399_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1399-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+../libtest/unit1399-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1399_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../libtest/unit1399-first.obj -MD -MP -MF ../libtest/$(DEPDIR)/unit1399-first.Tpo -c -o ../libtest/unit1399-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libtest/$(DEPDIR)/unit1399-first.Tpo ../libtest/$(DEPDIR)/unit1399-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libtest/first.c' object='../libtest/unit1399-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1399_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1399-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
unit1600-unit1600.o: unit1600.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1600_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1600-unit1600.o -MD -MP -MF $(DEPDIR)/unit1600-unit1600.Tpo -c -o unit1600-unit1600.o `test -f 'unit1600.c' || echo '$(srcdir)/'`unit1600.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unit1600-unit1600.Tpo $(DEPDIR)/unit1600-unit1600.Po
@@ -1481,6 +1590,34 @@ unit1605-unit1605.obj: unit1605.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1605_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1605-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+unit1606-unit1606.o: unit1606.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1606_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1606-unit1606.o -MD -MP -MF $(DEPDIR)/unit1606-unit1606.Tpo -c -o unit1606-unit1606.o `test -f 'unit1606.c' || echo '$(srcdir)/'`unit1606.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unit1606-unit1606.Tpo $(DEPDIR)/unit1606-unit1606.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unit1606.c' object='unit1606-unit1606.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1606_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1606-unit1606.o `test -f 'unit1606.c' || echo '$(srcdir)/'`unit1606.c
+
+unit1606-unit1606.obj: unit1606.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1606_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1606-unit1606.obj -MD -MP -MF $(DEPDIR)/unit1606-unit1606.Tpo -c -o unit1606-unit1606.obj `if test -f 'unit1606.c'; then $(CYGPATH_W) 'unit1606.c'; else $(CYGPATH_W) '$(srcdir)/unit1606.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/unit1606-unit1606.Tpo $(DEPDIR)/unit1606-unit1606.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unit1606.c' object='unit1606-unit1606.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1606_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1606-unit1606.obj `if test -f 'unit1606.c'; then $(CYGPATH_W) 'unit1606.c'; else $(CYGPATH_W) '$(srcdir)/unit1606.c'; fi`
+
+../libtest/unit1606-first.o: ../libtest/first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1606_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../libtest/unit1606-first.o -MD -MP -MF ../libtest/$(DEPDIR)/unit1606-first.Tpo -c -o ../libtest/unit1606-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libtest/$(DEPDIR)/unit1606-first.Tpo ../libtest/$(DEPDIR)/unit1606-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libtest/first.c' object='../libtest/unit1606-first.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1606_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1606-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
+
+../libtest/unit1606-first.obj: ../libtest/first.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1606_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../libtest/unit1606-first.obj -MD -MP -MF ../libtest/$(DEPDIR)/unit1606-first.Tpo -c -o ../libtest/unit1606-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libtest/$(DEPDIR)/unit1606-first.Tpo ../libtest/$(DEPDIR)/unit1606-first.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libtest/first.c' object='../libtest/unit1606-first.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1606_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1606-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
diff --git a/tests/unit/Makefile.inc b/tests/unit/Makefile.inc
index e7db96f5..bfb5c4d4 100644
--- a/tests/unit/Makefile.inc
+++ b/tests/unit/Makefile.inc
@@ -6,8 +6,10 @@ UNITFILES = curlcheck.h \
# These are all unit test programs
UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307 \
- unit1308 unit1309 unit1330 unit1394 unit1395 unit1396 unit1397 unit1398 \
- unit1600 unit1601 unit1602 unit1603 unit1604 unit1605
+ unit1308 unit1309 unit1323 \
+ unit1330 unit1394 unit1395 unit1396 unit1397 unit1398 \
+ unit1399 \
+ unit1600 unit1601 unit1602 unit1603 unit1604 unit1605 unit1606
unit1300_SOURCES = unit1300.c $(UNITFILES)
unit1300_CPPFLAGS = $(AM_CPPFLAGS)
@@ -36,6 +38,9 @@ unit1308_CPPFLAGS = $(AM_CPPFLAGS)
unit1309_SOURCES = unit1309.c $(UNITFILES)
unit1309_CPPFLAGS = $(AM_CPPFLAGS)
+unit1323_SOURCES = unit1323.c $(UNITFILES)
+unit1323_CPPFLAGS = $(AM_CPPFLAGS)
+
unit1330_SOURCES = unit1330.c $(UNITFILES)
unit1330_CPPFLAGS = $(AM_CPPFLAGS)
@@ -57,6 +62,9 @@ unit1397_CPPFLAGS = $(AM_CPPFLAGS)
unit1398_SOURCES = unit1398.c $(UNITFILES)
unit1398_CPPFLAGS = $(AM_CPPFLAGS)
+unit1399_SOURCES = unit1399.c $(UNITFILES)
+unit1399_CPPFLAGS = $(AM_CPPFLAGS)
+
unit1600_SOURCES = unit1600.c $(UNITFILES)
unit1600_CPPFLAGS = $(AM_CPPFLAGS)
@@ -74,3 +82,6 @@ unit1604_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
unit1605_SOURCES = unit1605.c $(UNITFILES)
unit1605_CPPFLAGS = $(AM_CPPFLAGS)
+
+unit1606_SOURCES = unit1606.c $(UNITFILES)
+unit1606_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/tests/unit/curlcheck.h b/tests/unit/curlcheck.h
index 0660e2be..46cb84aa 100644
--- a/tests/unit/curlcheck.h
+++ b/tests/unit/curlcheck.h
@@ -39,9 +39,10 @@
#define verify_memory(dynamic, check, len) \
if(dynamic && memcmp(dynamic, check, len)) { \
fprintf(stderr, "%s:%d Memory buffer mismatch size %d. '%s' is not\n", \
- __FILE__, __LINE__, len, hexdump((unsigned char *)check, len)); \
- fprintf(stderr, "%s:%d the same as '%s'\n", \
- __FILE__, __LINE__, hexdump((unsigned char *)dynamic, len)); \
+ __FILE__, __LINE__, len, \
+ hexdump((const unsigned char *)check, len)); \
+ fprintf(stderr, "%s:%d the same as '%s'\n", __FILE__, __LINE__, \
+ hexdump((const unsigned char *)dynamic, len)); \
unitfail++; \
}
diff --git a/tests/unit/unit1300.c b/tests/unit/unit1300.c
index c4d9dd90..8ec32a8c 100644
--- a/tests/unit/unit1300.c
+++ b/tests/unit/unit1300.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,9 +23,9 @@
#include "llist.h"
-static struct curl_llist *llist;
+static struct curl_llist llist;
-static struct curl_llist *llist_destination;
+static struct curl_llist llist_destination;
static void test_curl_llist_dtor(void *key, void *value)
{
@@ -36,34 +36,32 @@ static void test_curl_llist_dtor(void *key, void *value)
static CURLcode unit_setup(void)
{
- llist = Curl_llist_alloc(test_curl_llist_dtor);
- if(!llist)
- return CURLE_OUT_OF_MEMORY;
- llist_destination = Curl_llist_alloc(test_curl_llist_dtor);
- if(!llist_destination) {
- Curl_llist_destroy(llist, NULL);
- return CURLE_OUT_OF_MEMORY;
- }
-
+ Curl_llist_init(&llist, test_curl_llist_dtor);
+ Curl_llist_init(&llist_destination, test_curl_llist_dtor);
return CURLE_OK;
}
static void unit_stop(void)
{
- Curl_llist_destroy(llist, NULL);
- Curl_llist_destroy(llist_destination, NULL);
+ Curl_llist_destroy(&llist, NULL);
+ Curl_llist_destroy(&llist_destination, NULL);
}
UNITTEST_START
+{
int unusedData_case1 = 1;
int unusedData_case2 = 2;
int unusedData_case3 = 3;
+ struct curl_llist_element case1_list;
+ struct curl_llist_element case2_list;
+ struct curl_llist_element case3_list;
+ struct curl_llist_element case4_list;
+ struct curl_llist_element case5_list;
struct curl_llist_element *head;
struct curl_llist_element *element_next;
struct curl_llist_element *element_prev;
struct curl_llist_element *to_remove;
- size_t llist_size = Curl_llist_count(llist);
- int curlErrCode = 0;
+ size_t llist_size = Curl_llist_count(&llist);
/**
* testing llist_init
@@ -76,10 +74,10 @@ UNITTEST_START
* 4: list dtor will be NULL
*/
- fail_unless(llist->size == 0, "list initial size should be zero");
- fail_unless(llist->head == NULL, "list head should initiate to NULL");
- fail_unless(llist->tail == NULL, "list tail should intiate to NULL");
- fail_unless(llist->dtor == test_curl_llist_dtor,
+ fail_unless(llist.size == 0, "list initial size should be zero");
+ fail_unless(llist.head == NULL, "list head should initiate to NULL");
+ fail_unless(llist.tail == NULL, "list tail should intiate to NULL");
+ fail_unless(llist.dtor == test_curl_llist_dtor,
"list dtor shold initiate to test_curl_llist_dtor");
/**
@@ -92,67 +90,49 @@ UNITTEST_START
* 3: list tail will be the same as list head
*/
- curlErrCode = Curl_llist_insert_next(llist, llist->head, &unusedData_case1);
- if(curlErrCode == 1) {
- fail_unless(Curl_llist_count(llist) == 1,
- "List size should be 1 after adding a new element");
- /*test that the list head data holds my unusedData */
- fail_unless(llist->head->ptr == &unusedData_case1,
- "List size should be 1 after adding a new element");
- /*same goes for the list tail */
- fail_unless(llist->tail == llist->head,
- "List size should be 1 after adding a new element");
-
- /**
- * testing Curl_llist_insert_next
- * case 2:
- * list has 1 element, adding one element after the head
- * @assumptions:
- * 1: the element next to head should be our newly created element
- * 2: the list tail should be our newly created element
- */
-
- curlErrCode = Curl_llist_insert_next(llist, llist->head,
- &unusedData_case3);
- if(curlErrCode == 1) {
- fail_unless(llist->head->next->ptr == &unusedData_case3,
- "the node next to head is not getting set correctly");
- fail_unless(llist->tail->ptr == &unusedData_case3,
- "the list tail is not getting set correctly");
- }
- else {
- printf("skipping Curl_llist_insert_next as a non "
- "success error code was returned\n");
- }
-
- /**
- * testing Curl_llist_insert_next
- * case 3:
- * list has >1 element, adding one element after "NULL"
- * @assumptions:
- * 1: the element next to head should be our newly created element
- * 2: the list tail should different from newly created element
- */
-
- curlErrCode = Curl_llist_insert_next(llist, llist->head,
- &unusedData_case2);
- if(curlErrCode == 1) {
- fail_unless(llist->head->next->ptr == &unusedData_case2,
- "the node next to head is not getting set correctly");
- /* better safe than sorry, check that the tail isn't corrupted */
- fail_unless(llist->tail->ptr != &unusedData_case2,
- "the list tail is not getting set correctly");
- }
- else {
- printf("skipping Curl_llist_insert_next as a non "
- "success error code was returned\n");
- }
-
- }
- else {
- printf("skipping Curl_llist_insert_next as a non "
- "success error code was returned\n");
- }
+ Curl_llist_insert_next(&llist, llist.head, &unusedData_case1, &case1_list);
+
+ fail_unless(Curl_llist_count(&llist) == 1,
+ "List size should be 1 after adding a new element");
+ /*test that the list head data holds my unusedData */
+ fail_unless(llist.head->ptr == &unusedData_case1,
+ "head ptr should be first entry");
+ /*same goes for the list tail */
+ fail_unless(llist.tail == llist.head,
+ "tail and head should be the same");
+
+ /**
+ * testing Curl_llist_insert_next
+ * case 2:
+ * list has 1 element, adding one element after the head
+ * @assumptions:
+ * 1: the element next to head should be our newly created element
+ * 2: the list tail should be our newly created element
+ */
+
+ Curl_llist_insert_next(&llist, llist.head,
+ &unusedData_case3, &case3_list);
+ fail_unless(llist.head->next->ptr == &unusedData_case3,
+ "the node next to head is not getting set correctly");
+ fail_unless(llist.tail->ptr == &unusedData_case3,
+ "the list tail is not getting set correctly");
+
+ /**
+ * testing Curl_llist_insert_next
+ * case 3:
+ * list has >1 element, adding one element after "NULL"
+ * @assumptions:
+ * 1: the element next to head should be our newly created element
+ * 2: the list tail should different from newly created element
+ */
+
+ Curl_llist_insert_next(&llist, llist.head,
+ &unusedData_case2, &case2_list);
+ fail_unless(llist.head->next->ptr == &unusedData_case2,
+ "the node next to head is not getting set correctly");
+ /* better safe than sorry, check that the tail isn't corrupted */
+ fail_unless(llist.tail->ptr != &unusedData_case2,
+ "the list tail is not getting set correctly");
/* unit tests for Curl_llist_remove */
@@ -165,19 +145,19 @@ UNITTEST_START
* 3: "new" head's previous will be NULL
*/
- head=llist->head;
- abort_unless(head, "llist->head is NULL");
+ head=llist.head;
+ abort_unless(head, "llist.head is NULL");
element_next = head->next;
- llist_size = Curl_llist_count(llist);
+ llist_size = Curl_llist_count(&llist);
- Curl_llist_remove(llist, llist->head, NULL);
+ Curl_llist_remove(&llist, llist.head, NULL);
- fail_unless(Curl_llist_count(llist) == (llist_size-1),
+ fail_unless(Curl_llist_count(&llist) == (llist_size-1),
"llist size not decremented as expected");
- fail_unless(llist->head == element_next,
+ fail_unless(llist.head == element_next,
"llist new head not modified properly");
- abort_unless(llist->head, "llist->head is NULL");
- fail_unless(llist->head->prev == NULL,
+ abort_unless(llist.head, "llist.head is NULL");
+ fail_unless(llist.head->prev == NULL,
"new head previous not set to null");
/**
@@ -190,13 +170,16 @@ UNITTEST_START
* 2: element->previous->next will be element->next
* 3: element->next->previous will be element->previous
*/
- Curl_llist_insert_next(llist, llist->head, &unusedData_case3);
- llist_size = Curl_llist_count(llist);
- to_remove = llist->head->next;
+ Curl_llist_insert_next(&llist, llist.head, &unusedData_case3,
+ &case4_list);
+ llist_size = Curl_llist_count(&llist);
+ fail_unless(llist_size == 3, "should be 3 list members");
+
+ to_remove = llist.head->next;
abort_unless(to_remove, "to_remove is NULL");
element_next = to_remove->next;
element_prev = to_remove->prev;
- Curl_llist_remove(llist, to_remove, NULL);
+ Curl_llist_remove(&llist, to_remove, NULL);
fail_unless(element_prev->next == element_next,
"element previous->next is not being adjusted");
abort_unless(element_next, "element_next is NULL");
@@ -213,10 +196,10 @@ UNITTEST_START
* 4: list->tail will be tail->previous
*/
- to_remove = llist->tail;
+ to_remove = llist.tail;
element_prev = to_remove->prev;
- Curl_llist_remove(llist, to_remove, NULL);
- fail_unless(llist->tail == element_prev,
+ Curl_llist_remove(&llist, to_remove, NULL);
+ fail_unless(llist.tail == element_prev,
"llist tail is not being adjusted when removing tail");
/**
@@ -228,11 +211,11 @@ UNITTEST_START
* 3: list tail will be null
*/
- to_remove = llist->head;
- Curl_llist_remove(llist, to_remove, NULL);
- fail_unless(llist->head == NULL,
+ to_remove = llist.head;
+ Curl_llist_remove(&llist, to_remove, NULL);
+ fail_unless(llist.head == NULL,
"llist head is not NULL while the llist is empty");
- fail_unless(llist->tail == NULL,
+ fail_unless(llist.tail == NULL,
"llist tail is not NULL while the llist is empty");
/* @testing Curl_llist_move(struct curl_llist *,
@@ -242,7 +225,7 @@ UNITTEST_START
/**
* @case 1:
- * moving head from an llist containg one element to an empty llist
+ * moving head from an llist containing one element to an empty llist
* @assumptions:
* 1: llist size will be 0
* 2: llist_destination size will be 1
@@ -255,38 +238,33 @@ UNITTEST_START
* add one element to the list
*/
- curlErrCode = Curl_llist_insert_next(llist, llist->head, &unusedData_case1);
+ Curl_llist_insert_next(&llist, llist.head, &unusedData_case1,
+ &case5_list);
/* necessary assertions */
- abort_unless(curlErrCode == 1,
- "Curl_llist_insert_next returned an error, Can't move on with test");
- abort_unless(Curl_llist_count(llist) == 1,
+ abort_unless(Curl_llist_count(&llist) == 1,
"Number of list elements is not as expected, Aborting");
- abort_unless(Curl_llist_count(llist_destination) == 0,
+ abort_unless(Curl_llist_count(&llist_destination) == 0,
"Number of list elements is not as expected, Aborting");
/*actual testing code*/
- curlErrCode = Curl_llist_move(llist, llist->head, llist_destination, NULL);
- abort_unless(curlErrCode == 1,
- "Curl_llist_move returned an error, Can't move on with test");
- fail_unless(Curl_llist_count(llist) == 0,
+ Curl_llist_move(&llist, llist.head, &llist_destination, NULL);
+ fail_unless(Curl_llist_count(&llist) == 0,
"moving element from llist didn't decrement the size");
- fail_unless(Curl_llist_count(llist_destination) == 1,
+ fail_unless(Curl_llist_count(&llist_destination) == 1,
"moving element to llist_destination didn't increment the size");
- fail_unless(llist->head == NULL,
+ fail_unless(llist.head == NULL,
"llist head not set to null after moving the head");
- fail_unless(llist_destination->head != NULL,
+ fail_unless(llist_destination.head != NULL,
"llist_destination head set to null after moving an element");
- fail_unless(llist_destination->tail != NULL,
+ fail_unless(llist_destination.tail != NULL,
"llist_destination tail set to null after moving an element");
- fail_unless(llist_destination->tail == llist_destination->tail,
+ fail_unless(llist_destination.tail == llist_destination.tail,
"llist_destination tail doesn't equal llist_destination head");
-
-
-
+}
UNITTEST_STOP
diff --git a/tests/unit/unit1303.c b/tests/unit/unit1303.c
index c39e147a..143ccd03 100644
--- a/tests/unit/unit1303.c
+++ b/tests/unit/unit1303.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -64,14 +64,14 @@ struct timetest {
int timeout_ms;
int connecttimeout_ms;
bool connecting;
- long result;
+ time_t result;
const char *comment;
};
UNITTEST_START
{
- struct timeval now;
- long timeout;
+ struct curltime now;
+ time_t timeout;
unsigned int i;
const struct timetest run[] = {
diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c
index db0a44c5..b958d043 100644
--- a/tests/unit/unit1305.c
+++ b/tests/unit/unit1305.c
@@ -76,9 +76,6 @@ static void unit_stop(void)
static Curl_addrinfo *fake_ai(void)
{
static Curl_addrinfo *ai;
- int ss_size;
-
- ss_size = sizeof(struct sockaddr_in);
ai = calloc(1, sizeof(Curl_addrinfo));
if(!ai)
@@ -90,7 +87,7 @@ static Curl_addrinfo *fake_ai(void)
return NULL;
}
- ai->ai_addr = calloc(1, ss_size);
+ ai->ai_addr = calloc(1, sizeof(struct sockaddr_in));
if(!ai->ai_addr) {
free(ai->ai_canonname);
free(ai);
@@ -98,7 +95,7 @@ static Curl_addrinfo *fake_ai(void)
}
ai->ai_family = AF_INET;
- ai->ai_addrlen = ss_size;
+ ai->ai_addrlen = sizeof(struct sockaddr_in);
return ai;
}
diff --git a/tests/unit/unit1309.c b/tests/unit/unit1309.c
index 3cf6eefb..9d1e70d2 100644
--- a/tests/unit/unit1309.c
+++ b/tests/unit/unit1309.c
@@ -52,7 +52,7 @@ static void splayprint(struct Curl_tree * t, int d, char output)
(long)t->key.tv_usec, i);
}
- for(count=0, node = t->same; node; node = node->same, count++)
+ for(count=0, node = t->samen; node != t; node = node->samen, count++)
;
if(output) {
@@ -70,19 +70,23 @@ UNITTEST_START
/* number of nodes to add to the splay tree */
#define NUM_NODES 50
- struct Curl_tree *root;
- struct Curl_tree nodes[NUM_NODES];
+ struct Curl_tree *root, *removed;
+ struct Curl_tree nodes[NUM_NODES*3];
int rc;
- int i;
+ int i, j;
+ struct curltime tv_now = {0, 0};
root = NULL; /* the empty tree */
+ /* add nodes */
for(i = 0; i < NUM_NODES; i++) {
- struct timeval key;
+ struct curltime key;
+ size_t payload;
key.tv_sec = 0;
key.tv_usec = (541*i)%1023;
+ payload = (size_t) key.tv_usec;
- nodes[i].payload = (void *)key.tv_usec; /* for simplicity */
+ nodes[i].payload = (void *)payload; /* for simplicity */
root = Curl_splayinsert(key, root, &nodes[i]);
}
@@ -103,6 +107,37 @@ UNITTEST_START
}
}
+ fail_unless(root == NULL, "tree not empty after removing all nodes");
+
+ /* rebuild tree */
+ for(i = 0; i < NUM_NODES; i++) {
+ struct curltime key;
+
+ key.tv_sec = 0;
+ key.tv_usec = (541*i)%1023;
+
+ /* add some nodes with the same key */
+ for(j = 0; j <= i % 3; j++) {
+ size_t payload = key.tv_usec*10 + j;
+ nodes[i*3+j].payload = (void *)payload; /* for simplicity */
+ root = Curl_splayinsert(key, root, &nodes[i*3+j]);
+ }
+ }
+
+ removed = NULL;
+ for(i = 0; i <= 1100; i+= 100) {
+ printf("Removing nodes not larger than %d\n", i);
+ tv_now.tv_usec = i;
+ root = Curl_splaygetbest(tv_now, root, &removed);
+ while(removed != NULL) {
+ printf("removed payload %ld[%ld]\n", (long)(removed->payload) / 10,
+ (long)(removed->payload) % 10);
+ root = Curl_splaygetbest(tv_now, root, &removed);
+ }
+ }
+
+ fail_unless(root == NULL, "tree not empty when it should be");
+
UNITTEST_STOP
diff --git a/tests/unit/unit1323.c b/tests/unit/unit1323.c
new file mode 100644
index 00000000..65dd3d28
--- /dev/null
+++ b/tests/unit/unit1323.c
@@ -0,0 +1,66 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "curlcheck.h"
+
+#include "timeval.h"
+
+static CURLcode unit_setup(void)
+{
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+
+}
+
+struct a {
+ struct curltime first;
+ struct curltime second;
+ time_t result;
+};
+
+UNITTEST_START
+{
+ struct a tests[] = {
+ { {36762, 8345 }, {36761, 995926 }, 13 },
+ { {36761, 995926 }, {36762, 8345 }, -13 },
+ { {36761, 995926 }, {0, 0}, 36761995 },
+ { {0, 0}, {36761, 995926 }, -36761995 },
+ };
+ size_t i;
+
+ for(i=0; i < sizeof(tests)/sizeof(tests[0]); i++) {
+ time_t result = curlx_tvdiff(tests[i].first, tests[i].second);
+ if(result != tests[i].result) {
+ printf("%d.%06u to %d.%06u got %d, but expected %d\n",
+ tests[i].first.tv_sec,
+ tests[i].first.tv_usec,
+ tests[i].second.tv_sec,
+ tests[i].second.tv_usec,
+ result,
+ tests[i].result);
+ fail("unexpected result!");
+ }
+ }
+}
+UNITTEST_STOP
diff --git a/tests/unit/unit1395.c b/tests/unit/unit1395.c
index 13f46413..13ea97bc 100644
--- a/tests/unit/unit1395.c
+++ b/tests/unit/unit1395.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -65,10 +65,17 @@ UNITTEST_START
{ "/", "/" },
{ "", "" },
{ "/.../", "/.../" },
+ { "./moo", "moo" },
+ { "../moo", "moo" },
+ { "/.", "/" },
+ { "/..", "/" },
+ { "/moo/..", "/" },
+ { "..", "" },
+ { ".", "" },
};
for(i=0; i < sizeof(pairs)/sizeof(pairs[0]); i++) {
- char *out = Curl_dedotdotify((char *)pairs[i].input);
+ char *out = Curl_dedotdotify(pairs[i].input);
abort_unless(out != NULL, "returned NULL!");
if(strcmp(out, pairs[i].output)) {
diff --git a/tests/unit/unit1396.c b/tests/unit/unit1396.c
index 84a5162d..f3275fdb 100644
--- a/tests/unit/unit1396.c
+++ b/tests/unit/unit1396.c
@@ -21,7 +21,7 @@
***************************************************************************/
#include "curlcheck.h"
-CURL *hnd;
+static CURL *hnd;
static CURLcode unit_setup(void)
{
diff --git a/tests/unit/unit1399.c b/tests/unit/unit1399.c
new file mode 100644
index 00000000..82e0dc27
--- /dev/null
+++ b/tests/unit/unit1399.c
@@ -0,0 +1,100 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "curlcheck.h"
+
+#include "urldata.h"
+#include "progress.h"
+
+static int usec_magnitude = 1000000;
+
+static bool unit_setup(void)
+{
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+
+}
+
+static bool usec_matches_seconds(time_t time_usec, int expected_seconds)
+{
+ int time_sec = (int)(time_usec / usec_magnitude);
+ bool same = (time_sec == expected_seconds);
+ fprintf(stderr, "is %d us same as %d seconds? %s\n",
+ (int)time_usec, expected_seconds,
+ same?"Yes":"No");
+ return same;
+}
+
+UNITTEST_START
+ struct Curl_easy data;
+ struct curltime now = Curl_tvnow();
+
+ data.progress.t_starttransfer = 0;
+ data.progress.t_redirect = 0;
+
+ /*
+ * Set the startsingle time to a second ago. This time is used by
+ * Curl_pgrsTime to calculate how much time the events takes.
+ * t_starttransfer should be updated to reflect the difference from this time
+ * when `Curl_pgrsTime is invoked.
+ */
+ data.progress.t_startsingle.tv_sec = now.tv_sec - 1;
+ data.progress.t_startsingle.tv_usec = now.tv_usec;
+
+ Curl_pgrsTime(&data, TIMER_STARTTRANSFER);
+
+ fail_unless(usec_matches_seconds(data.progress.t_starttransfer, 1),
+ "about 1 second should have passed");
+
+ /*
+ * Update the startsingle time to a second ago to simulate another second has
+ * passed.
+ * Now t_starttransfer should not be changed, as t_starttransfer has already
+ * occurred and another invocation of `Curl_pgrsTime` for TIMER_STARTTRANSFER
+ * is superfluous.
+ */
+ data.progress.t_startsingle.tv_sec = now.tv_sec - 2;
+ data.progress.t_startsingle.tv_usec = now.tv_usec;
+
+ Curl_pgrsTime(&data, TIMER_STARTTRANSFER);
+
+ fail_unless(usec_matches_seconds(data.progress.t_starttransfer, 1),
+ "about 1 second should have passed");
+
+ /*
+ * Simulate what happens after a redirect has occurred.
+ *
+ * Since the value of t_starttransfer is set to the value from the first
+ * request, it should be updated when a transfer occurs such that
+ * t_starttransfer is the starttransfer time of the redirect request.
+ */
+ data.progress.t_startsingle.tv_sec = now.tv_sec - 3;
+ data.progress.t_startsingle.tv_usec = now.tv_usec;
+ data.progress.t_redirect = data.progress.t_starttransfer + 1;
+
+ Curl_pgrsTime(&data, TIMER_STARTTRANSFER);
+
+ fail_unless(usec_matches_seconds(data.progress.t_starttransfer, 3),
+ "about 3 second should have passed");
+UNITTEST_STOP
diff --git a/tests/unit/unit1600.c b/tests/unit/unit1600.c
index f0f9cc1f..11d718d3 100644
--- a/tests/unit/unit1600.c
+++ b/tests/unit/unit1600.c
@@ -24,12 +24,12 @@
#include "urldata.h"
#include "curl_ntlm_core.h"
-CURL *easy;
+static CURL *easy;
static CURLcode unit_setup(void)
{
easy = curl_easy_init();
- return CURLE_OK;
+ return easy ? CURLE_OK : CURLE_OUT_OF_MEMORY;
}
static void unit_stop(void)
diff --git a/tests/unit/unit1604.c b/tests/unit/unit1604.c
index 5f1ea951..b414e03e 100644
--- a/tests/unit/unit1604.c
+++ b/tests/unit/unit1604.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -45,26 +45,28 @@ static void unit_stop(void)
static char *getflagstr(int flags)
{
char *buf = malloc(256);
- fail_unless(buf, "out of memory");
- snprintf(buf, 256, "%s,%s,%s,%s",
- ((flags & SANITIZE_ALLOW_COLONS) ? "SANITIZE_ALLOW_COLONS" : ""),
- ((flags & SANITIZE_ALLOW_PATH) ? "SANITIZE_ALLOW_PATH" : ""),
- ((flags & SANITIZE_ALLOW_RESERVED) ? "SANITIZE_ALLOW_RESERVED" : ""),
- ((flags & SANITIZE_ALLOW_TRUNCATE) ? "SANITIZE_ALLOW_TRUNCATE" : ""));
+ if(buf) {
+ snprintf(buf, 256, "%s,%s,%s,%s",
+ ((flags & SANITIZE_ALLOW_COLONS) ? "SANITIZE_ALLOW_COLONS" : ""),
+ ((flags & SANITIZE_ALLOW_PATH) ? "SANITIZE_ALLOW_PATH" : ""),
+ ((flags & SANITIZE_ALLOW_RESERVED) ? "SANITIZE_ALLOW_RESERVED" : ""),
+ ((flags & SANITIZE_ALLOW_TRUNCATE) ? "SANITIZE_ALLOW_TRUNCATE" : ""));
+ }
return buf;
}
static char *getcurlcodestr(int cc)
{
char *buf = malloc(256);
- fail_unless(buf, "out of memory");
- snprintf(buf, 256, "%s (%d)",
- (cc == SANITIZE_ERR_OK ? "SANITIZE_ERR_OK" :
- cc == SANITIZE_ERR_BAD_ARGUMENT ? "SANITIZE_ERR_BAD_ARGUMENT" :
- cc == SANITIZE_ERR_INVALID_PATH ? "SANITIZE_ERR_INVALID_PATH" :
- cc == SANITIZE_ERR_OUT_OF_MEMORY ? "SANITIZE_ERR_OUT_OF_MEMORY" :
- "unexpected error code - add name"),
- cc);
+ if(buf) {
+ snprintf(buf, 256, "%s (%d)",
+ (cc == SANITIZE_ERR_OK ? "SANITIZE_ERR_OK" :
+ cc == SANITIZE_ERR_BAD_ARGUMENT ? "SANITIZE_ERR_BAD_ARGUMENT" :
+ cc == SANITIZE_ERR_INVALID_PATH ? "SANITIZE_ERR_INVALID_PATH" :
+ cc == SANITIZE_ERR_OUT_OF_MEMORY ? "SANITIZE_ERR_OUT_OF_MEMORY" :
+ "unexpected error code - add name"),
+ cc);
+ }
return buf;
}
@@ -310,8 +312,11 @@ UNITTEST_START
}
flagstr = getflagstr(data[i].flags);
+ abort_unless(flagstr, "out of memory");
received_ccstr = getcurlcodestr(res);
+ abort_unless(received_ccstr, "out of memory");
expected_ccstr = getcurlcodestr(data[i].expected_result);
+ abort_unless(expected_ccstr, "out of memory");
unitfail++;
fprintf(stderr, "\n"
diff --git a/tests/unit/unit1605.c b/tests/unit/unit1605.c
index c807cb3f..2fe3a5ac 100644
--- a/tests/unit/unit1605.c
+++ b/tests/unit/unit1605.c
@@ -34,9 +34,10 @@ static void unit_stop(void)
}
UNITTEST_START
- CURL *easy = curl_easy_init();
int len;
char *esc;
+ CURL *easy = curl_easy_init();
+ abort_unless(easy, "out of memory");
esc = curl_easy_escape(easy, "", -1);
fail_unless(esc == NULL, "negative string length can't work");
diff --git a/tests/unit/unit1606.c b/tests/unit/unit1606.c
new file mode 100644
index 00000000..eca8f3c3
--- /dev/null
+++ b/tests/unit/unit1606.c
@@ -0,0 +1,90 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "curlcheck.h"
+
+#include "speedcheck.h"
+#include "urldata.h"
+
+static CURLcode unit_setup(void)
+{
+ return CURLE_OK;
+}
+
+static void unit_stop(void)
+{
+
+}
+
+static int runawhile(struct Curl_easy *easy,
+ long time_limit,
+ long speed_limit,
+ curl_off_t speed,
+ int dec)
+{
+ int counter = 1;
+ struct curltime now = {1, 0};
+ CURLcode result;
+ int finaltime;
+
+ curl_easy_setopt(easy, CURLOPT_LOW_SPEED_LIMIT, speed_limit);
+ curl_easy_setopt(easy, CURLOPT_LOW_SPEED_TIME, time_limit);
+ Curl_speedinit(easy);
+
+ do {
+ /* fake the current transfer speed */
+ easy->progress.current_speed = speed;
+ result = Curl_speedcheck(easy, now);
+ if(result)
+ break;
+ /* step the time */
+ now.tv_sec = ++counter;
+ speed -= dec;
+ } while(counter < 100);
+
+ finaltime = (int)(now.tv_sec - 1);
+
+ return finaltime;
+}
+
+UNITTEST_START
+{
+ struct Curl_easy *easy = curl_easy_init();
+ abort_unless(easy, "out of memory");
+
+ fail_unless(runawhile(easy, 41, 41, 40, 0) == 41,
+ "wrong low speed timeout");
+ fail_unless(runawhile(easy, 21, 21, 20, 0) == 21,
+ "wrong low speed timeout");
+ fail_unless(runawhile(easy, 60, 60, 40, 0) == 60,
+ "wrong log speed timeout");
+ fail_unless(runawhile(easy, 50, 50, 40, 0) == 50,
+ "wrong log speed timeout");
+ fail_unless(runawhile(easy, 40, 40, 40, 0) == 99,
+ "should not time out");
+ fail_unless(runawhile(easy, 10, 50, 100, 2) == 36,
+ "bad timeout");
+
+ curl_easy_cleanup(easy);
+
+ return 0;
+}
+UNITTEST_STOP
diff --git a/tests/valgrind.pm b/tests/valgrind.pm
index e6f66fd5..8b3d717d 100644
--- a/tests/valgrind.pm
+++ b/tests/valgrind.pm
@@ -23,9 +23,7 @@
use File::Basename;
sub valgrindparse {
- my ($srcdir, # the dir in which the runtests script resides
- $sslenabled,
- $file) = @_;
+ my ($file) = @_;
my @o;
open(VAL, "<$file");
@o = <VAL>;
diff --git a/tests/valgrind.supp b/tests/valgrind.supp
index 8c81327e..10b07314 100644
--- a/tests/valgrind.supp
+++ b/tests/valgrind.supp
@@ -87,3 +87,24 @@
fun:operate
fun:main
}
+
+{
+ openssl-1.0.1-error-as-seen-on-travis
+ Memcheck:Cond
+ fun:ASN1_STRING_set
+ fun:ASN1_mbstring_ncopy
+ fun:ASN1_mbstring_copy
+ fun:ASN1_STRING_to_UTF8
+ obj:/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
+ obj:/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
+ fun:ASN1_item_ex_d2i
+ obj:/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
+ obj:/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
+ fun:ASN1_item_ex_d2i
+ obj:/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
+ obj:/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
+ fun:ASN1_item_ex_d2i
+ fun:ASN1_item_d2i
+ fun:PEM_X509_INFO_read_bio
+ fun:X509_load_cert_crl_file
+}