Skip to Main Content
Sockets, Shellcode, Porting, and Coding: Reverse Engineering Exploits and Tool Coding for Security Professionals
book

Sockets, Shellcode, Porting, and Coding: Reverse Engineering Exploits and Tool Coding for Security Professionals

by James C Foster
April 2005
Intermediate to advanced content levelIntermediate to advanced
700 pages
20h 39m
English
Syngress
Content preview from Sockets, Shellcode, Porting, and Coding: Reverse Engineering Exploits and Tool Coding for Security Professionals
144 // close client connection
145 try
146 {
147 clnt.close();
148 clnt = null ;
149 }
150 catch (IOException ioe)
151 {
152 System.err.println(“IOException: “
153 + ioe.getMessage());
154 }
155 }
156
157
// be nice to CPU
158 try
159 {
160 Thread.sleep(10);
161 }
162 catch(InterruptedException ie)
163 {
164 }
165
166
// continue monitoring queue..
167 }
168 }
169 }
Compilation
C:\> j2sdk1.4.1_02\bin\javac.exe WormCatcher.java
C:\> dir
.
.
ThreadPool.class
WorkerThread.class
WormCatcher.class
.
.
Example Execution
C:\> j2sdk1.4.1_02\bin\java.exe WormCatcher
usage: java WormCatcher <local_port>
Example: java WormCatcher 80
C:\> j2sdk1.4.1_02\bin\java.exe WormCatcher 80
*** WorkerThread ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

32/64-Bit 80x86 Assembly Language Architecture

32/64-Bit 80x86 Assembly Language Architecture

James Leiterman

Publisher Resources

ISBN: 9781597490054