# HG changeset patch # User d3v1150m471c # Date 1310341885 18000 # Node ID 63d19f68304c4f53a891e5622cfd3be19eccaeab # Parent 44cb8de11e7de5f373aa43b8efa75e9a9eb6dda8 peer2anonet: Sun Jul 10 18:50:31 CDT 2011 - d3v1150m471c * public key prompt altered to avoid complications. diff -r 44cb8de11e7d -r 63d19f68304c contrib/peer2anonet/README --- 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. + diff -r 44cb8de11e7d -r 63d19f68304c contrib/peer2anonet/peer2anonet --- 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 "