Trouble compiling a .tgz with GCC compiler
Hello, I've been following the instructions to install a program.
So far, I've did everything but i eventually get stuck on when i have to compile the program 'stress' with the GCC compiler. I also updated to the latest compiler. I'm logged in as root. When I insert either of the 2 below into Debian GNU(debian-7.0-x86) - I get the following errors; Code:
gcc: error: stress.c: No such file or directory The above 2 errors appear when i insert either one of the below; Code:
gcc -Wall -c stress.c If anyone can assist me with this problem further, contact me on skype via; @ eminem2ka9 Thank you =] |
The error says there's no such file or directory. This leads me to believe that you may have attempted to run gcc against a file or directory that does not exist in your current location.
From what directory (provide full path please) are you attempting to execute the command? And also, why are you using gcc directly? does `stress` not come with a Makefile or some kind of inbuilt build system? |
Furthermore, there is Debian package stress. Why are you trying to build it by hand?
|
show me the output of:
Code:
ls |
Quote:
We will get a better picture of what it is you are trying to achieve. |
Quote:
Output of 'pwd'; root/sockstress (Though now I'm pretty sure I used 'make' which was built in, so no need for the compiler now? Instructions are here; http://samsclass.info/123/proj10/sockstress.htm OR; https://defuse.ca/sockstress.htm I tried to insert a command, but; http://prntscr.com/2wn9ku I used 'sudo' before the command, and the abort never appeared then, but still everything above it did. |
Look at your directory listing more closely, and youll see that there is no sockstress.c to compile. it looks like a binary called 'sockstress' already.
Ie: You cant use gcc to compile something that is already compiled. Just run './sockstress' |
Quote:
|
What Linux system are you using? I'm assuming you're ssh'd in to something.
Sockstress compiles and runs fine for me. What copy of the source code did you download? your source folder looks nothing like what I see. Go to the github link and download a copy of the latest version, then perform a `make` and then run it. |
Quote:
And yes, I'm using SSH connection(putty). I downloaded the source just now(github) - the same thing occurs. 1) I typed "wget https://github.com/defuse/sockstress/archive/master.zip" 2) Then i typed "cd sockstress" 3) Then i typed "make" - http://prntscr.com/2wx9e4 4) But If i typed "./sockstress", I'd only get an "buffer overflow detected - ./sockstress terminated" - http://prntscr.com/2wxamp |
Quote:
1. wget command looks ok But you did not unzip the archive you downloaded, according to you. Here's what I would do : mkdir ~/src wget blahblah/master.zip unzip *.zip -d ~/src (that unzips the master.zip file into the src directory) cd ~/src ls (just to make sure you see the files you need) pwd (to make sure you're where you think you are) make ./sockstress |
I should also add, and I do not mean this in a pedantic way, that you ought to consider using Linux more often, as your primary OS. To get really good at the stuff you are doing in that course, knowing Linux would be invaluable and it would make all those commands and the logic of those commands make a lot more sense. I know using Linux is frustrating if you're really good on Windows, as you probably are, but after the initial learning curve, you have so much at your disposal. An t's free, after all, so the only real investment is the learning part. But it looks like you're ok with learning new stuff, since you're taking that course.
Just my thoughts. Again, not attempting to patronize you. |
Okay Everything looks grand! Thank you man =]
You're helpfulness is most appreciated by me. I'm using this to test on my hosted website for vulnerabilities test purposes, so which command would be most effective? |
I wasn't thinking of one command in particular; just saying that 1) if you know your way around a unix shell, then 2) testing for vulns is easier because you know your way around a unix shell, and 3) the way to learn your way around a shell is to use a shell, ergo 4) use unix often.
Anyway, glad it worked for you! If you go to the top of this thread > Thread Tools > Mark Thread as Solved, that'll close this thread. Also, if you found my advice helpful, mark 'yes' to "did you find this response helpful?" Good luck, mate! |
Right, voted and 1 more thing;
Do you know how to add payload? |
All times are GMT -5. The time now is 02:52 PM. |