Archive for the 'MSN' Tag

Vb Net - Change MSN Name

This is just a slightly more efficient way to change your MSN name than using SendKeys.

It uses the SendMessage API in order to set the text, rather than SendKeys.

The code is pretty fully commented, and so there is nothing much to explain…

Below is the full source file:

Imports System.Runtime.InteropServices

Public Class Form1

”API

<DllImport(“User32.dll”)> Private Shared Function EnumChildWindows(ByVal WindowHandle As IntPtr, ByVal Callback As EnumWindowProcess, ByVal lParam As IntPtr) As Boolean

End Function

<DllImport(“user32.dll”, CharSet:=CharSet.Auto)> Private Shared Sub GetClassName(ByVal hWnd As System.IntPtr, ByVal lpClassName As System.Text.StringBuilder, ByVal nMaxCount As Integer)

End Sub

<DllImport(“user32.dll”, SetLastError:=True, CharSet:=CharSet.Auto)> Private Shared Function GetWindowText(ByVal hwnd As IntPtr, ByVal lpString As System.Text.StringBuilder, ByVal cch As Integer) As Integer

End Function

<DllImport(“user32.dll”, SetLastError:=True, CharSet:=CharSet.Auto)> Private Shared Function GetWindowTextLength(ByVal hwnd As IntPtr) As Integer

End Function

Private Declare Auto Function SendMessage Lib “user32″ (ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wparam As Integer, ByVal lparam As System.Text.StringBuilder) As IntPtr

Private Declare Auto Function SendMessage Lib “user32″ (ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wParam As IntPtr, ByVal lParam As String) As IntPtr

Private Declare Auto Function FindWindow Lib “user32″ (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr

”API Functions

Private Shared Function GetChildWindows(ByVal ParentHandle As IntPtr) As IntPtr()

Dim ChildrenList As New List(Of IntPtr)

Dim ListHandle As GCHandle = GCHandle.Alloc(ChildrenList)

Try

EnumChildWindows(ParentHandle, AddressOf EnumWindow, GCHandle.ToIntPtr(ListHandle))

Finally

If ListHandle.IsAllocated Then ListHandle.Free()

End Try

Return ChildrenList.ToArray

End Function

Private Shared Function EnumWindow(ByVal Handle As IntPtr, ByVal Parameter As IntPtr) As Boolean

Dim ChildrenList As List(Of IntPtr) = GCHandle.FromIntPtr(Parameter).Target

If ChildrenList Is Nothing Then Throw New Exception(“GCHandle Target could not be cast as List(Of IntPtr)”)

ChildrenList.Add(Handle)

Return True

End Function

Public Shared Function GetText(ByVal hWnd As IntPtr) As String

Dim length As Integer

If hWnd.ToInt32 <= 0 Then

Return Nothing

End If

length = GetWindowTextLength(hWnd)

If length = 0 Then

Return Nothing

End If

Dim sb As New System.Text.StringBuilder(“”, length + 1)

GetWindowText(hWnd, sb, sb.Capacity)

Return sb.ToString()

End Function

”Constants

Private Const WM_SETTEXT = &HC

Private Const WM_CHAR = &H102

Private Const WM_KEYDOWN = &H100

Private Const WM_KEYUP = &H101

Private Const WM_SETFOCUS = &H7

”Window Enum Delegate

Private Delegate Function EnumWindowProcess(ByVal Handle As IntPtr, ByVal Parameter As IntPtr) As Boolean

”This function finds the Handle for the MSN Options window

Private Shared Function FindMSN() As IntPtr

FindMSN = FindWindow(vbNullString, “Options”)

End Function

”This function Sends the text to the Options window

Public Shared Function SendText(Optional ByVal Display_Text As String = “”, Optional ByVal Personal_Text As String = “”) As Boolean

”Create the Messenger API

Dim iMessenger As MessengerAPI.Messenger

iMessenger = New MessengerAPI.Messenger

”Show the options window

iMessenger.OptionsPages(0, MessengerAPI.MOPTIONPAGE.MOPT_GENERAL_PAGE)

”Get the options windows handle

Dim handle As IntPtr = FindMSN()

”This will keep looping until the window is found

Do

handle = FindMSN()

Loop Until handle <> 0

”Sleeps the thread while the options window loads

System.Threading.Thread.Sleep(60)

”i is our counter for which control we are on

Dim i As Integer = 0

”Loop through each of the child windows

For Each child As IntPtr In GetChildWindows(handle)

”Gets the class name of the child

Dim sClassName As New System.Text.StringBuilder(“”, 256)

Call GetClassName(child, sClassName, 256)

”Converts it to a readable string

Dim x As String = sClassName.ToString

”If its a textbox

If x = “RichEdit20W” Then

i += 1

”If we are on the first control, the display name box

If i = 1 Then

”If display text is being changed

If Display_Text <> “” Then

”Send the display text to the textbox

Dim sb As New System.Text.StringBuilder(Display_Text)

SendMessage(child, WM_SETTEXT, 0, sb)

SendMessage(child, WM_CHAR, 13, 1)

End If

”If we are on the second control, the personal message box

ElseIf i = 2 Then

”If we are changing the personal text

If Personal_Text <> “” Then

”Send the personal message text to the textbox

Dim sb As New System.Text.StringBuilder(Personal_Text)

SendMessage(child, WM_SETTEXT, 0, sb)

SendMessage(child, WM_CHAR, 13, 1)

End If

End If

”If the child control is the “OK” button

ElseIf GetText(child) = “OK” Then

”Focus the button

SendMessage(child, WM_SETFOCUS, 0, 0)

”Press the Space button, to save changes

SendMessage(child, WM_KEYDOWN, &H20, 390001)

SendMessage(child, WM_CHAR, &H63, 11101)

SendMessage(child, WM_KEYUP, &H20, 390001)

End If

Next

End Function

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

”Create the Messenger API

Dim oMessenger As MessengerAPI.Messenger

oMessenger = New MessengerAPI.Messenger

”Set the status to offline

oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE

”Change name

SendText(“Mine”)

”Sleep the thread

System.Threading.Thread.Sleep(700)

”Set status to online

oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE

”Repeat

oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE

SendText(“beats”)

System.Threading.Thread.Sleep(700)

oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE

oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE

SendText(“yours”)

System.Threading.Thread.Sleep(700)

oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE

oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE

SendText(“cyb3r”)

System.Threading.Thread.Sleep(700)

oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE

oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE

SendText(“d3m0n”)

System.Threading.Thread.Sleep(700)

oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE

End Sub

End Class

You might want to make a function that automates the repeating

Imports System.Runtime.InteropServices
Public Class Form1

”API
<DllImport(”User32.dll”)> Private Shared Function EnumChildWindows(ByVal WindowHandle As IntPtr, ByVal Callback As EnumWindowProcess, ByVal lParam As IntPtr) As Boolean
End Function
<DllImport(”user32.dll”, CharSet:=CharSet.Auto)> Private Shared Sub GetClassName(ByVal hWnd As System.IntPtr, ByVal lpClassName As System.Text.StringBuilder, ByVal nMaxCount As Integer)
End Sub
<DllImport(”user32.dll”, SetLastError:=True, CharSet:=CharSet.Auto)> Private Shared Function GetWindowText(ByVal hwnd As IntPtr, ByVal lpString As System.Text.StringBuilder, ByVal cch As Integer) As Integer
End Function
<DllImport(”user32.dll”, SetLastError:=True, CharSet:=CharSet.Auto)> Private Shared Function GetWindowTextLength(ByVal hwnd As IntPtr) As Integer
End Function

Private Declare Auto Function SendMessage Lib “user32″ (ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wparam As Integer, ByVal lparam As System.Text.StringBuilder) As IntPtr
Private Declare Auto Function SendMessage Lib “user32″ (ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wParam As IntPtr, ByVal lParam As String) As IntPtr
Private Declare Auto Function FindWindow Lib “user32″ (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr

”API Functions
Private Shared Function GetChildWindows(ByVal ParentHandle As IntPtr) As IntPtr()
Dim ChildrenList As New List(Of IntPtr)
Dim ListHandle As GCHandle = GCHandle.Alloc(ChildrenList)
Try
EnumChildWindows(ParentHandle, AddressOf EnumWindow, GCHandle.ToIntPtr(ListHandle))
Finally
If ListHandle.IsAllocated Then ListHandle.Free()
End Try
Return ChildrenList.ToArray
End Function
Private Shared Function EnumWindow(ByVal Handle As IntPtr, ByVal Parameter As IntPtr) As Boolean
Dim ChildrenList As List(Of IntPtr) = GCHandle.FromIntPtr(Parameter).Target
If ChildrenList Is Nothing Then Throw New Exception(”GCHandle Target could not be cast as List(Of IntPtr)”)
ChildrenList.Add(Handle)
Return True
End Function
Public Shared Function GetText(ByVal hWnd As IntPtr) As String
Dim length As Integer
If hWnd.ToInt32 <= 0 Then
Return Nothing
End If
length = GetWindowTextLength(hWnd)
If length = 0 Then
Return Nothing
End If
Dim sb As New System.Text.StringBuilder(”", length + 1)
GetWindowText(hWnd, sb, sb.Capacity)
Return sb.ToString()
End Function

”Constants
Private Const WM_SETTEXT = &HC
Private Const WM_CHAR = &H102
Private Const WM_KEYDOWN = &H100
Private Const WM_KEYUP = &H101
Private Const WM_SETFOCUS = &H7

”Window Enum Delegate
Private Delegate Function EnumWindowProcess(ByVal Handle As IntPtr, ByVal Parameter As IntPtr) As Boolean

”This function finds the Handle for the MSN Options window
Private Shared Function FindMSN() As IntPtr
FindMSN = FindWindow(vbNullString, “Options”)
End Function

”This function Sends the text to the Options window
Public Shared Function SendText(Optional ByVal Display_Text As String = “”, Optional ByVal Personal_Text As String = “”) As Boolean
”Create the Messenger API
Dim iMessenger As MessengerAPI.Messenger
iMessenger = New MessengerAPI.Messenger
”Show the options window
iMessenger.OptionsPages(0, MessengerAPI.MOPTIONPAGE.MOPT_GENERAL_PAGE)
”Get the options windows handle
Dim handle As IntPtr = FindMSN()
”This will keep looping until the window is found
Do
handle = FindMSN()
Loop Until handle <> 0
”Sleeps the thread while the options window loads
System.Threading.Thread.Sleep(60)
”i is our counter for which control we are on
Dim i As Integer = 0
”Loop through each of the child windows
For Each child As IntPtr In GetChildWindows(handle)
”Gets the class name of the child
Dim sClassName As New System.Text.StringBuilder(”", 256)
Call GetClassName(child, sClassName, 256)
”Converts it to a readable string
Dim x As String = sClassName.ToString
”If its a textbox
If x = “RichEdit20W” Then
i += 1
”If we are on the first control, the display name box
If i = 1 Then
”If display text is being changed
If Display_Text <> “” Then
”Send the display text to the textbox
Dim sb As New System.Text.StringBuilder(Display_Text)
SendMessage(child, WM_SETTEXT, 0, sb)
SendMessage(child, WM_CHAR, 13, 1)
End If
”If we are on the second control, the personal message box
ElseIf i = 2 Then
”If we are changing the personal text
If Personal_Text <> “” Then
”Send the personal message text to the textbox
Dim sb As New System.Text.StringBuilder(Personal_Text)
SendMessage(child, WM_SETTEXT, 0, sb)
SendMessage(child, WM_CHAR, 13, 1)
End If
End If
”If the child control is the “OK” button
ElseIf GetText(child) = “OK” Then
”Focus the button
SendMessage(child, WM_SETFOCUS, 0, 0)
”Press the Space button, to save changes
SendMessage(child, WM_KEYDOWN, &H20, 390001)
SendMessage(child, WM_CHAR, &H63, 11101)
SendMessage(child, WM_KEYUP, &H20, 390001)
End If
Next
End Function

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
”Create the Messenger API
Dim oMessenger As MessengerAPI.Messenger
oMessenger = New MessengerAPI.Messenger
”Set the status to offline
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE
”Change name
SendText(”Mine”)
”Sleep the thread
System.Threading.Thread.Sleep(700)
”Set status to online
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE

”Repeat
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE
SendText(”beats”)
System.Threading.Thread.Sleep(700)
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE
SendText(”yours”)
System.Threading.Thread.Sleep(700)
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE
SendText(”cyb3r”)
System.Threading.Thread.Sleep(700)
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE
SendText(”d3m0n”)
System.Threading.Thread.Sleep(700)
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE
End Sub
End Class

VB Net - MSN Xfire Personal Message

Imports System.Runtime.InteropServices

Public Class Form1

#Region “APIS+CONST”

”Here are the API Functions needed

<DllImport(“User32.dll”)> Private Shared Function EnumChildWindows(ByVal WindowHandle As IntPtr, ByVal Callback As EnumWindowProcess, ByVal lParam As IntPtr) As Boolean

End Function

<DllImport(“user32.dll”, CharSet:=CharSet.Auto)> Private Shared Sub GetClassName(ByVal hWnd As System.IntPtr, ByVal lpClassName As System.Text.StringBuilder, ByVal nMaxCount As Integer)

End Sub

Private Declare Auto Function FindWindow Lib “user32″ (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr

Private Declare Auto Function SendMessage Lib “user32″ (ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wparam As Integer, ByVal lparam As System.Text.StringBuilder) As IntPtr

Private Declare Auto Function SendMessage Lib “user32″ (ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wParam As IntPtr, ByVal lParam As String) As IntPtr

Private Declare Function SendMessage2 Lib “user32.dll” Alias “SendMessageA” (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As IntPtr) As Int32

Private Declare Function FindWindowEx Lib “user32.dll” Alias “FindWindowExA” (ByVal hWnd1 As Int32, ByVal hWnd2 As Int32, ByVal lpsz1 As String, ByVal lpsz2 As String) As Int32

Private Const WM_GETTEXT = &HD

Private Const WM_GETTEXTLENGTH As Integer = &HE

Private Const WM_SETTEXT = &HC

Private Structure COPYDATASTRUCT

Public dwData As Int32

Public cbData As Int32

Public lpData As IntPtr

End Structure

Private Const WM_COPYDATA As Int32 = &H4A

#End Region

#Region “Functions/Enums not to edit”

Private Delegate Function EnumWindowProcess(ByVal Handle As IntPtr, ByVal Parameter As IntPtr) As Boolean

Private Enum IconType

Music

Games

Office

End Enum ”This contains the values for the different MSN now playing icons

Private Shared Function GetChildWindows(ByVal ParentHandle As IntPtr) As IntPtr() ”Gets the list of child windows from the parent window

Dim ChildrenList As New List(Of IntPtr)

Dim ListHandle As GCHandle = GCHandle.Alloc(ChildrenList)

Try

EnumChildWindows(ParentHandle, AddressOf EnumWindow, GCHandle.ToIntPtr(ListHandle)) ”Enumerates the windows

Finally

If ListHandle.IsAllocated Then ListHandle.Free()

End Try

Return ChildrenList.ToArray ”Returns the list of windows as a collection on IntPrt, which is then searched in

End Function

Private Shared Function EnumWindow(ByVal Handle As IntPtr, ByVal Parameter As IntPtr) As Boolean

Dim ChildrenList As List(Of IntPtr) = GCHandle.FromIntPtr(Parameter).Target

If ChildrenList Is Nothing Then Throw New Exception(“GCHandle Target could not be cast as List(Of IntPtr)”)

ChildrenList.Add(Handle) ”Adds a list of window handles

Return True

End Function

Private Shared Function FindXfire() As IntPtr

FindXfire = FindWindow(“SkinWnd”, vbNullString) ”Finds handle of the Xfire class window

End Function

Private Shared Function SendText(ByVal Text As String) As Boolean

Shell(“xfire:status?text=” & Text) ”Sets the Xfire status

End Function

Private Shared Function ReadText() As String

ReadText = “”

Dim handle As IntPtr = FindXfire()

If handle = 0 Then ”If the window isnt found

MessageBox.Show(“Xfire window not found.”, “Error:”, MessageBoxButtons.OK, MessageBoxIcon.Error)

Return “Error;”

Exit Function

End If

For Each child As IntPtr In GetChildWindows(handle) ”Loop through list of windows

Dim sClassName As New System.Text.StringBuilder(“”, 256)

Call GetClassName(child, sClassName, 256)

If sClassName.ToString = “Edit” Then ”Reads the class name of the handle

Dim conLength As IntPtr

conLength = SendMessage(child, WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero) ”Gets the length of the text

Dim sbText As New System.Text.StringBuilder(conLength.ToInt32 + 1)

Dim ptrRet As IntPtr

ptrRet = SendMessage(child, WM_GETTEXT, conLength.ToInt32 + 1, sbText) ”Reads the text from the handle

If Not sbText.ToString = “” Then

Return sbText.ToString ”returns the text

End If

End If

Next

End Function

Private Shared Sub SetPlayingInfo(ByVal Artist As String, ByVal Album As String, ByVal Title As String, Optional ByVal Icon As IconType = IconType.Music, Optional ByVal WMContentID As String = vbNullString, Optional ByVal Format As String = “{0} - {1}”, Optional ByVal Show As Boolean = True)

”Not my function

Dim mess As String = String.Format(“{0}{1}{2}{3}{4}{5}{6}” & vbNullChar, Icon.ToString, Math.Abs(CInt(Show)), Format, Artist, Title, Album, WMContentID)

Dim lpMess As GCHandle = GCHandle.Alloc(mess, GCHandleType.Pinned)

Dim CD As COPYDATASTRUCT

With CD

.dwData = &H547

.cbData = mess.Length * 2

.lpData = lpMess.AddrOfPinnedObject

End With

Dim lpCD As GCHandle = GCHandle.Alloc(CD, GCHandleType.Pinned)

Dim hMSGRUI As Integer

Do

hMSGRUI = FindWindowEx(0, hMSGRUI, “MsnMsgrUIManager”, vbNullString)

If (hMSGRUI > 0) Then

SendMessage2(hMSGRUI, WM_COPYDATA, 0, lpCD.AddrOfPinnedObject)

End If

Loop Until (hMSGRUI = 0)

lpMess.Free()

lpCD.Free()

End Sub

#End Region

Private Xfolder As IO.FileSystemWatcher = New System.IO.FileSystemWatcher()

Private work As Boolean = True

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim path As String = My.Computer.FileSystem.GetParentPath(My.Computer.FileSystem.GetParentPath(My.Computer.FileSystem.GetParentPath(My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData)))

Xfolder.Path = path & “\Xfire”

Xfolder.NotifyFilter = IO.NotifyFilters.Attributes

AddHandler Xfolder.Changed, AddressOf Changed ”Creates the fsw, to the sub Changed

Xfolder.EnableRaisingEvents = True ”Starts watching

End Sub

Private Sub Changed(ByVal source As Object, ByVal e As System.IO.FileSystemEventArgs)

If e.Name = “status.ini” Then ”If the modified file is status.ini

Dim Str As String = ReadText() ”reads the window text

If Not Str = “Online” Or Str = “(AFK) Away From Keyboard” Then ”if its not a default one

SetPlayingInfo(“Now Playing”, “i__h4x Logger”, ReadText(), IconType.Games) ”Sets the msn pm to the game

If BackgroundWorker1.IsBusy = False Then ”Starts the bgw which sets the personal message (Incase other programs change it)

BackgroundWorker1.RunWorkerAsync()

work = True

End If

End If

End If

End Sub

Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork

Do

Dim Str As String = ReadText()

If Not Str = “Online” Or Str = “(AFK) Away From Keyboard” Then

SetPlayingInfo(“Now Playing”, “i__h4x Logger”, ReadText(), IconType.Games)

Else ”Does same as in Changed

SetPlayingInfo(“Now Playing”, “i__h4x Logger”, “Nothing”, IconType.Games)

work = False ”If the game has been closed, then it ends the bgw

End If

System.Threading.Thread.Sleep(200) ”pauses the loop

Loop Until work = False

BackgroundWorker1.WorkerSupportsCancellation = True

BackgroundWorker1.CancelAsync() ”ends the bgw

End Sub

End Class

This will change your MSN personal message to whatever you have in Xfire, you can see it change as you type, expect to see a full project released soon.

C# - MSN Conversation Window Blocking

using System;

using System.Windows.Forms;

using System.Runtime.InteropServices;

 

namespace MSN_Event_Hooker

    //Blocks the opening of any MSN conversation window

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

            MessengerAPI.Messenger MSN = new MessengerAPI.Messenger();

            MSN.OnIMWindowCreated += new MessengerAPI.DMessengerEvents_OnIMWindowCreatedEventHandler(OnIMWindowCreated);

        }

        void OnIMWindowCreated(object plMWindow)

        {

            MessengerAPI.IMessengerWindow theWindow = (MessengerAPI.IMessengerWindow)plMWindow;

            int wHwnd = theWindow.HWND;

            IntPtr cwHwnd;

            cwHwnd = new IntPtr(wHwnd);

            theWindow.Close();

        }

    }

}

 

Release - Vb Net Windows Live Messenger Skin-Polygamy

 WLM Skin-Polygamy

i__h4x Multi-skin/Polygamy program

This program is intended for skins that utilise a modified msgsres.dll and for people that use multiple WLM clients.

It allows you to run one exe with one skin, and another exe with a different skin, so for example:

The client on the left is running a unmodified msgsres.dll, and the client on the right is using my ‘Cleaned’ skin (With DP/Text showing)

The program has basic instructions if you click the ? next to the button, it tells you what each step is for.
It also has an enable polygamy feature at the bottom, which patches the .exe so you can run more than one copy of it at a time.

Download:

WLM SkinPolygamy.rar
WLM SkinPolygamy.zip
WLM SkinPolygamy.exe

Release - Vb Net Windows Live Messenger Nudger

Windows Live Messenger Nudger

i__h4x Nudger

progressbar.jpg

Features:

  • Disable nudge timer in memory – Tested working with WLM versions 8.1.0178.00 and 8.5.1302.1018
  • Option to try and disable timer on other versions
  • Retrieves list of contacts to autocomplete contact Email
  • Specify number of nudges to send
  • Specify interval between nudges
  • Cancel sending the nudges during the sending process
  • Option to pause the sending process and resume it again
  • Progress bar to visually display the progress, and a percentage counter

done.jpg

Download:

Windows Live Messenger Nudger.rar
Windows Live Messenger Nudger.zip

Windows Live Messenger Nudger.exe
Interop.MessengerAPI.dll

*Note: In order to run the exe, the dll must be in the same folder*

VB Net - MSN Nudger Full Project

Imports System.Runtime.InteropServicesImports MessengerAPIPublic Class Form1 <DllImport(“kernel32.dll”)> Public Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByVal lpBuffer As Byte(), ByVal nSize As UIntPtr, <Out()> ByRef lpNumberOfBytesWritten As IntPtr) As Boolean End Function ‘@The fucnction to allow us to disable the timer Public Declare Function SendMessage Lib “user32.dll” Alias “SendMessageA” (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As IntPtr) As Int32 <DllImport(“user32.dll”, EntryPoint:=“FindWindow”)> Private Shared Function FindWindowByCaption(ByVal zero As IntPtr, ByVal lpWindowName As String) As IntPtr End Function Public Const CMD_NUDGE = &H2B1 Public Const WM_COMMAND As Long = &H111 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Processes() As System.Diagnostics.Process ”get processes Processes = System.Diagnostics.Process.GetProcessesByName(“msnmsgr”) ”find messenger If Processes.Length = 0 Then ”check that the process was found MessageBox.Show(“Windows Live Messenger process was not found”, “Error:”, MessageBoxButtons.OK, MessageBoxIcon.Error) Exit Sub End If Dim msnpath As String = Processes(0).MainModule.FileName Dim msnversion As String = System.Diagnostics.FileVersionInfo.GetVersionInfo(msnpath).FileVersion ”get the version of user If Not msnversion = “8.1.0178.00″ Then ”my version is 8.1…. If MessageBox.Show(“The version of Windows Live Messenger you are running is not the same that this program was intended, you are running:” & vbNewLine & msnversion & vbNewLine & “The intended version is 8.1.0178.00, you can try and enable nudging if you wish but it may crash WLM” & vbNewLine & “Do you want to enable?”, “Error: Wrong version, continue?”, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = Windows.Forms.DialogResult.No Then Exit Sub End If End If Dim nops As Byte() = New Byte(6 - 1) {&H90, &H90, &H90, &H90, &H90, &H90} ”create our data to write ”&H90 = NOP in ASM, which stands for No OPeration WriteProcessMemory(Processes(0).Handle, New IntPtr(&H61F239), nops, New UIntPtr(CType(nops.Length, UInt32)), New IntPtr(0)) ”Write the data to the proocess,—————–the address——————-size————————-length MessageBox.Show(“Windows Live Messenger was sucessfully modified” & vbNewLine & “6 Bytes written at address 0061F239″, “Done:”, MessageBoxButtons.OK, MessageBoxIcon.Exclamation) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ”checks that the fields are filled in correctly If TextBox1.Text = “” Then MessageBox.Show(“Please enter a valid contact email address”, “Error:”, MessageBoxButtons.OK, MessageBoxIcon.Error) Exit Sub ElseIf InStr(TextBox1.Text, “@”) = 0 Then MessageBox.Show(“Please enter a valid contact email address”, “Error:”, MessageBoxButtons.OK, MessageBoxIcon.Error) Exit Sub ElseIf NumericUpDown1.Value = 0 Then MessageBox.Show(“Please enter a number of times to send the nudge”, “Error:”, MessageBoxButtons.OK, MessageBoxIcon.Error) Exit Sub End If Dim oMessenger As Messenger oMessenger = New Messenger Dim msncontact As IMessengerContact Dim msncontacts As IMessengerContacts ”gets the msn contacts msncontacts = oMessenger.MyContacts For Each msncontact In msncontacts ”loop through them If msncontact.SigninName = TextBox1.Text Then ”till it finds a matching contact oMessenger.InstantMessage(msncontact) ”open window Dim times As Integer = 0 Dim wnd As Integer = 0 wnd = FindWindowByCaption(0, msncontact.FriendlyName & ” - Conversation”) ”finds the window If wnd = 0 Then Dim Processes() As System.Diagnostics.Process ”if it dosnt find the window (contact may have weird symbols) Processes = System.Diagnostics.Process.GetProcessesByName(“msnmsgr”) If Processes.Length = 0 Then ”check that the process was found MessageBox.Show(“Windows Live Messenger process was not found”, “Error:”, MessageBoxButtons.OK, MessageBoxIcon.Error) Exit Sub End If wnd = Processes(0).MainWindowHandle ’sets the handle to the window End If Do times += 1 SendMessage(wnd, WM_COMMAND, CMD_NUDGE, 0) ‘’sends a nudge Loop Until times = NumericUpDown1.Value ”x amount of times MessageBox.Show(“Done”, “MSN Nudge Spam”, MessageBoxButtons.OK, MessageBoxIcon.Exclamation) Exit Sub End If Next MessageBox.Show(“Error, contact matching that email was not found”, “Error:”, MessageBoxButtons.OK, MessageBoxIcon.Error) End SubEnd Class

Example form:

nudger.jpg

Download @

http://cid-50c4db1f234d8c02.skydrive.live.com/self.aspx/Public/Windows%20Live%20Messenger%208.1%20Nudger.exe
http://cid-50c4db1f234d8c02.skydrive.live.com/self.aspx/Public/Interop.MessengerAPI.dll

VB Net - Removing MSN Nudge Limit

    <DllImport(”kernel32.dll”)> Public Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByVal lpBuffer As Byte(), ByVal nSize As UIntPtr, <Out()> ByRef lpNumberOfBytesWritten As IntPtr) As Boolean
End Function

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Processes() As System.Diagnostics.Process ”get processes
Processes = System.Diagnostics.Process.GetProcessesByName(”-msnmsgr”) ”find messenger
Dim nops As Byte() = New Byte(6 - 1) {&H90, &H90, &H90, &H90, &H90, &H90} ”create our data to write
WriteProcessMemory(Processes(0).Handle, New IntPtr(&H61F239), nops, New UIntPtr(CType(nops.Length, UInt32)), New IntPtr(0))
”Write the data to the proocess,—————–the address——————-size————————-length
End Sub
Thats some example code for Windows Live Messenger V8.1.0178.00, there is a newer version out so you will need to update the address for that.

What this does is overwrites the timer at the address 0061F239
The original bytes = 8986DC020000
The written bytes = 909090909090

If you wanted to do it by patching the exe, it is the address 0021E630 (for v8.1…)

VB Net - Change MSN Status (Status Spam)

Public Shared Sub ChangeStatus(ByVal count As Integer)
Dim oMessenger As MessengerAPI.Messenger
oMessenger = New MessengerAPI.Messenger
Dim times As Integer = 0
Do
times += 1
oMessenger.MyStatus = MISTATUS.MISTATUS_ONLINE
System.Threading.Thread.Sleep(100)
oMessenger.MyStatus = MISTATUS.MISTATUS_INVISIBLE
System.Threading.Thread.Sleep(100)
Loop Until times = count
End Sub

Usage:  ChangeStatus(20)

VB Net - MSN Block Spam

Public Shared Sub BlockSpam(ByVal count As Integer, ByVal contact As String)
Dim done As Boolean = False
Dim oMessenger As MessengerAPI.Messenger
oMessenger = New MessengerAPI.Messenger
Dim msncontact As IMessengerContact
Dim msncontacts As IMessengerContacts
msncontacts = oMessenger.MyContacts
For Each msncontact In msncontacts
If msncontact.SigninName = contact Then
Dim times As Integer = 0
done = True
Do
times += 1
msncontact.Blocked = True
System.Threading.Thread.Sleep(400)
msncontact.Blocked = False
System.Threading.Thread.Sleep(400)
Loop Until times = count
MessageBox.Show(”Done”, “MSN Block Spam”, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Exit Sub
End If
Next
MessageBox.Show(”Error, contact matching that email was not found”, “Error:”, MessageBoxButtons.OK, MessageBoxIcon.Error)
End Sub

Usage: BlockSpam(10, “spiderman@hotmail.com”)

VB Net - MSN Nudge Spam

Public Shared Sub NudgeSpam(ByVal count As String, ByVal contact As String)
Dim oMessenger As MessengerAPI.Messenger
oMessenger = New MessengerAPI.Messenger
Dim msncontact As IMessengerContact
Dim msncontacts As IMessengerContacts
msncontacts = oMessenger.MyContacts
For Each msncontact In msncontacts
If msncontact.SigninName = contact Then
Dim times As Integer = 0
Dim wnd As Integer = “0″
wnd = FindWindowByCaption(0, msncontact.FriendlyName & ” - Conversation”)
If wnd = 0 Then
Dim Processes() As System.Diagnostics.Process
Processes = System.Diagnostics.Process.GetProcessesByName(”msnmsgr”)
wnd = Processes(0).MainWindowHandle
End If
Do
times += 1
SendMessage(wnd, WM_COMMAND, CMD_NUDGE, 0)
Loop Until times = count
MessageBox.Show(”Done”, “MSN Nudge Spam”, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Exit Sub
End If
Next
MessageBox.Show(”Error, contact matching that email was not found”, “Error:”, MessageBoxButtons.OK, MessageBoxIcon.Error)
End Sub

Usage: NudgeSpam(100, “spiderman@hotmail.com”)

Note: Need to have a patched MSN that removes nudge timer

Next Page »