changeset 545:63d19f68304c draft

peer2anonet: Sun Jul 10 18:50:31 CDT 2011 - d3v1150m471c * public key prompt altered to avoid complications.
author d3v1150m471c <d3v11@d3v1150m471c.ano>
date Sun, 10 Jul 2011 18:51:25 -0500
parents 44cb8de11e7d
children b19b3e973065
files contrib/peer2anonet/README contrib/peer2anonet/peer2anonet
diffstat 2 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/peer2anonet/README	Sun Jul 10 17:33:15 2011 -0500
+++ b/contrib/peer2anonet/README	Sun Jul 10 18:51:25 2011 -0500
@@ -111,6 +111,9 @@
       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.
+
 
 
       
--- a/contrib/peer2anonet/peer2anonet	Sun Jul 10 17:33:15 2011 -0500
+++ b/contrib/peer2anonet/peer2anonet	Sun Jul 10 18:51:25 2011 -0500
@@ -35,7 +35,6 @@
 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 @@
 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_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 @@
 
 #########################################################################
 # 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
 "