Ejemplo n.º 1
0
        public static IEnumerable <string> getUserNames(int pageNum)
        {
            string           content = ShallerConnector.getPageContent("showmembers.php?Cat=&sb=13&page=" + pageNum + "&showlite=l", new Dictionary <string, string>(), new System.Net.CookieContainer());
            Regex            matcher = new Regex(";User=([^&]+)&", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.IgnoreCase);
            MatchCollection  matches = matcher.Matches(content);
            HashSet <string> result  = new HashSet <string>();

            foreach (Match match in matches)
            {
                result.Add(HttpUtility.UrlDecode(match.Groups[1].Value, ShallerConnector.encoding).Trim());
            }
            return(result);
        }
Ejemplo n.º 2
0
 private static FileInfo getFileInfo(string path, int attempt)
 {
     try {
         return(ShallerConnector.getPageInfo(path, new Dictionary <string, string>(), new CookieContainer()));
     } catch (Exception) {
         if (attempt > 3)
         {
             throw;
         }
         else
         {
             return(getFileInfo(path, attempt + 1));
         }
     }
 }
Ejemplo n.º 3
0
 public static string getUserInfoAsString(string userName)
 {
     //if(userName != HttpUtility.UrlEncode(userName, ShallerConnector.encoding)) throw new ApplicationException("'" + userName + "':showprofile.php?User="******"&What=login&showlite=l");
     return(ShallerConnector.getPageContent("showprofile.php?User="******"&What=login&showlite=l", new Dictionary <string, string>(), new System.Net.CookieContainer()));
 }