Jump to content
Sign in to follow this  
Skitty

IP info

Recommended Posts

Skitty

I'm making an app to be used for server access inspection, I have a list of IP addresses that are checked and I want to know if anyone here knows of an easy way to find info on an ip.

Say I have IP address 255.255.255.255, I check to see if its pingable, if so, go on to check if the IP has an accessible web service.

Any one have any protips I should know about?


Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites
Klovis

MsgBox(0,"IP",@IPAddress1) Will give you your IP address if that is your question.

I don't quite understand getting info on your IP address could you please expand that statement?

Share this post


Link to post
Share on other sites
trancexx

Try _TCPIpToName.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
Skitty

MsgBox(0,"IP",@IPAddress1) Will give you your IP address if that is your question.

I don't quite understand getting info on your IP address could you please expand that statement?

Thanks, but that's not exactly what my inquiry pertained to, say I have the IP address of Google.com, I need a solution for discovering if that IP hosts a web site and what that web sites name would be (E.g. Google.com), problem is, some IP's may host a multitude of services reachable by various domain names, In short, I need to discover if a particular IP address hosts any web services.

And fyi, a more reliable way to find your own IP would be to use _GetIP() or a more updated version of the same-

Func _GetIP2()
    Local $ip, $t_ip, $bRead, $sRead, $sReturn
    If InetGet("http://checkip.dyndns.org/?rnd1=" & Random(1, 65536) & "&rnd2=" & Random(1, 65536), @TempDir & "\~ip.tmp") Then
        $ip = FileRead(@TempDir & "\~ip.tmp", FileGetSize(@TempDir & "\~ip.tmp"))
        FileDelete(@TempDir & "\~ip.tmp")
        $ip = StringTrimLeft($ip, StringInStr($ip, ":") + 1)
        $ip = StringTrimRight($ip, StringLen($ip) - StringInStr($ip, "/") + 2)
        $t_ip = StringSplit($ip, '.')
        If $t_ip[0] = 4 And StringIsDigit($t_ip[1]) And StringIsDigit($t_ip[2]) And StringIsDigit($t_ip[3]) And StringIsDigit($t_ip[4]) Then
            Return $ip
        EndIf
    EndIf
    $bRead = InetRead("http://api.hostip.info/?ip=")
    $sRead = BinaryToString($bRead)
    $sReturn = StringRegExp($sRead, "(.*?)", 3)
    If Not @error Then Return $sReturn[0]
    $bRead = InetRead("http://www.checkingtools.com/ip_check")
    $sRead = BinaryToString($bRead)
    $sReturn = StringRegExp($sRead, '(?s)(?i)[url="/\?ip=(.*?)"]', 3)
    If Not @error Then Return $sReturn[0]
    Return SetError(1, 0, -1)
EndFunc   ;==>_GetIP

Try _TCPIpToName.

I didn't know about that function, thanks Trancexx, that's pretty close to what I need although it didn't hit the nail on the head.

Edit: well, so far my best solution is using inetget and looking for the <title></title> tags.

Edited by THAT1ANONYMOUSEDUDE

Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites
guinness

Look at _GetIP() in my signature, there are other sites to obtain more details about an IP address.


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 parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
Skitty

Look at _GetIP() in my signature, there are other sites to obtain more details about an IP address.

Why thank you, your sig contains lots of interesting information.

This is the best I've came up with using an internet service to do the work for me, but I can't find anything in their usage terms that say I cant do this so this is what I'll use from now on.

$Info = "None"
$IP = "69.147.76.15"
$bRead = InetRead("http://whois.arin.net/rest/nets;q="&$IP)
$sRead = BinaryToString($bRead)
$sReturn = StringRegExp($sRead, 'name="(.*?)"', 3)
If IsArray($sReturn) Then $Info = $sReturn[0]
MsgBox(0,"info",$Info)

This is kind of what I needed.

Correction, this is exactly what I needed, thank you guinness, all these _GetIP() functions really do help.

Edit: I was doing something wrong with trancexx's method, I see not that _TCPIpToName is also pretty much what I needed.

Edited by THAT1ANONYMOUSEDUDE

Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

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  

×