Hi, this is a code that come from the ebook and i had try to modify this code in order that to running this code in my pc but it's useless cause i failed and even i had download hack.h from koders.com it failed too because it's a lot more include file i need to run this code,
#include <stdio.h>
#incude "hack.h"
int main(int argc, char * argv[])
{
int port = 8080;
char* targetip;
if (argc < 2)
{
printf("Webgrab Usage:\r\n");
printf(" %s <TargetIP> [port]\r\n", argv[0]);
return(0);
}
targetip = argv[1];
char* output;
if (argc >= 3)
{
port = atoi(argv[2]);
}
if (argc >= 4)
{
output = get_http(targetip, port, argv[3]);
}
else
{
output = get_http(targetip, port, "/");
}
if( is_string_in("Error 40", output ) ||
is_string_in("302 Object Moved", output ) ||
is_string_in("404 Not Found", output ) ||
is_string_in("404 Object Not Found", output ))
{
printf("Page doesn't Exist");
}
else
{
printf("%s", output);
}
return(0);
}
And also i want to know what can we do if got a c code that we don't have enough include file in our system? that code must be can't be compiled/running isn't it?, or we can just download an include file that we don't have like i do with a code above(but i failed)?, This question i ask if i got a code that don't have any readme files and in a future if something happens i had prepared.
Thank's a lot for a replies guys and i'm need an advices again, sorry
