JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #41  
Old 03.11.2015, 15:03
Spongshga's Avatar
Spongshga Spongshga is offline
JD Legend
 
Join Date: Apr 2009
Location: web
Posts: 1,159
Default

Alternative: ArchivStreaming via EventScript


edit:
Quote:
Da die umsetzug der neuen Erweiterung mehr Zeit in anspruch nimmt habe ich alternativ einige andere Ideen um solch eine funktion vorzeitig zu ermöglichen.
Für einen EventScript haebe ich die Idee etwas abgespeckt.
Event-Script:
Wie wäre es wenn man deinen einfachen JavaScript für den Eventmanager bastelt. Ist das überhaupt möglich?

Auf ein Interface ist zu verzichten, da man Einstellungen auch im Editor des Eventmanager vornehmen könnte um beispielsweise den Pfad des VLC.exe oder Filter der Media-Dateien anzugeben (ähnlich wie für das Infofile-Script).

Dieser Script würd über das Kontexmenü für ein Archiv ausgewählt und gestartet (nach erstellter Datei im Trigger)


Einfacher script:

1. Via Kontextmenüeintrag (Trigger) wird der Script auf ein Paket/Archiv im Linksammler/Downloadliste aktivert.
2. Der Script speist den Downloadfad in das Stream-Script-Tool (weitere Anwendung o-ä.), welcher sofort anfängt die größte Datei des vorhandene Archivs (part1) intervall und erzwungen zu entpacken.
2b) Während des Entpackvorgangs wird diese temporäre-Datei mithilfe eines Players (vlc) gesrtartet.
3. Das wars soweit...
3b) Weitere Einstellungen des Scripts JD-Regeln und/oder des Stream-Script-Tool's könnten dafür sorgen das nach dem *erfolgreichen Entpacken des Archivund die Links aus der Downloadliste entfernt werden.
__________________
sorry about my gramma (dyslexia).
———————————————————————————————————
SuFu/Google: Inoffizielle JDownloader Plugins, Erweiterungen, Addons & Tools

Last edited by Spongshga; 26.04.2016 at 18:06.
Reply With Quote
  #42  
Old 04.01.2016, 04:01
Spongshga's Avatar
Spongshga Spongshga is offline
JD Legend
 
Join Date: Apr 2009
Location: web
Posts: 1,159
Default News

Hinweis: VLC Player Untersützung


Der kommende VLC-Player 3.0 Soll künftig Archive unterstützen.
Vielleicht hilft das bei der Entwicklung des Streaming-Erweiterung etwas weiter.

Einige Fragen wie beispielsweise in Bezug auf die Passwort-Entschlüsselung der Archive welcher der VLC künftig öffnen soll, stehen vorerst noch in Frage.




*VLOG: **External links are only visible to Support Staff****External links are only visible to Support Staff**

*DL: **External links are only visible to Support Staff****External links are only visible to Support Staff**

*=Siehe Orginal Video-Lan Webseite.

LG Bob
__________________
sorry about my gramma (dyslexia).
———————————————————————————————————
SuFu/Google: Inoffizielle JDownloader Plugins, Erweiterungen, Addons & Tools

Last edited by Spongshga; 15.03.2016 at 15:03.
Reply With Quote
  #43  
Old 15.03.2016, 15:14
Spongshga's Avatar
Spongshga Spongshga is offline
JD Legend
 
Join Date: Apr 2009
Location: web
Posts: 1,159
Default

Folgender Beitrag ist für Zukünftige Dissussionen Dokumentiert und spielt derzeit keine große Rolle.

Spoiler:
alternative: vorschauregel für Tools wie RarStreamer
ggf. Kann dies als EventScript regel ausgeführt werden.
Durch einen Kontextmenüeintrag oder Regel wird auf folgende Pakete (Staffelpack) die ersten Parts (1-3) der ersten 3 Archive geladen um diese für eine Vorschaufunktion für Tools wie den RarStreamer einsehen zu können bzw. schneller öffnen zu können, um bereits bekannte Videos aus der Downloadliste (Pakete oder deren Archive) löschen zu können.
Anschließend werden weitere Parts in der Reihenfolge des Paketes geladen.
In diesem Falle für Archiv 1 part 2,3-.. anschließend für Archiv 2. part 2,3.. und so weiter...
Notitz: Intelligente Regel bei 6 Archiven.
__________________
sorry about my gramma (dyslexia).
———————————————————————————————————
SuFu/Google: Inoffizielle JDownloader Plugins, Erweiterungen, Addons & Tools
Reply With Quote
  #44  
Old 09.06.2016, 09:49
coalado's Avatar
coalado coalado is offline
JD Manager
 
Join Date: Feb 2009
Posts: 1,980
Default

Wir waren da ja schon recht weit, sind aber mit dem Entpacker (7zip) an Grenzen gestoßen. Ich bin mir ziemlich sicher, dass wir das Projekt demnächst wieder neu beleben werden.
__________________
Reply With Quote
  #45  
Old 18.06.2016, 04:05
Spongshga's Avatar
Spongshga Spongshga is offline
JD Legend
 
Join Date: Apr 2009
Location: web
Posts: 1,159
Default

Das hört sich klasse an!
__________________
sorry about my gramma (dyslexia).
———————————————————————————————————
SuFu/Google: Inoffizielle JDownloader Plugins, Erweiterungen, Addons & Tools
Reply With Quote
  #46  
Old 23.11.2016, 10:01
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

@Spongshga
Code:
Spongshga has exceeded their stored private messages quota and cannot accept further messages until they clear some space.

Please continue the conversation here or contact me in JD Chat.

I do not have 'rarstreamer.exe'. As I already mentioned, external links are hidden to users, so if you had already posted the link to the software in your previous message, I was not able to access it.

The translation did not help me much to figure out what kind of script you need. I managed to find a 'rarstreamer' software. Not sure if it is the latest version or if it is even the same software you were referring to. I was however, able to use it in a script.

The default 'folder monitor' mode of the software results in 100% CPU (maxing one core) usage. There is however, an additional option, to directly extract the archives. It appears to be working without any problems and I have used that in the script. Once the extraction is started, it will wait and automatically (without any user interaction) continue extracting when the next part becomes available. It also has an option to extract password protected archives, but it seems to be broken.

Code:
Assertion failed: files_to_unpack.size() == passwords.size(), file stream_unrar.cpp, line 695
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information

Script:

Code:
// Stream Archives
// Trigger : "Downloadlist Contextmenu Button"
// Note: Selection must be a finished link (not package)
// rarstreamer used: **External links are only visible to Support Staff**

if (name == "Stream Archive") {
    if (dlSelection.isLinkContext()) {
        var link = dlSelection.getContextLink();
        var file = link.getDownloadPath();
        var downloadFolder = link.getPackage().getDownloadFolder();
        var rarstreamer = "c:/portable/rarstreamer/stream_unrar.exe"; /* <- Set full path to rarstreamer */
        var player = "c:/portable/videolan/vlc/vlc.exe"; /* <- Set full path to media player */
        var streamFolder = downloadFolder + "/stream";

        if (getPath(file).exists()) {
            callAsync(function() {}, rarstreamer, "-a", file, "-d", streamFolder);
            callAsync(function() {}, player, streamFolder);
        }
    }
}
Reply With Quote
  #47  
Old 05.12.2016, 11:50
thecoder2012's Avatar
thecoder2012 thecoder2012 is offline
Official 9kw.eu Support
 
Join Date: Feb 2013
Location: Internet
Posts: 1,324
Default

Quote:
Originally Posted by mgpai View Post
It also has an option to extract password protected archives, but it seems to be broken.
It's broken with password and rar5 but the source code is helpful, maybe.
Code:
github.com/vlovich/stream-unrar
And UnRAR.dll / UnRAR source under rarlabs.com/rar_add.htm

And for linux:
Code:
github.com/m3t/urs
Script with RAR5/Password:
Code:
// Stream Archives
// Trigger : "Downloadlist Contextmenu Button"
// Note: Selection must be a finished link (not package)
// rarstreamer: **External links are only visible to Support Staff**// Source: **External links are only visible to Support Staff**//
// hashcat: **External links are only visible to Support Staff**// unrar: **External links are only visible to Support Staff**// rar2john: **External links are only visible to Support Staff**// mplayer for windows: **External links are only visible to Support Staff**
if (name == "Stream Archive") {
    if (dlSelection.isLinkContext()) {
        var link = dlSelection.getContextLink();
        var file = link.getDownloadPath();
        var downloadFolder = link.getPackage().getDownloadFolder();

        var rarstreamer = "c:/portable/rarstreamer/stream_unrar.exe"; /* <- Set full path to rarstreamer */
        var player = "c:/portable/videolan/vlc/vlc.exe"; /* <- Set full path to media player */
        var mplayer = "c:/portable/videolan/MPlayer for Windows/mplayer.exe"; /* <- Set full path to media player (mplayer) */
        var rar2john = "c:/portable/rar2john.exe"; /* <- Set full path to rar2john (and john) */
        var hashcat = "c:/portable/hashcat64.exe"; /* <- Set full path to hashcat */
        var unrar = "c:/portable/unrar.exe"; /* <- Set full path to unrar */
        var streamFolder = downloadFolder + "/stream";

        if (getPath(file).exists()) {
            var my_rar = getPath(file);
            var pwjson = JSON.parse(readFile(JD_HOME + "/cfg/org.jdownloader.extensions.extraction.ExtractionExtension.passwordlist.json"));
            var res = "";
            for (var i = 0; i < pwjson.length; i++) {
                res += pwjson[i] + "\n";
            }
            deleteFile(JD_HOME + "/tmp/password.txt", false);
            writeFile(JD_HOME + "/tmp/password.txt", res, false);

            callAsync(function(exitCode, stdOut, errOut) {
                if (errOut.match('not encrypted') || errOut == '' && stdOut == '') {
                    callAsync(function(exitCode2, stdOut2, errOut2) {
                        if (stdOut2.match('Details: RAR 4')) {
                            callAsync(function() {}, rarstreamer, "-a", file, "-d", streamFolder);
                            callAsync(function() {}, player, streamFolder);
                        } else {//RAR5
                            var stream_res = unrar + " p -inul -kb -x\"*sample*\" \"" + my_rar + "\" \"*.avi\" \"*.mkv\" \| \"" + mplayer + "\" -cache 20240 -noconsolecontrols -";

                            deleteFile(JD_HOME + "/tmp/stream.bat", false);
                            writeFile(JD_HOME + "/tmp/stream.bat", stream_res, false);
                            callAsync(function() {
                                deleteFile(JD_HOME + "/tmp/stream.bat", false);
                            }, JD_HOME + "/tmp/stream.bat");
                        }
                    }, unrar, "v", my_rar);
                } else {
                    deleteFile(JD_HOME + "/tmp/z.txt", false);
                    deleteFile(JD_HOME + "/tmp/newhash.txt", false);
                    var rarversion;
                    if (errOut.match('RAR3')) {
                        rarversion = 12500;
                        writeFile(JD_HOME + "/tmp/newhash.txt", stdOut.split(':')[1], false);
                    } else {
                        rarversion = 13000;
                        writeFile(JD_HOME + "/tmp/newhash.txt", stdOut.split(':')[2], false);
                    }
                    callAsync(function(exitCode2, stdOut2, errOut2) {
                        if (stdOut2.match('Cracked')) {
                            var mypass = readFile(JD_HOME + '/tmp/z.txt');
                            var stream_res = unrar + " p -inul -kb -p\"" + mypass + "\" -x\"*sample*\" \"" + my_rar + "\" \"*.avi\" \"*.mkv\" \| \"" + mplayer + "\" -cache 20240 -noconsolecontrols -";
                            stream_res = stream_res.replace(/\n/, "");
                            stream_res = stream_res.replace(/\//g, "\\");

                            deleteFile(JD_HOME + "/tmp/stream.bat", false);
                            writeFile(JD_HOME + "/tmp/stream.bat", stream_res, false);
                            callAsync(function() {
                                deleteFile(JD_HOME + "/tmp/stream.bat", false);
                            }, JD_HOME + "/tmp/stream.bat");
                        } else {
                            alert("Password not found.\n\n" + stdOut2 + errOut2);
                        }
                        deleteFile(JD_HOME + "/tmp/password.txt", false);
                        deleteFile(JD_HOME + "/tmp/z.txt", false);
                        deleteFile(JD_HOME + "/tmp/newhash.txt", false);
                    }, hashcat, "-m", rarversion, "--potfile-disable", "--outfile-format", "2", "--logfile-disable", "--weak-hash-threshold", "0", "-o", JD_HOME + "/tmp/z.txt", "-a", "0", JD_HOME + "/tmp/newhash.txt", JD_HOME + "/tmp/password.txt");
                }
            }, rar2john, my_rar);
        }
    }
}
Two known issues:
1. No auto delete for the stream files
2. For rar5 and with password is only unrar possible. (incomplete video as preview/stream)

I hope for JD2 and/or stream_unrar (with rar5/pw) in the future.
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep.

Last edited by thecoder2012; 14.07.2019 at 07:15.
Reply With Quote
  #48  
Old 09.12.2016, 14:35
Spongshga's Avatar
Spongshga Spongshga is offline
JD Legend
 
Join Date: Apr 2009
Location: web
Posts: 1,159
Default

thank you mgpai & thecoder2012 for the codes.
i will check it this weekand and give a feedback.

I also hope for a offical support <3
__________________
sorry about my gramma (dyslexia).
———————————————————————————————————
SuFu/Google: Inoffizielle JDownloader Plugins, Erweiterungen, Addons & Tools
Reply With Quote
  #49  
Old 27.05.2019, 15:41
thecoder2012's Avatar
thecoder2012 thecoder2012 is offline
Official 9kw.eu Support
 
Join Date: Feb 2013
Location: Internet
Posts: 1,324
Default

Quote:
Originally Posted by Spongshga View Post
i will check it this weekand and give a feedback.
Weekend in our live or later?
You can also write the feedback in German.

Quote:
Originally Posted by Spongshga View Post
I also hope for a offical support <3
Years later and the hope alive.

Example "GPU Password detection":
Code:
//disablePermissionChecks();

// GPU Password detection
// Trigger: Any Extraction Event
// Required: Synchronous execution of script

// hashcat: **External links are only visible to Support Staff**// rar2john: **External links are only visible to Support Staff**
// Config
var rar2john = "c:/portable/rar2john.exe"; /* <- Set full path to rar2john */
var hashcat = "c:/portable/hashcat64.exe"; /* <- Set full path to hashcat */

// Script
setAdvancedAlert(true);
if (event == "QUEUED") { //EXTRACTION_FAILED, EXTRACTING, CLEANUP, ACTIVE_ITEM, START, QUEUED, OPEN_ARCHIVE_SUCCESS
    var myArchive = archive;
    var pathS = getEnvironment().getPathSeparator();
    if (myArchive) {
        var ext = "";
        var file = myArchive.getFolder() + pathS + myArchive.getName();

        if (myArchive.getArchiveType() == "RAR_SINGLE") {
            ext = ".rar";
        } else if (myArchive.getArchiveType() == "RAR_MULTI" || myArchive.getArchiveType() == "RAR_MULTI2" || myArchive.getArchiveType() == "RAR_MULTI3" || myArchive.getArchiveType() == "RAR_MULTI4") {
            if (getPath(file + ".part0.rar").exists()) {
                ext = ".part0.rar";
            } else if (getPath(file + ".part00.rar").exists()) {
                ext = ".part00.rar";
            } else if (getPath(file + ".part000.rar").exists()) {
                ext = ".part000.rar";
            } else if (getPath(file + ".part1.rar").exists()) {
                ext = ".part1.rar";
            } else if (getPath(file + ".part01.rar").exists()) {
                ext = ".part01.rar";
            } else if (getPath(file + ".part001.rar").exists()) {
                ext = ".part001.rar";
            } else if (getPath(file + ".001.rar").exists()) {
                ext = ".001.rar";
            } else if (getPath(file + ".r00").exists()) {
                ext = ".r00";
            } else if (getPath(file + ".rar").exists()) {
                ext = ".rar";
            } else if (getPath(file + ".000").exists()) {
                ext = ".000";
            } else if (getPath(file + ".001").exists()) {
                ext = ".001";
            }
        }
        if (ext != "") {
            var my_rar = file + ext;

            //var jdpwlist = callAPI("config", "get", "org.jdownloader.extensions.extraction.ExtractionConfig", "cfg/org.jdownloader.extensions.extraction.ExtractionExtension", "PasswordList");
            var pwjson = JSON.parse(readFile(JD_HOME + pathS + "cfg" + pathS + "org.jdownloader.extensions.extraction.ExtractionExtension.passwordlist.json"));
            var res = "";
            for (var i = 0; i < pwjson.length; i++) {
                res += pwjson[i] + "\n";
            }
            deleteFile(JD_HOME + pathS + "tmp" + pathS + "password.txt", false);
            writeFile(JD_HOME + pathS + "tmp" + pathS + "password.txt", res, false);

            callAsync(function(exitCode, stdOut, errOut) {
                if (errOut.match('not encrypted') || errOut == '' && stdOut == '') {
                    myArchive.setPasswords([""]); //no password required
                } else {
                    deleteFile(JD_HOME + pathS + "tmp" + pathS + "z.txt", false);
                    deleteFile(JD_HOME + pathS + "tmp" + pathS + "newhash.txt", false);

                    var rarversion;
                    if (errOut.match('RAR3')) {
                        rarversion = 12500;
                        writeFile(JD_HOME + pathS + "tmp" + pathS + "newhash.txt", stdOut.split(':')[1], false);
                    } else {
                        rarversion = 13000;
                        writeFile(JD_HOME + pathS + "tmp" + pathS + "newhash.txt", stdOut.split(':')[2], false);
                    }
                }

                callAsync(function(exitCode2, stdOut2, errOut2) {
                    if (stdOut2.match('Cracked')) {
                        var mypass = readFile(JD_HOME + pathS + "tmp" + pathS + "z.txt");
                        myArchive.setPasswords([mypass]); //new password
                    } else {
                        if (myEnvironment.isHeadless()) {
                            log("Password not found.\n\n" + stdOut2 + errOut2);
                        } else {
                            alert("Password not found.\n\n" + stdOut2 + errOut2);
                        }
                    }
                    deleteFile(JD_HOME + pathS + "tmp" + pathS + "password.txt", false);
                    deleteFile(JD_HOME + pathS + "tmp" + pathS + "z.txt", false);
                    deleteFile(JD_HOME + pathS + "tmp" + pathS + "newhash.txt", false);
                }, hashcat, "-m", rarversion, "--potfile-disable", "--outfile-format", "2", "--logfile-disable", "--weak-hash-threshold", "0", "-o", JD_HOME + pathS + "tmp" + pathS + "z.txt", "-a", "0", JD_HOME + pathS + "tmp" + pathS + "newhash.txt", JD_HOME + pathS + "tmp" + pathS + "password.txt");
            }, rar2john, my_rar);
        }
    }
}
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep.

Last edited by thecoder2012; 14.07.2019 at 22:52.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 20:35.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.