summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/peer2anonet/README3
-rw-r--r--contrib/peer2anonet/peer2anonet11
2 files changed, 6 insertions, 8 deletions
diff --git a/contrib/peer2anonet/README b/contrib/peer2anonet/README
index a592b7f..41decf8 100644
--- a/contrib/peer2anonet/README
+++ b/contrib/peer2anonet/README
@@ -111,6 +111,9 @@ CHANGES:
Sun Jul 10 17:04:36 CDT 2011 - d3v1150m471c
* security check and key bugs patched.
+ Sun Jul 10 18:50:31 CDT 2011 - d3v1150m471c
+ * public key prompt altered to avoid complications.
+
diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet
index dc760d2..c639480 100644
--- a/contrib/peer2anonet/peer2anonet
+++ b/contrib/peer2anonet/peer2anonet
@@ -35,7 +35,6 @@ read -p "Enter your new local port: " YOURPORT
read -p "Enter your peer remote port: " PEERPORT
read -p "Enter your new asn: " YOURASN
read -p "Enter your peer asn: " PEERASN
-read -p "Enter your peer's public key: " PUBKEY
#########################################################################
# Do some security checks on variables:
@@ -60,12 +59,6 @@ if [[ $(echo ${TEST[$X]} | tr -d '0-9' | wc -c) -gt 1 ]]; then
fi
done
-if [[ $(echo ${TEST[10]} | tr -d 'a-zA-Z0-9' | wc -c) -gt 1 ]]; then
- echo "peer2anonet: fatal error: unacceptable data: ${TEST[11]}
-"
-exit 1
-fi
-
#########################################################################
# We need to check if base files need to be imported to services for bird:
NEW_PROTOCOL="
@@ -149,7 +142,7 @@ export REMOTE_ADDRESS=$REMOTEIP
export REMOTE_PORT=$PEERPORT
export LOCAL_PORT=$YOURPORT
export PRIVATE_KEY=$SECKEY
-export PUBLIC_KEY=$PUBKEY
+export PUBLIC_KEY=\"$(cat pubkey)\"
export TUN_MODE=1
export INTERFACE=ppp-$PEERNAME
( sleep 5;
@@ -162,6 +155,8 @@ chmod +x /services/"$PEERNAME"/run
#########################################################################
# Configure and start our new peering session:
+read -p "Enter your peer's public key: " PUBKEY
+echo "$PUBKEY" > /services/"$PEERNAME"/pubkey
ln -s /services/"$PEERNAME" /service/
echo "peer2anonet: New peering session configured
"