banned ip remover
 

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

banned ip remover

Started by LoTeK_, 07 May, 2005, 14:56:40

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LoTeK_

Hi, does anyone have a script for Ptokax 17.03 to remove permanently banned ip after xx time automatically?


Typhoon

This should do what you want..


-- Auto Clear Perm Banlist by Typhoon?
-- Request by LoTek
-- hope it does what you need



--// Time Units
sTime = {}
sTime["Sec"]  = 1000
sTime["Min"]  = 60*sTime.Sec
sTime["Hour"] = 60*sTime.Min
sTime["Day"]  = 24*sTime.Hour
sTime["Week"]  = 7*sTime.Day
sTime["Month"]  = 30*sTime.Day
sTime["Year"]  = 365*sTime.Day
sTime["Interval"] = 2 -- changed interval here 

function Main()
	SetTimer(sTime.Interval*sTime.Day) -- change Day with different choice, default is cleared everu 2 days 
	StartTimer()
end

function OnTimer()
	SendToOps("BanList was cleared")
	ClearPermBan()
end


Typhoon?



LoTeK_

QuoteOriginally posted by Typhoon?
This should do what you want..


-- Auto Clear Perm Banlist by Typhoon?
-- Request by LoTek
-- hope it does what you need



--// Time Units
sTime = {}
sTime["Sec"]  = 1000
sTime["Min"]  = 60*sTime.Sec
sTime["Hour"] = 60*sTime.Min
sTime["Day"]  = 24*sTime.Hour
sTime["Week"]  = 7*sTime.Day
sTime["Month"]  = 30*sTime.Day
sTime["Year"]  = 365*sTime.Day
sTime["Interval"] = 2 -- changed interval here 

function Main()
	SetTimer(sTime.Interval*sTime.Day) -- change Day with different choice, default is cleared everu 2 days 
	StartTimer()
end

function OnTimer()
	SendToOps("BanList was cleared")
	ClearPermBan()
end


Typhoon?

Watching the code, it looks like this clears out all permbanlist, I would like to leave nicks banned, but not ips, is possibile to do so?

6Marilyn6Manson6

QuoteOriginally posted by LoTeK_
QuoteOriginally posted by Typhoon?
This should do what you want..


-- Auto Clear Perm Banlist by Typhoon?
-- Request by LoTek
-- hope it does what you need



--// Time Units
sTime = {}
sTime["Sec"]  = 1000
sTime["Min"]  = 60*sTime.Sec
sTime["Hour"] = 60*sTime.Min
sTime["Day"]  = 24*sTime.Hour
sTime["Week"]  = 7*sTime.Day
sTime["Month"]  = 30*sTime.Day
sTime["Year"]  = 365*sTime.Day
sTime["Interval"] = 2 -- changed interval here 

function Main()
	SetTimer(sTime.Interval*sTime.Day) -- change Day with different choice, default is cleared everu 2 days 
	StartTimer()
end

function OnTimer()
	SendToOps("BanList was cleared")
	ClearPermBan()
end


Typhoon?

Watching the code, it looks like this clears out all permbanlist, I would like to leave nicks banned, but not ips, is possibile to do so?

Not is possible LoteK_ ... not exist option for Clear only nick sorry :P

LoTeK_

no, not nick, ips, i would like to leave nicks banned, but to clears ips every xx time automatically.

NightLitch

Ok this should work then:

--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// Clear PermBanList on IPs by NightLitch
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
interval_time = 1
interval_value  = "month"
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
sTime = {}
sTime["sec"]  = 1000
sTime["min"]  = 60*sTime.sec
sTime["hour"] = 60*sTime.min
sTime["day"]  = 24*sTime.hour
sTime["week"]  = 7*sTime.day
sTime["month"]  = 30*sTime.day
sTime["year"]  = 365*sTime.day
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function Main()
	SetTimer(tonumber(interval_time) * sTime[string.lower(interval_value)])
	StartTimer()
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function OnTimer()
	local c = 0
	local list = frmHub:GetPermBanList()
	for i = 1,table.getn(list) do
		if string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
			c = c + 1
			Unban(list[i].sIP)
		end
	end
	SendToOps(frmHub:GetHubBotName(), "*** "..c.." IPs has been unbanned from Banlist")
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// NightLitch

Cheers
//NL

NightLitch

#6
Updated:

--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// Clear PermBanList by NightLitch
--// Version: 
--//     0.1 - Created Bot
--//     0.2 - Added Unban mode. Unban Nick(s) or IP(s)
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
interval_time = 1 -- enter a number
interval_value  = "month" -- enter sec, min, hour, day, week, month, year
unban_mode = 1 -- 1 = unban IPs  /  0 = unban Nicks
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
sTime = {}
sTime["sec"]  = 1000
sTime["min"]  = 60*sTime.sec
sTime["hour"] = 60*sTime.min
sTime["day"]  = 24*sTime.hour
sTime["week"]  = 7*sTime.day
sTime["month"]  = 30*sTime.day
sTime["year"]  = 365*sTime.day
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function Main()
	SetTimer(tonumber(interval_time) * sTime[string.lower(interval_value)])
	StartTimer()
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function OnTimer()
	local c = 0
	local list = frmHub:GetPermBanList()
	for i = 1,table.getn(list) do
		if tonumber(unban_mode) == 1 and string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
			c = c + 1
			Unban(list[i].sIP)
		elseif tonumber(unban_mode) == 0 and not string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
			c = c + 1
			Unban(list[i].sIP)
		end
	end
	if tonumber(unban_mode) == 1 then
		SendToOps(frmHub:GetHubBotName(), "*** "..c.." IP(s) have been unbanned from Banlist")
	elseif tonumber(unban_mode) == 0 then
		SendToOps(frmHub:GetHubBotName(), "*** "..c.." Nick(s) have been unbanned from Banlist")
	end
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// NightLitch
//NL

6Marilyn6Manson6

QuoteOriginally posted by NightLitch
Updated:

--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// Clear PermBanList by NightLitch
--// Version: 
--//     0.1 - Created Bot
--//     0.2 - Added Unban mode. Unban Nick(s) or IP(s)
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
interval_time = 1 -- enter a number
interval_value  = "month" -- enter sec, min, hour, day, week, month, year
unban_mode = 1 -- 1 = unban IPs  /  0 = unban Nicks
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
sTime = {}
sTime["sec"]  = 1000
sTime["min"]  = 60*sTime.sec
sTime["hour"] = 60*sTime.min
sTime["day"]  = 24*sTime.hour
sTime["week"]  = 7*sTime.day
sTime["month"]  = 30*sTime.day
sTime["year"]  = 365*sTime.day
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function Main()
	SetTimer(tonumber(interval_time) * sTime[string.lower(interval_value)])
	StartTimer()
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function OnTimer()
	local c = 0
	local list = frmHub:GetPermBanList()
	for i = 1,table.getn(list) do
		if tonumber(unban_mode) == 1 and string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
			c = c + 1
			Unban(list[i].sIP)
		elseif tonumber(unban_mode) == 0 and not string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
			c = c + 1
			Unban(list[i].sIP)
		end
	end
	if tonumber(unban_mode) == 1 then
		SendToOps(frmHub:GetHubBotName(), "*** "..c.." IP(s) have been unbanned from Banlist")
	elseif tonumber(unban_mode) == 0 then
		SendToOps(frmHub:GetHubBotName(), "*** "..c.." Nick(s) have been unbanned from Banlist")
	end
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// NightLitch

NightLitch is king of LUA :D.. i'm you're best fan LOL

NightLitch

#8
QuoteOriginally posted by 6Marilyn6Manson6
NightLitch is king of LUA :D.. i'm you're best fan LOL

Well thank you...  :D

Been a while since I posted something here now...

Though I would try and start helping out again...

When I have some time over  :P

Cheers // NL
//NL

6Marilyn6Manson6

Eheeheheh NightLitch no prob.. you're the king and we wait new release of Thor in LUA 5... Go Go NightLitch ;)

LoTeK_

QuoteOriginally posted by NightLitch
Updated:

--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// Clear PermBanList by NightLitch
--// Version: 
--//     0.1 - Created Bot
--//     0.2 - Added Unban mode. Unban Nick(s) or IP(s)
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
interval_time = 1 -- enter a number
interval_value  = "month" -- enter sec, min, hour, day, week, month, year
unban_mode = 1 -- 1 = unban IPs  /  0 = unban Nicks
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
sTime = {}
sTime["sec"]  = 1000
sTime["min"]  = 60*sTime.sec
sTime["hour"] = 60*sTime.min
sTime["day"]  = 24*sTime.hour
sTime["week"]  = 7*sTime.day
sTime["month"]  = 30*sTime.day
sTime["year"]  = 365*sTime.day
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function Main()
	SetTimer(tonumber(interval_time) * sTime[string.lower(interval_value)])
	StartTimer()
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function OnTimer()
	local c = 0
	local list = frmHub:GetPermBanList()
	for i = 1,table.getn(list) do
		if tonumber(unban_mode) == 1 and string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
			c = c + 1
			Unban(list[i].sIP)
		elseif tonumber(unban_mode) == 0 and not string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
			c = c + 1
			Unban(list[i].sIP)
		end
	end
	if tonumber(unban_mode) == 1 then
		SendToOps(frmHub:GetHubBotName(), "*** "..c.." IP(s) have been unbanned from Banlist")
	elseif tonumber(unban_mode) == 0 then
		SendToOps(frmHub:GetHubBotName(), "*** "..c.." Nick(s) have been unbanned from Banlist")
	end
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// NightLitch

thanks, you made me a very happy man :P
1 question, what is interval_time = 1 -- enter a number
thanks again.

jiten

If the values were: interval time = 2 and interval value = "day", the PermBanList check and cleaning would be done every 2 days.

Best regards

Envinyatar

How do I get this script to clean both banned ip's and nick's?

Also just to make sure I got it right:
This script will delete the bans that are older then x time?
It wont clear the whole banlist when it starts up, right?
"What is piracy? Piracy is the act of stealing an artist's work without any intention of paying for it. I'm not talking about Napster-type software. I'm talking about major label recording contracts." [Courtney Love]

Envinyatar

Is there really noone who can answer my q's?
"What is piracy? Piracy is the act of stealing an artist's work without any intention of paying for it. I'm not talking about Napster-type software. I'm talking about major label recording contracts." [Courtney Love]

6Marilyn6Manson6

-- Auto Clear Perm Banlist by Typhoon?
-- Request by LoTek
-- hope it does what you need
--// Small Touched by 6Marilyn6Manson6 23/03/2006
BotName = frmHub:GetHubBotName()
Message = "Perm/Temp BanList Was Cleared"
--// Time Units
sTime = {}
sTime["Sec"]   = 1000
sTime["Min"]   = 60*sTime.Sec
sTime["Hour"]  = 60*sTime.Min
sTime["Day"]   = 24*sTime.Hour
sTime["Week"]  = 7*sTime.Day
sTime["Month"] = 30*sTime.Day
sTime["Year"]  = 365*sTime.Day
sTime["Interval"] = 2 -- changed interval here 
--//

function Main()
	SetTimer(sTime.Interval*sTime.Day) -- change Day with different choice, default is cleared everu 2 days 
	StartTimer()
end
function OnTimer()
	ClearTempBan()
	ClearPermBan()
	SendToOps(BotName,Message)
end
--// 6Marilyn6Manson6


You like this?

bastya_elvtars

I can look into it later, but it can be done, though it has to know the exact time of the ban.
6Marilyn6Manson6 it should NOT clearthe banlist, as previously stated.
Everything could have been anything else and it would have just as much meaning.

6Marilyn6Manson6

#16
QuoteHow do I get this script to clean both banned ip's and nick's?

I have read this :D

and I have tested it...

[2006-03-23 | 20:27:18] <[666]-LawMaker-> Perm/Temp BanList Was Cleared
[2006-03-23 | 20:27:34] <[666]-LawMaker-> *** 82.59.84.79 is banned by 6Marilyn6Manson6
[2006-03-23 | 20:27:39] <[666]-LawMaker-> *** 82.59.84.80 is banned by 6Marilyn6Manson6
[2006-03-23 | 20:27:41] <[666]-LawMaker-> *** 82.59.84.81 is banned by 6Marilyn6Manson6
[2006-03-23 | 20:27:48] <[666]-LawMaker-> Perm/Temp BanList Was Cleared


here work ( i have set interval at 30seconds ) ^^

SMF spam blocked by CleanTalk