You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
492 B
28 lines
492 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Proxy
|
|
{
|
|
class ProxyWeb : IWeb
|
|
{
|
|
private IWeb realWeb = new RealWeb();
|
|
|
|
List<string> BAD_SITES = new List<string>()
|
|
{
|
|
"https://hackersite.com",
|
|
"https://fraudsite.com",
|
|
"https://phishingsite.com"
|
|
};
|
|
|
|
public string Visit(string url)
|
|
{
|
|
if (BAD_SITES.Contains(url.ToLower()))
|
|
return "BAD_SITES";
|
|
|
|
return realWeb.Visit(url);
|
|
}
|
|
}
|
|
}
|
|
|