How to find the localhost of a pc?
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

How to find the localhost of a pc?

Started by Dessamator, 20 April, 2005, 20:43:37

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dessamator

the question is simple how to find the localhost of a pc, it changes depending on ur settings, and the firewall etc etc, so whats the best method to do so?

the ip, specifically  !!
Ignorance is Bliss.

kepp

either run cmd.exe and type ipconfig or look in router for ip's shared amongst network computers
Guarding    

jiten

QuoteOriginally posted by kepp
either run cmd.exe and type ipconfig or look in router for ip's shared amongst network computers
I think he meant by Lua scripting ;)

kepp

os.execute("ipconfig > filename.txt")

then read it :)
I think that will work
Guarding    

uffetjur

why don't try 127.0.0.1    LooooooooooooooL
Somewhere in Cyberspace

plop

QuoteOriginally posted by Dessamator
the question is simple how to find the localhost of a pc, it changes depending on ur settings, and the firewall etc etc, so whats the best method to do so?

the ip, specifically  !!
it doesn't change, it's always 127.0.0.1 unless you have changed it yourself.
and then you are still bound to 127.0.0.xxx.
only on special linux/bsd server setups those other local hosts are used (shared server).

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Dessamator

#6
QuoteOriginally posted by plop
QuoteOriginally posted by Dessamator
the question is simple how to find the localhost of a pc, it changes depending on ur settings, and the firewall etc etc, so whats the best method to do so?

the ip, specifically  !!
it doesn't change, it's always 127.0.0.1 unless you have changed it yourself.
and then you are still bound to 127.0.0.xxx.
only on special linux/bsd server setups those other local hosts are used (shared server).
plop

well the thing is, i created a script which gets the hub ip, and using it finds out which user has it, when i test it with another hub somehow it doesnt find the ip, if the person with the server logs in with localhost,

anyways heres the script for reference:::

     
--By Dessamator
--SIMPLE Online ip checker
bot=frmHub:GetHubBotName()

function ChatArrival(user, data)

data = string.sub(data,1,string.len(data)-1)
s,e,cmd = string.find(data, "%b<>%s+(%S+)")

local s,e,ip = string.find(data, "%b<>%s+%S+%s+(.+)")
	if cmd=="!findip" and user.bOperator then
		findip(user,ip,1)
		return 1
	elseif cmd=="!getserver" and user.bOperator then
		local hubip=frmHub:GetHubIp()
		findip(user,hubip,0)
		return 1	
	end
end	
ToArrival=ChatArrival

function findip(user,ip,i)
local check =""
	if i==1 and ip then 
		temp= "\r\n".."\t".."The ip: "..ip.." Belongs to :".."\r\n"
	else
		temp= "\r\n".."\t".."The Current server is: ".."\r\n"
	end
	if ip==nil or ip=="" then
		user:SendPM(bot,"Syntax error. Correct Syntax is : !findip ")
	else
		temp=temp.."\t".."??????????????????????".."\r\n"
		for _,nick in frmHub:GetOnlineUsers() do
			serverip=string.sub(nick.sIP,1,4)
			if nick.sIP==ip then
				temp=temp.."\t\t".."•"..nick.sName.."\r\n"
				check=check..nick.sName
			elseif i==0 and serverip=="127." then 
				temp=temp.."\t\t".."•"..nick.sName.."\r\n"
				check=check..nick.sName
			elseif (i==0) and not(nick.sIP==ip )  then
				temp="The person with the server isnt online!!"
			end
		end
		if check=="" then
			user:SendPM(bot,"The User with that ip isnt online")
		else
			user:SendPM(bot,temp)
			temp=nil
			serverip=""
			check=""
		end
	end
end
 
Ignorance is Bliss.

bastya_elvtars

This could only be retrieved by a script which does a ping -a on the hubs DNS thus retrieves the IP andcompares it with userstable.
Everything could have been anything else and it would have just as much meaning.

Dessamator

QuoteOriginally posted by bastya_elvtars
This could only be retrieved by a script which does a ping -a on the hubs DNS thus retrieves the IP andcompares it with userstable.

well generally that would work, and it already does work in that script, the prob arises when the server connects through localhost !!, when i test it , it works, but not with the other guy who handles the server of our hub !!
Ignorance is Bliss.

plop

why not search with 2 key's??
127.0.0.1 and the ip from frmHub:GetHubIP()

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Dessamator

QuoteOriginally posted by plop
why not search with 2 key's??
127.0.0.1 and the ip from frmHub:GetHubIP()

plop

great idea, will do !!
Ignorance is Bliss.

SMF spam blocked by CleanTalk