Anti hammer and banlist (IP Access)

Post here if you have some suggestions or you want to request a new feature.

Re: Anti hammer and banlist (IP Access)

Postby gockenbr » Fri Feb 11, 2011 4:07 pm

Can you explain more about how I'm supposed to run the code you posted? I'm not understanding.

Thanks,
-B
gockenbr
 
posts 7
 
joined Thu Jan 27, 2011 8:26 pm

Re: Anti hammer and banlist (IP Access)

Postby FTP » Fri Feb 11, 2011 4:12 pm

You just need to copy/paste this code, the added code is for translating the boolean field into an integer.
FTP
Site Admin
 
posts 1236
 
joined Tue Sep 29, 2009 6:09 am

Re: Anti hammer and banlist (IP Access)

Postby gockenbr » Fri Feb 11, 2011 7:27 pm

Ok I added the code but I get the same results.

Please advise.

-B
gockenbr
 
posts 7
 
joined Thu Jan 27, 2011 8:26 pm

Re: Anti hammer and banlist (IP Access)

Postby FTP » Thu Feb 17, 2011 5:09 am

I got it, you can only add such lua script into FTP/SSH event, but not HTTP event. Because when this event is triggered, user hasn't logged in, and there is no web session exists, so it can't call the variables like "%Domain", "%IP". Anyway, we will consider to improve it.

Code: Select all
local ipmasks = c_GetIPMaskList("%Domain")
local domain_ipmasks = {}
if type(ipmasks) == "table" then
   for _,ipmask in pairs(ipmasks) do
      local temp = {}
      table.insert(temp,ipmask.ip)
      table.insert(temp,ipmask.refuse)
      table.insert(domain_ipmasks,temp)
   end
end
table.insert(domain_ipmasks,{"%IP",true})
c_SetIPMaskList("%Domain",domain_ipmasks)
FTP
Site Admin
 
posts 1236
 
joined Tue Sep 29, 2009 6:09 am

Previous

Return to Suggestions & Wishlist

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron