Well, the only thing I can think of when RECEIVING UNSOLICITED packets is to use reverse DNS. However, since you are "sniffing" HTTP, then it is simply a matter of catching all of the HTTP GET request headers, and mapping (an associative array) the actual IP address:port to the requested URL from the HTTP GET request header. Then, as packets come in from that IP, you retreive the URL by looking up the IP in your array... The thing is, in order to GET a TCP packet (using HTTP), you have to have made a GET request at some point: no unsolicited pushing of files onto your computer here. Every image and other resource on an HTML page is the result of a separate GET request. By the way, Sniffer80 is a piece of crap. It is not a sniffer. It is a cheap facade using URLMon. It is tied directly into IE. The source code is unnavailable, probably out of shame due to it's lame-ness. You could do the same by writing an IE add-in that copies the contents of the address bar... Anyhow, if I am way off the mark here, let me know. It seems like a simple solution to me though, since you already have all the information at hand before the TCP packets even start flowing.
macerenn
Posts
-
How can I get the URL address for a TCP Packet? -
How do i open a program from a buttonWell, without the source code, I would hazard a guess and say that you're not double-back-slashing your constant string like this: "C:\\Program Files\\Some Program Folder\\SomeExe.exe" Am I "write"? Of course, if this IS the case, I would suggest reading a little bit in a "learn to code in C in 21 days" or C# for dummies book... If I am wrong, well, try posting some source code o we can see what you're doing wrong.
-
If you're still in school, pay attention to this....you will have to deal with it somedayWell... You could try showing them how their method could be exploited by a malicious bit of software on a well-hacked client's machine... Basically, when all else fails, use security as your defense. Other than that, it is nearly impossible to convince somebody that their way sucks and that your way rules, especially if they have the power to approve or deny your changes. However, their boss's-boss's boss probably doesn't know jack about programming, and if you start talking "security breach" and "liability" they freak out and let you have your way. Been there, done that. It worked (wrote an ACH utility for in-house payroll to do direct deposit, back in '98, using VC++ 6.0 and ATL. Their old method was to use the bank's free ACH software, which required printing out of payroll data and manual entering... Every hacker in the world had already figured out how to crack into that software too...)
-
Banning GPL articlesIMHO, if somebody posts code here on CP, it should be assumed that somebody might actually put that code to use. If the code is of such inferior quality that nobody would actually use it, then it shouldn't be here in the first place. That said, GPL code should not be banned. It stands to reason that if somebody takes GPL code and "taints" his company's code base with it, then that person really shouldn't have access to the company's code base to begin with. Honestly, any developer that can't figure out how to completely re-implement, in his or her own "words", any one of the examples on this site has no business working on production code in the first place. Also, by getting more people to use GPL code, we force more people to release their source code, which is good. And another thing: just because some code is GPL doesn't mean that somebody hasn't already thought of it and used it in closed-source application somewhere. All it means is that we don't know about it yet because it was used in a closed-source application. I couldn't expect to slap a GPL on: mov ax, 0B800h; int 21h; because this code is found in nearly every DOS program ever written. However, Microsoft probably did it first. In fact, if there is one supremely efficient way to do something in a given type of application, it is a safe bet that some closed-source app has already done it that way. Thus, a LOT of GPL code probably violates the hell out of patented closed source code anyway... If you write an open-source application that does "the exact same thing, only free" that a closed-source app does, putting a GPL on it wouldn't do any good anyway, since it is likely that you have duplicated some patented process that you are completely unaware of... But I digress... The topic being GPL code on CP. Keep it. We need it. If somebody wants to put a GPL on their code before posting it here, that is their business. If you block it here, some other site will pick it up and THAT site will become "the next Code Project".