Password RAR options

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
User avatar
WyldWolf
Newbie
Newbie
Posts: 4
Joined: February 27th, 2018, 2:29 pm

Password RAR options

Post by WyldWolf »

Hi all!

So I have been pouring through the forum here including post-processing script stuff and am surprised this has not been done I must just be missing it. Is there an option, or does somebody have a post-processing script example to simply always try the full rar filename itself (or I guess could also be the nzb full filename) as the password?

I do see options where the password is embedded in the name in different formats, so this must be possible. I commonly see valid rars where they are simply set to the rar filename itself as the password, and it's a huge pain to have to manually add them on each job and obviously trying to programatically add and remove from the shared password file would just slow things down so I'm guessing this is probably a post-processing regex?

TIA for any help!
User avatar
jcfp
Release Testers
Release Testers
Posts: 989
Joined: February 7th, 2008, 12:45 pm

Re: Password RAR options

Post by jcfp »

Using a post-proc script to set a job password doesn't make much sense, as such a script runs only after all other processing - including extraction of rar archives - has already completed.

Using a pre-queue script to set the password by manipulating the nzb name may be possible though. At that point, however, neither the rar filename(s) nor the content of the nzb are available to the script; only the nzb filename is known and passed as an argument. It would be way more efficient if the password were simply included in the nzb itself or via http headers by whatever indexer is supplying them.
User avatar
WyldWolf
Newbie
Newbie
Posts: 4
Joined: February 27th, 2018, 2:29 pm

Re: Password RAR options

Post by WyldWolf »

So between pre and post are you saying there is nothing to expose the passed in nzb filename that could be regex'd and passed back to the unrar routine? How does the current process regex it when it is embedded per the wiki in the {} or the password= format? All i'm looking for is a 3rd method on top of those 2 to automatically try the rar filename itself upon unraring which I'm amazed is not there since this seems awfully common in the valid tv nzbs I use every day and have for years and until now simply done it via local script.

But as I understand the code was added to allow reading of the passwords.txt but since in this case they would dynamically change per file, that METHOD that's in place is perfect (as are the aforementioned two that do the nzb filename parsing for embedded pwd), I just need a way to tap into that existing unrar method and pass it a known password of my own - which is in turn always to try the rar filename. I apologize I thought the post-processing could still be used for unrar calls as it can be in other nzb apps like I said I'm brand new to sab.

Since this is always adding only one additional password attempt per file unrar, it certainly should not introduce any real noticeable processing delay (should be milliseconds additional to try a single pwd if as example it's already trying three from my passwords.txt, and already potentially trying the two other parsed passwords potentially already in the nzb filename.

Thanks for the reply hopefully we can pin down a way to accomplish this!
User avatar
jcfp
Release Testers
Release Testers
Posts: 989
Joined: February 7th, 2008, 12:45 pm

Re: Password RAR options

Post by jcfp »

Maybe you could set a password from postproc after all by retrying the job via the api, see https://sabnzbd.org/wiki/advanced/api#retry

The NZO_ID and other useful input (whether it was encrypted, etc.) for the script are available as environment vars. From the files on disk, have the script figure out the rar name and make that api call. Not sure if this works though, I never come across passworded releases.
User avatar
safihre
Administrator
Administrator
Posts: 5366
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Password RAR options

Post by safihre »

You are right, unlike NZBGet we don't provide any other "events" then entered-queue and finished-everything..
While I can see the appeal in supporting all these extra event-types, that's just not the kind of software SABnzbd is. For detailed tweaking NZBGet is the better option, for easy setup and use it's SABnzbd.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
WyldWolf
Newbie
Newbie
Posts: 4
Joined: February 27th, 2018, 2:29 pm

Re: Password RAR options

Post by WyldWolf »

I had no idea it was impossible to do such a simple thing like this with Sabnzbd but now looking at NZBGet it is clear it can do 100% of the same downloading that I get with Sab but offers substantially more options for matching my workflow and me not having to either manually perform these things (I can just continue to use newsleecher for that with a full windows GUI client) or worse yet change have to change my entire workflow just to match the NNTP downloader.

Thanks again for your help though and responding so quickly!
Post Reply