tonikelope 2019-10-24 23:16:24 +02:00
parent 6efc18daa7
commit fbf45c85bd
4 changed files with 25 additions and 3 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId>
<version>6.73</version>
<version>6.74</version>
<packaging>jar</packaging>
<dependencies>
<dependency>

View File

@ -53,7 +53,7 @@ import javax.swing.UIManager;
*/
public final class MainPanel {
public static final String VERSION = "6.73";
public static final String VERSION = "6.74";
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
public static final int STREAMER_PORT = 1337;

View File

@ -785,7 +785,29 @@ public class MiscTools {
if (data != null) {
try {
ArrayList<String> links = findAllRegex("(?:https?|mega)://[^/\r\n]+/(#[^\r\n!]*?)?![^\r\n!]+![^\r\n]+", URLDecoder.decode(data, "UTF-8"), 0);
ArrayList<String> links = new ArrayList<>();
ArrayList<String> base64_chunks = findAllRegex("[A-Za-z0-9+/_-]+=*", URLDecoder.decode(data, "UTF-8"), 0);
if (!base64_chunks.isEmpty()) {
for (String chunk : base64_chunks) {
try {
String decoded = MiscTools.findFirstRegex("(?:https?|mega)://[^/\r\n]+/(#[^\r\n!]*?)?![^\r\n!]+![^\r\n]+", new String(Base64.getDecoder().decode(chunk), "UTF-8"), 0);
if (decoded != null) {
links.add(decoded);
}
} catch (Exception e) {
};
}
}
links.addAll(findAllRegex("(?:https?|mega)://[^/\r\n]+/(#[^\r\n!]*?)?![^\r\n!]+![^\r\n]+", URLDecoder.decode(data, "UTF-8"), 0));
links.addAll(findAllRegex("mega://e(n|l)c[^\r\n]+", URLDecoder.decode(data, "UTF-8"), 0));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 194 KiB