grep etter flere ting samtidig
# ps auxww | grep “udev\|devfs” | grep -v “grep” # cat filnavn.txt |grep “\”Name\”\|Description” > skrivere_navn_og_ip.txt
A chronological documentation test project, nothing serious, really!
# ps auxww | grep “udev\|devfs” | grep -v “grep” # cat filnavn.txt |grep “\”Name\”\|Description” > skrivere_navn_og_ip.txt
# cat /etc/passwd | awk -F: ‘{print $1}’ | sort | uniq -c | grep -v 1 # cat /etc/shadow | awk -F: ‘{print $1}’ | sort | uniq -c | grep -v 1 # awk -F: ‘{ print $1, $5}’ /etc/passwd
This is a tutorial to detect changes in port from hosts on your network. The basic approach is to ping every available address upon your subnet and see which ones are up by detecting replies. If you install the package libperl-net-ping you can use the following script to see which hosts upon your LAN are […]
Legg følgende inn i fila iplist.sh #!/bin/bash # filename: iplist.sh # usage: ./iplist.sh 192.168.1.0/24 > iplist.txt nmap -sL $1 –randomize_hosts | grep ‘^Host’ | cut -d ‘(‘ -f 2 | cut -d ‘)’ -f 1
Dette scriptet scanner IP-er fra ei fil og finner ut hvem som har en spesiell port åpen.Lim inn følgende script kode i fila portLookup.sh #!/bin/bashNETWORKTARGET=$1PORT=$2FN=”port”# Scan Network Input File for active hosts saving IPS to $FNips.txtnmap -sS -p $PORT -n -iL $NETWORKTARGET -oG – | grep open | awk ‘/[1-9].[1-9]/ {print $2}’ > ${FN}ips.txt# use […]