Welcome Guest.   Make a donation to an author on the site October 24, 2014, 03:33:20 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Free DonationCoder.com Member Kit: Submit Request.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: FBSL - Net Send grabber + logger  (Read 3712 times)
Gerome
Charter Honorary Member
***
Posts: 154


View Profile WWW Give some DonationCredits to this forum member
« on: February 07, 2006, 04:55:30 PM »

Hello,

Sometimes, when you're at office without admin rights or poweruser rights, you are feeling kinda bitter...
And to send messages to your collegues, you have to use the NET SEND mycollegue TheMessage blahhh
to discuss a bit...
Yes, but exchnaging those kinda msg is heavy and not convivial, plus you can't grab the text that is just popped at screen...
I've found a solution !

I've developped a tiny GUI application that is in charge of scruting for incoming net sended messages, grabbing its very content, redirecting the message into a richedit control + logging the very content of the popped messages + closing the popped message !!!

Here's a screen shot of a just grabbed popped message :


Here's the main script that does the trick :
[copy or print]
#Option Explicit
#DllDeclare User32( "EnumWindows", "GetWindowText", "GetWindowTextLength", _
                    "GetDlgItem", "SetFocus", "FindWindow", "FlashWindow" )

' // Replace with the correct translation here
Const service = "Service Affichage des messages "
Const sep     = "--------------------------------------------------------------------------------"
Const STYLE = WS_CHILD + WS_CLIPSIBLINGS + WS_VISIBLE + WS_HSCROLL + WS_VSCROLL + ES_MULTILINE + _
              ES_AUTOVSCROLL + ES_AUTOHSCROLL + WS_TABSTOP
LoadLibrary("Riched20.dll")
Dim %H = 420, %W = 220, $sGet, %fp
Resize( Me, 0, 0, H, W )
Dim hwndInput = FBSL_Control ( _
         "richedit20a", Me, "", 1000, 20, 20, H-40, W-40, STYLE, WS_EX_CLIENTEDGE )
Fbsl_settext( Me, "NET Send Capturer / logger" )
SetTimer(Me, 3615, 100)

fp = Fileopen( ".\Capturer.log", Append )

Center(Me): ResizeMe(): Show(Me)

Begin Events
    If cbmsg = wm_close Then
        Killtimer( Me, 3615 )
        Fileclose( fp )
        Exitprogram(0)
    End If
    If cbmsg = wm_timer Then
        MyGetNetSend()
    End If
    If cbmsg = wm_size Then
        ResizeMe()
    End If
End Events

Sub MyGetNetSend()
    Dim %hwnd = FindWindow(Null, service )
    Dim %Ret = GetWindowTextLength(hwnd)
    If Ret > 0 Then
        Dim $sSave, %hdlg
        sSave = Space(Ret)
        GetWindowText( hwnd, sSave, Ret + 1 )
        If Left(sSave, Len(service)) = service Then
            ' // Message Window
            hdlg = GetDlgItem( hwnd, 0xFFFF )
            Ret = GetWindowTextLength(hdlg)
            sSave = Space(Ret)
            GetWindowText( hdlg, sSave, Ret + 1 )
            Sendmessage( hwnd, WM_CLOSE, 0, 0 )
            Fbsl_Gettext( hwndInput, sGet )
            sGet = sGet & sSave & CrLf & sep & CrLf
            Fbsl_Settext( hwndInput, sGet )
            Fileprint( fp, sSave )
            FlashWindow( Me, True )
        End If
    End If
End Sub

Sub ResizeMe()
Dim %TopWin, %leftWin, %RightWin, %BottomWin
   GetClientRect(Me, TopWin, leftWin, RightWin, BottomWin )
   Resize( hwndInput, 20, 20, RightWin - 40, BottomWin - 60 )
End Sub

The only thing to adapt into that script will be this only line :
Const service = "Service Affichage des messages "

It was tested onto : NT4, Win2k and WinXP French versions with success smiley
And what about you ? smiley

Tell me please smiley
Logged

Yours,
(¯`·._.FBSL Help file]
(¯`·._.
mouser
First Author
Administrator
*****
Posts: 33,581



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: February 09, 2006, 02:13:25 PM »

cool!
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.028s | Server load: 0.08 ]