Sign in to follow this  
Followers 0
6105

WinPcap Autoit3 UDF

2 posts in this topic

#1 ·  Posted (edited)

Hi Guys, somebody know WinPcap Autoit3?

how i will can to monitor special port? like 22, an see full packet not just connection.

Thank you.

I try to do like in example but that don't write nothing to file

#include <Winpcap.au3>

$winpcap=_PcapSetup() ; initialise the Library
$pcap_devices=_PcapGetDeviceList() ; Get the interfaces list for which a capture is possible

; Start a capture on interface #0, in promiscuous mode, for http packets only
$pcap=_PcapStartCapture($pcap_devices[1][7],"telnet port 22",1)

; Open pcap file for writting
$pcapfile=_PcapSaveToFile($pcap,"mycapture.pcap")
If ($pcapfile=0) Then MsgBox(16,"Pcap error !",_PcapGetLastError())

; Write all telnet traffic to the file for 10s...
$time0=TimerInit()
While (TimerDiff($time0)<10000)
    $packet=_PcapGetPacket($pcap)
    If IsArray($packet) Then _PcapWriteLastPacket($pcapfile)
Wend

_PcapStopCaptureFile($pcapfile) ; Close pcap file
_PcapStopCapture($pcap) ; Stop capture
_PcapFree() ; release ressources
Edited by toader

[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

Share this post


Link to post
Share on other sites



Ok, no need, i does it in perl! Thank you :graduated:

windump and tcpdump is our help.

Thank a lot.


[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0