-Deleted 2 dead decrypters closes #4510 closes #4508

-Added some "login failed" loggers fixes #4511 fixes #4509
-Fixed dl.free.fr fixes #4515
-Fixed yuvutu fixes #4514

git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@16228 ebf7c1c2-ba36-0410-9fe8-c592906822b4
This commit is contained in:
psp 2012-03-28 11:23:16 +00:00
parent 0a745d78d0
commit bda02969e4
8 changed files with 49 additions and 144 deletions

View File

@ -723,4 +723,6 @@ jd/captcha/methods/fl
jd/plugins/hoster/ShareHutCom.class
jd/plugins/hoster/ShareHubCom.class
jd/plugins/hoster/GotUploadCom.class
jd/plugins/hoster/FyelsCom.class
jd/plugins/hoster/FyelsCom.classä
jd/plugins/decrypter/HdLnkngCom.class
jd/plugins/decrypter/Hsbstzcm.class

View File

@ -1,68 +0,0 @@
//jDownloader - Downloadmanager
//Copyright (C) 2009 JD-Team support@jdownloader.org
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program. If not, see <http://www.gnu.org/licenses/>.
package jd.plugins.decrypter;
import java.io.File;
import java.util.ArrayList;
import jd.PluginWrapper;
import jd.controlling.ProgressController;
import jd.plugins.CryptedLink;
import jd.plugins.DecrypterException;
import jd.plugins.DecrypterPlugin;
import jd.plugins.DownloadLink;
import jd.plugins.PluginForDecrypt;
import jd.plugins.PluginForHost;
import jd.plugins.hoster.DirectHTTP;
import jd.utils.JDUtilities;
import jd.utils.locale.JDL;
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "hidelinking.com" }, urls = { "http://(www\\.)?hidelinking\\.com/s/\\d+/[a-z0-9]+" }, flags = { 0 })
public class HdLnkngCom extends PluginForDecrypt {
public HdLnkngCom(PluginWrapper wrapper) {
super(wrapper);
}
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(">Sorry\\. The link provided does not exist")) throw new DecrypterException(JDL.L("plugins.decrypt.errormsg.unavailable", "Perhaps wrong URL or the download is not available anymore."));
boolean failed = true;
for (int i = 0; i <= 5; i++) {
PluginForHost recplug = JDUtilities.getPluginForHost("DirectHTTP");
jd.plugins.hoster.DirectHTTP.Recaptcha rc = ((DirectHTTP) recplug).getReCaptcha(br);
rc.parse();
rc.load();
File cf = rc.downloadCaptcha(getLocalCaptchaFile());
String c = getCaptchaCode(cf, param);
rc.setCode(c);
if (br.containsHTML(">Image Verification failed")) {
br.getPage(parameter);
continue;
}
failed = false;
break;
}
if (failed) throw new DecrypterException(DecrypterException.CAPTCHA);
String finallink = br.getRegex("<TR><td><font size=\"2\">(.*?)</td></tr></table>").getMatch(0);
if (finallink == null) return null;
decryptedLinks.add(createDownloadlink(finallink.trim()));
return decryptedLinks;
}
}

View File

@ -57,7 +57,10 @@ public class HdMxTpsCom extends PluginForDecrypt {
String finallink = null;
if (parameter.contains("/login/") || br.containsHTML("hdmixtapes\\.com/Create_account")) {
synchronized (LOCK) {
if (!getUserLogin()) return null;
if (!getUserLogin()) {
logger.info("Invalid logindata!");
return decryptedLinks;
}
br.setFollowRedirects(false);
// Access the page
br.getPage(parameter);

View File

@ -36,10 +36,10 @@ import jd.plugins.PluginForDecrypt;
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "houselegend.com" }, urls = { "http://[\\w\\.]*?houselegend\\.com/(([0-9]+.+)|(redirector.+))" }, flags = { 0 })
public class HsLgndCm extends PluginForDecrypt {
private Pattern sitePattern = Pattern.compile("target='_blank' href='(.*?houselegend\\.com/redirector\\.php\\?url=.*?)'>", Pattern.CASE_INSENSITIVE);
private Pattern redirectorPattern = Pattern.compile("click on the link <a href=\"(http://.*?)\">", Pattern.CASE_INSENSITIVE);
private Pattern sitePattern = Pattern.compile("target='_blank' href='(.*?houselegend\\.com/redirector\\.php\\?url=.*?)'>", Pattern.CASE_INSENSITIVE);
private Pattern redirectorPattern = Pattern.compile("click on the link <a href=\"(http://.*?)\">", Pattern.CASE_INSENSITIVE);
/* must be static so all plugins share same lock */
private static final Object LOCK = new Object();
private static final Object LOCK = new Object();
public HsLgndCm(PluginWrapper wrapper) {
super(wrapper);
@ -55,7 +55,10 @@ public class HsLgndCm extends PluginForDecrypt {
if (parameter.contains("redirector.php?")) {
links = new String[] { parameter };
} else {
if (!getUserLogin(parameter)) return decryptedLinks;
if (!getUserLogin(parameter)) {
logger.info("Invalid logindata!");
return decryptedLinks;
}
links = br.getRegex(sitePattern).getColumn(0);
}
if (links == null || links.length == 0) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);

View File

@ -1,56 +0,0 @@
// jDownloader - Downloadmanager
// Copyright (C) 2009 JD-Team support@jdownloader.org
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package jd.plugins.decrypter;
import java.util.ArrayList;
import jd.PluginWrapper;
import jd.controlling.ProgressController;
import jd.plugins.CryptedLink;
import jd.plugins.DecrypterPlugin;
import jd.plugins.DownloadLink;
import jd.plugins.FilePackage;
import jd.plugins.PluginForDecrypt;
@DecrypterPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "hsbsitez.com" }, urls = { "http://[\\w\\.]*?hsbsitez\\.com/files/\\d+/.*" }, flags = { 0 })
public class Hsbstzcm extends PluginForDecrypt {
public Hsbstzcm(PluginWrapper wrapper) {
super(wrapper);
// TODO Auto-generated constructor stub
}
@Override
public ArrayList<DownloadLink> decryptIt(CryptedLink parameter, ProgressController progress) throws Exception {
ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>();
br.getPage(parameter.toString());
String[] links = br.getRegex("<b>Original Url: </b> &nbsp; (http://.*?)<BR>").getColumn(0);
progress.setRange(links.length);
FilePackage fp = FilePackage.getInstance();
for (String data : links) {
decryptedLinks.add(createDownloadlink(data));
progress.increase(1);
}
String fpname = null;
fpname = br.getRegex("<TITLE>(.*?) \\| FilesCollection</TITLE>").getMatch(0);
fp.setName(fpname);
fp.addLinks(decryptedLinks);
return decryptedLinks;
}
}

View File

@ -263,7 +263,7 @@ public class VKontakteRu extends PluginForDecrypt {
else
decryptedLink = "http://vk.com/album" + photoAlbum;
decryptedLinks.add(createDownloadlink(decryptedLink));
logger.info("Decrypted link number " + df.format(overallCounter) + " :" + decryptedLink);
logger.info("Decrypted link number " + df.format(overallCounter) + " : " + decryptedLink);
overallCounter++;
}
}

View File

@ -16,11 +16,13 @@
package jd.plugins.hoster;
import java.io.File;
import java.io.IOException;
import java.util.regex.Pattern;
import jd.PluginWrapper;
import jd.http.URLConnectionAdapter;
import jd.parser.html.Form;
import jd.plugins.DownloadLink;
import jd.plugins.DownloadLink.AvailableStatus;
import jd.plugins.HostPlugin;
@ -28,10 +30,11 @@ import jd.plugins.LinkStatus;
import jd.plugins.Plugin;
import jd.plugins.PluginException;
import jd.plugins.PluginForHost;
import jd.utils.JDUtilities;
import org.appwork.utils.formatter.SizeFormatter;
@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "dl.free.fr" }, urls = { "http://[\\w\\.]*?dl\\.free\\.fr/(getfile\\.pl\\?file=/[\\w]+|[\\w]+/?)" }, flags = { 0 })
@HostPlugin(revision = "$Revision$", interfaceVersion = 2, names = { "dl.free.fr" }, urls = { "http://(www\\.)?dl\\.free\\.fr/(getfile\\.pl\\?file=/[\\w]+|[\\w]+/?)" }, flags = { 0 })
public class DlFreeFr extends PluginForHost {
public DlFreeFr(PluginWrapper wrapper) {
@ -53,21 +56,39 @@ public class DlFreeFr extends PluginForHost {
@Override
public void handleFree(DownloadLink downloadLink) throws Exception {
requestFileInformation(downloadLink);
br.setFollowRedirects(true);
if (HTML) {
if (br.containsHTML("Trop de slots utilis")) { throw new PluginException(LinkStatus.ERROR_IP_BLOCKED, null, 10 * 60 * 1001l); }
br.setFollowRedirects(false);
if (br.containsHTML("Trop de slots utilis")) throw new PluginException(LinkStatus.ERROR_IP_BLOCKED, null, 10 * 60 * 1001l);
final Form captchaForm = br.getForm(1);
if (captchaForm == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
String filename = br.getRegex(Pattern.compile("Fichier:</td>.*?<td.*?>(.*?)<", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
String filesize = br.getRegex(Pattern.compile("Taille:</td>.*?<td.*?>(.*?)soit", Pattern.DOTALL | Pattern.CASE_INSENSITIVE)).getMatch(0);
if (filename == null || filesize == null) { throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND); }
String dlLink = br.getRegex("window\\.location\\.href = \\'(http://.*?)\\'").getMatch(0);
if (dlLink == null) dlLink = br.getRegex("style=\"text\\-decoration: underline\" id=\"link\" href=\"(http[^<>\"]+)").getMatch(0);
if (filename == null || filesize == null) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
PluginForHost recplug = JDUtilities.getPluginForHost("DirectHTTP");
jd.plugins.hoster.DirectHTTP.Recaptcha rc = ((DirectHTTP) recplug).getReCaptcha(br);
rc.setForm(captchaForm);
String id = br.getRegex("\\?k=([A-Za-z0-9%_\\+\\- ]+)\\'").getMatch(0);
rc.setId(id);
rc.load();
rc.getForm().put("_ayl_captcha_engine", "recaptcha");
rc.getForm().put("_ayl_utf8_ie_fix", "%E2%98%83");
rc.getForm().put("_ayl_env", "prod");
rc.getForm().put("_ayl_token_challenge", "undefined");
rc.getForm().put("_ayl_tid", "undefined");
File cf = rc.downloadCaptcha(getLocalCaptchaFile());
String c = getCaptchaCode(cf, downloadLink);
rc.setCode(c);
if (br.containsHTML("(api\\.recaptcha\\.net|google\\.com/recaptcha/api/)")) throw new PluginException(LinkStatus.ERROR_CAPTCHA);
final String dlLink = br.getRedirectLocation();
if (dlLink == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
dl = jd.plugins.BrowserAdapter.openDownload(br, downloadLink, dlLink, true, 1);
} else {
br.setFollowRedirects(true);
dl = jd.plugins.BrowserAdapter.openDownload(br, downloadLink, downloadLink.getDownloadURL(), true, 1);
}
if (!dl.getConnection().isContentDisposition()) {
br.followConnection();
if (br.getURL().contains("overload")) { throw new PluginException(LinkStatus.ERROR_IP_BLOCKED, 60 * 60 * 1000l); }
if (br.getURL().contains("overload")) throw new PluginException(LinkStatus.ERROR_IP_BLOCKED, 60 * 60 * 1000l);
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
}
dl.startDownload();

View File

@ -21,6 +21,7 @@ import java.io.IOException;
import jd.PluginWrapper;
import jd.http.Browser;
import jd.http.URLConnectionAdapter;
import jd.nutils.encoding.Encoding;
import jd.parser.Regex;
import jd.plugins.DownloadLink;
import jd.plugins.DownloadLink.AvailableStatus;
@ -67,14 +68,13 @@ public class YuvutuCom extends PluginForHost {
br.setFollowRedirects(false);
br.getPage(downloadLink.getDownloadURL());
if (br.containsHTML(">The video you requested does not exist<")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
String filename = br.getRegex("Amateur Videos, Amateur Porn, TV Sex Porno XXX -(.*?)</title>").getMatch(0);
if (filename == null) filename = br.getRegex("class=\"userName\">.*?img src.*?href.*?</a>:(.*?)</td").getMatch(0);
String filename = br.getRegex("class=\"userName\">.*?img src.*?href.*?</a>:(.*?)</td").getMatch(0);
if (filename == null) filename = br.getRegex("<span class=\"authorName\">.*?<a href=\".*?\">.*?</a>.*?</span>(.*?)</td>.*?<td class=\"videoTitle\"").getMatch(0);
dllink = br.getRegex("value=\"file=(http.*?)\\&width").getMatch(0);
if (dllink == null) dllink = br.getRegex("(http://vs\\d+\\.yuvutu\\.com/dl/.*?/streams/.*?\\.flv)").getMatch(0);
dllink = br.getRegex("value=\"file=(http[^<>\\&\"]*?)\\&").getMatch(0);
if (dllink == null) dllink = br.getRegex("(http://vs\\d+\\.yuvutu\\.com/dl/.*?/streams/.*?\\.(flv|mp4))").getMatch(0);
if (filename == null || dllink == null) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
filename = filename.trim();
String ext = new Regex(dllink, ".+(\\..{2,4})$").getMatch(0);
filename = Encoding.htmlDecode(filename.trim());
String ext = new Regex(dllink, ".+(\\..{2,5})$").getMatch(0);
if (ext == null) ext = ".flv";
downloadLink.setFinalFileName(filename + ext);
Browser br2 = br.cloneBrowser();