User ISP / Country, check..
 

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

User ISP / Country, check..

Started by nEgativE, 05 February, 2004, 17:21:18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nEgativE

Hi all..

didn't search well the forum.. i'm looking 4 a script that tell a user what ISP other user is.. (ip and hostname), something like:

--> [PT]user1: !isp
user2
--> [ISP-BOT]:
user2 is from (Brazil)  with IP/ISP: 200.*.net.br

"Brazil" could be (i think) that function (country/hostname) that is on new UserInfo script by Patthy..

Hope it's possible this script, i really need this, i have a lot users with traffic limits, and this could help to identify some country users, etc.

TkS all.

Yokozuna

Hi,

if I were you, i would implement a complete whois-query in my hubscript, that can be used by OPs only.
Normaly there is no need for normal users to know the IP from another user


Yokozuna

nEgativE

QuoteOriginally posted by Yokozuna
Hi,

if I were you, i would implement a complete whois-query in my hubscript, that can be used by OPs only.
Normaly there is no need for normal users to know the IP from another user


Yokozuna

yes, it could be just:

--> [ISP-BOT]:
user2 is from (Brazil), so.. international traffic to you !

this "so.. international/national traffic to you" only if was possible also identify the user that request the info, heh.

something like that.. who knows (i don't) =)

sorry the english !! TkS.

Yokozuna

Hi again,

made same quick tests with the tohostname function.
It works, BUT

most of my "hubbies" have .net and .com as hostname ending ---> not possible to tell country.


I will post a script for you tommorow (sorry, no time right now) if it is still wanted.


Yokozuna

Yokozuna

Here it is:

BOTNAME = "Trafficinfo"
PREFIX = "+"

function Main() 
	frmHub:RegBot(BOTNAME)
end

function DataArrival(user,data)
	if (strsub(data,1,strlen(BOTNAME)+5) == "$To: "..BOTNAME) then
		if strfind(data,PREFIX.."trafficto") then
			_,_,_,userto = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
			userto = strsub(userto,1,strlen(userto) - 1)
			user2 = GetItemByName(userto)
			hostname1 = tohostname(user.sIP)
			hostname2 = tohostname(user2.sIP)
		end
		if hostname1 then
			temp1 = strsub(hostname1,(strlen(hostname1)-4))
			_,_,_,country1 = strfind(temp1,"(%a+).(%a+)")
		end
		if hostname2 then
			temp2 = strsub(hostname2,(strlen(hostname2)-4))
			_,_,_,country2 = strfind(temp2,"(%a+).(%a+)")
		end
			user:SendPM(BOTNAME1,country1.." "..country2)
		if (country1 and country2) then
			if (country1 ~= "net" and country1 ~= "com") then
				if (country1 == country2) then
					user:SendPM(BOTNAME,"Traffic from you to "..user2.sName.." is national traffic !")
				else
					user:SendPM(BOTNAME,"Traffic from you to "..user2.sName.." is international traffic !")
				end
			else
				user:SendPM(BOTNAME,"It could not be determined if traffic from you to "..user2.sName.." is national or international traffic !")
			end
		else
			user:SendPM(BOTNAME,"It could not be determined if traffic from you to "..user2.sName.." is national or international traffic !")
		end
	end
end

For info on traffic, a user sends a pm to the bot.
Syntax: +trafficto anotheruser

Hope it is what you wanted (I have not integrated your countrydetermination, the user who asks knows his country and can see if the user is from same country if the message says national traffic).

Give it a try, play with it and if you have additional questions contact me :-)


Yokozuna

P.S.
If someone wants to optimize this script, feel free to do so.

pHaTTy

or you can goto finsihed scripts and look at my userinfo bot, which also tell you the country using web extension, i will be adding my ideas soon, to my userinfo, so it will be more accurate ;)
Resistance is futile!

nEgativE

well, thank u Yokozuna.. i think did not work so well as i really wanted.. tks anyway.

Phatty, have u finnished the userinfo bot ? is there a way to have a standalone script to check user with the that hostname funtion ?

SMF spam blocked by CleanTalk