vnet576
Sep 11 2003, 11:55 PM
I've tried compiling several c exploits with bloodshed dev-c++. Anyway I get errors on every one that I try to compile. For example I tried compiling the media exploit. These r the compilation errors from the log. I don't know if these errors are becuz of the exploit or the compiler. I included the exploit that I'm trying to compile too.
| QUOTE |
Compiler: Default compiler Executing gcc.exe... gcc.exe "C:\xfocus-nsiislog-exploit.c" -o "C:\xfocus-nsiislog-exploit.exe" -I"C:\Program Files\Dev-Cpp\include" -L"C:\Program Files\Dev-Cpp\lib" C:/xfocus-nsiislog-exploit.c: In function `main': C:/xfocus-nsiislog-exploit.c:67: warning: return type of `main' is not `int'
C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0xed):xfocus-nsiislog-exploit.c: undefined reference to `WSAStartup@8' C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0xff):xfocus-nsiislog-exploit.c: undefined reference to `WSAGetLastError@0' C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0x135):xfocus-nsiislog-exploit.c: undefined reference to `htons@4' C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0x14d):xfocus-nsiislog-exploit.c: undefined reference to `inet_addr@4' C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0x17d):xfocus-nsiislog-exploit.c: undefined reference to `socket@12' C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0x19a):xfocus-nsiislog-exploit.c: undefined reference to `WSAGetLastError@0' C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0x1cf):xfocus-nsiislog-exploit.c: undefined reference to `WSAConnect@28' C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0x1e2):xfocus-nsiislog-exploit.c: undefined reference to `WSAGetLastError@0' C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0x23b):xfocus-nsiislog-exploit.c: undefined reference to `send@16' C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0x254):xfocus-nsiislog-exploit.c: undefined reference to `recv@16' C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0x2c6):xfocus-nsiislog-exploit.c: undefined reference to `send@16' C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0x2d4):xfocus-nsiislog-exploit.c: undefined reference to `closesocket@4' C:\DOCUME~1\admin\LOCALS~1\Temp/cc2nbaaa.o(.text+0x2dc):xfocus-nsiislog-exploit.c: undefined reference to `WSACleanup@0'
Execution terminated
|
vnet576
Sep 13 2003, 04:03 PM
since the board no longer allows compilation requests perhaps somebody could help me and other members compile things. Apparently I'm experiancing alot of errors in every exploit that I try to compile.
Dillinja
Sep 13 2003, 05:36 PM
Moved to beginners section.
Ill d/l the code and try myself later on, vnet.
You might get help before that though.
ArEs
Sep 13 2003, 05:53 PM
i guess u`re compiling on win32 ...so install CYGWIN , with the gcc (GNU compiler collection ) modules then just do , normally , gcc -o iislog.exe nsiislog.c, gcc works most times , but in many exploits in the code there is a note with wich compiler its compiled best...so first have a look at the sploit code , if there are no special notes , install cygwin ...hope i helped u
SilverSandStorm
Sep 14 2003, 01:53 AM
hmm,
this is a linker error. Essentially your winsock (used for socket communications on win32 boxes) lib is not getting linked in - for some reason its not found, even.
Ill check on my friends bloodshed dev and see if I can compile a simple test - check the library path you gave in the cmd line (-Lblah) meanwhile
SilverSandStorm
Sep 14 2003, 02:03 AM
Sorry, stupid me, didnt spot the winsock.h etc at first go
Works under 2 conditions
1. Use Microsoft Visual C++
2. Add wsock32.lib and ws2_32.lib to the project -> settings -> link -> Object/Library modules.
Need more help, post
GroundZero
Sep 14 2003, 09:28 AM
@ vnet576
its a linker error, the ws2_32 lib under win is not be linked....
you can try to make it in the code like #pragma comment (lib,"ws2_32.lib")
Or you can try bcc32 -lx ws2_32.lib datei.c
maybe that will help you too,
int winsock(void)
{
WSADATA wsa;
return WSAStartup(MAKEWORD(2,0), &wsa);
}
good luck, Best Regards
GroundZero
vnet576
Sep 14 2003, 04:37 PM
Sylvanblue...I tried what you suggested and added those libraries to the project. The compiler got a little further than last time...then it crashed with these errors. I included the library files that I used.
Groundzero...how would I go about doing what you suggested. I don't really know alot about c scripting so alot of what you said went way over my head.
| QUOTE |
Compiler: Default compiler Building Makefile: "C:\Program Files\Dev-Cpp\Makefile.win" Executing make... make.exe -f "C:\Program Files\Dev-Cpp\Makefile.win" all gcc.exe -c "../../directory/main.c" -o "../../directory/main.o" -I"C:/Program Files/Dev-Cpp/include"
../../directory/main.c: In function `main': ../../directory/main.c:67: warning: return type of `main' is not `int'
gcc.exe -c "../../directory/main.c" -o "../../directory/main.o" -I"C:/Program Files/Dev-Cpp/include"
../../directory/main.c: In function `main': ../../directory/main.c:67: warning: return type of `main' is not `int'
gcc.exe -c "../../directory/main.c" -o "../../directory/main.o" -I"C:/Program Files/Dev-Cpp/include"
../../directory/main.c: In function `main': ../../directory/main.c:67: warning: return type of `main' is not `int'
gcc.exe -c "../../directory/main.c" -o "../../directory/main.o" -I"C:/Program Files/Dev-Cpp/include"
../../directory/main.c: In function `main': ../../directory/main.c:67: warning: return type of `main' is not `int'
gcc.exe -c "../../directory/main.c" -o "../../directory/main.o" -I"C:/Program Files/Dev-Cpp/include"
../../directory/main.c: In function `main': ../../directory/main.c:67: warning: return type of `main' is not `int'
gcc.exe "../../directory/main.o" -o "Project1.exe" -L"C:/Program Files/Dev-Cpp/lib" "../../directory/My Downloads/WS2_32.LIB" ../WinZip/Unzipped/WSock32/WSOCK32.LIB
../../directory/main.o(.text+0x1cf):main.c: undefined reference to `WSAConnect@28'
make.exe: *** [Project1.exe] Error 1
Execution terminated |
thex12
Oct 21 2003, 05:18 AM
Dev-C++ 4/5?
=========
in order to use winsock in dev-c++ you must go options/ compiler options then tick add the following commands when calling compiler then in the box below it add the line
-lwsock32
this help?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.