Page 1 of 1

rar password extraction from filename

Posted: July 23rd, 2018, 5:07 pm
by flower
hi,

very often i have nzb files which contains the same password two times:

eg. filename_{{pwd}}_{{pwd}}.nzb

sabnzb tries to extract the received rar files with the password: "pwd}}_{{pwd"

ist there an easy way to change this behavior to force sabnzb to only use pwd? in my case the passwords inside the curly brackets are always identic

regards and thank you very much for this tool!

Re: rar password extraction from filename

Posted: July 24th, 2018, 8:47 am
by safihre
We search for the first and last occurrence, just in case maybe {{ or }} are in the password.
You could write a pre-queue script to fix this :) Or where do you get these NZB's? :P

Re: rar password extraction from filename

Posted: July 24th, 2018, 9:20 am
by jcfp
Seems like an indexer bug first and foremost, would be nice to know which one does this.

A simple regex in a pre-queue script can eliminate the surplus password(s), as long as you don't mind the side effects when the actual password itself contains certain sequences involving {{ and }}:

Code: Select all

echo 'nzbname here' | sed 's/}}_{{.\+}}$/}}/'

Re: rar password extraction from filename

Posted: July 24th, 2018, 9:47 am
by flower
jcfp wrote: July 24th, 2018, 9:20 am Seems like an indexer bug first and foremost, would be nice to know which one does this.

A simple regex in a pre-queue script can eliminate the surplus password(s), as long as you don't mind the side effects when the actual password itself contains certain sequences involving {{ and }}:

Code: Select all

echo 'nzbname here' | sed 's/}}_{{.\+}}$/}}/'
well it kinda is... the site insits on adding the password to the filename but some users upload them with the pwd already inside.

thank you.. will try