Ban DNS?
 

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

Ban DNS?

Started by kepp, 10 November, 2003, 18:13:43

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

kepp

You can get The DNS from a user with tohostname(user.sIP)

But is it possible to ban the DNS?
Guarding    

SaintSinner

why would you want to ban a entire DNS  ?(
you would be banning 1000's possibly
hundreds of thousands of users
too dangerous im figuring. ;)
   


c h i l l a

#2
kepp

something like

if strfind(tohostname(ip), "THE DNS") then
   -- do what you want
end

or get the ip range with whois and ban the ip range with the logger

kepp

thanks alot :)

SainSinner: As far as i know, if you ban the persons DNS
it will only ban him,
I've ever seen anyone with the same DNS, Which is good with dynamic IP's and if you really want to ban the person for good.
Guarding    

c h i l l a

#4
well kepp one thing, if you only wanna ban one single dns then its no good, ban the ip cause if the ip changes the hostname changes too, you can either ban the ip, if he has dynamic ip then its no use, then I would ban the ip range, if you realy want to get rid of him, or enter a string in THE DNS that is always the same in on these ip's.

something like

strfind(tohostname(ip), "dorm.utexas.edu")

would get all users from that host.

kepp

#5
Ok  :S

I have a dynamic ip adress but my dns stays the same.
Which is why i thought it would be a great idea..

But thanks :) I've learned something new

While im on it, im going to ask another question as i don't want to start a new thread everytime.

I want to TimeBan(time) a user.
and im thinking about making a command such as
?timeban
Guarding    

c h i l l a

sure your dns domain name server  stays the same,

he is a server of your provider...   with most likely a static IP address.

but the hostname  of a users dynamic ip  will change when the ip changes.

kepp

Guarding    

kepp

i tried with this

s,e,cmd,name,timer = strfind(data,"%b<>%s+(%S+)%s+(%S+)%s+(%D+)%d+(.+)%d+(%D+)")

time = timer

victim:TimeBan(time)
Guarding    

tezlo

1. the code above doesnt make any sense
2. not all IPs can be resolved so tohostname() will return nil occasionally

kepp

I noticed to and ended up with this code :

elseif (cmd=="+timeban") or (cmd=="?timeban") then
s,e,cmd,Name,reason,time = strfind(data,"%b<>%s+(%S+)%s+(%S+)%s*(.+)%s+(.*).*")
rsn = reason
timer = time
if victim ~= nil then
SendToAll(BotName, user.sName.." Banned "..victim.sName..", Reason: "..rsn.." For: "..timer.." Minutes")
victim:SendPM(BotName, "You have been Banned by: "..user.sName..", Reason: "..rsn.." For: "..timer.." Minutes")
victim:TimeBan(timer) return 1
Guarding    

SMF spam blocked by CleanTalk