// jDownloader - Downloadmanager // Copyright (C) 2008 JD-Team jdownloader@freenet.de // // 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 . package jd.plugins.decrypt; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.util.HashMap; import java.util.Vector; import java.util.regex.Pattern; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; import javax.crypto.spec.SecretKeySpec; import jd.config.Configuration; import jd.controlling.JDController; import jd.crypt.AESdecrypt; import jd.crypt.Base16Decoder; import jd.crypt.BaseDecoder.IllegalAlphabetException; import jd.plugins.DownloadLink; import jd.plugins.Plugin; import jd.plugins.PluginForDecrypt; import jd.plugins.PluginStep; import jd.utils.JDLocale; import jd.utils.JDUtilities; // http://crypt-it.com/s/BXYMBR // http://crypt-it.com/s/B44Z4A public class CryptItCom extends PluginForDecrypt { static private final String HOST = "crypt-it.com"; private String VERSION = "0.3.0"; private String CODER = "jD-Team"; static private final Pattern patternSupported = getSupportPattern("(http|ccf)://[*]crypt-it.com/(s|e|d|c)/[a-zA-Z0-9]+"); private static final String PATTERN_PW = "Passworteingabe"; private static final String PATTERN_FLASH = " decryptedLinks = new Vector(); step.setParameter(decryptedLinks); parameter = parameter.replace("/s/", "/s/"); parameter = parameter.replace("/e/", "/s/"); parameter = parameter.replace("/c/", "/s/"); parameter = parameter.replace("ccf://", "http://"); try { requestInfo = getRequest(new URL(parameter), null, null, true); String cookie = requestInfo.getCookie(); String folderId = parameter.substring(parameter.lastIndexOf("/")+1, parameter.length()); logger.info(folderId); if (requestInfo.containsHTML(PATTERN_PW)) { String pass = JDUtilities.getController().getUiInterface().showUserInputDialog( JDLocale.L("plugins.hoster.general.passwordProtectedInput", "Die Links sind mit einem Passwort gesch\u00fctzt. Bitte geben Sie das Passwort ein:")); String postData = "a=pw&pw=" + JDUtilities.urlEncode(pass); requestInfo = postRequest(new URL(parameter), requestInfo.getCookie(), parameter, null, "a=pw&pw=" + pass, false); if (requestInfo.containsHTML(PATTERN_PW)) { logger.warning("Password wrong"); JDUtilities.getController().getUiInterface().showMessageDialog(JDLocale.L("plugins.decrypt.general.passwordWrong", "Passwort falsch")); step.setStatus(PluginStep.STATUS_ERROR); return null; } } if ( requestInfo.containsHTML(PATTERN_FLASH) ) { logger.info("flash"); HashMap hm = new HashMap(); hm.put("Content-Type","application/x-amf"); Base16Decoder decoder = new Base16Decoder(); byte[] code1 = decoder.decode("0000000000010010637279707469742e67657446696c657300022f310000000e0a00000001020006".toUpperCase().toCharArray()); char[] code2 = new char[code1.length+folderId.length()]; //System.out.println(""); for ( int i=0; i