I want to make a single C++ or windows batch file that will create c:\netcat.exe I know that netcat comes with the source code, but it's in 4 or 5 seperate files. Is there anyway to do this?
Printable View
I want to make a single C++ or windows batch file that will create c:\netcat.exe I know that netcat comes with the source code, but it's in 4 or 5 seperate files. Is there anyway to do this?
You could use a batch file to just run the netcat executable itself.
or
You can write a program in C++ that essentially opens a waiting connection on port # whatever, and delivers a prompt when i connection is made. packetstormsecurity has a bunch of remote root exploits which work as such.
Poke around there and learn a little.
Digital, I can't have it run the executable, because the computer doesn't have netcat yet. How do I get the hex dump?
Would it work if I opened netcat.exe in notepad, copied the stuff it gave me, and then had: echo "The stuff in netcat.exe from notepad" >> netcat.exe ?
Here are the files:
no but you could uuencode it then uudecode itQuote:
Originally posted here by Jareds411
Digital, I can't have it run the executable, because the computer doesn't have netcat yet. How do I get the hex dump?
Would it work if I opened netcat.exe in notepad, copied the stuff it gave me, and then had: echo "The stuff in netcat.exe from notepad" >> netcat.exe ?
Here are the files:
wouldn't it be easier to:
tftp -i xx.xxx.xx.xxx get nc.exe
nc -whatever
If I understand the question correctly, he has the source code and needs to compile it. I'd recommend picking up a good c++ compiler and learning how to use it. That or simply going and downloading the netcat binary instead of the source.
I'm sorry, are you retarded? I can't tell which is worse. The fact that you can't compile netcat, the fact that you didn't just download the binary, or the specialist's really stupid response.
Regardless, get a compiler, and compile the source or download the binary. Either way, I don't see what the hell this has to do with programming security. This belongs in the newbie section.
What the hell happened to this place?
Quote:
Originally posted here by hogfly
I'm sorry, are you retarded? I can't tell which is worse. The fact that you can't compile netcat, the fact that you didn't just download the binary, or the specialist's really stupid response.
Regardless, get a compiler, and compile the source or download the binary. Either way, I don't see what the hell this has to do with programming security. This belongs in the newbie section.
What the hell happened to this place?
Mood: bored
Reason: lack of decent content on the forums.....thanks to it, I am forced to begin posting again.
Mood Updated:
01-30-2002 12:49 AM
your last post: 01-09-2004 12:22 AM
thank you for the high quality post! no rhyme, no reason just bitch!
Actually, I beg to differ. My response contained a solution to the problem. You don't like it? **** off and don't read my post. Thanks, and have a nice day.
Hey Hey,Quote:
Originally posted here by Jareds411
I want to make a single C++ or windows batch file that will create c:\netcat.exe I know that netcat comes with the source code, but it's in 4 or 5 seperate files. Is there anyway to do this?
Maybe I'm the only one that noticed this but last time I checked netcat's course code was a single file. Does the Windows port have additional files? If so, I'm now kinda curious to see the Windows source, to see why it's multiple files.... I think everyone is going along the correct lines here though, get your self a compiler (check out http://www.bloodshed.net) and compile the code. Other than that I'm not really sure what you are asking. My personal opinion is that if you can't even compile the app you prolly have no use for the app.
Peace,
HT
I already have a compiler. And I did download the binary. I want netcat in one source file though, so it would be easier to edit.
Hey Hey,Quote:
Originally posted here by Jareds411
I already have a compiler. And I did download the binary. I want netcat in one source file though, so it would be easier to edit.
In one source file, so that it will be easier to edit? Do you have any idea what you are talking about? I think you need to sit back and learn what you are talking about before you start asking q uestions that make no sense.
Peace,
HT
Putting everything in one source file doesn't necessarily make it easier to edit. People break the code into multiple files for some logical/physical separation and to make working on and thinking about the program easier.
If you really feel the need to put it all in one file I'd recommend picking up c/c++ and some good debugging skills (if you already had these skills you could have done the work manually or created the script yourself). Given your current line of questions, you're gonna need both.
ps. Please put more information in your questions in the future. It's hard to answer your question if we can't figure out what you're asking.
If the question is too vague then it is generally a good idea to ask for more info. As I put in my reply above, next time he also needs to word his question better if he wants relevant answers.
I'd recommend getting a hobby...the tone of your last post makes me think you take this whole ap/message board thing just a bit too seriously.
If he knew what he was doing, what's the point of him being here? Geez, some of you people have egos so inflated you seem to bash every newbie that comes on for the sin of being noob. You have to start somewhere, and asking stupid questions comes along with it. I've asked my share of stupid questions since I've come on here, and I've been grateful with the patience most older members have had with me.
Some of you forget this is a learning community.
*looks up* Oh no!!! Incoming poop!!! *ducks*
your right AngelicKnight. this guys done nothing wrong. he asked a question i must admit i dont quite understand. but im not going to jump on his case because of it. hes been called retarded for not downloading something that he did download and for not compleatly understanding programming. hes been told he shouldnt run something if he cant compile it. now how many would be running a browser or windows and linux too for that matter if it had to be compiled.
Jareds411 what is it exactly you're trying to do?
The fact is many of us do compile on our browsers, and the only reason we don't compile the others is because they are closed source. I have no problem with people downloading precompiled files, however if you want to play with source code, do a little bit of reading and at least understand the concept before you start asking questions. Based on Jared's initial question it sounds like he's done no research, he was told about a cool little program and downloaded it... Now he wants to compile... does he even understand the word compile? I have no problem with people not understanding a concept. That's fine. I have no problem with people needing help. I help out a shitload of people and anyone that disagrees with that can kiss my ass... My problem is with people who do no research and come here and ask a question. I could type 20 different things into google that would all come back and tell me how to compile a file, I could type in 100s of strings that would come back and tell me why there are mutliple source files in projects and why it's a better way of coding. We have no evidence that Jared has done any research on his own.... he has something and wants to play with it, who cares how it works.. just give me the new toy. Sure he can come back now and say he's searched google like so many others say, but who's to say he's telling the truth? His initial post said nothing about any research nor did it give us any idea that there's even a drop of knowledge in his head. I'm more than happy to help people, but I'm only going to help people who are willing to help themselves.Quote:
Originally posted here by Tedob1
now how many would be running a browser or windows and linux too for that matter if it had to be compiled.
Peace,
HT
Maybe his coming here to ask IS the research! When I start researching questions I have, AO is oftentimes my first stop. We ARE the research source.
Regardless you should still have an idea of what you are talking about, not just fly by the seat of your pants and hope people understand and can point you in the right direction... and AO shouldn't be the first stop in research... not for ridiculously stupid questions like this.Quote:
Originally posted here by AngelicKnight
Maybe his coming here to ask IS the research! When I start researching questions I have, AO is oftentimes my first stop. We ARE the research source.
Peace,
HT
HT you've been most patient with this guy and always offer everyone deserving of it your help and even some who dont. i didn't mean to offend you.
when i started playing with nc a windows binary was not available and i only had windows computers. i tried a few times to compile it but keep getting errors from the makefile i didn't understand. btw there are two src files and two header files along with a makefile in the nc archive. not the easiest thing for a newbie used to using windows. if i had to compile everything i used id probably be deep in the rewarding field of manual labor. while unix, linux and their apps needed to be compiled it was all done automatically with a make. so even after installing it i still didn't have a clue. i think we all forget how far we've come
Hey Hey,Quote:
Originally posted here by Tedob1
HT you've been most patient with this guy and always offer everyone deserving of it your help and even some who dont. i didn't mean to offend you.
when i started playing with nc a windows binary was not available and i only had windows computers. i tried a few times to compile it but keep getting errors from the makefile i didn't understand. btw there are two src files and two header files along with a makefile in the nc archive. not the easiest thing for a newbie used to using windows. if i had to compile everything i used id probably be deep in the rewarding field of manual labor. while unix, linux and their apps needed to be compiled it was all done automatically with a make. so even after installing it i still didn't have a clue. i think we all forget how far we've come
No offence taken :).... I agree completely that we often forget what it was like when we started. However, most of us, started by reading and using search engines to find what we wanted to know. Asking someone to spoonfeed you the information may get you what you want, but you'll never learn how to learn... and that's vital in todays world. Sure you can get the information if you ask, but do you know how to look up the information? how to find the information? How to use the information? Everyone can search on google, but can you learn from what you find? The problem is that most people today don't know how to learn. I've seen many people in my program that hate profs that, after 4 semesters and specific lectures on the topic, say "set this up" or "do this"... They can't learn for themselves, they have no idea how to find the information, they panic and they whine. If people come to AO and ask for immediate help before attempting anything on their own.... they are no better than the people in my program, and they'll end up with no real world skills.... A lack of the ability to learn is a dangerous thing, you might as well just kill yourself because it's a form of suicide. We have 3 hours for our networking labs and without step by step sheets, people that have been playing with cisco routers for a min. of 4 semesters still can't do a basic config (hostname, console port, telnet, and eth0 configured).... It's sad and I don't want to be a part of something that is creating this type of person.. People need to learn for themselves... and we've got to stop spoonfeeding them information when they can't even attempt to do it themselves.
Peace,
HT
Well, that's a good point. The last two exams I took in college focused on that very thing. One, we were given nothing but a manual then asked a bunch of questions; the next, we were given machines that had various things wrong with them, and we had to figure out by ourselves why they weren't working. So I see your point, those who don't figure part if out on their own never truly master it; they just repeat what's told to them.
Oh well, I know less about C++ than any of you guys anyway. I haven't taken a course in it in a few years now, so I've forgotten what little I knew at the time!
Whenever I try to compile it, using Bloodshed dev-c++ version 4, I get these errors:
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o: In function `gethostpoop':
//c/netcat/netcat.c:535: undefined reference to `inet_addr@4'
//c/netcat/netcat.c:540: undefined reference to `gethostbyname@4'
//c/netcat/netcat.c:544: undefined reference to `WSAGetLastError@0'
//c/netcat/netcat.c:548: undefined reference to `inet_ntoa@4'
//c/netcat/netcat.c:556: undefined reference to `gethostbyaddr@12'
//c/netcat/netcat.c:559: undefined reference to `WSAGetLastError@0'
//c/netcat/netcat.c:567: undefined reference to `inet_ntoa@4'
//c/netcat/netcat.c:572: undefined reference to `gethostbyaddr@12'
//c/netcat/netcat.c:575: undefined reference to `WSAGetLastError@0'
//c/netcat/netcat.c:578: undefined reference to `gethostbyname@4'
//c/netcat/netcat.c:580: undefined reference to `WSAGetLastError@0'
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o: In function `getportpoop':
//c/netcat/netcat.c:628: undefined reference to `htons@4'
//c/netcat/netcat.c:629: undefined reference to `getservbyport@8'
//c/netcat/netcat.c:631: undefined reference to `ntohs@4'
//c/netcat/netcat.c:651: undefined reference to `getservbyname@8'
//c/netcat/netcat.c:654: undefined reference to `ntohs@4'
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o: In function `doconnect':
//c/netcat/netcat.c:799: undefined reference to `WSASetLastError@4'
//c/netcat/netcat.c:805: undefined reference to `socket@12'
//c/netcat/netcat.c:811: undefined reference to `setsockopt@20'
//c/netcat/netcat.c:836: undefined reference to `htons@4'
//c/netcat/netcat.c:848: undefined reference to `inet_ntoa@4'
//c/netcat/netcat.c:842: undefined reference to `bind@12'
//c/netcat/netcat.c:855: undefined reference to `inet_ntoa@4'
//c/netcat/netcat.c:862: undefined reference to `htons@4'
//c/netcat/netcat.c:938: undefined reference to `connect@12'
//c/netcat/netcat.c:942: undefined reference to `WSASetLastError@4'
//c/netcat/netcat.c:951: undefined reference to `WSAGetLastError@0'
//c/netcat/netcat.c:952: undefined reference to `closesocket@4'
//c/netcat/netcat.c:953: undefined reference to `WSASetLastError@4'
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o: In function `dolisten':
//c/netcat/netcat.c:987: undefined reference to `listen@8'
//c/netcat/netcat.c:1000: undefined reference to `getsockname@12'
//c/netcat/netcat.c:1005: undefined reference to `inet_ntoa@4'
//c/netcat/netcat.c:1009: undefined reference to `ntohs@4'
//c/netcat/netcat.c:1022: undefined reference to `recvfrom@24'
//c/netcat/netcat.c:1040: undefined reference to `connect@12'
//c/netcat/netcat.c:1048: undefined reference to `accept@12'
//c/netcat/netcat.c:1053: undefined reference to `closesocket@4'
//c/netcat/netcat.c:1104: undefined reference to `getsockname@12'
//c/netcat/netcat.c:1107: undefined reference to `inet_ntoa@4'
//c/netcat/netcat.c:1118: undefined reference to `ntohs@4'
//c/netcat/netcat.c:1119: undefined reference to `inet_ntoa@4'
//c/netcat/netcat.c:1141: undefined reference to `closesocket@4'
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o: In function `readwrite':
//c/netcat/netcat.c:1444: undefined reference to `WSAGetLastError@0'
//c/netcat/netcat.c:1447: undefined reference to `closesocket@4'
//c/netcat/netcat.c:1417: undefined reference to `WSASetLastError@4'
//c/netcat/netcat.c:1434: undefined reference to `select@20'
//c/netcat/netcat.c:1440: undefined reference to `WSAGetLastError@0'
//c/netcat/netcat.c:1473: undefined reference to `closesocket@4'
//c/netcat/netcat.c:1475: undefined reference to `WSASetLastError@4'
//c/netcat/netcat.c:1484: undefined reference to `__WSAFDIsSet@8'
//c/netcat/netcat.c:1489: undefined reference to `recv@16'
//c/netcat/netcat.c:1603: undefined reference to `send@16'
//c/netcat/netcat.c:1623: undefined reference to `__WSAFDIsSet@8'
//c/netcat/netcat.c:1631: undefined reference to `closesocket@4'
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o: In function `main':
//c/netcat/netcat.c:230: undefined reference to `WSAStartup@8'
//c/netcat/netcat.c:247: undefined reference to `WSACleanup@0'
//c/netcat/netcat.c:1764: undefined reference to `optarg'
//c/netcat/netcat.c:1775: undefined reference to `optarg'
//c/netcat/netcat.c:1788: undefined reference to `optarg'
//c/netcat/netcat.c:1793: undefined reference to `optarg'
//c/netcat/netcat.c:1800: undefined reference to `optarg'
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o://c/netcat/netcat.c:1803: more undefined references to `optarg' follow
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o: In function `main':
//c/netcat/netcat.c:1840: undefined reference to `getopt'
//c/netcat/netcat.c:1872: undefined reference to `optind'
//c/netcat/netcat.c:1877: undefined reference to `optind'
//c/netcat/netcat.c:1889: undefined reference to `optind'
//c/netcat/netcat.c:1892: undefined reference to `optind'
//c/netcat/netcat.c:1918: undefined reference to `optind'
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o://c/netcat/netcat.c:1920: more undefined references to `optind' follow
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o: In function `main':
//c/netcat/netcat.c:1165: undefined reference to `send@16'
//c/netcat/netcat.c:1184: undefined reference to `closesocket@4'
//c/netcat/netcat.c:1193: undefined reference to `send@16'
//c/netcat/netcat.c:1200: undefined reference to `closesocket@4'
//c/netcat/netcat.c:1985: undefined reference to `WSAGetLastError@0'
//c/netcat/netcat.c:1993: undefined reference to `closesocket@4'
//c/netcat/netcat.c:2004: undefined reference to `optind'
//c/netcat/netcat.c:2004: undefined reference to `optind'
//c/netcat/netcat.c:2012: undefined reference to `WSACleanup@0'
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o: In function `res_init':
//c/netcat/netcat.c:230: undefined reference to `WSAStartup@8'
//c/netcat/netcat.c:247: undefined reference to `WSACleanup@0'
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o: In function `holler':
//c/netcat/netcat.c:336: undefined reference to `WSAGetLastError@0'
//c/netcat/netcat.c:337: undefined reference to `WSAGetLastError@0'
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o: In function `bail':
//c/netcat/netcat.c:336: undefined reference to `WSAGetLastError@0'
//c/netcat/netcat.c:337: undefined reference to `WSAGetLastError@0'
//c/netcat/netcat.c:358: undefined reference to `closesocket@4'
C:\DOCUME~1\JAREDJ~1\LOCALS~1\Temp\cc08caaa.o: In function `udptest':
//c/netcat/netcat.c:1165: undefined reference to `send@16'
//c/netcat/netcat.c:1184: undefined reference to `closesocket@4'
//c/netcat/netcat.c:1193: undefined reference to `send@16'
//c/netcat/netcat.c:1200: undefined reference to `closesocket@4'
All I'm doing to compile it is loading Netcat.c and hitting compile, so I'm probably doing it wrong. And to whoever said I should learn to do it myself, I think compiling it with help from you guys is a step in the right direction compared to just running the binary. (Which I'm doing for now)
i dnot think dev-cpp will do it. i have it on this computer but when i go to the folder in dos that contains the nc files and type gcc makefile i get:
C:\nc>gcc makefile
C:\Dev-Cpp\bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe:makefile: file format n
ot recognized; treating as linker script
C:\Dev-Cpp\bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe:makefile:3: parse error
Can you recommend a free compiler that would run on win-xp please? :)
cygwin w/ gcc?
I'd go with gcc.
gcc makefile wont' do anything for you.. You'd need to type 'make -f makefile' and the make file calls gcc to compile the lines. The errors you are getting is because gcc has no idea what to do with a makefile. However you were indirectly correct. GCC will return WINMAIN@16 errors because it's not sure what to do with all the code. The reason for this is that NC 1.1 for Windows was developed using VC++ and must be compiled with VC++ (unless you want to edit the code). I'm no programmer, so there may be a way around this.. but this is how I understand it.Quote:
Originally posted here by Tedob1
i dnot think dev-cpp will do it. i have it on this computer but when i go to the folder in dos that contains the nc files and type gcc makefile i get:
C:\nc>gcc makefile
C:\Dev-Cpp\bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe:makefile: file format n
ot recognized; treating as linker script
C:\Dev-Cpp\bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe:makefile:3: parse error
Anyways I decided to start from scratch and forget that I had VS .Net installed. Including download and install time for the packages I needed (and this included googling links for NC source, and all the compile-related apps I needed) took 15 minutes. Now I'm a lowly student, I don't even have a diploma.... so I see no need why this should take any longer for anyone else... Especially since I'm going to provide you with the links and tell you exactly what to do. I will post it in here, and then make take some time and write out a fully detailed tutorial on how to compile NC for Windows (so no one steal my walk-through and copy it :)... I'll kick yer ass)....
Anyways... Let's get all the files we need first.
.Net Framework 1.1 Redistributable Package
.Net Framework SDK V. 1.1
[url=http://www.microsoft.com/downloads/details.aspx?FamilyId=272BE09D-40BB-49FD-9CB0-4BFA122FA91B&displaylang=en]Visual C++ Toolkit 2003
nmake for Windows
NetCat for Windows V 1.1
When you download the SDK It may provide you with nmake. If it doesnt, just add it to the directory that you installed the C++ toolkit (bin directory) to. Also the SDK should provide you with winsock2.h and wsock32.lib (which are needed to compile netcat). However I'm not sure if they were installed or not (having VS installed already seems to have confused things a little.... I'll make a VM later to test if no one has attempted it by tomorrow evening and I'll let you know for sure). Now you should beable to take the .c files, the .h files and the makefile out of the NetCat archive and paste them into your Toolkit bin/ directory. Then simply open a command prompt and browse to the directory and run nmake (you could just double click on it, but then you won't see any error messages). Everything should compile just fine. If you have additional problems check to see what your errors are. A common error may be a file missing (stdio.h, winsock2.h, kernel32.lib, wsock32.lib). If it tells you a file is missing, just search your computer for it.. If you find it go to your command prompt and type the following
Header (.h) Files: set include=%include%;<path to file>
Library (.lib) Files: set lib=%lib%;<path to file>
<path to file> represents the directory location that search returned. It should always be some folder/lib or somefolder/include.. i.e C:\Program Files\Microsoft Visual C++ ToolKit\include
If you have any other types of errors, paste them here and I'll let ya know what to do. Just remember I'm not a programmer, but like I said.. it took me about 15 minutes.
Peace,
HT
[edit]
As chsh so "kindly" pointed out.. I forgot the -f in my 'make makefile'... it's corrected above
[/edit]
So let me get this straight, you didn't understand the question, but proceeded to respond anyway? You're just as guilty of giving an idiotic answer as TheSpecialist, lol.Quote:
Originally posted here by Tedob1
[B]your right AngelicKnight. this guys done nothing wrong. he asked a question i must admit i dont quite understand.[/q]
I'm all for helping people who will at least help themselves.Quote:
but im not going to jump on his case because of it. hes been called retarded for not downloading something that he did download and for not compleatly understanding programming.
There's a difference between knowing something, and being intelligent enough to try and help yourself learn.Quote:
Originally posted here by Tedob1
when i started playing with nc a windows binary was not available and i only had windows computers. i tried a few times to compile it but keep getting errors from the makefile i didn't understand. btw there are two src files and two header files along with a makefile in the nc archive. not the easiest thing for a newbie used to using windows. if i had to compile everything i used id probably be deep in the rewarding field of manual labor. while unix, linux and their apps needed to be compiled it was all done automatically with a make. so even after installing it i still didn't have a clue. i think we all forget how far we've come
I personally don't expect most people to just "know something", but I do expect they be intelligent enough to try and help themselves.
EDIT: Damn, censorship on this board seems to be at an all-time high.
chsh, I think we've already concluded that little debate bro', we're moving on now. You're beating a dead horse. :)
On the makefile thing....you're both suffering from pebcak. I'd strongly suggest you learn how makefile's work. You might also want to pick up the oreilly book on 'autoconf, automake, and the lib tools'.
You don't run the makefile through gcc. And you don't run 'make makefile'. Generally the command is 'make <target>' with target being a specific group of settings inside the makefile.
The most common settings you will use are 'make' 'make install' and 'make clean'. Though it's pretty much open to whatever the developer likes.
When hogfly says "what happened to this place", he really means it. It seems like every thread where advice is dispensed it is glaringly inaccurate, even to the point where the most accurate post is still completely wrong. Juridian is dead on the money, it's make target, not make makefile, gcc makefile, or any other such nonsense. If I were going to have a place to come for advice, AO would certainly not be it. I'd advise any of you who think similarly to do the same. It's really just become a place for posers and people who get their jollies off reading their own words in print.
AngelicKnight: The horse isn't dead beause these threads and posters keep popping up all over the place. The point needs to be hammered home to people that they shouldn't try and help if they don't know wtf they are talking about, and that they should try and help themselves before running to AO for largely inaccurate advice..
I don't know what threads you've been on, but all the threads I've started have been met with great advice that has helped me considerably. Sounds to me that you're just hitting the wrong ones. As with any forum, some people inevitably talk before thinking or don't know well what they speak of, but others have some golden advice to offer. That's where the concept of "discernment" comes into play. :)
My advice to newcomers is get acquainted with senior and regular members first and figure out which ones really know their stuff. Then, stick with their advice as opposed to the advice of others. Also beware the senior members who have taken "senior" too seriously and have become cranky old coots. ;)
I installed everything and tried to compile it, but it said it was missing "sys/socket.h"
Search your system for socket.h. You should find it in some/directory/sys/socket.h so then go to your command prompt and type set include=%include%;some/directory that should solve your problemQuote:
Originally posted here by Jareds411
I installed everything and tried to compile it, but it said it was missing "sys/socket.h"
As for those of you that said it's make <target>.... that's all find and dandy when you need it, but if there's no need for it why waste the keystrokes and since make won't work to compile this make file good luck with it.... you have to use nmake.
Peace,
HT
Ok, now when I do nmake makefile or nmake netcat.c it just says "makefile is up to date" or "netcat.c is up to date"
:-/
just type nmake on it's own with all the files in the same directory.Quote:
Originally posted here by Jareds411
Ok, now when I do nmake makefile or nmake netcat.c it just says "makefile is up to date" or "netcat.c is up to date"
:-/
Peace,
HT
Hmm, I still can't get it to work. I guess I'll learn some more about c++ and stuff before I try bigger things like netcat. :cool:
WHat's the error it's giving you?Quote:
Originally posted here by Jareds411
Hmm, I still can't get it to work. I guess I'll learn some more about c++ and stuff before I try bigger things like netcat. :cool:
This is the error message:
You don't have cl and link in the directory you are working in.. they'll be in Program Files\MS VC++ tool kit\bin or something along those lines.. just copy nmake, your .c files and your .h files over to the directory where cl is located or open the makefile in notepad and modify the lines that point to cl and link... or modify your path.... set path=%path%;c:\path\to\cl\folderQuote:
Peace,
HT