Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C (http://www.programmingforums.org/forum60.html)
-   -   undefined reference (http://www.programmingforums.org/showthread.php?t=10040)

J_I_M_B_O May 28th, 2006 11:11 PM

undefined reference
 
Hi, I'm trying to compile something and I think it is in C.

There are 3 files t3wmbof.c, rwbits.h, and winerr.h.

I'm am using mingw but I get errors like:

E:\DOCUME~1\Jim\LOCALS~1\Temp/ccqY5aaa.o(.text+0x8a1):t3wmbof.c: undefined reference to `inet_ntoa@4'
E:\DOCUME~1\Jim\LOCALS~1\Temp/ccqY5aaa.o(.text+0x8f2):t3wmbof.c: undefined reference to `socket@12'
E:\DOCUME~1\Jim\LOCALS~1\Temp/ccqY5aaa.o(.text+0x954):t3wmbof.c: undefined reference to `closesocket@4'
E:\DOCUME~1\Jim\LOCALS~1\Temp/ccqY5aaa.o(.text+0x9ad):t3wmbof.c: undefined reference to `socket@12'
E:\DOCUME~1\Jim\LOCALS~1\Temp/ccqY5aaa.o(.text+0xc76):t3wmbof.c: undefined reference to `closesocket@4'

Any ideas how I can turn this into an exe file to be used in cmd? The souce files seems quit basic and are less than 15Kb in size.

Thanks for your time.

Jimbo

Serinth May 28th, 2006 11:22 PM

can you post the t3wmbof.c source? It seems like the program can't find inet_ntoa, which means you're missing headerfiles or it was called incorrectly and thus interpreted as a variable (hence the undefined reference).

J_I_M_B_O May 28th, 2006 11:30 PM

t3wmbof.c file
 
1 Attachment(s)
Ok, the source file is attached. Thanks for your reply.


Jimbo

Serinth May 28th, 2006 11:44 PM

Several things:
1. Next time attach the .c file;
2. I don't think anyone here wants to show a script kiddie how to compile an exploit;
3. concepts and proofs of concepts are purposefully smudged so that script kiddies can't just use them;

J_I_M_B_O May 29th, 2006 12:01 AM

1 Attachment(s)
The fact that it's an exploit is not really relevant. Enclosed, is the complete package incl the excutable. What I'm trying to do is compile it from its source, I already use this POC hundreds of times every day.

It was the first program I can across that I couldn't compile - I've only ever done really simple examples.

Booooze May 29th, 2006 12:20 AM

The fact that it's an exploit is relevant. Looks to me like you are hacking a game. These topics are not aloud. Check the rules.

J_I_M_B_O May 29th, 2006 12:24 AM

Right.... Would it help it a attached a different example? I'll go and have a look and come back with something more 'appropriate'.

J_I_M_B_O May 29th, 2006 12:39 AM

Sleepy
 
1 Attachment(s)
Well. 'Sleepy' should be okay. Its waits a custom amount of time (secs, mins, hours,days) then excutes a specific program. I had a problem compiling this in mingw. Maybe I am doing something wrong. I did gcc -c sleepy.c then gcc -o sleepy.c but still theres a problem.

Booooze May 29th, 2006 12:43 AM

Does the compiled EXE work for you or not. Works fine for me. The files obviously use winsocks. Consider installing them if you haven't yet. Try the Microstft C runtime library or something. Maybe it'l have it.

[EDIT] The sleepy app works for me too. I can compile it, and run it fine. Your missing required windows files( or so it would seem). Like I said, perhaps try the runtime libraries. I could be wrong, but it's a start.

J_I_M_B_O May 29th, 2006 12:56 AM

Sleepy
 
Yes, the exe works for me. I just want to be able to make the exe for myself from the .c file. How would I know if I already have it? I have a winsock.dll in system32, and some winsock.h in the mingw folders.

How are you going about compiling it?


All times are GMT -5. The time now is 6:12 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC