Sign in to follow this  
Followers 0
frank10

PacketX doesn't work in Beta 3.3.7.21, it's ok in 3.3.5.6

12 posts in this topic

I have a sniffing script that uses PacketX with Winpcap in W7.

Const $PktXPacketTypePromiscuous = 0x0020
Const $PktXModeCapture = 1
; # CREATE PACKETX OBJECT #  
Global $oPktX = ObjCreate("PktX.PacketX")
If Not IsObj($oPktX) Then
MsgBox(48, "Error", "PacketX could not load the object, reinstall!")
Else
$EventObject = ObjEvent($oPktX, "PacketX_")
EndIf
; # GET THE DEVICE NUMBERS #
$deviceno = ""
$deviceitem = ""
For $i = 1 To $oPktX.Adapters.Count
If $oPktX.Adapters($i).IsGood Then
  $deviceitem = $i
  $deviceno = $deviceitem & "|" & $deviceno
Else
  MsgBox(48, "Error", "No Valid Network Adaptors was found!")
EndIf
Next
$oPktX.Adapter = $oPktX.Adapters(2)

with official autoit 3.3.5.6 works well, but if I use the beta 3.3.7.21, the same script from Scite says cannot make that operation with this object:

$oPktX.Adapter = $oPktX.Adapters(2)

What's this?

Share this post


Link to post
Share on other sites



Does it work with the latest production version 3.3.6.1?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I tried 3.3.6.1, yes it works, it's only with Beta that doesn't work.

Share this post


Link to post
Share on other sites

Do you have a COM error handler in your script?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Before of that call to PacketX in my script I call Sqlite, some stdoutRead-Err call and this line:

local $a = _CommSetPort($CMPort, $sportSetError, $CmBoBaud, $CmboDataBits, $CmBoParity, $CmBoStop, $setflow, $RTSMode, $DTRMode)

of CommMG.au3 to initialize a serial port.

I think I don't have COM error handler before calling PacketX.

Share this post


Link to post
Share on other sites

Could you please insert the following code:

$oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler

; ... Here goes the rest of your script

; This is my custom defined error handler
Func MyErrFunc()

Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _
"err.description is: " & @TAB & $oMyError.description & @CRLF & _
"err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _
"err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _
"err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _
"err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _
"err.source is: " & @TAB & $oMyError.source & @CRLF & _
"err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _
"err.helpcontext is: " & @TAB & $oMyError.helpcontext _
)
Endfunc
This grabs all COM errors and for each a MessageBox is shown.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I will try it in two or three hours.

Share this post


Link to post
Share on other sites

The COM handler says:

description: impossible to find member (I translate it from italian 'membro')

err.numb: 80020003

lastdll: 0

help: 43237768

Share this post


Link to post
Share on other sites

Do you get the COM error on the same line as the error in your first post? Sometimes the problem is located many lines above the line crashing the script.

Did you have a look at the of the 3.3.7.21 version? COM support has changed and there might be some script breaking changes.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

For the latest test I made a script with only that part I posted above.

So, yes the line of the error is the same:

$oPktX.Adapter = $oPktX.Adapters(2)

and there are no other things except call to PacketX

Share this post


Link to post
Share on other sites

Then I think it's time to ask one of the Devs.

Or install one of the older 3.3.7.x betas (i would start with 3.3.7.0). If it works with one of the 3.3.7.x betas you know that there might be a bug in 3.3.7.21.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

At this point I can use the 3.3.5.6, I don't need the beta now.

It could only be useful for the devs to know there is a bug.

And in the future, if the beta will became official...

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