summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authord3v1150m471c <d3v11@d3v1150m471c.ano>2011-07-10 08:29:56 -0500
committerd3v1150m471c <d3v11@d3v1150m471c.ano>2011-07-10 08:29:56 -0500
commit1ab077f7aee31496b366da161babc3f4c7b507c3 (patch)
treed4db12da7787c9eb0c20029c501a1390f6ba4fc8 /contrib
parent6ccce373cf53d3076e0c52b5f8094eec32d534c5 (diff)
downloadresdb-1ab077f7aee31496b366da161babc3f4c7b507c3.tar.gz
resdb-1ab077f7aee31496b366da161babc3f4c7b507c3.zip
peer2anonet:
* security checks more specific
Diffstat (limited to 'contrib')
-rw-r--r--contrib/peer2anonet/README7
-rw-r--r--contrib/peer2anonet/peer2anonet18
2 files changed, 17 insertions, 8 deletions
diff --git a/contrib/peer2anonet/README b/contrib/peer2anonet/README
index 2790296..ab062b9 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 2696f11..389c2ac 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