Im making some tests with the irc protocol. I want to create a stable irc bot for the moment. My first question is more related to wsock generally: Is it bedder to check wether its winnt or 9x and use wsock32.dll for 9x and ws2_32.dll for nt ? Or is it not important becoz the ws2_32.dll in win98 uses the APIs of wsock32 ? The second problem i discovered is, how to check wether an irc server is online or not. GetInternetConnectedState() is not a solution, because i saw that it doesnt work correctly on each windows machine. So i decided to use a ping. Here comes the question: i found a raw sockets example how to create an icmp packet. Thats fine but does it work on win95 for example, or are raw sockets only for nt/2k/xp user? I know, windows has a special library for creating pings, but i dont want to use it!
Posted on 2003-02-22 10:53:33 by belial
My first question is more related to wsock generally: Is it bedder to check wether its winnt or 9x and use wsock32.dll for 9x and ws2_32.dll for nt ?

http://www.madwizard.org/view.php?page=tutorials.networking.chapter3&lang=asm (section 7 at the bottom of the page).

Or is it not important becoz the ws2_32.dll in win98 uses the APIs of wsock32 ?

It's the other way around, wsock32 is just a wrapper around ws2_32 on windows versions with winsock 2.

The second problem i discovered is, how to check wether an irc server is online or not. GetInternetConnectedState() is not a solution, because i saw that it doesnt work correctly on each windows machine. So i decided to use a ping. Here comes the question: i found a raw sockets example how to create an icmp packet. Thats fine but does it work on win95 for example, or are raw sockets only for nt/2k/xp user?

Yes win9x has no support for raw sockets.

I know, windows has a special library for creating pings, but i dont want to use it!

Why not?

Thomas
Posted on 2003-02-22 11:49:15 by Thomas
Thanx for ur reply. Is this ping.dll already implemented in win98 ? And when raw sockets are not possible under 9x, how can i create udp or syn packets under 9x? Is this possible without raw sockets?
Posted on 2003-02-23 07:58:15 by belial
why would you want to do your own SYN handling? it's much easier to let the protocol implementation take care of it :/
Posted on 2003-02-23 08:05:46 by Hiroshimator
i was just thinking about socket coding and saw that my old port scanner can use syn stealth. So it must be able to create syn packets and i asked myself, how he does it under 9x.
Posted on 2003-02-23 08:24:00 by belial
hmm..so want to inject raw packets in your network. then forget about using winsocik. it just sucks. if you are really serious about injecting packets i will strongly suggest that you take a look at win pcap library.

you can craft the packets on your own, but if you want to save time , you can use tried and tested library, libnet. a windows port of libnet is available.libnet will certainly save you from lots of trtoubles. it takes care of all packet crc etc..so you can concetrate on stuff you are doing.

check out some great tuts on the net for winpcap and libnet.
Posted on 2003-03-04 06:49:51 by himanshu
irc bot. raw sockets and SYN. ping, but not wanting to use the microsoft library.

Am I the only one who think this smells a bit fishy? ;)

Anyway, you don't have to use neither raw sockets nor "ping.dll", there's "semi-raw sockets" (AF_INET, SOCK_RAW, IPPROTO_ICMP) which iirc also works on 9x.
Posted on 2003-03-10 11:56:34 by f0dder
Certainly does look a bit strange to me. sending SYN packets, Ping without the ICMP API's, IRC Bot....:confused:
Posted on 2003-03-11 03:25:23 by IRBMe
DoS ..... ;)
Posted on 2003-03-11 07:03:08 by himanshu
dDoS ;)
Posted on 2003-03-13 05:28:44 by IRBMe
Testing his network recources with some pings or coding an irc bot doesnt mean automaticly that im creating adDoS tool. Im working on an IRC bot which tests the internet connection via ping, becoz GetInternetConnectedState() has some bugs. The question about SYN wasnt neccessary for my bot, but i was interested in it. So please, 'mon amis', dont be so paranoid. ;)
Posted on 2003-03-17 07:10:23 by belial
hey belial,

if you need help, feel free to ask ne kind of question :)

ppl in this forum are quite friendly :)

and as far as handling syn etc is concerned , let the networking stack do the job for you :)

try using some packet analyzer like ethereal for gathering more information. nothing beats a nice packet analyzer for network problems :)

i am working on my own packet decoder .. but its in kinda alpha stage :)
Posted on 2003-03-19 08:48:52 by himanshu