[GH-ISSUE #21] Problème démarrage secmon.py #19

Closed
opened 2026-03-02 23:36:02 +03:00 by kerem · 3 comments
Owner

Originally created by @focheur91300 on GitHub (Aug 20, 2021).
Original GitHub issue: https://github.com/alb-uss/SECMON/issues/21

Originally assigned to: @focheur91300 on GitHub.

root@secmon:/# python3 /var/www/secmon/secmon.py
Traceback (most recent call last):
File "/var/www/secmon/secmon.py", line 12, in
import cve_poller
File "/var/www/secmon/cve_poller.py", line 12, in
import base64, os, smtplib, re, requests, time, sqlite3, feedparser, colorama, warnings
File "/usr/local/lib/python3.9/dist-packages/feedparser.py", line 93, in
_base64decode = getattr(base64, 'decodebytes', base64.decodestring)
AttributeError: module 'base64' has no attribute 'decodestring'

Originally created by @focheur91300 on GitHub (Aug 20, 2021). Original GitHub issue: https://github.com/alb-uss/SECMON/issues/21 Originally assigned to: @focheur91300 on GitHub. root@secmon:/# python3 /var/www/secmon/secmon.py Traceback (most recent call last): File "/var/www/secmon/secmon.py", line 12, in <module> import cve_poller File "/var/www/secmon/cve_poller.py", line 12, in <module> import base64, os, smtplib, re, requests, time, sqlite3, feedparser, colorama, warnings File "/usr/local/lib/python3.9/dist-packages/feedparser.py", line 93, in <module> _base64decode = getattr(base64, 'decodebytes', base64.decodestring) AttributeError: module 'base64' has no attribute 'decodestring'
kerem 2026-03-02 23:36:02 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jheeree commented on GitHub (Aug 25, 2021):

That error occurs because the "decodestring" function is deprecated. Now corresponds to "decodebyte" (ref: https://docs.python.org/3/library/base64.html).

The way I was able to fix it was changing directly in the library as follows:
sed -i 's/base64.decodestring/base64.decodebytes/g' /usr/lib/python3/dist-packages/feedparser.py

<!-- gh-comment-id:905096232 --> @jheeree commented on GitHub (Aug 25, 2021): That error occurs because the "decodestring" function is deprecated. Now corresponds to "decodebyte" (ref: https://docs.python.org/3/library/base64.html). The way I was able to fix it was changing directly in the library as follows: `sed -i 's/base64.decodestring/base64.decodebytes/g' /usr/lib/python3/dist-packages/feedparser.py`
Author
Owner

@alb-uss commented on GitHub (Aug 30, 2021):

Hi ! @focheur91300, can you test the @jheeree workaround ? Thx :)

<!-- gh-comment-id:908669763 --> @alb-uss commented on GitHub (Aug 30, 2021): Hi ! @focheur91300, can you test the @jheeree workaround ? Thx :)
Author
Owner

@focheur91300 commented on GitHub (Aug 31, 2021):

Hi ! @Guezone ,

The solution provided by @jheeree works.

The deferred path on my side.

sed -i 's/base64.decodestring/base64.decodebytes/g' /usr/local/lib/python3.9/dist-packages/feedparser.py

For info I am on docker der my side with the Dockerfile provided on Github.

<!-- gh-comment-id:909018587 --> @focheur91300 commented on GitHub (Aug 31, 2021): Hi ! @Guezone , The solution provided by @jheeree works. The deferred path on my side. `sed -i 's/base64.decodestring/base64.decodebytes/g' /usr/local/lib/python3.9/dist-packages/feedparser.py` For info I am on docker der my side with the Dockerfile provided on Github.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SECMON#19
No description provided.