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
4 #Released by James C. Foster & Mark Burnett at BlackHat Windows 2004 in Seattle
5 #January 2004
6
7
use Getopt::Std;
8
9
getopts('d:t:rhs:l:') || usage();
10
11
$logfile = $opt_l;
12
13
##########
14
15
if ($opt_h == 1)
16 {
17 usage();
18 }
19 ##########
20
21
if ($opt_t ne "" && $opt_s eq "")
22 {
23 open (FILE, "$logfile");
24
25
while (<FILE>)
26 {
27 $ranip=randomip();
28 s/$opt_t/$ranip/;
29 push(@templog,$_);
30 next;
31 }
32
33
close FILE;
34 open (FILE2, ">$logfile") || die("couldnt open");
35 print FILE2"@templog";
36 close FILE2;
37 }
38 ##########
39
40
if ($opt_s ne "")
41 {
42 open (FILE, "$logfile");
43
44
while (<FILE>)
45 {
46 s/$opt_t/$opt_s/;
47 push(@templog,$_);
48 next;
49 }
50
51
close FILE;
52 open (FILE2, ">$logfile") || die("couldnt open");
53 print FILE2"@templog";
54 close ...
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