Jump to content

Packet sender.


 Share

Recommended Posts

HotKeySet("^{F2}", "_Quit")
TCPStartUp ()

$g_IP = InputBox("Internet Protocol (IP):", "IP:", "", "", 100, 10)
$g_Port = InputBox("TCP Port:", "Port:", "", "", 100, 10)
Dim $szIPADDRESS = $g_IP
Dim $nPORT = $g_Port
Dim $ConnectedSocket = -1
Dim $szData = GeneratePacket(8)

$ConnectedSocket = TCPConnect ($szIPADDRESS, $nPORT)

While 1
    TCPSend ($ConnectedSocket, $szData)
    If Not @error Then
        ;MsgBox(0, "Succeed:", "Packet Sended")
    Else
        MsgBox(0, "Error:", "Unable To Sent Packet")
        ExitLoop
    EndIf
WEnd

Func GeneratePacket($bits)
    Local $packet
    For $x = 0 To $bits
        $packet &= Random(0, 1, 1)
    Next
    Return $packet
EndFunc   ;==>GeneratePacket

Func _Quit()
    Exit
EndFunc   ;==>_Quit

Is it possible to increase the size of those packets? :lmao:

Thnk :ph34r:

Edited by AceLoc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
Share on other sites

HotKeySet("^{F2}", "_Quit")
TCPStartUp ()

$g_IP = InputBox("Internet Protocol (IP):", "IP:", "", "", 100, 10)
$g_Port = InputBox("TCP Port:", "Port:", "", "", 100, 10)
$g_Size = InputBox("Size (in Bits):", "Size:", "", "", 100, 10)
Dim $szIPADDRESS = $g_IP
Dim $nPORT = $g_Port
Dim $ConnectedSocket = -1
Dim $szData = GeneratePacket($g_Size)

$ConnectedSocket = TCPConnect ($szIPADDRESS, $nPORT)

While 1
    TCPSend ($ConnectedSocket, $szData)
    If Not @error Then
        ;MsgBox(0, "Succeed:", "Packet Sended")
    Else
        MsgBox(0, "Error:", "Unable To Sent Packet")
        ExitLoop
    EndIf
WEnd

Func GeneratePacket($bits)
    Local $packet
    For $x = 0 To $bits
        $packet &= Random(0, 1, 1)
    Next
    Return $packet
EndFunc   ;==>GeneratePacket

Func _Quit()
    Exit
EndFunc   ;==>_Quit

so this will work fine? :lmao:

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
Share on other sites

so this will work fine? :geek:

:lmao: Try it and you can answer your own question :ph34r:


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Link to comment
Share on other sites

You do realize you're sending bytes not bits, right?

Those 1's and 0's are just characters, not actual binary. :lmao:

ofcourse i do.. i said this topic could be closed.

so please stop posting --

Thank :ph34r:

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...