Sign in to follow this  
Followers 0
Flam

Need help with packets

10 posts in this topic

#1 ·  Posted (edited)

I'm trying to learn how to send/receive packets with autoit.

I recorded myself saying "hi" to someone on MSN using WPE pro. Is it possible to send this "hi" packet using autoit somehow?

Edited by Flam

Share this post


Link to post
Share on other sites



WPE pro uses winsock hooking..so basically you need to create a dll that hooks the winsock function and stuff . then u can inject the dll u made with autoit..

Share this post


Link to post
Share on other sites

Or you can decipher the msn messenger tcp protocol and use TCPSend() to send the data you want. Either way, it's gonna be a lot of work.

Share this post


Link to post
Share on other sites

WPE pro comes with WpeSpy.dll. Can I just hook that or do I have to make my own?

Share this post


Link to post
Share on other sites

i dont know if u can..if u do im assuming u need to parse the data and all that stuff.

it's heaps easier if u make ur own..if u know some C++, look up microsoft detour lib 1.5..it will make hooking 10x easier.

Share this post


Link to post
Share on other sites

You don't need to hook anything. That's way beyond the scope of your initial question, and the guy before me doesn't know what he's talking about. Packets aren't some magic structure, they're simply data, sent over a network. In MSN messenger's case,the TCP functions in AutoIt will allow you to interact with that data.

So, figure out how to intercept the data with the TCP functions... basically intercepting data from the IP address of the MSN server, decyphering the login attempt, accepting the connection, and formatting the data so that the server accepts the packets as valid.

Skip the complicated stuff and instead determine what ports and IP addresses are used, and start tinkering with the TCP functions. :)

Share this post


Link to post
Share on other sites

i do know what i'm talking about.

If you hook the winsock api, then u can just parse the "chat" packet and modify it to ur needs..where as if u use autoit's tcp functions, you'll need to, i think, create a MSN client of ur own, u cant just send away.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I'm tinkering with the TCPSend() example source from the help files right now. When the

; InputBox for data to transmit
            $szData = InputBox("Data for Server", @LF & @LF & "Enter data to transmit to the SERVER:")

box pops up after execution, do I enter the "22 75 74 66 2D 38 22 3E 68 69 3C 2F 54 45 58 54" part that I recorded with WPE or the ""utf-8">hi</TEXT" part?

Orrrr, should I worry about receiving data before I try to send because what I wrote above is way off?

[capo, checking out microsoft detour lib 1.5 as you suggested. Took a C++ course, think I can figure it out]

Edited by Flam

Share this post


Link to post
Share on other sites

if ur trying to use tcpsend() with MSN, it won't work unless u make a msn client.

Share this post


Link to post
Share on other sites

The msnmessenger server can't know where the packet it's getting is coming from if the format is identical to a packet sent from the msn client. So you figure out how the packets are formatted and send away. The only thing that matters, and the area to focus on, is how that data is formatted. Once you have that, you just whip up some TCP functions.

http://www.autoitscript.com/forum/index.ph...te=%2Bmessenger

There are already a few existing UDFs for MSN, as well as TCP examples galore. Some searching will turn up usable code for what you're looking for.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0