Raw Sockets possible in VB6?
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Raw Sockets possible in VB6?

  1. #1
    Junior Member
    Join Date
    Aug 2003
    Posts
    4

    Raw Sockets possible in VB6?

    Apparently you can do raw sockets in windows XP now. So can anyone show me some code on if this is possible in VB6?

  2. #2
    str34m3r
    Guest
    Check out this post for a discussion on raw sockets:

    http://www.antionline.com/showthread...&postid=634481

    If you're really interested in learning, you'd probably be better off learning a language like perl, python, or C/C++. Any of these will be a lot more useful in real world applications

  3. #3
    Junior Member
    Join Date
    Aug 2003
    Posts
    4
    I know a bit of C but VB seems fast for when I need something spurr of the moment.

  4. #4
    Ninja Code Monkey
    Join Date
    Nov 2001
    Location
    Washington State
    Posts
    1,027
    You've had the ability to do 'raw' sockets for some time according to ms. And VB is good for real world applications. For what you are wanting to do however you'd be better off doing your socket stuff in a com component built with c/c++ that the vb app uses.

    Article on the problems since windows 2k - http://www.uksecurityonline.com/husd...rawsockets.htm

    Another one - http://news.grc.com/dos/sockettome2.htm (this one includes links to code....even vb.)

    "When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
    "There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
    "Mischief my ass, you are an unethical moron." - chsh
    Blog of X

  5. #5
    Senior Member
    Join Date
    Nov 2001
    Posts
    4,786
    i use vb when i need something quit with a user interface and i agree with str34m3r. i think you'll find perl much more suited to your needs
    Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”

  6. #6
    Ninja Code Monkey
    Join Date
    Nov 2001
    Location
    Washington State
    Posts
    1,027
    Tho this is off topic.....and will most likely start a language war. He has hardly stated his 'needs'. He said he wants code in vb because he knows it best.

    VB is as good as any other language in the hands of someone who knows how to use it well.
    "When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
    "There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
    "Mischief my ass, you are an unethical moron." - chsh
    Blog of X

  7. #7
    Senior Member Maestr0's Avatar
    Join Date
    May 2003
    Posts
    604
    Raw sockets have been available with winsock 2 for some time, the difference is in 2000/NT admin privileges are required for raw sockets whereas XP allows the USER level account to work with them. In order to do this in VB you must load the winsock 2 library from the ws2_32.dll. This is done with the WSAStartup(). You should be able to find all you need here:
    http://www.winsockvb.com/article.php?article_id=31


    -Maestr0
    \"If computers are to become smart enough to design their own successors, initiating a process that will lead to God-like omniscience after a number of ever swifter passages from one generation of computers to the next, someone is going to have to write the software that gets the process going, and humans have given absolutely no evidence of being able to write such software.\" -Jaron Lanier

  8. #8
    Senior Member
    Join Date
    Nov 2001
    Posts
    4,786
    searching each page for "raw" :

    There is a third type - SOCK_RAW(3) which is what it says. This type of socket allows access to
    the underlying protocols, and allows you to send custom built packets manually, and also to intercept the
    protocol headers of incoming data. Raw sockets will not be covered.

    i didn't think vb could use raw sockets. guess i was wrong
    Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”

  9. #9
    Junior Member
    Join Date
    Aug 2003
    Posts
    4
    I'll probably be checking out perl sometime I just can find one that runs on winblows... yeah I know why am I here if I'm a windows user.

    Quite honestly I missed the whole linux revolution and as such I never dug deep enough in the beginning.

    Plus I never had the need to run a server.

    Generally I shutdown as many services as I can do without.

    Is there a perl for windows and quite honestly is it worth it to learn perl on windows? (I doubt it)....

    So far I'm experimenting with linux on knoppix mainly because I don't want to dedicate the time to learn and configure it. (don't understand VM stuff).

    Ok before I get off topic my original query was wheither it was possible to do it from VB maybe with extensive API calls... then again I probably know the answer (yes) but the better question as you guys have put forth is, is it worth it.

    Oh well gonna jump into perl soon then when I have time to learn linux install / config.

  10. #10
    Ninja Code Monkey
    Join Date
    Nov 2001
    Location
    Washington State
    Posts
    1,027
    Go to www.activestate.com. Here is the url to go straight to the activeperl download page - http://www.activestate.com/Products/...?id=ActivePerl .

    Activestate does alot of perl goodies and alot of nice stuff for working with windows. Later you might also want to take a look at perl.net . The activestate engine works with wsh and will allow you to do asp 3.0 with perl, or straight up perl scripting. I believe you can even work with com objects. Also 'Learning perl on win32 systems' by o'reilly is pretty good.

    The o'reilly perl bookshelf has been copied all over the net as well. You could probably find a mirror through google. If you want to be legit I highly recommend getting a safari.oreilly.com subscription. They have a ton of good perl books.

    Some decent websites:
    www.perl.org
    www.cpan.org
    www.perl.com


    Perl.net allows you to use all of the perl you learn to work with the .net goodies. I haven't poked around this too much tho I did just pick up a book.

    If you have any questions....gimme a shout. I'm working on becoming a perl superhero atm.
    "When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
    "There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
    "Mischief my ass, you are an unethical moron." - chsh
    Blog of X

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •