0% found this document useful (0 votes)
9 views2 pages

Kali Notes

Uploaded by

sidhujjohn0594
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Kali Notes

Uploaded by

sidhujjohn0594
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

apt purge *impacket* // unstalling thing

git clone /imper


TURNING ON AND TURNING OFF SERVICES

service apache2 start //web server


service ssh start
service postgresql start

all the above will be lost on reboot

systemctl enable ssh


systemctl enable apache2
// using the above will automatiocally start those services on boot

SCRIPT WRITING

ping -c 1 192.168.2.1 > ip.txt


the above is up if not up then a line will be drawn

cat ip.txt | grep "64 bytes"


cat ip.txt | grep "64 bytes" |cut -d(delimiter) " " -f 4
it will bring 192.168.2.1:

cat ip.txt | grep "64 bytes" |cut -d(delimiter) " " -f 4 | tr -d ":"

definations

grep is used to find an association


|cut remove -d is the ddelimeter " " spaces between -f foward to 4
the forth field which is the ip. | tr is the trim -d delimeter ":"
remove the colon
the result should just be the ip address

nano ipsweep.sh

#!/bin/bash >>define what we are running

for ip in 'seq 1 254' ; do


ping -c 1 $1.$ip | grep "64 bytes" | cut -d " " -f 4 | tr -d ":" & done
tr is the translate
&(threadind) it scans all ip at once

./ipsweep.sh 192.168.1.1

./ipsweep 192

#!/bin/bash >>define what we are running


if ["$1" == ""]
then
echo "you forgot an Ip adress"
echo " syntax: ./ipsweep.sh 192.168.1"

else
for ip in 'seq 1 254' ; do
ping -c 1 $1.$ip | grep "64 bytes" | cut -d " " -f 4 | tr -d ":" &
done
fi

back to terminal
./ipsweep

on the terminal

for ip in $(cat iplist.txt); do nmap -p 80 -T4 $ip & done

You might also like