Sign in to follow this  
Followers 0
tamir

ip of user

33 posts in this topic

i was searching for a way to get the user ip, but i only found @IPAddress1~4 and i think that it gets the ip of the hosting pc.

so how do i get the ip of the user that activate the script?

Share this post


Link to post
Share on other sites

What you are wanting is everytime your script runs to get their public IP? Is this correct?

If that is the case check out the current support topic for sending a silent email. If not let me know.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

i'll look in the other topic, but why i see in all the topics a tree with all replys instead of all replys with their full content etc. ?

Share this post


Link to post
Share on other sites

Not sure... you must have your forum setup different than the default. Odd. That would be a Jon question.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Javascript, Php, or some otherweird Os Bug??? JON HELP!!(I don't see it but w/e, they should make a forum bug forum, lol. As it turns out when you go to search or ANYWHERE and press a bold button the button turns to non bold. Weird)

Share this post


Link to post
Share on other sites

hmm i looked in the silent email thread but couldn't find something about ip :/ also all that flams kinda confused me...

and i don't know if what u said was what i meant so i'll tell u exactly y i need it:

i have a program (of autoit) on my pc that others can use through PHP script and i want that everytime a user use it it'll write a log.

i managed to do it, and it writes the date & time in the log but i want it to write the ip of the user too...

Share this post


Link to post
Share on other sites

They download the script to their computer yes? Or they just run it using your PHP? One way you can have PHP get the IP and the other you can have AutoIt.

I am sorry about that thread. That isnt usual, right now there have been alot of extra stuff going on around here that is quite immature in my opinion. I was just trying to show you where I put the BMail thread.

BMail is a command line program that sends email using a specified smtp email server.

The IP thing I was going to address next. I will show you the function/possible UDF I would use.

Func _GetIP()
    Local $ip
    If InetGet("http://www.whatismyip.com", @TempDir & "\~ip.tmp") Then
        $ip = FileRead(@TempDir & "\~ip.tmp", FileGetSize(@TempDir & "\~ip.tmp"))
        FileDelete(@TempDir & "\~ip.tmp")
        $ip = StringTrimLeft($ip, StringInStr($ip, "<TITLE>Your ip is ") + 17)
        $ip = StringLeft($ip, StringInStr($ip, " WhatIsMyIP.com</TITLE>") - 1)    
        Return $ip
    Else
        SetError(1)
        Return -1
    EndIf
EndFunc;Function End >> _GetIP()

There ya go. Maybe I should see if they want to include that in the next set of AutoIt UDF's.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

thanks! and i think they should add it...

Share this post


Link to post
Share on other sites

thanks! and i think they should add it...

<{POST_SNAPBACK}>

I just submitted it in the proper format, I hope they do. I had to ask how to do it when I first got into AutoIt.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

I just submitted it in the proper format, I hope they do. I had to ask how to do it when I first got into AutoIt.

JS

<{POST_SNAPBACK}>

Hi i use this exampel from his forum :idiot: It is very Nice test it i hope you like it))

;===============================================================================
; ----------------------------------------------------------------------------
; Set up our defaults
; ----------------------------------------------------------------------------
;AutoItSetOption("MustDeclareVars", 1)
;AutoItSetOption("MouseCoordMode", 0)
;AutoItSetOption("PixelCoordMode", 0)
;AutoItSetOption("RunErrorsFatal", 1)
;AutoItSetOption("TrayIconDebug", 1)
;AutoItSetOption("WinTitleMatchMode", 4)
; ----------------------------------------------------------------------------
; Script Start
; ----------------------------------------------------------------------------

#include <GuiConstants.au3>
#include <File.au3>

Ask()

Func Ask()
GUICreate("DirtyBanditos IP Config 1.0",400,500)
Opt("GUICoordMode", 1)
GUISetFont(12, 800,4,"Arial")
GUICtrlCreateLabel ("DirtyBanditos IP Config 1.0  Options",  25, 50, 400)
GUISetFont(10, 800,0,"Arial")
GUICtrlCreateLabel ("Display",  160, 70, 200)
GUICtrlCreateLabel ("Update",  162, 140, 200)
GUISetFont(9,400,0,"")

$Sel1 = GUICtrlCreateRadio("Simple IP Info", 40, 100, 120, 20)
GUICtrlSetState(-1,$GUI_CHECKED)
$Sel2 = GUICtrlCreateRadio("All IP Info", 250, 100, 120, 20)
$Sel3 = GUICtrlCreateRadio("Renew IP", 40, 170, 120, 20)
$Sel4 = GUICtrlCreateRadio("Release IP", 250, 170, 120, 20)
$Sel5 = GUICtrlCreateRadio("Flush DNS", 40, 200, 120, 20)
$Sel6 = GUICtrlCreateRadio("Re-Register IP/DNS", 250, 200, 120, 20)
$ok = GUICtrlCreateButton("OK", 100, 400, 80)
$Cancel = GUICtrlCreateButton("Cancel/Exit", 200,400,80)
GUISetState()
; Run the GUI until the dialog is closed
While 1
 $msg = GUIGetMsg()
 Select
    Case $msg = -3
       Exit
    Case $msg = $ok
       ExitLoop
    Case $msg = $Cancel
       Exit
 EndSelect
Wend

If GUICtrlRead($Sel1) = 1 Then $Sel = ""
If GUICtrlRead($Sel2) = 1 Then $Sel = "/ALL"
If GUICtrlRead($Sel3) = 1 Then $Sel = "/RENEW"
If GUICtrlRead($Sel4) = 1 Then $Sel = "/RELEASE"
If GUICtrlRead($Sel5) = 1 Then $Sel = "/FLUSHDNS"
If GUICtrlRead($Sel6) = 1 Then $Sel = "/REREGISTERDNS"

GuiDelete()

GetInfo($Sel)
Ask()
EndFunc

Func GetInfo($Sel)
Dim $temp, $arr
;RunWait(@ComSpec & " /c " & "IPCONFIG.EXE /all > IPINFO.TXT", @MyDocumentsDir, @SW_HIDE)
RunWait(@ComSpec & " /c " & "IPCONFIG.EXE " & $Sel & " > " & "IPINFO.TXT", @MyDocumentsDir, @SW_HIDE)
_FileReadToArray(@MyDocumentsDir & "\IPINFO.TXT", $temp )

For $n = 1 to $temp[0]

  $arr = $arr & StringStripWS($temp[$n],4)

Next

MsgBox(0, "IP Configuration Information", "Logged User:" & @UserName & @LF & $arr & @LF & @LF & @LF)
RunWait(@ComSpec & " /c " & "DEL.EXE IPINFO.TXT", @MyDocumentsDir, @SW_HIDE)
EndFunc
Edited by DirtyBanditos

Share this post


Link to post
Share on other sites

Hi i  use this exampel from his forum :idiot: It is very Nice test it i hope you like it))

<{POST_SNAPBACK}>

Looks good. I like the GUI part of it. That is still something I have yet to get into fully. The only problem with that that I can see is that it doesnt allow you to get the public IP address. (Not that I could see with IPCONFIG.exe). I like the /all function I had forgotten that was avail with that tool, but it needs to grab the current public IP Address which is what the UDF does.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

There are many downsides to a program that will find a person's IP adress. Firstly, if it is going to be used for anything malicious or "b14ck" then a proxy will do you no good. First thing is to get rid of nasty proxies. After that it's pretty much all game. If you can find a way to incorporate a proxy scanner in with your script without a 3rd party program let me know.


-I am the giver of life and the bringer of death.

Share this post


Link to post
Share on other sites

Looks good. I like the GUI part of it. That is still something I have yet to get into fully. The only problem with that that I can see is that it doesnt allow you to get the public IP address. (Not that I could see with IPCONFIG.exe). I like the /all function I had forgotten that was avail with that tool, but it needs to grab the current public IP Address which is what the UDF does.

JS

<{POST_SNAPBACK}>

Hi js :D Thats is my prob i use on my wlan wis many ohters Pc but i can not sea the real ip wat me the router tell (server) but,i have no idea for adde this future :idiot:

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

They download the script to their computer yes? Or they just run it using your PHP? One way you can have PHP get the IP and the other you can have AutoIt.

I am sorry about that thread. That isnt usual, right now there have been alot of extra stuff going on around here that is quite immature in my opinion. I was just trying to show you where I put the BMail thread.

BMail is a command line program that sends email using a specified smtp email server.

The IP thing I was going to address next. I will show you the function/possible UDF I would use.

CODE

Func _GetIP()

    Local $ip

    If InetGet("http://www.whatismyip.com", @TempDir & "\~ip.tmp") Then

        $ip = FileRead(@TempDir & "\~ip.tmp", FileGetSize(@TempDir & "\~ip.tmp"))

        FileDelete(@TempDir & "\~ip.tmp")

        $ip = StringTrimLeft($ip, StringInStr($ip, "<TITLE>Your ip is ") + 17)

        $ip = StringLeft($ip, StringInStr($ip, " WhatIsMyIP.com</TITLE>") - 1)     

        Return $ip

    Else

        SetError(1)

        Return -1

    EndIf

EndFunc;Function End >> _GetIP()

There ya go. Maybe I should see if they want to include that in the next set of AutoIt UDF's.

JS

<{POST_SNAPBACK}>

Ok, the only thing I can see that would crater this thing into the ground would be the lack of internet access. If this program he's using is working on a private LAN intranet where the users are not allowed to access the WAN internet, the locating of the IP by any http:// server would be a little difficult. I've run into this problem....for approximately 2 years, certian users were restricted to LAN only sites by a Novell firewall (myself included). Any HTTP:// calls outside of the local network domain were blocked with a 403 FORBIDDEN error. Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

Hi js  :D Thats is my prob i use on my  wlan wis many ohters Pc but i can not sea the real ip wat me the router tell (server) but,i have no idea for adde this future :idiot:

<{POST_SNAPBACK}>

The only way I can see to add that feature is to do the suggested. I have done some research on this myself. Only external computers/servers can see your public ip. You could also log into your router and parse that page, but it is easier just to use the one that I have above. I am pretty sure it will be included in the UDF's section of the next release. JdeB was speaking with me about it.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Ok, the only thing I can see that would crater this thing into the ground would be the lack of internet access.  If this program he's using is working on a private LAN intranet where the users are not allowed to access the WAN internet, the locating of the IP by any http:// server would be a little difficult.  I've run into this problem....for approximately 2 years, certian users were restricted to LAN only sites by a Novell firewall (myself included).  Any HTTP:// calls outside of the local network domain were blocked with a 403 FORBIDDEN error.

<{POST_SNAPBACK}>

That being the case the only way I could see to get the public IP would be to connect to the router, but I doubt that would be possible in that situation.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

That being the case the only way I could see to get the public IP would be to connect to the router, but I doubt that would be possible in that situation.

JS

<{POST_SNAPBACK}>

HI JsThePatriot Thx for your info :idiot:

I hope for fast include it :D

Edited by DirtyBanditos

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

Func _GetIP()
    Local $ip
    If InetGet("http://www.whatismyip.org", "ip.tmp") Then
        $ip = FileReadLine("ip.tmp")
        FileDelete("ip.tmp")
        Return $ip
    Else
        SetError(1)
        Return -1
    EndIf
EndFunc

cleaner, faster by 100-200 ms.

Edited by ryeguy

Share this post


Link to post
Share on other sites

Func _GetIP()
    Local $ip
    If InetGet("http://www.whatismyip.org", "ip.tmp") Then
        $ip = FileReadLine("ip.tmp")
        FileDelete("ip.tmp")
        Return $ip
    Else
        SetError(1)
        Return -1
    EndIf
EndFunc

cleaner, faster by 100-200 ms.

<{POST_SNAPBACK}>

:lol: H ryeguy your script wörks not for me i use wlan and he tell me not my real ip((

But i still i hope adde the future for it)) :idiot:

I go to Bed cue all :D

Share this post


Link to post
Share on other sites

:lol: H ryeguy your script wörks not for me i use wlan and he tell me not my real ip((

But i still i hope  adde the future for it)) :idiot:

I go to Bed cue all :D

<{POST_SNAPBACK}>

Did my script work for you? I dont quite know how ryeguy's script would work. I have already submitted the one I had to JdeB to put into the new releases.

Who is the 'he' that told you its not your real IP? Also do you use proxies? (that would hide the real ip).

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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