Sign in to follow this  
Followers 0
AceLoc

Packet sender.

10 posts in this topic

#1 ·  Posted (edited)

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]

Share this post


Link to post
Share on other sites



Dim $szData = GeneratePacket(9999)

?

then it will be 9999bits right..?

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

Share this post


Link to post
Share on other sites

As far as I can tell it should be.

okay.. Thanks :lmao:

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

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

so this will work fine? :geek:

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


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

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

Yep .. it does Thanks for helping everybody & Topic can be closed. :geek:

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

Share this post


Link to post
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]

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