Sign in to follow this  
Followers 0
acer20006

TCP & winlist & String

3 posts in this topic

hii all im trying to make a connection with some server and receive packets and sniff it to pick a specific packets and import it at my winlist but i had problem at import this data at winlist _ and i wonder to how to read the data which saved at winlist ( select the first / Randomly select )

>>> plz have a look at the code

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#Include <GuiEdit.au3>
#include <WindowsConstants.au3>
#Include <GuiListView.au3>
GUICreate("tcp", 633, 447, 192, 124)
$Status = GUICtrlCreateListView("", 8, 8, 609, 377, BitOR($LVS_SORTDESCENDING, $LVS_LIST, $LVS_SHOWSELALWAYS))
GUISetState(@SW_SHOW)
$IP = "157.255.256.12"
TCPStartUp()
$socket = TCPConnect($IP, 15592)
While 1
$Packet = TCPRecv($socket, 10000)
 If $Packet <> "" Then ;recvied data
            Status("incoming >>  : " & $Packet)   
            If (StringInStr($Packet, "195864")) Then  ; i wann to take a specific packets 
                StringMid($Packet, 3, 5) ; take a part from the data which i specific it at line 17
                MsgBox (0,"",""&$Packet) ; this line not important
            EndIf
EndIf
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Func Status($text)
GUICtrlCreateListViewItem($Packet, $Status)
EndFunc

>> my problem is how to get a part of code which i picked it from stringInStr

and put i at winlist _ and how to export the data at winlist to use it after that

>>>idk if i was clear at my explain _ i hope anyone help me :D

Share this post


Link to post
Share on other sites



You're not using the data from your StringMid(), try $data = StringMid(....)

HTH,

whim

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

You're not using the data from your StringMid(), try $data = StringMid(....)

HTH,

whim

:D$data = StringMid(....)

ty now i can pick a specific packets and import it at my winlist

but about select the data from winlst ( select the first / Randomly select ) is this possible ?

Edited by acer20006

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