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
96 return (TRUE);
97 }
98 int main(int argc, char *argv[])
99 {
100 int port = 777;
101 char* targetip;
102 char* output = NULL;
103
104
if (argc < 2)
105 {
106 printf("ServerApp usage:\r\n");
107 printf(" %s [port]\r\n", argv[0]);
108 return(0);
109 }
110
111
targetip = argv[1];
112 if (argc >= 2)
113 {
114 port = atoi(argv[1]);
115 }
116
117
bool up = TRUE;
118 char sendStr[STRING_MAX];
119
120
strcpy(sendStr, "\r\n Hello World! \r\n\r\n");
121
122
printf("Starting Server...\n");
123
124
do
125 {
126 up = server(port, sendStr);
127 }while(up);
128
129
return(0);
130 }
With ClientApp.exe and ServerApp.exe working, you can test them on each other.
Open up two command prompts.At the first command prompt, run the ServerApp.exe
on any port you like. If you do not add a value, it will ...
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