Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo ich brauch eure Hilfe!!!!

Ich möchte bei diesem Skript erreichen dass nur die IP-Adresse(egal welche) von dem Skript angenommen wird. Ansonsten soll eine Fehlermeldung erscheinen.

#!/bin/bash


#Pfad für temporäre Datei

file=/scripte/scan.log

datum=`date +%x`

zeit=`date +%k:%M`


clear


echo "Bitte geben Sie das Subnetz ein, das gescannt werden soll?"

read IP

#An dieser Stelle komme ich einfach nich weiter!!

[B]echo $IP | grep -E [0-9,"/","."]+| grep -E [^A-Za-z]   [/B]

exit


echo "Starte nmap für $IP..."

echo "Folgende Hosts sind online:"


echo "-------------------------------" >> $file

echo "Scan ausgeführt am $datum um $zeit für Subnetz: $IP" >> $file

nmap -sP $IP |grep "is up" |cut -d " " -f 2 |tee -a $file

echo " " >> $file

echo " " >> $file

count=`cat /scripte/scan.log |grep Scan|wc -l`

echo "Es wurde bisher $count"mal"gescannt..."


exit

[/code]

Danke schonmal

[...] die IP-Adresse(egal welche) [...]

:floet:

Mir reicht das in meinen Skripten, weil ich nur Schreibfehler erkennen möchte, aber an sich hast du Recht. Folgende RegEx sollte auch den Adressraum abdecken:

^(([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\.([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.