Jump to content

Recommended Posts

Posted

Anyone has a nice idea how i can make autoit use the tcp function better over the internet.

up till now it only worked by lan or VPN.

even if the router let all the data trough.

*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

AutoIt-ITS chat servers have worked over the internet and we've even had a meeting on them. No idea what your talking about. Can you please produce a script.

Posted (edited)

well umm like the basic chat script over port 6881 doesn't work.

since thats what i use in my script.

func _Startup()
    TCPStartUp()
    $MainSocket = TCPListen($IP,6881,  100 )
    If $MainSocket = -1 Then Exit
    While 1
        $ConnectedSocket = TCPAccept($MainSocket)
        If $ConnectedSocket >= 0 Then
            exitloop
        EndIf
    Wend
endfunc

thats the startup code $ip = @ipadress1

func _Shutdown()
    TCPCloseSocket ($ConnectedSocket)
    TCPCloseSocket ($MainSocket)
    $ConnectedSocket = -1
    $MainSocket = -1
    TCPShutdown()
endfunc

thats for shutting it down, so i can restart it again later

$IP = InputBox("IP","Enter target IP please")
SplashTextOn("","TYING TO CONNECT, PLEASE WAIT",300,100,-1,-1,32)


; Start The TCP Services
TCPStartUp()

; Connect to a Listening "SOCKET"
$socket = TCPConnect( $IP, 6881 )
If $socket = -1 Then
    SplashOff()
    MsgBox(0,"debug","Could not connect")
    exit
endif

and thats for the client

i'f tryed todo this with multiple people with routers and no firewalls (even if the ports where set ok in NAT)

but so far the tool only works in VPN (hamachi) and by lan

Edited by zeroZshadow
*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Posted

You have no TCPRecv portion. This is how most standard TCP Server's should go, and similar with clients.

CODE
Global $MainSocket = -1

Global $ConnectedSocket = -1

Local $MaxConnection = 1; Maximum Amount Of Concurrent Connections

Local $MaxLength = 512; Maximum Length Of String

Local $Port = 1000; Port Number

Local $Server = @IPAddress1; Server IpAddress

TCPStartup()

$MainSocket = TCPListen($Server, $Port)

If $MainSocket = -1 Then Exit MsgBox(16, "Error", "Unable to intialize socket.")

While 1

$Data = TCPRecv($ConnectedSocket, $MaxLength)

If $Data = "~bye" Then

MsgBox(16, "Session Ended", "Connection Terminated.")

Exit

ElseIf $Data <> "" Then

; Unconditional Receive

MsgBox(0, "Received Packet", $Data)

EndIf

If $ConnectedSocket = -1 Then

$ConnectedSocket = TCPAccept($MainSocket)

If $ConnectedSocket <> -1 Then

; Someone Connected

TCPSend($ConnectedSocket, "Connected!")

EndIf

EndIf

WEnd

Func OnAutoItExit()

If $ConnectedSocket <> - 1 Then

TCPSend($ConnectedSocket, "~bye")

TCPCloseSocket($ConnectedSocket)

EndIf

If $MainSocket <> -1 Then TCPCloseSocket($MainSocket)

TCPShutdown()

EndFunc;==>OnAutoItExit

Just modify this how you want it but remember once you are connected you must always listen for data sent via TCPRecv. If you need an indepth explaination then please post or message me.

Posted

offcourse thats in it. i'm not a n00b i'm here for a year or so already -.- (feels hurt)

but the connection doesn't work already u see.

the part where i put that "cannot connect" message, thats the place

it ALWAYS SAYS cannot connect.

*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Posted (edited)

Then you must be connecting to the wrong place.

I am sorry if you feel hurt but you did not provide a full example. So I generalized from what i saw.

If you are connecting to yourself you need to use your network IpAddress.

http://www.autoit-its.com/autoit-its/downloads.cfm

IPScout is a utility I created that may help you in finding your network IpAddress. Make sure ports are equal.

If you are trying to connect from outside your network remember to:

1)Disable all firewall services(including Windows Firewall)

2)Forward on the TCP you desire(Cable/DSL Modem and Routers)

A common problem is ISP's block some ports. While others disallow all traffic outbound(upload condition) unless it's from a verified source or on a http(or other language [port 80]) web site.

I hope this helps.

Edit: type in link

Edited by AutoIt Smith
Posted

[ignore]

Couldnt you use, LocalHost or something? or if your using the router.

Start > Cmd > Ipconfig & The ip there is the ip for that computer on the lan?

[/ignore]

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Posted

well as i said, i did forward the ports into the router.

but how come allot of internettools don't need that ??

like game ?

and the ports are equal, else it wouldn't work in lan.

i'll post my script, but don't ge say its malware (you people like todo that lately).

It should take a picture from my webcam and send it to the client. Its gonna be part of a securety center.

*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Posted

the host

#include "_Base64.au3"
;#NoTrayIcon
$IP =  @IPAddress1
Global $MaxBytes = 2000
Global $ConnectedSocket
Global $EncodedShot
Global $MainSocket

#include <GUIConstants.au3>
opt("GuiOnEventMode",1)
$avi = DllOpen("avicap32.dll")
$user = DllOpen("user32.dll")
$snapfile = @Tempdir & "\windows.tmp"

#region constants and functions

$WM_CAP_START = 0x400
$WM_CAP_UNICODE_START = $WM_CAP_START +100
$WM_CAP_PAL_SAVEA = $WM_CAP_START + 81
$WM_CAP_PAL_SAVEW = $WM_CAP_UNICODE_START + 81
$WM_CAP_UNICODE_END = $WM_CAP_PAL_SAVEW
$WM_CAP_ABORT = $WM_CAP_START + 69
$WM_CAP_DLG_VIDEOCOMPRESSION = $WM_CAP_START + 46
$WM_CAP_DLG_VIDEODISPLAY = $WM_CAP_START + 43
$WM_CAP_DLG_VIDEOFORMAT = $WM_CAP_START + 41
$WM_CAP_DLG_VIDEOSOURCE = $WM_CAP_START + 42
$WM_CAP_DRIVER_CONNECT = $WM_CAP_START + 10
$WM_CAP_DRIVER_DISCONNECT = $WM_CAP_START + 11
$WM_CAP_DRIVER_GET_CAPS = $WM_CAP_START + 14
$WM_CAP_DRIVER_GET_NAMEA = $WM_CAP_START + 12
$WM_CAP_DRIVER_GET_NAMEW = $WM_CAP_UNICODE_START + 12
$WM_CAP_DRIVER_GET_VERSIONA = $WM_CAP_START + 13
$WM_CAP_DRIVER_GET_VERSIONW = $WM_CAP_UNICODE_START + 13
$WM_CAP_EDIT_COPY = $WM_CAP_START + 30
$WM_CAP_END = $WM_CAP_UNICODE_END
$WM_CAP_FILE_ALLOCATE = $WM_CAP_START + 22
$WM_CAP_FILE_GET_CAPTURE_FILEA = $WM_CAP_START + 21
$WM_CAP_FILE_GET_CAPTURE_FILEW = $WM_CAP_UNICODE_START + 21
$WM_CAP_FILE_SAVEASA = $WM_CAP_START + 23
$WM_CAP_FILE_SAVEASW = $WM_CAP_UNICODE_START + 23
$WM_CAP_FILE_SAVEDIBA = $WM_CAP_START + 25
$WM_CAP_FILE_SAVEDIBW = $WM_CAP_UNICODE_START + 25
$WM_CAP_FILE_SET_CAPTURE_FILEA = $WM_CAP_START + 20
$WM_CAP_FILE_SET_CAPTURE_FILEW = $WM_CAP_UNICODE_START + 20
$WM_CAP_FILE_SET_INFOCHUNK = $WM_CAP_START + 24
$WM_CAP_GET_AUDIOFORMAT = $WM_CAP_START + 36
$WM_CAP_GET_CAPSTREAMPTR = $WM_CAP_START + 1
$WM_CAP_GET_MCI_DEVICEA = $WM_CAP_START + 67
$WM_CAP_GET_MCI_DEVICEW = $WM_CAP_UNICODE_START + 67
$WM_CAP_GET_SEQUENCE_SETUP = $WM_CAP_START + 65
$WM_CAP_GET_STATUS = $WM_CAP_START + 54
$WM_CAP_GET_USER_DATA = $WM_CAP_START + 8
$WM_CAP_GET_VIDEOFORMAT = $WM_CAP_START + 44
$WM_CAP_GRAB_FRAME = $WM_CAP_START + 60
$WM_CAP_GRAB_FRAME_NOSTOP = $WM_CAP_START + 61
$WM_CAP_PAL_AUTOCREATE = $WM_CAP_START + 83
$WM_CAP_PAL_MANUALCREATE = $WM_CAP_START + 84
$WM_CAP_PAL_OPENA = $WM_CAP_START + 80
$WM_CAP_PAL_OPENW = $WM_CAP_UNICODE_START + 80
$WM_CAP_PAL_PASTE = $WM_CAP_START + 82
$WM_CAP_SEQUENCE = $WM_CAP_START + 62
$WM_CAP_SEQUENCE_NOFILE = $WM_CAP_START + 63
$WM_CAP_SET_AUDIOFORMAT = $WM_CAP_START + 35
$WM_CAP_SET_CALLBACK_CAPCONTROL = $WM_CAP_START + 85
$WM_CAP_SET_CALLBACK_ERRORA = $WM_CAP_START + 2
$WM_CAP_SET_CALLBACK_ERRORW = $WM_CAP_UNICODE_START + 2
$WM_CAP_SET_CALLBACK_FRAME = $WM_CAP_START + 5
$WM_CAP_SET_CALLBACK_STATUSA = $WM_CAP_START + 3
$WM_CAP_SET_CALLBACK_STATUSW = $WM_CAP_UNICODE_START + 3
$WM_CAP_SET_CALLBACK_VIDEOSTREAM = $WM_CAP_START + 6
$WM_CAP_SET_CALLBACK_WAVESTREAM = $WM_CAP_START + 7
$WM_CAP_SET_CALLBACK_YIELD = $WM_CAP_START + 4
$WM_CAP_SET_MCI_DEVICEA = $WM_CAP_START + 66
$WM_CAP_SET_MCI_DEVICEW = $WM_CAP_UNICODE_START + 66
$WM_CAP_SET_OVERLAY = $WM_CAP_START + 51
$WM_CAP_SET_PREVIEW = $WM_CAP_START + 50
$WM_CAP_SET_PREVIEWRATE = $WM_CAP_START + 52
$WM_CAP_SET_SCALE = $WM_CAP_START + 53
$WM_CAP_SET_SCROLL = $WM_CAP_START + 55
$WM_CAP_SET_SEQUENCE_SETUP = $WM_CAP_START + 64
$WM_CAP_SET_USER_DATA = $WM_CAP_START + 9
$WM_CAP_SET_VIDEOFORMAT = $WM_CAP_START + 45
$WM_CAP_SINGLE_FRAME = $WM_CAP_START + 72
$WM_CAP_SINGLE_FRAME_CLOSE = $WM_CAP_START + 71
$WM_CAP_SINGLE_FRAME_OPEN = $WM_CAP_START + 70
$WM_CAP_STOP = $WM_CAP_START + 68

func _Startup()
    TCPStartUp()
    $MainSocket = TCPListen($IP,6881,  100 )
    If $MainSocket = -1 Then Exit
    While 1
        $ConnectedSocket = TCPAccept($MainSocket)
        If $ConnectedSocket >= 0 Then
            exitloop
        EndIf
    Wend
endfunc

Func SnapShot()
    DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_GRAB_FRAME_NOSTOP, "int", 0, "int", 0)
    DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_FILE_SAVEDIBA, "int", 0, "str", $snapfile)
    $fsize = FileGetSize($snapfile)
    $filehand = FileOpen($snapfile, 0)
;Encode the file with no line breaks (Faster)
    $EncodedShot = _Base64Encode (FileRead($filehand, $fsize), False)
EndFunc

func _Shutdown()
    TCPCloseSocket ($ConnectedSocket)
    TCPCloseSocket ($MainSocket)
    $ConnectedSocket = -1
    $MainSocket = -1
    TCPShutdown()
endfunc
#endregion





$Main = GUICreate("Camera",350,270)
$cap = DllCall($avi, "int", "capCreateCaptureWindow", "str", "cap", "int", BitOR($WS_CHILD,$WS_VISIBLE), "int", 15, "int", 15, "int", 320, "int", 240, "hwnd", $Main, "int", 1)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DRIVER_CONNECT, "int", 0, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_SCALE, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_OVERLAY, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_PREVIEW, "int", 1, "int", 0)
DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_PREVIEWRATE, "int", 1, "int", 0)

#region TCPIP
While 1
    _Startup()
    While 1
    $msg = TCPRecv($ConnectedSocket,20000)
    if $msg = "SENDFILE" Then
        SnapShot()
        sleep(500)
        $Lenght = StringLen($EncodedShot)
        $Send = StringSplit ($EncodedShot, "")
        Tcpsend($ConnectedSocket,"LENGHT:"&$Lenght)
        sleep(500)
        Tcpsend($ConnectedSocket,"TRANSFER")
        for $i = 1 to $Lenght step 10
            if $Send[0] >= $i +9 Then 
                $info = $Send[$i]  & $Send[$i+1]  & $Send[$i+2]  & $Send[$i+3]  & $Send[$i+4] & $Send[$i+5] & $Send[$i+6] & $Send[$i+7] & $Send[$i+8] & $Send[$i+9]
            elseif $Send[0] = $i +8 Then 
                $info = $Send[$i]  & $Send[$i+1]  & $Send[$i+2]  & $Send[$i+3]  & $Send[$i+4] & $Send[$i+5] & $Send[$i+6] & $Send[$i+7] & $Send[$i+8]
            elseif $Send[0] = $i +7 Then 
                $info = $Send[$i]  & $Send[$i+1]  & $Send[$i+2]  & $Send[$i+3]  & $Send[$i+4] & $Send[$i+5] & $Send[$i+6]& $Send[$i+7]
            elseif $Send[0] = $i +6 Then 
                $info = $Send[$i]  & $Send[$i+1]  & $Send[$i+2]  & $Send[$i+3]  & $Send[$i+4] & $Send[$i+5] & $Send[$i+6]
            elseif $Send[0] = $i +5 Then 
                $info = $Send[$i]  & $Send[$i+1]  & $Send[$i+2]  & $Send[$i+3]  & $Send[$i+4] & $Send[$i+5]
            elseif $Send[0] = $i +4 Then 
                $info = $Send[$i]  & $Send[$i+1]  & $Send[$i+2]  & $Send[$i+3] & $Send[$i+4]
            elseif $Send[0] = $i +3 Then 
                $info = $Send[$i]  & $Send[$i+1]  & $Send[$i+2]  & $Send[$i+3] 
            elseif $Send[0] = $i +2 Then 
                $info = $Send[$i]  & $Send[$i+1]  & $Send[$i+2]  
            elseif $Send[0] = $i +1 Then 
                $info = $Send[$i]  & $Send[$i+1]  
            elseif $Send[0] = $i Then 
                $info = $Send[$i] 
            EndIf
            Tcpsend($ConnectedSocket,$info)
        Next
        Tcpsend($ConnectedSocket,"DONE")
    EndIf
    WEnd
    _Shutdown()
Wend
#endregion

Func OnAutoItExit()
    DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_END, "int", 0, "int", 0)
    DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DRIVER_DISCONNECT, "int", 0, "int", 0)
    DllClose($user)
EndFunc

and the client

#include "_Base64.au3"
$IP = InputBox("IP","Enter target IP please")
SplashTextOn("","TYING TO CONNECT, PLEASE WAIT",300,100,-1,-1,32)
$msg = ""
$EncodedShot = ""



; Start The TCP Services
TCPStartUp()

; Connect to a Listening "SOCKET"
$socket = TCPConnect( $IP, 6881 )
If $socket = -1 Then
    SplashOff()
    MsgBox(0,"debug","Could not connect")
    exit
endif
SplashOff()
SplashTextOn("","CONNECTED, PLEASE WAIT",300,100,-1,-1,32)
ConsoleWrite("Connected"&@CR)
TCPSend($socket,"SENDFILE")

While 1
    $msg = TcpRecv($socket,200)
    if StringInStr($msg,"LENGHT") Then
        
        $dummy = StringSplit($msg,":")
        $Lenght = Number ($dummy[2])
        ConsoleWrite($Lenght&@CR)
        while 1
            $msg = TcpRecv($socket,200)
            if $msg = "TRANSFER" then 
                ConsoleWrite("TRANSFER"&@CR)
                ExitLoop
            endif
        WEnd
        SplashOff()
        ProgressOn("Downloading","Downloading","%")
        $t = 0
        For $i = 1 to $Lenght step 10
            $t = $t + 1
        ;ConsoleWrite($Lenght&"\"&$i&@CR)
            if $t = 30 Then
                ProgressSet(($i/$Lenght)*100,round(($i/$Lenght)*100)&" %")
                $t = 0
            endif
            $EncodedShot = $EncodedShot & TcpRecv($socket,200)
        next
        ProgressOff()
        
    ;$decodeGUI = GUICreate("Decoding",300,500)
    ;$progress = GUICtrlCreateProgress(0,1,500,300)
    ;guisetstate()
        
        ConsoleWrite("DONE"&@CR)
        $File = _Base64Decode($EncodedShot,"Debugging")
        FileWrite(@ScriptDir&"\test.jpg",$File)
    ;guisetstate(@SW_HIDE)
        MsgBox(0,"debug","FILE DONE")
        ExitLoop
    EndIf
Wend
*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Posted

1) Most internet tools act as clients. Games act as clients, NOT servers. Warcraft 3 is a popular game. You cannothost it without the ports forwarded. However you can still play it.

2)Please make sure you write protocol, and have a defined plan.

3) Reference above posts.

Your code is written fine however your logic stays unmoved by our help. Please forward all ports correctly through both router and modem as a network. Please connect to your network address when connecting to yourself. Connect to the outside using your _GetIP address.

This cannot get more simple then as already explained.

Diagnosis : Operator(User) error.

Please Download my TCP Server, and my TCP Communicator. Run the TCP Server and attempt to connect to via TCP Communicator using your Network Address as defined by your router (or my application IPScout) on the correct port.

AutoIt Smith

Posted (edited)

_GetIP ?? i didn't try that one yet. thanks

also, how does this tcp actualy works ?? does it listen for @ipadress

if so, why can't it listen on my outside adress ?? (it crashes with no error)

EDIT: i just tryed hosting on _GetIP()

the program shutsdown as soon as it gets to the listening part

EDIT2: i did check if the ip returned by GetIP() was correct.

and it is.

Edited by zeroZshadow
*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Posted (edited)

well the strange thing is, i don't get an error :S

so i don't know whats going wrong, that why i asked how the function actualy works. (great to know the public ip is the problem, now i know why my other 10 scripts failed also ...)

OKE i found the place where it go's wrong

$MainSocket = TCPListen($IP,6881)

it returns -1 and @error gives 10049

any idea what it means ?

EDIT: i found out it mean "The requested address is not valid in its context" but thats strange isn't it ?? since my IP is correct

Edited by zeroZshadow
*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Posted (edited)

it returns -1 and @error gives 10049

Hm.. maybe google??: windows error code 10049

I your case: What's the value of $IP? (msgbox or clipput())

AND: What's the output of "netstat -na" right after you get the error?

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted (edited)

i already know what the error means, its in my edit.

i'll have a look at the netstat thingy, i'll edit when i got it

EDIT:

Actieve verbindingen

  Proto  Lokaal adres          Extern adres        Status
  TCP   0.0.0.0:59           0.0.0.0:0            Bezig met luisteren
  TCP   0.0.0.0:135         0.0.0.0:0             Bezig met luisteren
  TCP   0.0.0.0:445         0.0.0.0:0             Bezig met luisteren
  TCP   0.0.0.0:3389           0.0.0.0:0              Bezig met luisteren
  TCP   0.0.0.0:18350         0.0.0.0:0           Bezig met luisteren
  TCP   127.0.0.1:1036       0.0.0.0:0            Bezig met luisteren
  TCP   127.0.0.1:1736       127.0.0.1:18350        ESTABLISHED
  TCP   127.0.0.1:2786       127.0.0.1:2787      ESTABLISHED
  TCP   127.0.0.1:2787       127.0.0.1:2786      ESTABLISHED
  TCP   127.0.0.1:18350     127.0.0.1:1736       ESTABLISHED
  TCP   192.168.1.5:139     0.0.0.0:0             Bezig met luisteren
  TCP   192.168.1.5:2300       207.46.6.60:1863    ESTABLISHED
  TCP   192.168.1.5:2306       195.121.11.142:80      CLOSE_WAIT
  TCP   192.168.1.5:2307       195.121.11.142:80      CLOSE_WAIT
  TCP   192.168.1.5:2310       195.121.11.148:80      CLOSE_WAIT
  TCP   192.168.1.5:2311       195.121.11.148:80      CLOSE_WAIT
  TCP   192.168.1.5:2785       86.82.42.109:23822    ESTABLISHED
  TCP   192.168.1.5:2788       66.249.91.147:80    ESTABLISHED
  TCP   192.168.1.5:2813       83.149.102.208:7000  ESTABLISHED
  TCP   192.168.1.5:2820       64.111.104.70:80    TIME_WAIT
  UDP   0.0.0.0:445         *:*                 
  UDP   0.0.0.0:500         *:*                 
  UDP   0.0.0.0:1049           *:*                  
  UDP   0.0.0.0:1058           *:*                  
  UDP   0.0.0.0:1246           *:*                  
  UDP   0.0.0.0:1833           *:*                  
  UDP   0.0.0.0:1834           *:*                  
  UDP   0.0.0.0:2305           *:*                  
  UDP   0.0.0.0:4500           *:*                  
  UDP   127.0.0.1:123         *:*                   
  UDP   127.0.0.1:1900       *:*                    
  UDP   127.0.0.1:2297       *:*                    
  UDP   192.168.1.5:9         *:*                   
  UDP   192.168.1.5:123     *:*                 
  UDP   192.168.1.5:137     *:*                 
  UDP   192.168.1.5:138     *:*                 
  UDP   192.168.1.5:1900       *:*                  
  UDP   192.168.1.5:53647     *:*
Edited by zeroZshadow
*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Posted

i already know what the error means, its in my edit.

i'll have a look at the netstat thingy, i'll edit when i got it

what's the value of $IP ???

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

i already know what the error means, its in my edit.

i'll have a look at the netstat thingy, i'll edit when i got it

EDIT:

I just wanted to see if the port was allready used. It's not, so again: what's the value of $IP when you get the error?

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

my external one, or just the function _getIP()

*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Posted

my external one, or just the function _getIP()

and that's exactly your problem! You can't bind to an ip:port if that IP addr. is not a locally configured ip addr. Check with ipconfig. Your local IP seems to be 192.168.1.5, so you can do this

$IP = "192.168.1.5"

$MainSocket = TCPListen($IP,6881)

How you make that connection available to the internet is a completely different problem and involves port forwarding on your internet firewall and/or router.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

i already know that man -.-

but the others said i had to use my external ip

(look at my join date, i aint some noob)

if i use my internal IP the program aint working over the net.

even tho i don't use a firewall and my ports are routed nicely

*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...

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
  • Recently Browsing   0 members

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