esptool - neue Versionen

OP #7357652

früher gab es esptool.py als Python-Programm, das unter Python2 oder Python3 unter allen OS lief. Jetzt finde ich esptool entweder als diverse ausführbare bin-Programme für Win/Linux/Macs oder als .py, das lädt irgendein Programm herunter - vermutlich wieder ein bin - und führt es aus, beides ist aus Sicherheitsaspekten nicht akzeptabel.

Gibt es neuere esptools wie die Version 4.5 nicht nach wie vor als .py zum Download.

OP #7357666

Jack V. schrieb:

https://github.com/espressif/esptool ← guck halt rein, was es macht.

Das ist genau das, was mich stört. Ich suche das echte Python-Programm, keine Binary.

1
#!/usr/bin/env python
2
#
3
# SPDX-FileCopyrightText: 2014-2022 Fredrik Ahlberg, Angus Gratton,
4
# Espressif Systems (Shanghai) CO LTD, other contributors as noted.
5
#
6
# SPDX-License-Identifier: GPL-2.0-or-later
7

8
# This executable script is a thin wrapper around the main functionality
9
# in the esptool Python package
10

11
# When updating this script, please also update espefuse.py and espsecure.py
12

13
import contextlib
14
import os
15
import sys
16

17
if os.name != "nt":
18
    # Linux/macOS: remove current script directory to avoid importing this file
19
    # as a module; we want to import the installed esptool module instead
20
    with contextlib.suppress(ValueError):
21
        if sys.path[0].endswith("/bin"):
22
            sys.path.pop(0)
23
        sys.path.remove(os.path.dirname(sys.executable))
24

25
    # Linux/macOS: delete imported module entry to force Python to load
26
    # the module from scratch; this enables importing esptool module in
27
    # other Python scripts
28
    with contextlib.suppress(KeyError):
29
        del sys.modules["esptool"]
30

31
import esptool
32

33
if __name__ == "__main__":
34
    esptool._main()
#7357669

Stephan S. schrieb:

Ich suche das echte Python-Programm, keine Binary.

Sorry, aber einerseits ist das die offizielle Version – eine Andere gibt es nicht. Und andererseits sehe ich da nicht, dass es irgendein Binary nachladen würde:

1
# This executable script is a thin wrapper around the main functionality
2
# in the esptool Python package

Antwort schreiben

Eine eigene Frage? Dieser Thread ist über 3 Jahre alt. Stell sie in einem eigenen Thread – dort lesen mehr Leute mit, und sie wird öfter und schneller beantwortet.

Neuen Thread starten

Eine Lösung, Ergänzung oder Rückmeldung zu diesem Thread? Dann antworte hier.

Formatierung
  • [c]C-Code[/c]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] – Link zu einem Artikel
  • Verweis auf einen anderen Beitrag: Rechtsklick auf dessen Beitrags-ID (#8078628), „Adresse kopieren“, in den Text einfügen

Mehr zur Formatierung

Längeren Sourcecode als Anhang, nicht in den Text. JPG nur für Fotos und Scans; Zeichnungen und Screenshots als PNG oder GIF. Siehe Bildformate.

Schon registriert? Anmelden

Wird nicht angezeigt. Wir schicken dir einen Link; sobald du damit bestätigst, erscheint dein Beitrag.

Mit dem Abschicken legst du einen kostenlosen Account an und erkennst die Nutzungsbedingungen und die Datenschutzerklärung an.