Page 1 of 1

Add functionality of CharTranslator.py to Deobfuscate.py ?

Posted: September 30th, 2018, 7:01 am
by pven
I am using several postprocess-scripts. One of them is CharTranslator.py ( https://github.com/SynoCommunity/spksrc ... nslator.py ). This is getting rid of some terrible characters that are allways hard to handle at the prompt.

Is it possible to integrate the 'get rid of the strange characters'-functionality into Deobfuscate.py ?

Re: Add functionality of CharTranslator.py to Deobfuscate.py ?

Posted: October 1st, 2018, 1:56 pm
by safihre
Hmmm it's an interesting thought.
You could create a pull request for it? :)

Re: Add functionality of CharTranslator.py to Deobfuscate.py ?

Posted: October 1st, 2018, 2:05 pm
by OneCD
A semi-related question: is it possible to run multiple post-processing scripts?

Re: Add functionality of CharTranslator.py to Deobfuscate.py ?

Posted: October 1st, 2018, 2:22 pm
by pven
@safihr: I will

@OneCD: yes, it is

Maybe there is an easier way, but I created a script called all.psy (.sh is probably a better extension) that I start as postprocess-script, it contains :

Code: Select all

#!/bin/sh
python /usr/local/sabnzbd/var/scripts/CharTranslator.py "$@"
python /usr/local/sabnzbd/var/scripts/Deobfuscate.py "$@"

Re: Add functionality of CharTranslator.py to Deobfuscate.py ?

Posted: October 1st, 2018, 2:42 pm
by OneCD
pven wrote: October 1st, 2018, 2:22 pmMaybe there is an easier way, but I created a script called all.psy (.sh is probably a better extension) that I start as postprocess-script, it contains :

Code: Select all

#!/bin/sh
python /usr/local/sabnzbd/var/scripts/CharTranslator.py "$@"
python /usr/local/sabnzbd/var/scripts/Deobfuscate.py "$@"
That's cheating! ;D

Sorry, I meant via the SAB UI. ;)

Re: Add functionality of CharTranslator.py to Deobfuscate.py ?

Posted: October 2nd, 2018, 1:30 am
by safihre
As SAB is "the easy client", we left such options out ;)

Maybe we should add this char translation to the sabnzbd core? Since we have an option to Make windows compatible. Or is it too tricky? Seems like you need to set the specific encoding? We could use chardet package to do that.

Re: Add functionality of CharTranslator.py to Deobfuscate.py ?

Posted: October 2nd, 2018, 1:55 am
by pven
I have no idea what happens ie with Chinese characters. No idea what the chardet package is.

You still want m to create a pull request? (Did not look into it yet.)

Re: Add functionality of CharTranslator.py to Deobfuscate.py ?

Posted: October 2nd, 2018, 2:39 am
by safihre
Yes, a pull request and if you could include examples of NZB's that need it, that would be great for testing.
I can always modify the pull request and put it in Sab directly.