Slym Posted January 5, 2012 Share Posted January 5, 2012 Hi there,I've made a little tool to easily "ping" a TCP port called PingPort but I have a bug or I'm doing something wrong.You can download it (sources are included) using this link.An easy way to understand my issue is to run pingport google.com:80If you are connected then disconnect the cable or WiFi while pinging it will continue pinging successfully !?!I don't understand why TCPConnect does not fail. Am I missing something here ?Here is a piece of code :TCPCloseSocket($socket) $timer = TimerInit() $socket = TCPConnect($server_ip, $protocol_port) If $socket = -1 OR @error Then ConsoleWrite($server_name & " is DOWN on port " & $protocol_port & GetErrorDescription(@error) & @CRLF) Else ConsoleWrite($server_name & " is UP on port " & $protocol_port & " - latency : " & HumanTime(TimerDiff($timer)) & @CRLF) EndIf Sleep(1000) WEnd TCPCloseSocket($socket)Thank you for your help and time. --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] --------------------- Link to comment Share on other sites More sharing options...
guinness Posted January 5, 2012 Share Posted January 5, 2012 What happens if you add TCPStartup? UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Slym Posted January 5, 2012 Author Share Posted January 5, 2012 Same thing. TCPStartup is before in my code. I even try to put a shutdown/startup before any new call to TCPOpen. --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] --------------------- Link to comment Share on other sites More sharing options...
Slym Posted January 6, 2012 Author Share Posted January 6, 2012 (edited) Is someone able to reproduce this bug or is it just on my computer ? Here is a short code to reproduce it easily : Just run it and disconnect your cable/wifi. $protocol_port = 80 $server_ip = "209.85.229.104" HotKeySet("{ESC}", "Terminate") While 1 $timer = TimerInit() TCPStartup() $socket = TCPConnect($server_ip, $protocol_port) ConsoleWrite("TCPConnect socket=" & $socket & " - @error=" & @error & @CRLF) If $socket = -1 Or @error Then ConsoleWrite($server_ip & " is DOWN on port " & $protocol_port & @CRLF) Else TCPCloseSocket($socket) ConsoleWrite($server_ip & " is UP on port " & $protocol_port & " - latency : " & Round(TimerDiff($timer), 3) & "ms" & @CRLF) EndIf TCPShutdown() Sleep(1000) WEnd Exit Func Terminate() TCPShutdown() Exit EndFunc ;==>Terminate Edited January 6, 2012 by Slym --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] --------------------- Link to comment Share on other sites More sharing options...
guinness Posted January 6, 2012 Share Posted January 6, 2012 (edited) The code in your first post (linking to the program) isn't what I would call a good reproducer and neither is the small snippet that doesn't work. If you can consolidate this into a simple reproducer then I or someone else can test without having to debug a whole program. Edited January 6, 2012 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Slym Posted January 6, 2012 Author Share Posted January 6, 2012 You are too quick. Now you should have a good reproducer in my latest post :-D --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] --------------------- Link to comment Share on other sites More sharing options...
guinness Posted January 6, 2012 Share Posted January 6, 2012 That's better. When I disconnected it stopped right away so I'm not following what your problem is, does the output help you? Output: TCPConnect socket=396 - @error=0 209.85.229.104 is UP on port 80 - latency : 51.88ms TCPConnect socket=384 - @error=0 209.85.229.104 is UP on port 80 - latency : 58.466ms TCPConnect socket=380 - @error=0 209.85.229.104 is UP on port 80 - latency : 51.53ms TCPConnect socket=376 - @error=0 209.85.229.104 is UP on port 80 - latency : 52.327ms TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 TCPConnect socket=-1 - @error=10065 209.85.229.104 is DOWN on port 80 UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Slym Posted January 6, 2012 Author Share Posted January 6, 2012 Okay so it looks like it's related to my PC. It's like something is proxying requests because latency are also always very low (millisec). When I ping the same address, real latencies are quite high (1000ms or so). Do you have any idea of what could cause this behaviour ? --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] --------------------- Link to comment Share on other sites More sharing options...
Slym Posted January 6, 2012 Author Share Posted January 6, 2012 I found the culprit. It was BinTube Download Accelerator. Now I have almost the same behaviour as yours. Latencies are still bullshit though. --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] --------------------- Link to comment Share on other sites More sharing options...
guinness Posted January 6, 2012 Share Posted January 6, 2012 Latencies are still bullsh** though.It could be your connection? This is something you would have to test yourself, perhaps speed-test.net? Also glad you solved the problem. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Slym Posted January 6, 2012 Author Share Posted January 6, 2012 Latencies are actually very low comparing to the real ones. My internet line is crappy and I have a few hundreds of msec of real latency. This piece of code is reporting milliseconds latencies. It's like TCPConnect does not even wait for the socket to be really opened by the remote server. --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] --------------------- Link to comment Share on other sites More sharing options...
TheGeneral Posted January 8, 2012 Share Posted January 8, 2012 (edited) From Prompt:Pinging 209.85.229.104 with 32 bytes of data:Reply from 209.85.229.104: bytes=32 time=282ms TTL=46Reply from 209.85.229.104: bytes=32 time=284ms TTL=45Reply from 209.85.229.104: bytes=32 time=275ms TTL=46Reply from 209.85.229.104: bytes=32 time=281ms TTL=46From your program:TCPConnect socket=444 - @error=0209.85.229.104 is UP on port 80 - latency : 273.05msTCPConnect socket=424 - @error=0209.85.229.104 is UP on port 80 - latency : 275.238msTCPConnect socket=416 - @error=0209.85.229.104 is UP on port 80 - latency : 268.748msTCPConnect socket=412 - @error=0209.85.229.104 is UP on port 80 - latency : 278.486msTCPConnect socket=432 - @error=0209.85.229.104 is UP on port 80 - latency : 284.74msTCPConnect socket=444 - @error=0209.85.229.104 is UP on port 80 - latency : 284.711msTCPConnect socket=424 - @error=0209.85.229.104 is UP on port 80 - latency : 275.183msTCPConnect socket=416 - @error=0209.85.229.104 is UP on port 80 - latency : 301.265msTCPConnect socket=412 - @error=0209.85.229.104 is UP on port 80 - latency : 272.483msTCPConnect socket=432 - @error=0209.85.229.104 is UP on port 80 - latency : 274.119msTCPConnect socket=444 - @error=0209.85.229.104 is UP on port 80 - latency : 271.295msIt seems pretty reliable for me. Edited January 8, 2012 by TheGeneral Link to comment Share on other sites More sharing options...
Slym Posted January 8, 2012 Author Share Posted January 8, 2012 I tried from home on the same PC and it's working as expected. So it looks like if you have a transparent proxy this will not work (it will display latencies between your PC and the proxy and will never fail). This is a bad news because this tool is intended for "professional use" and I need it to be reliable. --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] --------------------- Link to comment Share on other sites More sharing options...
TheGeneral Posted January 8, 2012 Share Posted January 8, 2012 (edited) Googling "TCP port ping" I got that:http://code.google.com/p/paping/I analyzed the TCP packets sent and they are SYN Flags. I don't know how to send this flags with TCPSend.So, you have two options: use this program or finding a way to simulate its behavior with AutoIt.I compared with TCPConnect and the behavior is the same. Check that:Paping:1 0.000000 192.168.1.33 200.147.67.142 TCP 66 58007 > http [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=4 SACK_PERM=1 2 0.038109 200.147.67.142 192.168.1.33 TCP 66 http > 58007 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1452 SACK_PERM=1 WS=128 3 0.038182 192.168.1.33 200.147.67.142 TCP 54 58007 > http [ACK] Seq=1 Ack=1 Win=66792 Len=0 4 0.038322 192.168.1.33 200.147.67.142 TCP 54 58007 > http [FIN, ACK] Seq=1 Ack=1 Win=66792 Len=0 5 0.076151 200.147.67.142 192.168.1.33 TCP 60 http > 58007 [FIN, ACK] Seq=1 Ack=2 Win=5888 Len=0 6 0.076207 192.168.1.33 200.147.67.142 TCP 54 58007 > http [ACK] Seq=2 Ack=2 Win=66792 Len=0TCPConnect:1 0.000000 192.168.1.33 209.85.229.104 TCP 66 58018 > http [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=4 SACK_PERM=1 2 0.275632 209.85.229.104 192.168.1.33 TCP 66 http > 58018 [SYN, ACK] Seq=0 Ack=1 Win=14300 Len=0 MSS=1430 SACK_PERM=1 WS=64 3 0.275702 192.168.1.33 209.85.229.104 TCP 54 58018 > http [ACK] Seq=1 Ack=1 Win=65780 Len=0TCPCloseSocket:1 0.719827 192.168.1.33 209.85.229.104 TCP 54 58021 > http [FIN, ACK] Seq=1 Ack=1 Win=65780 Len=0 2 0.986404 209.85.229.104 192.168.1.33 TCP 60 http > 58021 [FIN, ACK] Seq=1 Ack=2 Win=14336 Len=0 3 0.986451 192.168.1.33 209.85.229.104 TCP 54 58021 > http [ACK] Seq=2 Ack=2 Win=65780 Len=0What Paping does is the same you do. I just have a question, does Paping work with a transparent proxy? Edited January 8, 2012 by TheGeneral Link to comment Share on other sites More sharing options...
Slym Posted February 14, 2012 Author Share Posted February 14, 2012 I did not know paping. I will try it as soon as I can to see if it's working with a proxy. Thank you for your answer. --------------------- [font="Franklin Gothic Medium"]LinuxLive USB Creator[/font], [size="3"]The only Linux Live USB creator with easy integrated virtualization (made with AutoIT)[/size] --------------------- Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now