TIps & Tricks

feissmaik
Entwickler Team
Beiträge: 2576
Registriert: So 17. Apr 2011, 11:39
Been thanked: 1 time
Kontaktdaten:

TIps & Tricks

Beitrag von feissmaik »

Allgemeine Tips & Tricks für CCcam


==================================================================================================
Ableger von: http://ipc.pebkac.at/forum/viewtopic.php?f=17&t=342

Zum schnellen kontrollieren ob eure CCcam-Server (Peers) Port 80 geöffnet haben und somit evtl. "unsicher" sein könnten, kann man folgendes Script benutzen

Vorraussetzungen:
apt-get install nmap

Code: Alles auswählen

#!/bin/bash
tcpPorts="21-25,80,139,443,8080"
udpPorts="53,111,137"
SKIPdevice="127.0.0.1,localhost"

cd /var/etc

cat CCcam.cfg | grep "^C: " | awk '{print $2}' > /tmp/ip.txt
IPs=$(cat /tmp/ip.txt | awk '{print $1}')
SKIPdevice=$(echo $SKIPdevice | sed 's/,/ /g')
for I in $IPs; do
   for S in $SKIPdevice; do
      [ "$I" != "$S" ] && echo "$I" >> /tmp/ipnew.txt
   done
done
[ ! -z "$udpPorts" ] && PORTS="U:$udpPorts"
[ ! -z "$tcpPorts" -a ! -z "$udpPorts" ] && PORTS+=",T:$tcpPorts" || PORTS="T:$tcpPorts"
nmap -iL /tmp/ipnew.txt -p $PORTS > /tmp/result.txt
cat /tmp/result.txt
rm -f /tmp/ip*.txt
rm -f /tmp/result.txt

exit 0

Resultat:

Code: Alles auswählen

Interesting ports on xxx-xxx-xxx-xxx-dynip.superkabel.de (xxx.xxx.xxx.xxx):
PORT   STATE SERVICE
80/tcp open  http

Nmap done: 4 IP addresses (1 hosts up) scanned in 1.79 seconds


==================================================================================================


Wenn ihr noch mehr TIps & Tricks habt, bitte hier posten - Danke :)
Du musst nicht kämpfen um zu siegen

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 3 Gäste