Guest User

Untitled

a guest
Apr 25th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1. public bool IsPiracySite(string url,System.Windows.Forms WebBrowser WebBrowserObject) {
  2.     string tld = ((url.Replace("http://","").Replace("https://",""))); //Get the TLD, ignoring protocol and subdirectory
  3.     if (URLBlackList.Contains(tld.Remove(tld.IndexOf('/'),tld.Length-1))){ //Assumes a data structure containing blacklisted URLs
  4.     WebBrowserObject.DOM.Navigate("http://siteadvisor.mcafee.com/rating/" + tld.Remove(tld.IndexOf('/'), tld.Length - 1) + "/"); }}
Advertisement
Add Comment
Please, Sign In to add comment