oscam-emu / oscam-patched-old

Open Source Cam Emulator
GNU General Public License v3.0
96 stars 55 forks source link

Everytime a PowerVU key is updated a line is added in SoftCam.Key #50

Closed littlesat closed 4 months ago

littlesat commented 5 years ago

Can't we better adapt the line we already have?

now-> P CCCCCCCC GROUP 1234 ; A nice transponder P 1234FFFF 00 AAAAAAAAAAAAAA P 1234FFFF 01 BBBBBBBBBBBBBB P 1234 XXXXXXXX QQQQQQQQQQQQQQ ;EMM Key

P 1234FFFF 00 DDDDDDDDDDDDDD ; added by Emu Sun Jun 31 23:53:08 2019 UA: XXXXXXXX P 1234FFFF 01 EEEEEEEEEEEEEE ; added by Emu Sun Jun 31 23:53:08 2019 UA: XXXXXXXX (these lines grow forever)...

suggested-> P CCCCCCCC GROUP 1234 ; A nice transponder P 1234FFFF 00 DDDDDDDDDDDDDD ; updated by Emu Sun Jun 31 23:53:08 2019 UA: XXXXXXXX P 1234FFFF 01 EEEEEEEEEEEEEE ; updated by Emu Sun Jun 31 23:53:08 2019 UA: XXXXXXXX P 1234 XXXXXXXX QQQQQQQQQQQQQQ ;EMM Key

The file now grows for ever and the old keys are not needed anymore...

oscam-emu commented 5 years ago

The new method (1 ecm key per transponder) is based on enigma namespace. Unfortunately, this info is not available to other clients, like non enigma2 stbs, pc clients, etc.

So, this means that oscam-emu will have to do different things based on the ecm key it is about to write in the file. This doesn't seem nice.

Also, before this "new method", way more keys were written and the softcam.key file was growing much faster. Now, only 1-2 ecm keys are written which keeps the file size manageable.

Another thing that can be done, and has been suggested previously, is to write new ecm keys in softcam.key only when oscam-emu is restarted or only when the emu reader is restarted. This means that new keys will be stored in memory, like it is done anyway, but they will be not written all the time in the softcam.key.

OscamSatUser commented 4 years ago

I wrote code that updates the softcam.key. It grabs the latest key from the bottom of the file, and updates the original ECM lines and on the EMM key line, it modifies the comment to show when that particular emm was last updated, that way i know which EMM keys are being utilized, and which have not. I run the code about once a week, and it keeps my softcam.key clean and easy to keep track.

P 6810426B GROUP 6051 ; 58:3881 P 6051FFFF 00 NEWKEYNEWKEY ; 58:3881 P 6051FFFF 01 NEWKEYNEWKEY ; 58:3881 P 6051 00EMM01 XXXXXXXXXE850E ; EMM 58:3881 P 6051 00EMM02 XXXXXXXXX46EFB ; EMM 58:3881 #Oscam 11-19-2019 by UA: 00EMM02 P 6051 00EMM03 XXXXXXXXXA3775 ; EMM 58:3881 P 6051 00EMM04 XXXXXXXXX7B0EC ; EMM 58:3881 #Oscam 10-27-2019 by UA: 00EMM04