PDA

View Full Version : Jade mod almost complete - just need help with last script!



mrdude
30th July, 2008, 02:55 PM
Right guys, that's my jade mod for the 500 just about complete now apart from the last script which is driving me a bit mad! lol

Anyway - The image uses two cam files - evocamd and scam
evocamd works great for me with no freezing, however some people report that it freezes sometimes so I also use scam which doesn't freeze but also doesn't use rom files to update so it gets the key from keylist.txt which evocamd does autoupdate.

As scam is a little weird and doesn't use the same provider key that scam uses it's sort of not working right as it uses the wrong key provider for it's nagra keyfile:

for example nagra uses provider 5a01 where scam uses 5b01

anyway I modded a script to make it use 5b01 - but it enters this vlaue manually, which is great if that's your provider but not great if it isn't as different areas in the uk use different providers.

I am looking for help to mod this script so that all UK key providers are catered for:



KEYFILE=/var/keys/Keylist.txt

key0=`grep " 00 " $KEYFILE`
prov1=`expr substr "$key0" 3 2`
prov2=`expr substr "$key0" 5 2`
key01=`expr substr "$key0" 11 2`
key02=`expr substr "$key0" 13 2`
key03=`expr substr "$key0" 15 2`
key04=`expr substr "$key0" 17 2`
key05=`expr substr "$key0" 19 2`
key06=`expr substr "$key0" 21 2`
key07=`expr substr "$key0" 23 2`
key08=`expr substr "$key0" 25 2`

key1=`grep " 01 " $KEYFILE`
key11=`expr substr "$key1" 11 2`
key12=`expr substr "$key1" 13 2`
key13=`expr substr "$key1" 15 2`
key14=`expr substr "$key1" 17 2`
key15=`expr substr "$key1" 19 2`
key16=`expr substr "$key1" 21 2`
key17=`expr substr "$key1" 23 2`
key18=`expr substr "$key1" 25 2`

echo "N: { 5B01 00 { $key01 $key02 $key03 $key04 $key05 $key06 $key07 $key08 } } SysID: ($prov1$prov2)" > /var/keys/nagra
echo "N: { 5B01 01 { $key11 $key12 $key13 $key14 $key15 $key16 $key17 $key18 } } SysID: ($prov1$prov2)" >> /var/keys/nagra

chmod 755 /var/keys/*


Any help would be appreciated - thanks.

Devilfish
30th July, 2008, 03:16 PM
What about this...


echo "N: { $prov1 $prov2 00 { $key01 $key02 $key03 $key04 $key05 $key06 $key07 $key08 }} SysID: $prov1$prov2" > /var/keys/nagra
echo "N: { $prov1 $prov2 01 { $key11 $key12 $key13 $key14 $key15 $key16 $key17 $key18 }} SysID: $prov1$prov2" >> /var/keys/nagra

This is Xenafans code, nothing to do with me.

mrdude
30th July, 2008, 03:24 PM
What about this...


echo "N: { $prov1 $prov2 00 { $key01 $key02 $key03 $key04 $key05 $key06 $key07 $key08 }} SysID: $prov1$prov2" > /var/keys/nagra
echo "N: { $prov1 $prov2 01 { $key11 $key12 $key13 $key14 $key15 $key16 $key17 $key18 }} SysID: $prov1$prov2" >> /var/keys/nagra

This is Xenafans code, nothing to do with me.


That was the original code m8,
it puts the provider at 5a01 instead of 5b01 - which scam uses - and scam is unable to decrypt the channels.

That's why I had to edit the code to show 5b01 in the first place.

I'm looking to add extra lines to nagra key file to add the extra uk providers.

cheers.

Devilfish
30th July, 2008, 05:12 PM
Ah ok...sorry I couldn't help more m8.

Aldormanndiobla
23rd September, 2008, 01:23 PM
I'm not sure how the keyfile is "ordered" or "built", but I can help with the scripting.

Not really sure what you are after, but if its just changing the provider from 5a01 to 5b01 on the fly, thats easy enough.

Can you post and example of the file, before and after?

mrdude
23rd September, 2008, 11:35 PM
I'm not sure how the keyfile is "ordered" or "built", but I can help with the scripting.

Not really sure what you are after, but if its just changing the provider from 5a01 to 5b01 on the fly, thats easy enough.

Can you post and example of the file, before and after?

LOL m8, the script is in the first post - If you understand scritping you'll see what that script does already.

It reads a file called 'keyfile.txt' and writes a new file called 'nagra'

when it reads the provider the script needs to append a hex value = ie provider 5a01 needs to be changed to 5b01 or provider 5801 needs to change to 5901 ---------- etc.

Do you think you could manage that? See devilfish's post to see what the providers original script looks like.