begin process at 2010 02 09 19:06:33
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Divers

 > MSN MESSENGER -> CONVERSATION LOGGER

MSN MESSENGER -> CONVERSATION LOGGER


 Information sur la source

Note :
5,5 / 10 - par 6 personnes
5,50 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Divers Niveau :Débutant Date de création :01/06/2003 Date de mise à jour :02/06/2003 09:57:22 Vu :13 032

Auteur : bydavid

Ecrire un message privé
Site perso
Commentaire sur cette source (16)
Ajouter un commentaire et/ou une note

 Description

Ben c comme un keylogger juste pour msn messenger .  

Source

  • 'Il vous faut un module et une form ,c tout !
  • 'A oui, vous devez allez dans projet -> reference et cochez "messenger api type library".
  • ' Et surtout cree un dossier "MsgrLogs" dans le disque C: !!! sinon erreur !
  • 'Dans le module
  • '-----------------
  • Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  • Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
  • Public Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  • Public Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
  • Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
  • Public Const VK_SPACE = &H20
  • Public Const WM_COMMAND = &H111
  • Public Const WM_KEYDOWN = &H100
  • Public Const WM_KEYUP = &H101
  • Public Const WM_SETTEXT = &HC
  • Public Const WM_GETTEXT = &HD
  • Public Const WM_GETTEXTLENGTH = &HE
  • '-----------------
  • 'Dans la form
  • '--------------
  • Option Explicit
  • Private WithEvents objMessenger As MessengerAPI.Messenger
  • Private Sub Form_Load()
  • Set objMessenger = New MessengerAPI.Messenger
  • End Sub
  • Private Sub objMessenger_OnIMWindowDestroyed(ByVal pIMWindow As Object)
  • Dim MsgrIMWindow As IMessengerConversationWnd
  • Dim MsgrContacts As IMessengerContacts
  • Dim lngEdit&, lngTextLen&, m&, f As Long
  • Dim strText$, strEditText$, strEmail$, strTmpText As String
  • Set MsgrIMWindow = pIMWindow
  • Set MsgrContacts = MsgrIMWindow.Contacts
  • lngEdit = FindWindowEx(MsgrIMWindow.hWnd, 0, "edit", vbNullString)
  • lngTextLen = SendMessageLong(lngEdit, WM_GETTEXTLENGTH, 0, 0)
  • strText = String(lngTextLen + 1, Chr(0))
  • Call SendMessageByString(lngEdit, WM_GETTEXT, lngTextLen + 1, strText)
  • strEditText = Left(strText, lngTextLen)
  • If MsgrContacts.Count = 0 Then
  • strTmpText = Mid(strEditText, 1, InStr(strEditText, ">, "))
  • Else
  • strTmpText = strEditText
  • End If
  • If InStr(strTmpText, ">") = 0 Then
  • strEmail = strTmpText
  • Else
  • m = InStrRev(strTmpText, "<")
  • f = InStrRev(strTmpText, ">")
  • strEmail = Mid(strTmpText, m + 1, f - m - 1)
  • End If
  • Open "C:\MsgrLogs\" & strEmail & ".log" For Append As #1 'a la fermeture de la fenetre de conversation , le programme enregistre la conversation dans un fichier .log
  • Print #1, "-----------------------------"
  • Print #1, "Contact dans la conversation : " & strEditText
  • Print #1, "Le " & Date & " a " & Time
  • Print #1, "-----------------------------"
  • Print #1, MsgrIMWindow.History
  • Print #1, "-----------------------------" & vbCrLf
  • Close #1
  • End Sub
  • '--------------
'Il vous faut un module et une form ,c tout !
'A oui, vous devez allez dans projet -> reference et cochez "messenger api type library".
' Et surtout cree un dossier "MsgrLogs" dans le disque C: !!! sinon erreur !

'Dans le module
'-----------------
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Public Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const VK_SPACE = &H20
Public Const WM_COMMAND = &H111
Public Const WM_KEYDOWN = &H100
Public Const WM_KEYUP = &H101
Public Const WM_SETTEXT = &HC
Public Const WM_GETTEXT = &HD
Public Const WM_GETTEXTLENGTH = &HE
'-----------------

'Dans la form
'--------------
Option Explicit
Private WithEvents objMessenger As MessengerAPI.Messenger

Private Sub Form_Load()
  Set objMessenger = New MessengerAPI.Messenger
End Sub

Private Sub objMessenger_OnIMWindowDestroyed(ByVal pIMWindow As Object)
Dim MsgrIMWindow As IMessengerConversationWnd
Dim MsgrContacts As IMessengerContacts
Dim lngEdit&, lngTextLen&, m&, f As Long
Dim strText$, strEditText$, strEmail$, strTmpText As String
  Set MsgrIMWindow = pIMWindow
  Set MsgrContacts = MsgrIMWindow.Contacts
  lngEdit = FindWindowEx(MsgrIMWindow.hWnd, 0, "edit", vbNullString)
  lngTextLen = SendMessageLong(lngEdit, WM_GETTEXTLENGTH, 0, 0)
  strText = String(lngTextLen + 1, Chr(0))
  Call SendMessageByString(lngEdit, WM_GETTEXT, lngTextLen + 1, strText)
  strEditText = Left(strText, lngTextLen)
  
  If MsgrContacts.Count = 0 Then
      strTmpText = Mid(strEditText, 1, InStr(strEditText, ">, "))
  Else
      strTmpText = strEditText
  End If
  
  If InStr(strTmpText, ">") = 0 Then
      strEmail = strTmpText
  Else
      m = InStrRev(strTmpText, "<")
      f = InStrRev(strTmpText, ">")
      strEmail = Mid(strTmpText, m + 1, f - m - 1)
  End If
  
  Open "C:\MsgrLogs\" & strEmail & ".log" For Append As #1 'a la fermeture de la fenetre de conversation , le programme enregistre la conversation dans un fichier .log
      Print #1, "-----------------------------"
      Print #1, "Contact dans la conversation : " & strEditText
      Print #1, "Le " & Date & " a " & Time 
      Print #1, "-----------------------------"
      Print #1, MsgrIMWindow.History
      Print #1, "-----------------------------" & vbCrLf
  Close #1
End Sub
'--------------  

 Conclusion

VOila voila...  


 Sources du même auteur

Source avec Zip Source avec une capture MSN MESSENGER -&GT; ENVOYER ET RECEVEZ DES MESSAGES...+
MSN MESSENGER -&GT; AI-JE RECU UN NOUVEL EMAIL ?
COULEURS DE FOND ALEATOIRE ...
FAIRE TREMBLER SON APPLI !
FERMETURE MARRANTE :)

 Sources de la même categorie

Source avec Zip Source avec une capture Source .NET (Dotnet) SPACE - UN SPACE MAC POUR WINDOWS par vbnino
Source avec Zip Source .NET (Dotnet) MULTI THREAD AVEC AFFICHAGE par jaknight007
Source avec Zip Source .NET (Dotnet) COMPILATEUR EN VB NET 2003 par alpha5
Source avec Zip Source avec une capture CRYPTER AVEC LE CHIFFRE DES NIHILISTES RUSSES par tresorsdevie
Source avec Zip Source avec une capture Source .NET (Dotnet) COMPTE_BANCAIRE.NET par Adn56

Commentaires et avis

Commentaire de Weado le 02/06/2003 00:54:57

une source et plus de commentaire svp!

Commentaire de fpinchon le 02/06/2003 06:37:48

personne n'a uj tric innovant sur msn : qui permette de faire sonner le pc du correspondant quand on cherche a le joindre, un peu comme la sonnerie telephonique de netmeeting ?
fredo

Commentaire de GRenard le 02/06/2003 07:37:29

j'espere que ca marche pour msn 6 !!! :P

Commentaire de Chrystalyst le 16/09/2003 16:18:55

c'est bien ms cé dommage, sa ne marche qu'avec windows messenger (et non msn messenger kom indiké ds le titre)
p-e est-ce parske j'utilize msn messenger 6...

Commentaire de bydavid le 16/09/2003 16:20:37

nan c marche avec la v5 mais pa avec la 6 ! dommage...

Commentaire de Existenz le 06/08/2004 15:31:53

Je l'ai fait marcher avec la 6 y a pas grand chose à rajouter. Y a que la fonction objMessenger_OnIMWindowDestroyed qui change. Voici le code :

Private Sub objMessenger_OnIMWindowDestroyed(ByVal pIMWindow As Object)
Dim MsgrIMWindow As IMessengerConversationWnd
Dim MsgrContacts As IMessengerContacts
Dim Contact As IMessengerContact
Dim lngEdit&, lngTextLen&, m&, f As Long
Dim strText$, strEditText$, strEmail$, strTmpText As String
    Set MsgrIMWindow = pIMWindow
    Set MsgrContacts = MsgrIMWindow.Contacts
    Set Contact = MsgrContacts.Item(0)
    lngEdit = FindWindowEx(MsgrIMWindow.hWnd, 0, "edit", vbNullString)
    lngTextLen = SendMessageLong(lngEdit, WM_GETTEXTLENGTH, 0, 0)
    strText = String(lngTextLen + 1, Chr(0))
    Call SendMessageByString(lngEdit, WM_GETTEXT, lngTextLen + 1, strText)
    strEditText = Left(strText, lngTextLen)
    
    
    If MsgrContacts.Count = 0 Then
        strTmpText = Mid(strEditText, 1, InStr(strEditText, ">, "))
    Else
        strTmpText = strEditText
    End If
    
    If InStr(strTmpText, ">") = 0 Then
        strEmail = strTmpText
    Else
        m = InStrRev(strTmpText, "<")
        f = InStrRev(strTmpText, ">")
        strEmail = Mid(strTmpText, m + 1, f - m - 1)
    End If
    
    Open "C:\MsgrLogs\" & Contact.FriendlyName & ".log" For Append As #1   'a la fermeture de la fenetre de conversation , le programme enregistre la conversation dans un fichier .log
        Print #1, "-----------------------------"
        Print #1, "Contact dans la conversation : " & strEditText
        Print #1, "Le " & Date & " a " & Time
        Print #1, "-----------------------------"
        Print #1, MsgrIMWindow.History
        Print #1, "-----------------------------" & vbCrLf
    Close #1
End Sub

Commentaire de Existenz le 06/08/2004 15:37:52

ps : j'ai pas viré le code original qui permettait d'obtenir l'email de la personne, j'ai juste rajouté le code nécessaire. De plus dans mon exemple, le nom du fichier sera le pseudo de l'interlocuteur et pas son adresse mail. Si vous voulez l'adresse email, mettez simplement Contact.SigninName à la place de Contact.FriendlyName dans le nom du fichier.

Commentaire de YaNn0u le 21/08/2004 00:30:56

Cest quoi le nom exact de la référence à cocher ?

Car je trouve pas messenger api type library..

Commentaire de kemo_0ne le 06/09/2004 14:05:11

Bravo, c'est classe que ça marche avec le 6. Par contre apprends à commenter !!!

Commentaire de rancher39 le 25/09/2004 06:34:10

crisse, c ou on clic pour downloader?

Commentaire de BaptisteC le 03/10/2004 21:23:24

Merci de préciser que cette source n'est pas de toi et que tu l'as Copiée/Collée/Traduite par respect pour Daniel, son auteur dans msnfanatic....

http://forums.msnfanatic.info/index.php?act=ST&f=38&t=3801&s=

Tu aurais pu au moins traduire les variables en FR et faire le code lamesque qui crée le dossier si il n'existe pas... au lieu de traduire :

Make sure the path "C:\MsgrLogs\" exists, or you will get an error.

Ce n'est pas un reproche en soi car c'est toujours interessant de faire part des sources interessantes qu'on peut glanner ça et là sur le net et de les traduire...
C'est juste une question de respect pour l'auteur réel...

A bon entendeur pour """"ta"""" prochaine source,
Baptiste


Commentaire de buzydoudou le 14/01/2005 20:17:20

Bonne source même si elle n'est pas de toi !!

Commentaire de buzydoudou le 14/01/2005 21:01:01

Ds ta modification pour msn 6.2,
    * Il faut remplacer :
[...]
Open "C:\MsgrLogs\" & Contact.FriendlyName & ".log" For Append As #1
[...]

    * Par :
[...]
Open "C:\MsgrLogs\" & Contact.SigninName & ".log" For Append As #1
[...]

Sinon ça ne marche pas !! Bonne continuation !!

Commentaire de Vedlen le 17/06/2005 23:17:25

Super!!.. Ca marche pas...

Commentaire de rafa75 le 29/12/2008 13:32:19

merci

Commentaire de ap00x le 12/07/2009 00:16:00

not runnig :( please send me source code | apocalypse-techno@hotmail.com

 Ajouter un commentaire




Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,452 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales