repo: resdb
action: commit
revision: 
path_from: 
revision_from: 1ab077f7aee31496b366da161babc3f4c7b507c3:
path_to: 
revision_to: 
git.thebackupbox.net
resdb
git clone git://git.thebackupbox.net/resdb
commit 1ab077f7aee31496b366da161babc3f4c7b507c3
Author: d3v1150m471c 
Date:   Sun Jul 10 08:29:56 2011 -0500

    peer2anonet:
          * security checks more specific

diff --git a/contrib/peer2anonet/README b/contrib/peer2anonet/README
index 27902964e65c7ac515b7c75dedee3ae896bbe582..
index ..ab062b9d13a36d129a726d9a9084812adc0ddf6a 100644
--- a/contrib/peer2anonet/README
+++ b/contrib/peer2anonet/README
@@ -63,15 +63,15 @@ USAGE:
       without including the following '<-- comments'.

 ================== Not Actual Line on File ============================
-anon        <--your peer's alias
+anon          <--your peer's alias
 1.2.3.0       <--your new anonet network address
 1.2.3.1       <--your new anonet router address
 1.2.3.2       <--your new anonet ip
-1001          <--your new anonet client port
-1230          <--you new asn
 11.22.33.44   <--your peer's remote ip
 3.5.7.9       <--your peer's anonet ip
+1001          <--your new anonet client port
 3571          <--your peer's client port
+1230          <--you new asn
 3570          <--your peer's asn
 3c6e0b8a9c15224a8228b9a98ca1531d <--your peer's public key
 ================== Not Actual Line on File ============================ 
@@ -106,6 +106,7 @@ CHANGES:
       Sun Jul 10 08:13:17 CDT 2011 - d3v1150m471c
       * security checks changed to check acceptable data and exits
         showing offending info for violating data detections.
+      * security checks more specific



diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet
index 2696f111d6bf1b1a9b80fca056fc2289b7b7bb38..
index ..389c2acf16209a09bb7e0985bf580e320348e6ee 100644
--- a/contrib/peer2anonet/peer2anonet
+++ b/contrib/peer2anonet/peer2anonet
@@ -30,11 +30,11 @@ read -p "Enter your peer name/interface: " PEERNAME
 read -p "Enter your new network address: " YOURNET
 read -p "Enter your new network router address: " YOURROUTE
 read -p "Enter your new network ip address: " YOURIP
-read -p "Enter your new local port: " YOURPORT
-read -p "Enter your new asn: " YOURASN
 read -p "Enter your peer remote ip: " REMOTEIP
 read -p "Enter your peer anonet ip: " PEERIP
+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

@@ -50,7 +50,7 @@ if [[ $(echo ${TEST[0]} | tr -d 'a-zA-Z0-9._-' | wc -c) -gt 1 ]]; then
  exit 1
 fi

-for((X=1;X<=8;X++)); do
+for((X=1;X<=5;X++)); do
 if [[ $(echo ${TEST[$X]} | tr -d '0-9.' | wc -c) -gt 1 ]]; then
  echo "peer2anonet: fatal error: unacceptable data: ${TEST[$X]}
 "
@@ -58,8 +58,16 @@ if [[ $(echo ${TEST[$X]} | tr -d '0-9.' | wc -c) -gt 1 ]]; then
 fi
 done

-if [[ $(echo ${TEST[9]} | tr -d 'a-zA-Z0-9' | wc -c) -gt 1 ]]; then
- echo "peer2anonet: fatal error: unacceptable data: ${TEST[9]}
+for((X=6;X<=9;X++)); do
+if [[ $(echo ${TEST[$X]} | tr -d '0-9' | wc -c) -gt 1 ]]; then
+ echo "peer2anonet: fatal error: unacceptable data: ${TEST[$X]}
+"
+ exit 1
+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

-----END OF PAGE-----