Archive for the 'Nudge' Tag

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 - 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