remote ip
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
LocalIp=10.10.10.4
|
||||
RemoteIp=10.10.10.4
|
||||
LocalPort=1666
|
||||
########
|
||||
Crypted=no
|
||||
|
||||
@@ -18,17 +18,17 @@ if [[ $(id -u) != "0" ]]
|
||||
Exit root
|
||||
fi
|
||||
|
||||
[[ -z $(ifconfig | grep inet | awk '{print $2}' | grep $LocalIp) ]] && Exit Config
|
||||
[[ -z $(ifconfig | grep inet | awk '{print $2}' | grep $RemoteIp) ]] && Exit Config
|
||||
|
||||
|
||||
|
||||
[[ "${Crypted}" == "yes" ]] && NcCmd="cryptcat -k ${LocalPassword} -l ${LocalIp} -p ${LocalPort} " || NcCmd="nc -l ${LocalIp} ${LocalPort}"
|
||||
[[ "${Crypted}" == "yes" ]] && NcCmd="cryptcat -k ${LocalPassword} -l ${RemoteIp} -p ${LocalPort} " || NcCmd="nc -l ${RemoteIp} -p ${LocalPort}"
|
||||
|
||||
if [[ "${1}" == "start" ]]
|
||||
then
|
||||
while true
|
||||
do
|
||||
#coproc cryptcat -k ${LocalPassword} -l ${LocalIp} -p ${LocalPort}
|
||||
#coproc cryptcat -k ${LocalPassword} -l ${RemoteIp} -p ${LocalPort}
|
||||
coproc eval ${NcCmd}
|
||||
while read -r cmd; do
|
||||
logger "Running $cmd"
|
||||
|
||||
Reference in New Issue
Block a user