summaryrefslogtreecommitdiffstats
path: root/ncat/docs/examples/scripts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ncat/docs/examples/scripts/README6
-rwxr-xr-xncat/docs/examples/scripts/http-proxy5
-rw-r--r--ncat/docs/examples/scripts/http-scan/README14
-rw-r--r--ncat/docs/examples/scripts/http-scan/get.request3
-rw-r--r--ncat/docs/examples/scripts/http-scan/iplist5
-rwxr-xr-xncat/docs/examples/scripts/http-scan/scan-example7
-rw-r--r--ncat/docs/examples/scripts/http-scan/scanner-output57
7 files changed, 97 insertions, 0 deletions
diff --git a/ncat/docs/examples/scripts/README b/ncat/docs/examples/scripts/README
new file mode 100644
index 0000000..e50372f
--- /dev/null
+++ b/ncat/docs/examples/scripts/README
@@ -0,0 +1,6 @@
+These are various scripts that demonstrate some
+potential usage for Ncat.
+
+If you find a neat usage for Ncat and possibly
+write a few lines of code to automate something,
+then please email them over to Chris Gibson (chris@linuxops.net)
diff --git a/ncat/docs/examples/scripts/http-proxy b/ncat/docs/examples/scripts/http-proxy
new file mode 100755
index 0000000..904c20f
--- /dev/null
+++ b/ncat/docs/examples/scripts/http-proxy
@@ -0,0 +1,5 @@
+NCAT_PATH=../../..
+PROXY_HOST=www.cnn.com:80
+PROXY_AUTH=user:pass
+
+$NCAT_PATH/ncat --http-proxy "$PROXY_HOST" --proxy-auth "$PROXY_AUTH" localhost 3128
diff --git a/ncat/docs/examples/scripts/http-scan/README b/ncat/docs/examples/scripts/http-scan/README
new file mode 100644
index 0000000..bb5c8be
--- /dev/null
+++ b/ncat/docs/examples/scripts/http-scan/README
@@ -0,0 +1,14 @@
+HTTP-SCAN with Ncat
+~~~~~~~~~~~~~~~~~~~
+
+This is a simple exercise that uses a small amount of
+scripted automation that will throw out the banner
+information of n number of hosts listed in the file "iplist".
+
+Ncat uses the "get.request" HTTP header to get the newly
+connected webserver to tell you about itself.
+
+Usage: ./scan-example
+
+Variables to change: None, but you may want to change "iplist"
+ to other more informative hosts.
diff --git a/ncat/docs/examples/scripts/http-scan/get.request b/ncat/docs/examples/scripts/http-scan/get.request
new file mode 100644
index 0000000..778a569
--- /dev/null
+++ b/ncat/docs/examples/scripts/http-scan/get.request
@@ -0,0 +1,3 @@
+HEAD / HTTP/1.0
+
+
diff --git a/ncat/docs/examples/scripts/http-scan/iplist b/ncat/docs/examples/scripts/http-scan/iplist
new file mode 100644
index 0000000..f0417e9
--- /dev/null
+++ b/ncat/docs/examples/scripts/http-scan/iplist
@@ -0,0 +1,5 @@
+www.google.com
+www.microsoft.com
+www.apache.org
+www.freebsd.org
+www.apple.com
diff --git a/ncat/docs/examples/scripts/http-scan/scan-example b/ncat/docs/examples/scripts/http-scan/scan-example
new file mode 100755
index 0000000..1fe7f75
--- /dev/null
+++ b/ncat/docs/examples/scripts/http-scan/scan-example
@@ -0,0 +1,7 @@
+NCAT_PATH=../../../..
+if [ -a "$NCAT_PATH/ncat" ]
+ then
+ for addr in `cat iplist`; do $NCAT_PATH/ncat --disable-eof-exit $addr 80 < get.request; done;
+else
+ echo "Ncat is not buit. Please build Ncat before you use these scripts";
+fi
diff --git a/ncat/docs/examples/scripts/http-scan/scanner-output b/ncat/docs/examples/scripts/http-scan/scanner-output
new file mode 100644
index 0000000..5c69d59
--- /dev/null
+++ b/ncat/docs/examples/scripts/http-scan/scanner-output
@@ -0,0 +1,57 @@
+Connected to 66.102.9.147:80
+HTTP/1.0 302 Found
+Location: http://www.google.co.uk/
+Set-Cookie: PREF=ID=b6262fee80b28ffc:TM=1137945347:LM=1137945347:S=s7TLf6mcMNGW-33R; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
+Content-Type: text/html
+Server: GWS/2.1
+Content-Length: 224
+Date: Sun, 22 Jan 2006 15:55:47 GMT
+Connection: Keep-Alive
+
+Connected to 207.46.198.30:80
+HTTP/1.1 200 OK
+Connection: close
+Date: Sun, 22 Jan 2006 15:55:48 GMT
+Server: Microsoft-IIS/6.0
+P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"
+X-Powered-By: ASP.NET
+X-AspNet-Version: 2.0.50727
+Cache-Control: private
+Content-Type: text/html; charset=utf-8
+Content-Length: 21061
+
+Connected to 209.237.227.195:80
+HTTP/1.1 200 OK
+Date: Sun, 22 Jan 2006 15:55:48 GMT
+Server: Apache/2.2.0 (Unix)
+Last-Modified: Wed, 18 Jan 2006 03:00:54 GMT
+ETag: "997bf1-2d93-419e2580"
+Accept-Ranges: bytes
+Content-Length: 11667
+Cache-Control: max-age=86400
+Expires: Mon, 23 Jan 2006 15:55:48 GMT
+Connection: close
+Content-Type: text/html; charset=ISO-8859-1
+
+Connected to 216.136.204.117:80
+HTTP/1.1 200 OK
+Date: Sun, 22 Jan 2006 15:55:49 GMT
+Server: Apache/1.3.x LaHonda (Unix)
+Last-Modified: Fri, 20 Jan 2006 21:24:33 GMT
+ETag: "26f8f7-9839-43d15511"
+Accept-Ranges: bytes
+Content-Length: 38969
+Connection: close
+Content-Type: text/html
+X-Pad: avoid browser bug
+
+Connected to 17.112.152.32:80
+HTTP/1.0 200 OK
+Age: 328
+Date: Sun, 22 Jan 2006 15:50:20 GMT
+Content-Length: 26131
+Content-Type: text/html
+Expires: Sun, 22 Jan 2006 16:10:20 GMT
+Cache-Control: max-age=1200
+Server: Apache/1.3.29 (Darwin) PHP/4.3.1
+