Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

copture all incoming net send messeges!

how i can capture all incoming messeges sended with "net send" command under nt platform?
0
d1kGroup
Asked:
d1kGroup
  • 9
  • 5
1 Solution
 
shaneholmesCommented:
Look at the NetAlertRaiseEx & NetAlertRaise API functions

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netalertraise.asp


Shane
0
 
shaneholmesCommented:
Sorry, you will need to add Netapi32 to your uses clause

Shane
0
 
d1kGroupAuthor Commented:
i look in msdn an NetAlertRaise and it's look to be what i need but is not NetAPI32.dcu in delphi! can you give me a header of NetAPI.dll???
or (better) a simple delphi example!!!

d1k
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
d1kGroupAuthor Commented:
no more need header for netapi.dll!!
i found it!! it's call lm!!!
0
 
shaneholmesCommented:
K, let me know if you need anymore help!

Shane
0
 
d1kGroupAuthor Commented:
i tryed NetAlertRaise but not working...

pls give a simple example!!!

d1k
0
 
shaneholmesCommented:
You tried it that quick!

Shane
0
 
d1kGroupAuthor Commented:
i just translate the msdn example!!!

d1k
0
 
shaneholmesCommented:
please post me what you used for code...

ANd I will look

Shane
0
 
d1kGroupAuthor Commented:
Shane, here is the code i tried:

const
  VAREDSIZE = 312;
type
  TPUSER_OTHER_INFO = record
                        alrtus_errcode: Integer;
                        alrtus_numstrings: Integer;
  end;
var
  buf: array [0..VAREDSIZE] of char;
  pUserInfo: ^TPUSER_OTHER_INFO;
begin
  FreeMem(pUserInfo, VAREDSIZE);
  pUserInfo.alrtus_errcode := -1;
  pUserInfo.alrtus_numstrings := 1;
  if NetAlertRaiseEx(ALERT_MESSAGE_EVENT, pUserInfo, 255, 'netsvcs') = NERR_Success then begin
    ShowMessage('something is coming!!!');
  end;

d1k
0
 
d1kGroupAuthor Commented:
i forgot to mention that it raise an exception!!!
prb service is not called netsvcs... but how???
0
 
d1kGroupAuthor Commented:
i tried too

NetAlertRaiseEx(ALERT_MESSAGE_EVENT, pUserInfo, VAREDSIZE, 'svchost.exe')

but it raise the same exception!!!
0
 
Ivanov_GCommented:

   You need mail slot component. Download some of them from here :

   http://swiss.torry.net/lan_comms.htm

   I use Mailslot v.1.1 - you just install it, drop on the form and write you code in OnNewMessage event...
0
 
d1kGroupAuthor Commented:
i try all mail slots components from torry.net but noone capture messeges sended with "net send"!!!

d1k
0
 
d1kGroupAuthor Commented:
more info: i don't want a replacer for Messenger service... i junst want to capture all incoming messeges!!!!

d1k
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 9
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now