Posts by taras-ua

    Could you replace line #139 in the script with:


    logger.error(f'Could not find {file.as_posix()} in {l_dir}.')

    and re-run? Please save the indentation in the line.

    Which credentials do you use for FTP on 192.168.8.90?

    Try # python3 afn.py --ip 192.168.8.90 --login YOUR_FTP_LOGIN --password YOUR_FTP_PASSWORD

    I tried running it from my Android tablet via telnet,it was not successful.See results attached....


    How do I make this work?

    Check that you have copied key_patcher.py on your Android tablet. Run ls -l command in the console, It should print a list of the /home/root/ directory according to the information from your screenshot. If you have copied the script to another location just provide the correct path to the script in the command line.

    The script could be run on any Windows/Linux host in your network where PYTHON3 is installed. It could be run from your laptop as an example. And there is no need to run the script on your receiver, but it is also possible. You should specify the IP address of your receiver in the command line and your receiver must be accessible by FTP.


    Actual topic HERE

    Yes, thank you. I've tested it. It does not store the keys to SoftCam.Key immediately, you have to wait for a real EMM AU.

    Unfortunately, it has an inaccuracy with parsing two keys in one message. Also, it might be a corner case with only one key on the last page. It is a really rare situation, but it inspired me to write this script. Might you know the way to contact the author?

    Code
    2023-04-03 22:09:40,287 INFO     PowerVU KeyPatcher by taras-ua, ver 0.9                                                                                                                                                                         2023-04-03 22:09:40,294 INFO     Connecting https://www.linuxsat-support.com/thread/152939-only-afn-powervu-keys-no-chat-keys-only/?pageNo=9999                                                                                                  
    2023-04-03 22:09:41,016 INFO     Found last page: 19.                                                                                                                                                                                            2023-04-03 22:09:41,017 INFO     Connecting https://www.linuxsat-support.com/thread/152939-only-afn-powervu-keys-no-chat-keys-only/?pageNo=18                                                                                                    
    2023-04-03 22:09:41,722 INFO     Got key pair ('00ABAA4E11116FDE', '019369FE79AC1F83').                                                                                                                                                          Traceback (most recent call last):                                                                                                                                                                                                                 File "/usr/script/key_patcher.py", line 204, in <module>                                                                                                                                                                                           softcamkey_handler.patch_keys(key_pair)                                                                                                                                                                                                        File "/usr/script/key_patcher.py", line 172, in patch_keys                                                                                                                                                                                         oscam_config = self._download(self.oscam_version_file)                                                                                                                                                                                         File "/usr/script/key_patcher.py", line 136, in _download                                                                                                                                                                                          with FTP(self.ip, self.login, self.password) as ftp:                                                                                                                                                                                           File "/usr/lib/python3.9/ftplib.py", line 121, in __init__                                                                                                                                                                                       File "/usr/lib/python3.9/ftplib.py", line 158, in connect                                                                                                                                                                                        File "/usr/lib/python3.9/socket.py", line 844, in create_connection                                                                                                                                                                              File "/usr/lib/python3.9/socket.py", line 832, in create_connection                                                                                                                                                                            TimeoutError: [Errno 110] Connection timed out                                                                                                                                                                                                   root@osmini4k:~#                                       

    You should specify the IP address of your receiver in the command line and your receiver must be accessible by FTP. See example python3 key_patcher.py --ip 192.168.0.120

    And there is no need to run the script on your receiver, it could be run from your laptop as an example.

    ! UPDATED ! key_patcher v 0.92


    Code
    Changelog:
    
    v 0.92 - Added command line argument --oscam-local. Should be set when you run the script from the receiver locally.
             python3 key_patcher.py --oscam-local true
    
    v 0.91 - Fixed file not found error message.
    
    v 0.90 - Initial release candidate.


    I would like to introduce the Key updater script for AFN package channels.


    When you don’t want to wait for auto-update of keys, start watching right now.


    The script parses the keys from the forum and patches the SoftCam.Key file in your receiver via FTP. Written in Python3, only built-in modules, no additional packages need to be installed. Tested on Linux and Windows. SoftCam.Key file from the forum, but any other AFN containing EMM keys can be used. Tested on Enigma2, but should work on other Linux receivers as well. Does not affect auto-update, etc.


    Run from your computer with the command:

    > python3 key_patcher.py --ip RECEIVER_IP

    If the user or password is not root, add arguments to the startup line.


    !!! After successful completion, restart Oscam on your receiver. !!!


    An example of output:

    Code
    $ python3 key_patcher.py --ip 192.168.0.120
    2023-04-02 18:18:32,335 INFO     PowerVU KeyPatcher by taras-ua, ver 0.9
    2023-04-02 18:18:32,339 INFO     Connecting https://www.linuxsat-support.com/thread/152939-only-afn-powervu-keys-no-chat-keys-only/?pageNo=9999
    2023-04-02 18:18:33,319 INFO     Found last page: 19.
    2023-04-02 18:18:33,319 INFO     Connecting https://www.linuxsat-support.com/thread/152939-only-afn-powervu-keys-no-chat-keys-only/?pageNo=18
    2023-04-02 18:18:34,282 INFO     Got key pair ('00A9B5C3A295635C', '01A58923BD775AD9').
    2023-04-02 18:18:34,392 INFO     Found OsCam version: oscam-1.20_svn-r11718-798
    2023-04-02 18:18:34,517 INFO     /home/gx/local/oscam/SoftCam.Key has been patched with ('00A9B5C3A295635C', '01A58923BD775AD9').
    2023-04-02 18:18:34,634 INFO     Done!

    I would like to introduce the Key updater script for AFN package channels.


    When you don’t want to wait for auto-update of keys, start watching right now.


    The script parses the keys from the forum and patches the SoftCam.Key file in your receiver via FTP. Written in Python3, only built-in modules, no additional packages need to be installed. Tested on Linux and Windows. SoftCam.Key file from the forum, but any other AFN containing EMM keys can be used. Tested on Enigma2, but should work on other Linux receivers as well. Does not affect auto-update, etc.


    Run from your computer with the command:

    > python3 key_patcher.py --ip RECEIVER_IP

    If the user or password is not root, add arguments to the startup line.


    !!! After successful completion, restart Oscam on your receiver. !!!


    An example of output:

    Code
    $ python3 key_patcher.py --ip 192.168.0.120
    2023-04-02 18:18:32,335 INFO     PowerVU KeyPatcher by taras-ua, ver 0.9
    2023-04-02 18:18:32,339 INFO     Connecting https://www.linuxsat-support.com/thread/152939-only-afn-powervu-keys-no-chat-keys-only/?pageNo=9999
    2023-04-02 18:18:33,319 INFO     Found last page: 19.
    2023-04-02 18:18:33,319 INFO     Connecting https://www.linuxsat-support.com/thread/152939-only-afn-powervu-keys-no-chat-keys-only/?pageNo=18
    2023-04-02 18:18:34,282 INFO     Got key pair ('00A9B5C3A295635C', '01A58923BD775AD9').
    2023-04-02 18:18:34,392 INFO     Found OsCam version: oscam-1.20_svn-r11718-798
    2023-04-02 18:18:34,517 INFO     /home/gx/local/oscam/SoftCam.Key has been patched with ('00A9B5C3A295635C', '01A58923BD775AD9').
    2023-04-02 18:18:34,634 INFO     Done!