Skip to content

Commit

Permalink
Update to 7.76 from upstream
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'upstream/master'
  • Loading branch information
Gaurav Suman authored and Gaurav Suman committed Aug 4, 2023
2 parents f1d7660 + b7598c8 commit c8dbd05
Show file tree
Hide file tree
Showing 20 changed files with 102 additions and 110 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1>MegaBasterd fork for using bulk proxy lists</h1>
<h2>This fork of megabasterd blocks failed proxies for 1 day instead of just 90 seconds. This ensures that if you are using bulk proxy lists where multiple proxies are useless, they won't be retried unneccessarily </h2>

[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![Linux](https://svgshare.com/i/Zhy.svg)](https://svgshare.com/i/Zhy.svg) [![macOS](https://svgshare.com/i/ZjP.svg)](https://svgshare.com/i/ZjP.svg) [![Windows](https://svgshare.com/i/ZhY.svg)](https://svgshare.com/i/ZhY.svg)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

<p align="center"><i>"If it compiles, it's good; if it boots up, it's perfect." (Linus Torvalds)</i></p>
<p align="center"><a href="https://github.com/tonikelope/megabasterd/releases/latest" target="_blank"><img src="https://raw.githubusercontent.com/tonikelope/megabasterd/master/src/main/resources/images/mbasterd_logo_git.png"></a></p>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId>
<version>7.74</version>
<version>7.76</version>
<packaging>jar</packaging>
<repositories>
<repository>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ public void run() {

tmp_chunk_file = new File(_download.getChunkmanager().getChunks_dir() + "/" + new File(_download.getFile_name()).getName() + ".chunk" + chunk_id + ".tmp");

try ( InputStream is = new ThrottledInputStream(con.getInputStream(), _download.getMain_panel().getStream_supervisor()); OutputStream tmp_chunk_file_os = new BufferedOutputStream(new FileOutputStream(tmp_chunk_file))) {
try (InputStream is = new ThrottledInputStream(con.getInputStream(), _download.getMain_panel().getStream_supervisor()); OutputStream tmp_chunk_file_os = new BufferedOutputStream(new FileOutputStream(tmp_chunk_file))) {

init_chunk_time = System.currentTimeMillis();

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/tonikelope/megabasterd/ChunkUploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public void run() {

ByteArrayOutputStream chunk_mac = new ByteArrayOutputStream();

try ( QueueInputStream qis = new QueueInputStream(); QueueOutputStream qos = qis.newQueueOutputStream(); BufferedInputStream bis = new BufferedInputStream(Channels.newInputStream(f.getChannel())); CipherInputStream cis = new CipherInputStream(qis, genCrypter("AES", "AES/CTR/NoPadding", _upload.getByte_file_key(), forwardMEGALinkKeyIV(_upload.getByte_file_iv(), chunk_offset))); OutputStream out = new ThrottledOutputStream(con.getOutputStream(), _upload.getMain_panel().getStream_supervisor())) {
try (QueueInputStream qis = new QueueInputStream(); QueueOutputStream qos = qis.newQueueOutputStream(); BufferedInputStream bis = new BufferedInputStream(Channels.newInputStream(f.getChannel())); CipherInputStream cis = new CipherInputStream(qis, genCrypter("AES", "AES/CTR/NoPadding", _upload.getByte_file_key(), forwardMEGALinkKeyIV(_upload.getByte_file_iv(), chunk_offset))); OutputStream out = new ThrottledOutputStream(con.getOutputStream(), _upload.getMain_panel().getStream_supervisor())) {

LOG.log(Level.INFO, "{0} Uploading chunk {1} from worker {2} {3}...", new Object[]{Thread.currentThread().getName(), chunk_id, _id, _upload.getFile_name()});

Expand Down Expand Up @@ -251,7 +251,7 @@ public void run() {

String httpresponse;

try ( InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {
try (InputStream is = con.getInputStream(); ByteArrayOutputStream byte_res = new ByteArrayOutputStream()) {

while ((reads = is.read(buffer)) != -1) {
byte_res.write(buffer, 0, reads);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public void run() {

int reads;

try ( CipherInputStream cis = new CipherInputStream(new BufferedInputStream(new FileInputStream(chunk_file)), genDecrypter("AES", "AES/CTR/NoPadding", _byte_file_key, forwardMEGALinkKeyIV(_byte_iv, _bytes_written)))) {
try (CipherInputStream cis = new CipherInputStream(new BufferedInputStream(new FileInputStream(chunk_file)), genDecrypter("AES", "AES/CTR/NoPadding", _byte_file_key, forwardMEGALinkKeyIV(_byte_iv, _bytes_written)))) {
while ((reads = cis.read(buffer)) != -1) {
_download.getOutput_stream().write(buffer, 0, reads);
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/tonikelope/megabasterd/CryptTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public static HashSet<String> decryptELC(String link, MainPanel main_panel) {

if (compression) {

try ( InputStream is = new GZIPInputStream(new ByteArrayInputStream(elc_byte)); ByteArrayOutputStream out = new ByteArrayOutputStream()) {
try (InputStream is = new GZIPInputStream(new ByteArrayInputStream(elc_byte)); ByteArrayOutputStream out = new ByteArrayOutputStream()) {

byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];

Expand Down Expand Up @@ -437,7 +437,7 @@ public static HashSet<String> decryptELC(String link, MainPanel main_panel) {

con.getOutputStream().close();

try ( InputStream is = con.getInputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream()) {
try (InputStream is = con.getInputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream()) {

byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];

Expand Down Expand Up @@ -558,7 +558,7 @@ public static HashSet<String> decryptDLC(String data, MainPanel main_panel) {

String enc_dlc_key;

try ( InputStream is = con.getInputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream()) {
try (InputStream is = con.getInputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream()) {
byte[] buffer = new byte[MainPanel.DEFAULT_BYTE_BUFFER_SIZE];
int reads;
while ((reads = is.read(buffer)) != -1) {
Expand Down
Loading

0 comments on commit c8dbd05

Please sign in to comment.