UserInfoBot
 

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

UserInfoBot

Started by pHaTTy, 30 January, 2004, 13:44:39

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pHaTTy

was looking for a userinfo script but coudlnt find one :S

so i wrote one

not done properly yet but its going fine, here it is

--UserInfo Bot By Phatty
--V1, not complete


function Main()
	mcmd = "!"
	frmHub:RegBot("G?KK?")
end

function DataArrival(ustring,dstring)
	if strsub(dstring, 1, 1) == "<" then
		dstring=strsub(dstring,1,strlen(dstring)-1)
		local s,e,cmd = strfind(dstring,"%b<>%s+(%S+)")

		if cmd == mcmd.."userinfo" then 
			if user.bOperator then
				s,e,cmd,arg = strfind(dstring,"%b<>%s+(%S+)%s+(%S+)")
				if GetItemByName(arg) then
					UserInfo(ustring, dstring)
				else
					ustring:SendData(Kos,"Either User is a bot or does not exist")
				end
			return 1
			end	
		end
	end
end

function GetArgML(data) 
	s,e,cmd,arg = strfind(data, "%b<>%s+(%S+)%s+(%S+)%s*") 
	return arg 
end

function UserInfo(ustring, dstring)
	towho=GetArgML(dstring) 
	local nick = GetItemByName(towho)
	local tmp = "\r\n\r\n"
	tmp = tmp.."\tUser Name: "..nick.sName.."\r\n"
	tmp = tmp.."\tUsers IP: "..nick.sIP.."\r\n"

	if strfind(nick.sMyInfoString," 4 then 
				limiter = limiter / 1024 
			end 
		end
		tmp = tmp.."\tUpload limited: "..limiter.." Kb/s\r\n"
	end

	_,b, limited = strfind(nick.sMyInfoString,"D:(%x+)") 
	if limited ~= nil then 
		tmp = tmp.."\tDownload limited: "..dlimiter.." Kb/s\r\n\r\n"
	end

	local hostname = tohostname(nick.sIP)
	_,b, hoster = strfind(hostname,"bt")
	if hoster ~= nil then 
		tmp = tmp.."\tUser ISP: "..hoster.." Kb/s\r\n"
	end

	if strfind(hostname,".fr") then 
		crm = "France" 
	elseif strfind(hostname,".lv") then 
		crm = "Latvia" 
	elseif strfind(hostname,".uk") then 
		crm = "UK"
	elseif strfind(hostname,".de") then 
		crm = "Germany"
	elseif strfind(hostname,".nl") then 
		crm = "Holland"
	elseif strfind(hostname,".es") then 
		crm = "Spain"
	elseif strfind(hostname,".hu") then 
		crm = "Hungarian"
	elseif strfind(hostname,".ct") then 
		crm = "Catalan"
	elseif strfind(hostname,".no") then 
		crm = "Norway"
	elseif strfind(hostname,".dk") then 
		crm = "Denmark"
	elseif strfind(hostname,".se") then 
		crm = "Sweden"
	elseif strfind(hostname,".it") then 
		crm = "Italy"
	elseif strfind(hostname,".jp") then 
		crm = "Japan"
	elseif strfind(hostname,".sg") then 
		crm = "Singapore"
	elseif strfind(hostname,".ca") then 
		crm = "Canada"
	else
		crm = "Worldwide"
	end
	tmp = tmp.."\tCountry: "..crm.."\r\n"

	ustring:SendPM(Bot,tmp)
end

later, if anyone finds any bits i can rip from other userinfos please post them, i want to try make this bigger and better, later ;)


btw: tssssk, the counry is not always accurate lol ;)
Resistance is futile!

pHaTTy

yep and i know b4 u ask i can make it

[".bt"] = "hatever"

sort of thing but not got time atm :p
Resistance is futile!

pHaTTy

hmm ripped the limiter check from a bot but i dont know who wrote the orignal didnt have a name  ?(

anyone know?
Resistance is futile!

c h i l l a

#3
just a thing tohostname, uses sockets, so it will shortly stop the hub. Just so you know.
and it sometimes can even turn out nil

pHaTTy

QuoteOriginally posted by c h i l l a
just a thing tohostname, uses sockets, so it will shortly stop the hub. Just so you know.
and it sometimes can even turn out nil

hmmm really?  ?(  
Resistance is futile!

pHaTTy

damn any sugestions?

bah dont some testing, its been runnign inside Gekko now very fine, used that commands lots of times, it only gets nil error of overloads, in the newuserconnect, to my conenction at once so its fine ;)
Resistance is futile!

NightLitch

Nice Script Phatty.
//NL

pHaTTy

QuoteOriginally posted by NightLitch
Nice Script Phatty.

eheh thx, i will add them to tables later, and watch the patterns so i can be more accurate with the country ;)
Resistance is futile!

plop

#8
did you look in the scripts archive phatty???  
lol there is an old userinfo script from me.
and check lines like this.
elseif strfind(nick.sMyInfoString,"<+") then
the + is magic, meaning it searches for 1 or more <, not <+ like you wanted.

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 <----<<

pHaTTy

QuoteOriginally posted by plop
did you look in the scripts archive phatty???  
lol there is an old userinfo script from me.
and check lines like this.
elseif strfind(nick.sMyInfoString,"<+") then
the + is magic, meaning it searches for 1 or more <, not <+ like you wanted.

plop

damn, u know i never thought of looking i think thats the only place, well i have ripped a bit from a one i got, but it didnt work, which is why i wrote this, and as for the + i not sure what you mean lol, can you explain, i thouhght the " " block that, as for (<+) type of this, is this the sort of this you mean?

im confused lol
Resistance is futile!

plop

QuoteOriginally posted by (uk-kingdom)pH?tt?
damn, u know i never thought of looking i think thats the only place, well i have ripped a bit from a one i got, but it didnt work, which is why i wrote this, and as for the + i not sure what you mean lol, can you explain, i thouhght the " " block that, as for (<+) type of this, is this the sort of this you mean?

im confused lol
"<+" matches every tag, for example < or << or <<< or <<<< etc...
basicly any description with a < in it matches.
try shifting dcgui under the dc++ mods part and you'll see the error popup clearly.
dcgui with limiter in the tag becomes bcdc++.

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 <----<<

pHaTTy

hmmmm ok thx alot, im gonna have a little play around with this script, try make it much better :)
Resistance is futile!

pHaTTy

oops fixed 3 of my silly mistakes and nice few extra's by Guibs

--UserInfo Bot By Phatty
--V1.05, not complete
--Few things by Guibs

Bot = "G?KK?"

function Main()
	mcmd = "!!"
	frmHub:RegBot(Bot)
end

function DataArrival(ustring,dstring)
	if strsub(dstring, 1, 1) == "<" then
		dstring=strsub(dstring,1,strlen(dstring)-1)
		local s,e,cmd = strfind(dstring,"%b<>%s+(%S+)")
		if cmd then
			if cmd == mcmd.."userinfo" then 
				if ustring.bOperator then
					s,e,arg = strfind(dstring,"%b<>%s+%S+%s+(%S+)")
					if arg ~= nil then
						local nick = GetItemByName(arg)
						if nick ~= nil then
							UserInfo(ustring,nick)
						else
							ustring:SendData(Kos,"Either User is a bot or does not exist")
						end
					else
						ustring:SendData(Kos,"Missing parameter....")
					end
					return 1
				end
			end
		end
	end
end

function UserInfo(ustring, nick)
	local tmp = "\r\n\r\n"
	tmp = tmp.."\tUser Name: "..nick.sName.."\r\n"
	tmp = tmp.."\tUsers IP: "..nick.sIP.."\r\n"

	if strfind(nick.sMyInfoString," 4 then 
				limiter = limiter / 1024 
			end 
		end
		tmp = tmp.."\tUpload limited: "..limiter.." Kb/s\r\n"
	end

	_,b, limited = strfind(nick.sMyInfoString,"D:(%x+)") 
	if limited ~= nil then 
		tmp = tmp.."\tDownload limited: "..dlimiter.." Kb/s\r\n\r\n"
	end

	local hostname = tohostname(nick.sIP)
	if hostname then
		_,b, hoster = strfind(hostname,"bt")
		if hoster ~= nil then 
			tmp = tmp.."\tUser ISP: "..hoster.." Kb/s\r\n"
		end

		if strfind(hostname,".fr") then 
			crm = "France" 
		elseif strfind(hostname,".lv") then 
			crm = "Latvia" 
		elseif strfind(hostname,".uk") then 
			crm = "UK"
		elseif strfind(hostname,".de") then 
			crm = "Germany"
		elseif strfind(hostname,".nl") then 
			crm = "Holland"
		elseif strfind(hostname,".es") then 
			crm = "Spain"
		elseif strfind(hostname,".hu") then 
			crm = "Hungarian"
		elseif strfind(hostname,".ct") then 
			crm = "Catalan"
		elseif strfind(hostname,".no") then 
			crm = "Norway"
		elseif strfind(hostname,".dk") then 
			crm = "Denmark"
		elseif strfind(hostname,".se") then 
			crm = "Sweden"
		elseif strfind(hostname,".it") then 
			crm = "Italy"
		elseif strfind(hostname,".jp") then 
			crm = "Japan"
		elseif strfind(hostname,".sg") then 
			crm = "Singapore"
		elseif strfind(hostname,".ca") then 
			crm = "Canada"
		else
			crm = "Worldwide"
		end

		tmp = tmp.."\tCountry: "..crm.."\r\n"
	else
		tmp = tmp.."\tHostname unknown\r\n"

		tmp = tmp.."\tCountry: unknown\r\n"
	end

	ustring:SendPM(Bot,tmp)
end
Resistance is futile!

NightLitch

A simple check if DC++ Stealth is used is in the hub part.

check after:

strfind(data, ("H:("%d+/%d+/%d+")")

this will detect fake hubs.
//NL

[NL]Pur

QuoteA simple check if DC++ Stealth is used is in the hub part.

check after:

strfind(data, ("H:("%d+/%d+/%d+")")

this will detect fake hubs.

how is this going too detect dc stealth, can you explain it to me?

NightLitch

Well I don't know in the newest version but in all others
you have to put "" with the hubs when entering them in
the client. look for yourself.

//NL

plop

QuoteOriginally posted by NightLitch
Well I don't know in the newest version but in all others
you have to put "" with the hubs when entering them in
the client. look for yourself.
no need for the "" it works different.
the trick is 2 check the hub count and the version number.
if the version is 0.233 or older and shows the new hubcount you got a stealth, same for the other way around.
try it on my hub phatty but get a clone in before you try it so you can ask me 2 unban your ass. lol
or look @ allin1 from piglja, i inserted that same thing in that bot.

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 <----<<

[NL]Pur

this is a detection way that uses the stupidity of the user configuring the client.

The only way i know how you can detect a stealth client is by sending him  a key when he is fully logged in , if you doens't respond with a lock, it's dcstealth.

plop

QuoteOriginally posted by [NL]Pur
this is a detection way that uses the stupidity of the user configuring the client.

The only way i know how you can detect a stealth client is by sending him  a key when he is fully logged in , if you doens't respond with a lock, it's dcstealth.
yep, but there are enough of those fools around.
you gotta be really stupid 2 think dc stealth is actualy stealth. lol
it used 2 be the most asked question on the stealth forum (great place 2 find sutch info).

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 <----<<

NightLitch

Well in that case I must ask; How/Can I script to send a key to client and check ??? if it's now possible.

And second. there is lots of users doing the "" in stealth.

So it's worth blocking in my eyes.

And about the check client verison & hubs I agree saw that function in the clientcheck I got from Skrollster long time ago.

But a easy part for you Plop and Pur and others;

LINE: With what script codes can I detect Stealth row them up plz.

you don't need to show me the code unless Am asking ^^ hehe...
//NL

plop

QuoteOriginally posted by NightLitch
Well in that case I must ask; How/Can I script to send a key to client and check ??? if it's now possible.

And second. there is lots of users doing the "" in stealth.

So it's worth blocking in my eyes.

And about the check client verison & hubs I agree saw that function in the clientcheck I got from Skrollster long time ago.

But a easy part for you Plop and Pur and others;

LINE: With what script codes can I detect Stealth row them up plz.

you don't need to show me the code unless Am asking ^^ hehe...
the 1st isn't posible as ptokax can't send it 2 the scripts.
i personaly never saw a tag with "" in them, can be caused that a.i. kicks every unknow tag unless it causes a error.
just added a kick for tags with 2 much spaces, saw a hub owner request that on the dc++k CDM forum.

basicly there are 2 ways 2 fake a tag on stealth.
1) use the options 2 fake hubcount and version.
2) use a fake tag in the description.

both can be filtered the same.
look true your users list and make the bot ban all those bad faked tag's.
can't make it more complex then this.
make your bot proces the tags of clients you want 2 allow and grab for example bcdc++ in nmdc mode and put a bad faked tag in the description, next you add a routine 2 ban that tag.

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 <----<<

SMF spam blocked by CleanTalk