Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol

    This topic has been deleted. Only users with topic management privileges can see it.
    • Homoran
      Homoran Global Moderator Administrators @liv-in-sky last edited by Homoran

      @liv-in-sky hatte ich dir gestern im Chat geschrieben.
      mit dem nmap Befehl im Skript läuft es bei mir nicht.

      muss bei mir so heißen:
      exec("sudo -u root nmap -sP --dns-servers "+dnsServer+" "+ipbereich , async function (error, result, stderr)

      überschnitten die posts sich haben

      liv-in-sky 1 Reply Last reply Reply Quote 0
      • liv-in-sky
        liv-in-sky @Homoran last edited by liv-in-sky

        @homoran

        ok ich verstehe - den mußte ich ändern, da ich nmap ja anders installieren mußte und der pfad ein anderer ist. das muss ich irgendwie am template ändern - vergessen hatte das ich

        1 Reply Last reply Reply Quote 1
        • bahnuhr
          bahnuhr Forum Testing Most Active @liv-in-sky last edited by

          @liv-in-sky

          Habe nun erstmal auch dein Script ausprobiert.
          von git kopiert und in js eingefügt.
          Exec hatte ich schon drin.
          Daten im js angepasst.
          nmap in meiner proxmox vm "iobroker" als root installiert.
          Datei /etc/sudoers.d/iobroker angepasst

          Es kommt nur "no data" im log.

          Ich dachte, da kann man eigentlich gar nicht so viel falsch machen.
          Hast du eine Idee ?
          Soll ich mein eingefügtes script in js mal anhängen?

          liv-in-sky 2 Replies Last reply Reply Quote 0
          • liv-in-sky
            liv-in-sky @bahnuhr last edited by

            @bahnuhr

            schau mal https://forum.iobroker.net/post/761180

            du wirst den pfad zu nmap angleichen müssen

            1 Reply Last reply Reply Quote 0
            • liv-in-sky
              liv-in-sky @bahnuhr last edited by

              @bahnuhr

              der im script im exec teil steht

              bahnuhr 2 Replies Last reply Reply Quote 0
              • bahnuhr
                bahnuhr Forum Testing Most Active @liv-in-sky last edited by

                @liv-in-sky

                hab ich nun geändert auf:
                exec("sudo -u root /usr/bin/nmap -sP --dns-servers "+dnsServer+" "+ipbereich , async function (error, result, stderr) {

                Es kommt aber immer noch "no data"
                (in usr/bin/ liegt auch die Datei nmap. Pfad müsste also jetzt stimmen)

                liv-in-sky 1 Reply Last reply Reply Quote 0
                • liv-in-sky
                  liv-in-sky @bahnuhr last edited by

                  @bahnuhr

                  nach dem exec kommt eine zeile mit

                     //  console.log(result);
                  

                  kommentiere das aus und schau mal, was dann im log steht - das sollte die rohdaten vom nmap befehl sein

                  bahnuhr 1 Reply Last reply Reply Quote 0
                  • bahnuhr
                    bahnuhr Forum Testing Most Active @liv-in-sky last edited by

                    @liv-in-sky
                    Wenn ich den Befehl mal per putty eingebe, kommt:

                    dieter@VM-iobroker:~$ sudo -u root /usr/bin/nmap -sP --dns-servers 192.168.243.1 192.168.243.0/24
                    >>> /etc/sudoers.d/iobroker: Syntax-Fehler near line 24 <<<
                    sudo: Syntax-Fehler in /etc/sudoers.d/iobroker bei der Zeile 24
                    sudo: Keine gültige sudoers-Quelle gefunden, Programmende
                    sudo: Regelwerks-Plugin konnte nicht initialisiert werden
                    
                    Thomas Braun bahnuhr 3 Replies Last reply Reply Quote 0
                    • bahnuhr
                      bahnuhr Forum Testing Most Active @liv-in-sky last edited by

                      @liv-in-sky sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                      @bahnuhr

                      nach dem exec kommt eine zeile mit

                         //  console.log(result);
                      

                      kommentiere das aus und schau mal, was dann im log steht - das sollte die rohdaten vom nmap befehl sein

                      // entfernt

                      im log kommt nix, außer wieder "no data"

                      liv-in-sky 1 Reply Last reply Reply Quote 0
                      • Thomas Braun
                        Thomas Braun Most Active @bahnuhr last edited by

                        @bahnuhr sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                        sudo -u root

                        Ist auch Quatsch.

                        sudo ohne Optionen geht immer auf den root.
                        Also

                        sudo nmap -sP --dns-servers 192.168.243.1 192.168.243.0/24
                        

                        wenn nmap als root aufgerufen werden soll.

                        1 Reply Last reply Reply Quote 0
                        • bahnuhr
                          bahnuhr Forum Testing Most Active @bahnuhr last edited by

                          @liv-in-sky

                          Und wenn ich sowas in putty eingebe, kommt:

                          dieter@VM-iobroker:~$ nmap 192.168.243.0/24
                          Starting Nmap 7.70 ( https://nmap.org ) at 2022-02-12 22:10 CET
                          Warning: 192.168.243.110 giving up on port because retransmission cap hit (10).
                          
                          
                          liv-in-sky 1 Reply Last reply Reply Quote 0
                          • liv-in-sky
                            liv-in-sky @bahnuhr last edited by

                            @bahnuhr weil der befehl in der console nicht funktioniert - geht er auch nicht im script

                            1 Reply Last reply Reply Quote 0
                            • liv-in-sky
                              liv-in-sky @bahnuhr last edited by

                              @bahnuhr bullseye ?

                              bahnuhr 1 Reply Last reply Reply Quote 0
                              • bahnuhr
                                bahnuhr Forum Testing Most Active @liv-in-sky last edited by

                                @liv-in-sky sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                                @bahnuhr bullseye ?

                                noch nicht, ist noch buster

                                1 Reply Last reply Reply Quote 0
                                • bahnuhr
                                  bahnuhr Forum Testing Most Active @bahnuhr last edited by

                                  @bahnuhr sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                                  @liv-in-sky
                                  Wenn ich den Befehl mal per putty eingebe, kommt:

                                  dieter@VM-iobroker:~$ sudo -u root /usr/bin/nmap -sP --dns-servers 192.168.243.1 192.168.243.0/24
                                  >>> /etc/sudoers.d/iobroker: Syntax-Fehler near line 24 <<<
                                  sudo: Syntax-Fehler in /etc/sudoers.d/iobroker bei der Zeile 24
                                  sudo: Keine gültige sudoers-Quelle gefunden, Programmende
                                  sudo: Regelwerks-Plugin konnte nicht initialisiert werden
                                  

                                  Und in Zeile 24 steht:
                                  iobroker ALL=(ALL) NOPASSWD: /usr/bin/nmap

                                  Ist es notwendig das System neu zu starten ?

                                  1 Reply Last reply Reply Quote 0
                                  • bahnuhr
                                    bahnuhr Forum Testing Most Active last edited by

                                    Wenn ich sowas als Benutzer oder root ausführe wird es korrekt ermittelt:

                                    dieter@VM-iobroker:~$ nmap -sP -R 192.168.243.0/24
                                    Starting Nmap 7.70 ( https://nmap.org ) at 2022-02-12 22:17 CET
                                    Nmap scan report for fritz.box (192.168.243.1)
                                    Host is up (0.00085s latency).
                                    Nmap scan report for Synology.fritz.box (192.168.243.5)
                                    Host is up (0.00056s latency).
                                    Nmap scan report for Synology-Lan2.fritz.box (192.168.243.6)
                                    Host is up (0.00051s latency).
                                    Nmap scan report for NUC-Proxmox.fritz.box (192.168.243.8)
                                    
                                    
                                    
                                    liv-in-sky 1 Reply Last reply Reply Quote 0
                                    • liv-in-sky
                                      liv-in-sky @bahnuhr last edited by liv-in-sky

                                      @bahnuhr root muss sein - sonst kann die netzwerkkarte nicht richtig gelesen werden

                                      bahnuhr 1 Reply Last reply Reply Quote 0
                                      • bahnuhr
                                        bahnuhr Forum Testing Most Active @liv-in-sky last edited by

                                        @liv-in-sky
                                        so ich bin weiter.
                                        Habe per nano die Datei sudoers.d/iobroker nochmal geändert.
                                        Jetzt kommt keine Fehlermeldung mehr.

                                        log wird angezeigt.
                                        Jetzt kämpfe ich noch mit der Darstellung.

                                        613c91cc-9293-4a1a-a4cc-27092f3dda6d-image.png

                                        Das sieht noch nicht schön aus.
                                        Dein Bild wie in #1, das wäre gut.

                                        liv-in-sky Homoran 2 Replies Last reply Reply Quote 0
                                        • liv-in-sky
                                          liv-in-sky @bahnuhr last edited by

                                          @bahnuhr

                                          das ist schon mal ne gute nachricht

                                          welches bild #1meinst du ?

                                          bahnuhr 1 Reply Last reply Reply Quote 0
                                          • Homoran
                                            Homoran Global Moderator Administrators @bahnuhr last edited by

                                            @bahnuhr sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                                            Dein Bild wie in #1, das wäre gut.

                                            Das war einmal

                                            was ist denn jetzt nicht mehr akzeptabel?

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            922
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            javascript template
                                            26
                                            493
                                            77888
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo