// @Override public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception { ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>(); String parameter = param.toString(); br.getPage(parameter); Form form = br.getForm(1); for (int i = 0; i <= 5; i++) { String code = getCaptchaCode("http://alpha-link.eu/captcha/captcha.php", param); form.put("captcha", code); form.setAction(parameter); br.submitForm(form); if (!br.containsHTML("(Code ist falsch)|(kein Code eingegeben)")) break; } form = br.getForm(1); String[] ids = br.getRegex("class='btn' name='id' value='(\\d+)'").getColumn(0); if (ids.length == 0) return null; progress.setRange(ids.length); for (String id : ids) { form.put("id", id); br.submitForm(form); String codedLink = br.getRegex("src=.\"(.*?).\"").getMatch(0); if (codedLink == null) return null; String link = Encoding.htmlDecode(codedLink); decryptedLinks.add(createDownloadlink(link)); progress.increase(1); } return decryptedLinks; }
private void decryptLinks(final ArrayList<DownloadLink> decryptedLinks, final CryptedLink param) throws Exception { br.setFollowRedirects(false); final String[] matches = br.getRegex("getFile\\('(cid=\\w*?&lid=\\d*?)'\\)").getColumn(0); try { Browser brc = null; for (final String match : matches) { Thread.sleep(2333); handleCaptchaAndPassword("http://www.relink.us/frame.php?" + match, param); if (ALLFORM != null && ALLFORM.getRegex("captcha").matches()) { logger.warning("Falsche Captcheingabe, Link wird übersprungen!"); continue; } brc = br.cloneBrowser(); if (brc != null && brc.getRedirectLocation() != null && brc.getRedirectLocation().contains("relink.us/getfile")) { brc.getPage(brc.getRedirectLocation()); } if (brc.getRedirectLocation() != null) { final DownloadLink dl = createDownloadlink(Encoding.htmlDecode(brc.getRedirectLocation())); try { distribute(dl); } catch (final Throwable e) { /* does not exist in 09581 */ } decryptedLinks.add(dl); break; } else { final String url = brc.getRegex("iframe.*?src=\"(.*?)\"").getMatch(0); final DownloadLink dl = createDownloadlink(Encoding.htmlDecode(url)); if (url != null) { try { distribute(dl); } catch (final Throwable e) { /* does not exist in 09581 */ } decryptedLinks.add(dl); } else { /* as bot detected */ return; } } PROGRESS.increase(1); } } finally { br.setFollowRedirects(true); } }
public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception { ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>(); String parameter = param.toString(); br.setFollowRedirects(true); br.getPage(parameter); String links[] = br.getRegex("href='(http://remixshare\\.com/get\\.php\\?file=.*?)'").getColumn(0); if (links == null || links.length == 0) return null; progress.setRange(links.length); for (String link : links) { decryptedLinks.add(createDownloadlink(link)); progress.increase(1); } return decryptedLinks; }
public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception { ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>(); // This site is using a somehow modified CopperMine gallery which allows // us to get data from the AJAX-Slideshow feature String albumid = new Regex(param, "thumbnails.php\\?album=([0-9]+)").getMatch(0); br.getPage("http://www.hi-living.de/galerie/thumbnails.php?album=" + albumid); String albumName = br.getRegex("<title>(.+?) - hi-living Galerie</title>").getMatch(0, 0); int imageCount = Integer.valueOf( br.getRegex("([0-9]+) Dateien auf [0-9]+ Seite\\(n\\)</td>").getMatch(0, 0)); progress.setRange(imageCount); // Threading would give a significant speedup, but lets spend our time // on more important things. for (int i = 0; i < imageCount; i++) { br.getPage( "http://www.hi-living.de/galerie/displayimage.php?album=" + albumid + "&ajax_show=1&pos=" + i); String url = "http://www.hi-living.de/galerie/" + br.getRegex("\"url\":\"(.+?)\"").getMatch(0, 0).replace("\\/", "/"); decryptedLinks.add(createDownloadlink(url)); progress.increase(1); } FilePackage fp = FilePackage.getInstance(); fp.setName(albumName.trim()); fp.addLinks(decryptedLinks); return decryptedLinks; }
// This decrypter should handle all sites using the qooy.com script! public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception { ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>(); br.setFollowRedirects(true); String parameter = param.toString(); // Only uploadmirrors.com has those "/download/" links so we need to // correct them parameter = parameter .replaceAll("(/dl/|/mirror/|/download/)", "/files/") .replace("flameupload.co/", "flameupload.com/"); // Tohse links need a "/" at the end to be valid if (!param.getCryptedUrl().endsWith("/")) param.setCryptedUrl(param.getCryptedUrl().toString() + "/"); String host = new Regex(parameter, "(.+)/(files|dl)").getMatch(0); // At the moment kewlfile.com is the only host in this plugin which has // this "kewlfile.com/rd/" links String id = new Regex(parameter, "files/([0-9A-Z]+)").getMatch(0); // This should never happen but in case a dev changes the plugin without // much testing he ll see the error later! if (host == null || id == null) { logger.warning("A critical error happened! Please inform the support."); return null; } parameter = host + "/status.php?uid=" + id; br.getPage(parameter); /* Error handling */ if (!br.containsHTML("<img src=") && !br.containsHTML("<td class=\"host\">")) { logger.info("The following link should be offline: " + parameter); throw new DecrypterException( JDL.L( "plugins.decrypt.errormsg.unavailable", "Perhaps wrong URL or the download is not available anymore.")); } br.setFollowRedirects(false); String[] redirectLinks = br.getRegex("(/(redirect|rd)/[0-9A-Z]+/[a-z0-9]+)").getColumn(0); if (redirectLinks == null || redirectLinks.length == 0) redirectLinks = br.getRegex("><a href=(.*?)target=").getColumn(0); if (redirectLinks == null || redirectLinks.length == 0) return null; progress.setRange(redirectLinks.length); String nicelookinghost = host.replaceAll("(www\\.|http://|/)", ""); logger.info("Found " + redirectLinks.length + " " + nicelookinghost + " links to decrypt..."); for (String singlelink : redirectLinks) { Browser brc = br.cloneBrowser(); String dllink = null; // Handling for links that need to be regexed or that need to be get // by redirect if (singlelink.contains("/redirect/") || singlelink.contains("/rd/")) { brc.getPage(host.replace("www.", "") + singlelink); dllink = brc.getRedirectLocation(); if (dllink == null) { dllink = brc.getRegex("<frame name=\"main\" src=\"(.*?)\">").getMatch(0); // For 1filesharing.com links if (dllink == null) { dllink = brc.getRegex("<iframe id=\"download\" src=\"(.*?)\"").getMatch(0); // For needmirror.com links if (dllink == null) dllink = brc.getRegex(">Please <a href=\"([^\"\\']+)\"").getMatch(0); } } } else { // Handling for already regexed final-links dllink = singlelink; } progress.increase(1); if (dllink == null) continue; if (dllink.contains("flameupload")) { logger.info("Recursion? " + param.toString() + "->" + dllink); } decryptedLinks.add(createDownloadlink(dllink)); } return decryptedLinks; }
@Override public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception { ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>(); String parameter = param.toString(); FilePackage fp = FilePackage.getInstance(); br.setFollowRedirects(false); br.getPage(parameter); boolean decrypterBroken = false; if (decrypterBroken) return null; /* Error handling */ if (br.containsHTML("This data has been removed by the owner")) { logger.warning("Wrong link"); logger.warning( JDL.L( "plugins.decrypt.errormsg.unavailable", "Perhaps wrong URL or the download is not available anymore.")); return new ArrayList<DownloadLink>(); } /* File package handling */ for (int i = 0; i <= 5; i++) { Form captchaForm = br.getForm(1); if (captchaForm == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT); String passCode = null; String captchalink0 = br.getRegex("src=\"(mUSystem.*?)\"").getMatch(0); String captchalink = "http://protect-my-links.com/" + captchalink0; if (captchalink0.contains("null")) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT); String code = getCaptchaCode(captchalink, param); captchaForm.put("captcha", code); if (br.containsHTML("Password :"******"passwd", passCode); } br.submitForm(captchaForm); if (br.containsHTML("Captcha is not valid") || br.containsHTML("Password is not valid")) continue; break; } if (br.containsHTML("Captcha is not valid")) throw new PluginException(LinkStatus.ERROR_CAPTCHA); String fpName = br.getRegex("h1 class=\"pmclass\">(.*?)</h1></td>").getMatch(0).trim(); fp.setName(fpName); String[] links = br.getRegex("><a href='(/\\?p=.*?)'").getColumn(0); if (links == null || links.length == 0) return null; progress.setRange(links.length); for (String psp : links) { // Fixed, thx to [email protected] br.getPage("http://protect-my-links.com" + psp); String c = br.getRegex("javascript>c=\"(.*?)\";").getMatch(0); String x = br.getRegex("x\\(\"(.*?)\"\\)").getMatch(0); if (c == null || x == null) return null; String step1Str = step1(c); if (step1Str == null) return null; ArrayList<Integer> step2Lst = step2(step1Str); if (step2Lst == null || step2Lst.size() == 0) return null; String step3Str = step3(step2Lst, x); if (step3Str == null) return null; String finallink = step4(step3Str); if (finallink == null) return null; decryptedLinks.add(createDownloadlink(finallink)); progress.increase(1); } fp.addLinks(decryptedLinks); return decryptedLinks; }
public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception { ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>(); String parameter = param.toString(); br.setFollowRedirects(false); br.getPage(parameter); if (br.containsHTML("(\"This link does not exist\\.\"|ERROR - this link does not exist)")) throw new DecrypterException( JDL.L( "plugins.decrypt.errormsg.unavailable", "Perhaps wrong URL or the download is not available anymore.")); if (br.containsHTML(">Not yet checked</span>")) throw new DecrypterException("Not yet checked"); if (br.containsHTML("To use reCAPTCHA you must get an API key from")) throw new DecrypterException("Server error, please contact the safelinking.net support!"); if (!parameter.contains("/d/")) { Form capForm = new Form(); capForm.put("post-protect", "1"); capForm.setMethod(MethodType.POST); capForm.setAction(parameter); for (int i = 0; i <= 5; i++) { if (br.containsHTML(PASSWORDPROTECTEDTEXT)) { capForm.put("link-password", getUserInput(null, param)); } if (br.containsHTML(RECAPTCHATEXT)) { PluginForHost recplug = JDUtilities.getPluginForHost("DirectHTTP"); jd.plugins.hoster.DirectHTTP.Recaptcha rc = ((DirectHTTP) recplug).getReCaptcha(br); rc.parse(); rc.load(); File cf = rc.downloadCaptcha(getLocalCaptchaFile()); capForm.put("recaptcha_challenge_field", rc.getChallenge()); capForm.put("recaptcha_response_field", getCaptchaCode(cf, param)); } else if (br.getRegex(CAPTCHAREGEX1).getMatch(0) != null) { capForm.put( "securimage_response_field", getCaptchaCode(br.getRegex(CAPTCHAREGEX1).getMatch(0), param)); } else if (br.getRegex(CAPTCHAREGEX2).getMatch(0) != null) { capForm.put( "3dcaptcha_response_field", getCaptchaCode(br.getRegex(CAPTCHAREGEX2).getMatch(0), param)); } else if (br.containsHTML(CAPTCHATEXT3)) { Browser xmlbrowser = br.cloneBrowser(); xmlbrowser.getPage("http://safelinking.net/includes/captcha_factory/fancycaptcha.php"); capForm.put("fancy-captcha", xmlbrowser.toString().trim()); } br.submitForm(capForm); if (br.containsHTML(RECAPTCHATEXT) || br.getRegex(CAPTCHAREGEX1).getMatch(0) != null || br.getRegex(CAPTCHAREGEX2).getMatch(0) != null || br.containsHTML(PASSWORDPROTECTEDTEXT)) continue; if (br.containsHTML(CAPTCHATEXT3)) { logger.warning("Captcha3 captchahandling failed for link: " + parameter); return null; } break; } if (br.containsHTML(RECAPTCHATEXT) || br.getRegex(CAPTCHAREGEX1).getMatch(0) != null || br.getRegex(CAPTCHAREGEX2).getMatch(0) != null) throw new DecrypterException(DecrypterException.CAPTCHA); if (br.containsHTML(PASSWORDPROTECTEDTEXT)) throw new DecrypterException(DecrypterException.PASSWORD); if (br.containsHTML(">All links are dead\\.<")) throw new DecrypterException( JDL.L( "plugins.decrypt.errormsg.unavailable", "Perhaps wrong URL or the download is not available anymore.")); // container handling (if no containers found, use webprotection if (br.containsHTML("\\.dlc")) { decryptedLinks = loadcontainer(".dlc", param); if (decryptedLinks != null && decryptedLinks.size() > 0) return decryptedLinks; } if (br.containsHTML("\\.rsdf")) { decryptedLinks = loadcontainer(".rsdf", param); if (decryptedLinks != null && decryptedLinks.size() > 0) return decryptedLinks; } if (br.containsHTML("\\.ccf")) { decryptedLinks = loadcontainer(".ccf", param); if (decryptedLinks != null && decryptedLinks.size() > 0) return decryptedLinks; } decryptedLinks = new ArrayList<DownloadLink>(); // Webprotection decryption String[] links = br.getRegex("class=\"linked\">(http://safelinking\\.net/d/.*?)</a>").getColumn(0); if (links == null || links.length == 0) { String allLinks = br.getRegex("class=\"link-box\" id=\"direct-links\".*?>(.*?<a href=\".*?)</div>") .getMatch(0); if (allLinks != null) links = new Regex(allLinks, "<a href=\"(.*?)\"").getColumn(0); if (links == null || links.length == 0) { links = br.getRegex("\"(http://safelinking\\.net/d/[a-z0-9]+)\"").getColumn(0); if (links == null || links.length == 0) { links = br.getRegex("class=\"linked\">(http://.*?)</a>").getColumn(0); } } } if (links == null || links.length == 0) return null; progress.setRange(links.length); for (String link : links) { if (!link.contains("safelinking.net/")) { decryptedLinks.add(createDownloadlink(link)); } else { br.getPage(link); String finallink = br.getRedirectLocation(); if (finallink == null) { logger.warning("Decrypter broken, decryption stopped at link: " + link); return null; } if (!parameter.equals(finallink)) decryptedLinks.add(createDownloadlink(finallink)); } progress.increase(1); } } else { if (br.getRedirectLocation() == null) { logger.warning("Error in single-link handling for link: " + parameter); return null; } decryptedLinks.add(createDownloadlink(br.getRedirectLocation())); } return decryptedLinks; }
public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception { ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>(); String parameter = param.toString(); br.getPage(parameter); if (br.containsHTML(">PICTURE GALLERY<") || parameter.matches(".*?deviantclip\\.com/Media-[0-9]+\\-[0-9]+_.*?\\.html")) { if (parameter.matches(".*?deviantclip\\.com/Media\\-[0-9]+\\-[0-9]+_.*?\\.html")) { getfpName(); if (fpName != null) { DownloadLink dl = createDownloadlink( parameter.replace("deviantclip.com", "gsghe366REHrtzegiolp") + "---picture"); dl.setName(fpName); br.getPage(parameter); String dllink = br.getRegex("\"(http://medias\\.deviantclip\\.com/media/[0-9]+/.*?)\"").getMatch(0); if (dllink != null) { dllink = dllink.replace("amp;", ""); URLConnectionAdapter con = br.openGetConnection(dllink); if (!con.getContentType().contains("html")) { String ending = LoadImage.getFileType(dllink, con.getContentType()); if (ending != null) dl.setFinalFileName(dl.getName() + ending); long size = con.getLongContentLength(); if (size != 0) { dl.setDownloadSize(con.getLongContentLength()); dl.setAvailable(true); } } } decryptedLinks.add(dl); } else { decryptedLinks.add( createDownloadlink( parameter.replace("deviantclip.com", "gsghe366REHrtzegiolp") + "---picture")); } } else { getfpName(); String[] links = br.getRegex("(http://www\\.deviantclip\\.com/Media\\-[0-9]+\\-[0-9]+_.*?\\.html)") .getColumn(0); if (links == null || links.length == 0) return null; progress.setRange(links.length); if (fpName != null) { int counter = 1; for (String photolink : links) { DownloadLink dl = createDownloadlink( photolink.replace("deviantclip.com", "gsghe366REHrtzegiolp") + "---picture"); dl.setName(fpName + "_" + counter); br.getPage(photolink); String dllink = br.getRegex("\"(http://medias\\.deviantclip\\.com/media/[0-9]+/.*?)\"").getMatch(0); if (dllink != null) { dllink = dllink.replace("amp;", ""); URLConnectionAdapter con = br.openGetConnection(dllink); if (!con.getContentType().contains("html")) { String ending = LoadImage.getFileType(dllink, con.getContentType()); if (ending != null) dl.setFinalFileName(dl.getName() + ending); long size = con.getLongContentLength(); if (size != 0) { dl.setDownloadSize(con.getLongContentLength()); dl.setAvailable(true); } } } decryptedLinks.add(dl); counter = counter + 1; progress.increase(1); } } else { for (String photolink : links) { decryptedLinks.add( createDownloadlink( photolink.replace("deviantclip.com", "gsghe366REHrtzegiolp") + "---picture")); } } if (fpName != null) { FilePackage fp = FilePackage.getInstance(); fp.setName(fpName.trim()); fp.addLinks(decryptedLinks); } } } else { getfpName(); if (fpName != null) { DownloadLink dl = createDownloadlink( parameter.replace("deviantclip.com", "gsghe366REHrtzegiolp") + "---video"); dl.setFinalFileName(fpName + ".flv"); decryptedLinks.add(dl); } else { decryptedLinks.add( createDownloadlink( parameter.replace("deviantclip.com", "gsghe366REHrtzegiolp") + "---video")); } } return decryptedLinks; }