public static List <Item> GetLinks(string url) { Config config = new Config(); config.LoginURL = url; config.Method = Method.GET; config.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/54.0"; config.AllowAutoRedirect = true; Requester Rer = new Requester(); RequestManage link = Rer.GETData(config); HtmlDocument DocumentHTML = new HtmlDocument(); DocumentHTML.LoadHtml(link.SourcePage); var nodes = DocumentHTML.DocumentNode.SelectSingleNode("//div[@class='file-info-btns-block m-b-10 m-t-15']"); string msmsdskj = nodes.InnerHtml.ToString().Replace(@"""", ""); int ind1 = msmsdskj.IndexOf("href=") + "href=".Length; int ind2 = msmsdskj.IndexOf(@"class=btn") - @"class=btn".Length; string dlLink = msmsdskj.Substring(ind1, ind2); nodes = DocumentHTML.DocumentNode.SelectSingleNode("//div[@class='filename']"); Item itemFin = new Item(); itemFin.Link = dlLink; itemFin.Info = nodes.InnerText.Replace("Б", "B").Replace("\n\n", "").Replace(@"(", " ").Replace(@")", " "); List <Item> Items = new List <Item>(); Items.Add(itemFin); return(Items); }
public static List <Item> GetLinks(string url, string password) { Config config = new Config(); Requester rr = new Requester(); config.KeepAlive = true; config.Cookies = "_ga=GA1.2.2039718586.1465731600; _gat=1"; config.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0"; string[] arr = url.Split('/'); bool give = false; string id = ""; string server = ""; foreach (string str in arr) { if (str.Contains("picofile.com")) { server = str.Substring(0, 2); } if (give) { id = str; break; } if (str == "file") { give = true; } } config.LoginURL = "http://" + server + ".picofile.com/file/GenerateDownloadLink?fileId=" + id; config.PostData = ""; config.Referer = url; config.Method = Method.POST; if (!string.IsNullOrEmpty(password)) { config.PostData = "password="******"application/x-www-form-urlencoded; charset=UTF-8"; config.AllowAutoRedirect = true; } RequestManage link = rr.POSTData(config); string Return = link.SourcePage; if (link.ErrorAst) { string[] error = Return.Split('|'); if (error[1] == "NotFound") { Return = "File Not Found"; } if (error[1] == "Forbidden") { Return = "Invalid password or somting error"; } } return(new List <Item> { new Item { Link = Return } }); }
public static List <Item> MovieLeech(HtmlDocument HD, RequestManage manage) { List <Item> items = new List <Item>(); List <string> list = new List <string>() { @"<div class=""dl-box"" data-quality=""(.*?)"">", }; MatchCollection coll = Regex.Matches(manage.SourcePage, list[0]); for (int i = 1; i < coll.Count + 1; i++) { string Info, Link; Info = HD.DocumentNode.SelectSingleNode(@"//*[@id=""dl-container""]/div[" + i.ToString() + "]").InnerText; Info = Info.Replace("\n", " ").Replace("\r", "").Replace("\t", "").Replace(" ", "").Replace("زيرنويس", "").Replace("دانلود", ""); string pattern = @"<a href=""(.*?)""><i class=""fa fa-fw fa-download""><\/i> دانلود<\/a>"; string pack = HD.DocumentNode.SelectSingleNode(@"//*[@id=""dl-container""]/div[" + i.ToString() + "]").InnerHtml; Link = Regex.Match(pack, pattern).Groups[1].Value; Item item = new Item { Link = Link, Info = Info }; items.Add(item); } return(items); }
private void editToolStripMenuItem2_Click(object sender, EventArgs e) { ListViewItem item = listView3.SelectedItems[0]; RequestManage value = Parser.Controller.RequestDefes[item.Index].GetManage(); EditRequest co = new MSC_Scripting_IDE.EditRequest(value); co.ShowDialog(); }
public static Item GetLinks(string url) { Config config = new Config(); Requester Rr = new Requester(); config.LoginURL = url; config.Method = Method.GET; config.AllowAutoRedirect = false; config.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0"; RequestManage get = Rr.GETData(config); Item item = new Item(); item.Link = get.Location; return(item); }
public void SendMessage(string text) { Config config = new Config(); Account ac = new Account(); ac.Username = ID; ac.Password = Token; config.Method = Method.POST; string pst = "'https://api.telegram.org/bot<TOKEN>/sendMessage?chat_id=<ID>&text=<TEXT>"; config.DataSet = "<ID>*<TOKEN>"; pst = Rer.ReplaceAccount(ac, pst, config); config.LoginURL = pst.Replace("<TEXT>", text); config.AllowAutoRedirect = true; RequestManage send = Rer.GETData(config); }
public static RequestManage GetManage(WebResponse Wr, CookieContainer Cc) { RequestManage NewManage = new RequestManage(); NewManage.Cookies = Cc; NewManage.Headers = Wr.Headers; NewManage.SourcePage = new System.IO.StreamReader(Wr.GetResponseStream()).ReadToEnd(); NewManage.Location = Wr.Headers["Location"]; NewManage.RedirectedUrl = Wr.ResponseUri.AbsoluteUri; //if (Wr.Headers["Content-Type"].Contains("image/")) //{ // Stream httpResponseStream = Wr.GetResponseStream(); // NewManage.Image = Image.FromStream(httpResponseStream); //} return(NewManage); }
public static List <Item> GetLinks(string url) { Config config = new Config(); Requester rer = new Requester(); config.LoginURL = url; config.KeepAlive = true; config.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0"; config.Method = Method.GET; RequestManage manage = rer.GETData(config); string pattern = @"<meta property=""og:image"" content=""(.*?)"""; Match m = Regex.Match(manage.SourcePage, pattern); string link = m.Groups[1].ToString(); return(new List <Item> { new Item { Link = link } }); }
public static RequestManage GetManage(WebResponse Wr, CookieContainer Cc) { RequestManage NewManage = new RequestManage(); NewManage.Cookies = Cc; NewManage.Headers = Wr.Headers; Stream stream = Wr.GetResponseStream(); byte[] buffer = new byte[16 * 1024]; using (MemoryStream ms = new MemoryStream()) { int read; while ((read = stream.Read(buffer, 0, buffer.Length)) > 0) { ms.Write(buffer, 0, read); } NewManage.Bytes = ms.ToArray(); } NewManage.SourcePage = Encoding.UTF8.GetString(NewManage.Bytes); NewManage.Location = Wr.Headers["Location"]; NewManage.RedirectedUrl = Wr.ResponseUri.AbsoluteUri; return(NewManage); }
public void SendMessage(string text, ParseMode mode = ParseMode.None) { Config config = new Config(); Account ac = new Account(); ac.Username = ID; ac.Password = Token; text = EncodeText(text); string pst = "https://api.telegram.org/bot<TOKEN>/sendMessage?chat_id=<ID>&text=<TEXT>"; config.DataSet = "<ID>*<TOKEN>"; pst = Rer.ReplaceAccount(ac, pst, config); pst = pst.Replace("<TEXT>", text); string modetext = ""; switch (mode) { case ParseMode.HTML: modetext = ParseMode.HTML.ToString(); break; case ParseMode.Markdown: modetext = ParseMode.Markdown.ToString(); break; case ParseMode.None: modetext = ""; break; } pst += "&parse_mode=" + modetext; config.LoginURL = pst; config.AllowAutoRedirect = true; RequestManage send = Rer.GETData(config); }
public EditRequest(RequestManage _manage) { manage = _manage; InitializeComponent(); }
public static List <Item> GetLinks(string url) { List <Item> items = new List <Item>(); Config config = new Config(); Requester Rer = new Requester(); Account ac = Accounts.GetAccount(SiteDetecter.TypeSite.Xnxx); config.LoginURL = url; config.DataSet = "<USER>*<PASS>"; config.Method = Method.GET; config.AllowAutoRedirect = true; config.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"; config.KeepAlive = true; config.ContectType = "application/x-www-form-urlencoded; charset=UTF-8"; RequestManage so = Rer.GETData(config); config.LoginURL = "http://www.xnxx.com/account/login/rpc"; config.Referer = url; config.Method = Method.POST; string pst = "login=<USER>&password=<PASS>"; config.PostData = Rer.ReplaceAccount(ac, pst, config); RequestManage manage = Rer.POSTData(config, so); config.Method = Method.GET; config.LoginURL = url; config.Referer = "http://www.xnxx.com/"; Token tok = new Token(); tok.RegexPattern = @"flashvars=""id_video=(.*?)&"; tok = Rer.GetToken(tok, config, manage); config.Referer = url; config.LoginURL = "http://www.xnxx.com/video-download/" + tok.GrpValue[0]; config.Cookies = manage.CookiesString; Token lib = new Token(); lib.RegexPattern = @"{""LOGGED"":true,""URL"":""(.*?)"",""URL_LOW"":""(.*?)""}"; lib = Rer.GetToken(lib, config); Item high = new Item(); high.Info = "HIGH QUALITY"; high.Link = lib.GrpValue[0].Replace("\\/", "/"); Item low = new Item(); low.Info = "LOW QUALITY"; low.Link = lib.GrpValue[1].Replace("\\/", "/");; items.Add(low); items.Add(high); return(items); }
public static List <Item> GetLinks(string url) { PageTypes typepage = PageTypes.Unkown; string[] arr = url.Split('/'); bool give = false; string id = ""; foreach (string str in arr) { if (give) { id = str; break; } if (str.Split('.')[0] == "30nama") { give = true; } } switch (id) { case "series": typepage = PageTypes.Series; break; case "movies": typepage = PageTypes.Movie; break; } Account ac = Accounts.GetAccount(SiteDetecter.TypeSite._30Nama); Config config = new Config(); Requester Rer = new Requester(); config.LoginURL = _30namaserver + "login"; RequestManage login = Rer.GETData(config); config.Cookies = login.CookiesString; string pst = "log=<USER>&pwd=<PASS>&rememberme=forever&wp-submit=%D9%88%D8%B1%D9%88%D8%AF&redirect_to=http%3A%2F%2F30nama.site%2Fwp-admin%2F&instance=&action=login"; config.DataSet = "<USER>*<PASS>"; config.PostData = Rer.ReplaceAccount(ac, pst, config); config.AllowAutoRedirect = true; config.KeepAlive = true; config.ContectType = "application/x-www-form-urlencoded"; config.Referer = config.LoginURL; login = Rer.POSTData(config, login); config.LoginURL = url; config.Cookies = ""; RequestManage manage = Rer.GETData(config, login); HtmlDocument HD = new HtmlDocument(); HD.LoadHtml(manage.SourcePage); switch (typepage) { case PageTypes.Movie: return(MovieLeech(HD, manage)); case PageTypes.Series: return(SeriesLeech(HD, manage)); } return(null); }
public static List <Item> SeriesLeech(HtmlDocument HD, RequestManage manage) { //Lazy :) //TODO: Series leech codes return(null); }
public void Create() { Request = new RequestManage(); }