What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Question] Winsock?

[Question] Winsock?
Author: Message:
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
RE: [Question] Winsock?
Hey Tryxter..

Here's the code for a dll I made. It looks silly because I'm sending a message to myself.. but I use it to trick another program.

code:
using System;
using System.Collections;
using System.Text;
using System.Runtime.InteropServices;
using System.Net;
using System.Net.Sockets;

namespace CS
{
    [Guid("D6F88E95-8A27-4ae6-B6DE-0542A0FC7039")]
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]

    public interface _Functions
    {
        [DispId(1)]
        string SendPacket(string msg, int port);
    }



    [Guid("13FE32AD-4BF8-495f-AB4D-6C61BD463EA4")]
    [ClassInterface(ClassInterfaceType.None)]
    [ProgId("MPL.Functions")]
    public class Functions : _Functions
    {
        public string SendPacket(string msg, int port)
        {
            byte[] sendBytes = Encoding.ASCII.GetBytes(msg);
            UdpClient myClient = new UdpClient();
            myClient.Send(sendBytes, sendBytes.Length, Dns.GetHostName(), port);
            return "ok";
        }
    }
}


And then this is how to use it in the script.

code:
function OnEvent_Initialize(MessengerStart)
{
var obj = new ActiveXObject("MPL.Functions");
var msg = obj.SendPacket("teste",11000);
}

Oh and the dll isn''t originally mine.. someone sent it sorry I don't rememer who :/

HAve fun!

01-08-2007 04:43 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Question] Winsock? - by tryxter on 01-07-2007 at 09:44 PM
RE: [Question] Winsock? - by deAd on 01-08-2007 at 12:15 AM
RE: [Question] Winsock? - by ShawnZ on 01-08-2007 at 12:31 AM
RE: [Question] Winsock? - by deAd on 01-08-2007 at 12:34 AM
RE: [Question] Winsock? - by ShawnZ on 01-08-2007 at 12:36 AM
RE: RE: [Question] Winsock? - by deAd on 01-08-2007 at 01:10 AM
RE: [Question] Winsock? - by Adeptus on 01-08-2007 at 12:47 AM
RE: [Question] Winsock? - by tryxter on 01-08-2007 at 10:03 AM
RE: [Question] Winsock? - by Deco on 01-08-2007 at 04:43 PM
RE: [Question] Winsock? - by tryxter on 01-08-2007 at 06:51 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On