mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-05-23 18:16:18 +02:00
6.46
-MAC GENERATOR CBC MAC status warning
This commit is contained in:
parent
db372bfd2e
commit
1559d0ac30
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.tonikelope</groupId>
|
||||
<artifactId>MegaBasterd</artifactId>
|
||||
<version>6.45</version>
|
||||
<version>6.46</version>
|
||||
<packaging>jar</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -145,13 +145,13 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
long chunk_id = _download.nextChunkId();
|
||||
|
||||
long chunk_offset = ChunkManager.calculateChunkOffset(chunk_id, Download.CHUNK_SIZE_MULTI);
|
||||
long chunk_offset = ChunkWriteManager.calculateChunkOffset(chunk_id, Download.CHUNK_SIZE_MULTI);
|
||||
|
||||
long chunk_size = ChunkManager.calculateChunkSize(chunk_id, _download.getFile_size(), chunk_offset, Download.CHUNK_SIZE_MULTI);
|
||||
long chunk_size = ChunkWriteManager.calculateChunkSize(chunk_id, _download.getFile_size(), chunk_offset, Download.CHUNK_SIZE_MULTI);
|
||||
|
||||
ChunkManager.checkChunkID(chunk_id, _download.getFile_size(), chunk_offset);
|
||||
ChunkWriteManager.checkChunkID(chunk_id, _download.getFile_size(), chunk_offset);
|
||||
|
||||
String chunk_url = ChunkManager.genChunkUrl(worker_url, _download.getFile_size(), chunk_offset, chunk_size);
|
||||
String chunk_url = ChunkWriteManager.genChunkUrl(worker_url, _download.getFile_size(), chunk_offset, chunk_size);
|
||||
|
||||
if ((_current_smart_proxy != null || http_error == 509) && MainPanel.isUse_smart_proxy() && !MainPanel.isUse_proxy()) {
|
||||
|
||||
|
@ -52,11 +52,11 @@ public class ChunkDownloaderMono extends ChunkDownloader {
|
||||
|
||||
chunk_id = getDownload().nextChunkId();
|
||||
|
||||
long chunk_offset = ChunkManager.calculateChunkOffset(chunk_id, 1);
|
||||
long chunk_offset = ChunkWriteManager.calculateChunkOffset(chunk_id, 1);
|
||||
|
||||
long chunk_size = ChunkManager.calculateChunkSize(chunk_id, getDownload().getFile_size(), chunk_offset, 1);
|
||||
long chunk_size = ChunkWriteManager.calculateChunkSize(chunk_id, getDownload().getFile_size(), chunk_offset, 1);
|
||||
|
||||
ChunkManager.checkChunkID(chunk_id, getDownload().getFile_size(), chunk_offset);
|
||||
ChunkWriteManager.checkChunkID(chunk_id, getDownload().getFile_size(), chunk_offset);
|
||||
|
||||
long chunk_reads = 0;
|
||||
|
||||
|
@ -122,13 +122,13 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
chunk_id = _upload.nextChunkId();
|
||||
|
||||
long chunk_offset = ChunkManager.calculateChunkOffset(chunk_id, Upload.CHUNK_SIZE_MULTI);
|
||||
long chunk_offset = ChunkWriteManager.calculateChunkOffset(chunk_id, Upload.CHUNK_SIZE_MULTI);
|
||||
|
||||
long chunk_size = ChunkManager.calculateChunkSize(chunk_id, _upload.getFile_size(), chunk_offset, Upload.CHUNK_SIZE_MULTI);
|
||||
long chunk_size = ChunkWriteManager.calculateChunkSize(chunk_id, _upload.getFile_size(), chunk_offset, Upload.CHUNK_SIZE_MULTI);
|
||||
|
||||
ChunkManager.checkChunkID(chunk_id, _upload.getFile_size(), chunk_offset);
|
||||
ChunkWriteManager.checkChunkID(chunk_id, _upload.getFile_size(), chunk_offset);
|
||||
|
||||
String chunk_url = ChunkManager.genChunkUrl(worker_url, _upload.getFile_size(), chunk_offset, chunk_size);
|
||||
String chunk_url = ChunkWriteManager.genChunkUrl(worker_url, _upload.getFile_size(), chunk_offset, chunk_size);
|
||||
|
||||
URL url = new URL(chunk_url);
|
||||
|
||||
|
@ -18,7 +18,7 @@ import javax.crypto.NoSuchPaddingException;
|
||||
*
|
||||
* @author tonikelope
|
||||
*/
|
||||
public final class ChunkManager implements Runnable, SecureSingleThreadNotifiable {
|
||||
public final class ChunkWriteManager implements Runnable, SecureSingleThreadNotifiable {
|
||||
|
||||
public static long calculateChunkOffset(long chunk_id, int size_multi) {
|
||||
long[] offs = {0, 128, 384, 768, 1280, 1920, 2688};
|
||||
@ -67,7 +67,7 @@ public final class ChunkManager implements Runnable, SecureSingleThreadNotifiabl
|
||||
private boolean _notified;
|
||||
private final String _chunks_dir;
|
||||
|
||||
public ChunkManager(Download downloader) throws Exception {
|
||||
public ChunkWriteManager(Download downloader) throws Exception {
|
||||
_notified = false;
|
||||
_exit = false;
|
||||
_download = downloader;
|
||||
@ -147,7 +147,7 @@ public final class ChunkManager implements Runnable, SecureSingleThreadNotifiabl
|
||||
try {
|
||||
MiscTools.deleteDirectoryRecursion(Paths.get(getChunks_dir()));
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(ChunkManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
Logger.getLogger(ChunkWriteManager.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,6 +227,6 @@ public final class ChunkManager implements Runnable, SecureSingleThreadNotifiabl
|
||||
|
||||
LOG.log(Level.INFO, "{0} Chunkmanager: bye bye{1}", new Object[]{Thread.currentThread().getName(), _download.getFile().getName()});
|
||||
}
|
||||
private static final Logger LOG = Logger.getLogger(ChunkManager.class.getName());
|
||||
private static final Logger LOG = Logger.getLogger(ChunkWriteManager.class.getName());
|
||||
|
||||
}
|
@ -79,7 +79,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
private volatile boolean _pause;
|
||||
private final ConcurrentLinkedQueue<Long> _partialProgressQueue;
|
||||
private volatile long _progress;
|
||||
private ChunkManager _chunkmanager;
|
||||
private ChunkWriteManager _chunkmanager;
|
||||
private String _last_download_url;
|
||||
private boolean _provision_ok;
|
||||
private boolean _finishing_download;
|
||||
@ -291,7 +291,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
_pause = pause;
|
||||
}
|
||||
|
||||
public ChunkManager getChunkmanager() {
|
||||
public ChunkWriteManager getChunkmanager() {
|
||||
return _chunkmanager;
|
||||
}
|
||||
|
||||
@ -594,7 +594,7 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
|
||||
if (_use_slots) {
|
||||
|
||||
_chunkmanager = new ChunkManager(this);
|
||||
_chunkmanager = new ChunkWriteManager(this);
|
||||
|
||||
_thread_pool.execute(_chunkmanager);
|
||||
|
||||
@ -1326,11 +1326,11 @@ public final class Download implements Transference, Runnable, SecureSingleThrea
|
||||
try {
|
||||
while (!_exit) {
|
||||
|
||||
long chunk_offset = ChunkManager.calculateChunkOffset(chunk_id, 1);
|
||||
long chunk_offset = ChunkWriteManager.calculateChunkOffset(chunk_id, 1);
|
||||
|
||||
long chunk_size = ChunkManager.calculateChunkSize(chunk_id, this.getFile_size(), chunk_offset, 1);
|
||||
long chunk_size = ChunkWriteManager.calculateChunkSize(chunk_id, this.getFile_size(), chunk_offset, 1);
|
||||
|
||||
ChunkManager.checkChunkID(chunk_id, this.getFile_size(), chunk_offset);
|
||||
ChunkWriteManager.checkChunkID(chunk_id, this.getFile_size(), chunk_offset);
|
||||
|
||||
tot += chunk_size;
|
||||
|
||||
|
@ -36,6 +36,7 @@ public final class LabelTranslatorSingleton {
|
||||
|
||||
private void Spanish() {
|
||||
|
||||
_addTranslation("Finishing calculating CBC-MAC code (this could take a while) ... ***DO NOT EXIT MEGABASTERD NOW***", "Terminando de calcular código CBC-MAC (esto podría llevar tiempo) ... ***NO CIERRES MEGABASTERD EN ESTE MOMENTO***");
|
||||
_addTranslation("Split content in different uploads", "Separar contenido en diferentes subidas");
|
||||
_addTranslation("Merge content in the same upload", "Juntar todo en la misma subida");
|
||||
_addTranslation("How do you want to proceed?", "¿Qué quieres hacer?");
|
||||
|
@ -50,7 +50,7 @@ import javax.swing.UIManager;
|
||||
*/
|
||||
public final class MainPanel {
|
||||
|
||||
public static final String VERSION = "6.45";
|
||||
public static final String VERSION = "6.46";
|
||||
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;
|
||||
|
@ -107,17 +107,33 @@ public final class UploadMACGenerator implements Runnable, SecureSingleThreadNot
|
||||
long tot = 0L;
|
||||
int[] chunk_mac = new int[4];
|
||||
byte[] byte_block = new byte[16];
|
||||
boolean upload_finished = false;
|
||||
|
||||
try {
|
||||
while (!_exit && !_upload.isStopped() && !_upload.getMain_panel().isExit()) {
|
||||
|
||||
if (!upload_finished && _upload.getProgress() == _upload.getFile_size()) {
|
||||
|
||||
_upload.getView().printStatusNormal("Finishing calculating CBC-MAC code (this could take a while) ... ***DO NOT EXIT MEGABASTERD NOW***");
|
||||
|
||||
_upload.getView().getPause_button().setVisible(false);
|
||||
_upload.getMain_panel().getGlobal_dl_speed().detachTransference(_upload);
|
||||
_upload.getView().getSpeed_label().setVisible(false);
|
||||
_upload.getView().getSlots_label().setVisible(false);
|
||||
_upload.getView().getSlot_status_label().setVisible(false);
|
||||
_upload.getView().getSlots_spinner().setVisible(false);
|
||||
|
||||
upload_finished = true;
|
||||
|
||||
}
|
||||
|
||||
int reads;
|
||||
|
||||
long chunk_offset = ChunkManager.calculateChunkOffset(chunk_id, 1);
|
||||
long chunk_offset = ChunkWriteManager.calculateChunkOffset(chunk_id, 1);
|
||||
|
||||
long chunk_size = ChunkManager.calculateChunkSize(chunk_id, _upload.getFile_size(), chunk_offset, 1);
|
||||
long chunk_size = ChunkWriteManager.calculateChunkSize(chunk_id, _upload.getFile_size(), chunk_offset, 1);
|
||||
|
||||
ChunkManager.checkChunkID(chunk_id, _upload.getFile_size(), chunk_offset);
|
||||
ChunkWriteManager.checkChunkID(chunk_id, _upload.getFile_size(), chunk_offset);
|
||||
|
||||
try {
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 218 KiB |
Loading…
x
Reference in New Issue
Block a user