summaryrefslogtreecommitdiffstats
path: root/prank
diff options
context:
space:
mode:
authorFlorian Pritz <f-p@gmx.at>2008-11-11 22:10:33 +0100
committerFlorian Pritz <f-p@gmx.at>2008-11-11 22:10:33 +0100
commitda2d0f071e5cd37b6f4f04906b5f2006cec57a70 (patch)
tree932fc5ec2212304f3266229db78ec29a598ef799 /prank
parente443ba89d07541516d7bd80f78cb0e16e535e870 (diff)
downloadbin-da2d0f071e5cd37b6f4f04906b5f2006cec57a70.tar.gz
bin-da2d0f071e5cd37b6f4f04906b5f2006cec57a70.tar.xz
updated and added soem things
Diffstat (limited to 'prank')
-rwxr-xr-xprank35
1 files changed, 35 insertions, 0 deletions
diff --git a/prank b/prank
new file mode 100755
index 0000000..125e9d2
--- /dev/null
+++ b/prank
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+#
+# prank.sh - Find any URL's Google Page Rank (PR)
+#
+# 2008 - Mike Golvach - eggi@comcast.net
+#
+# Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
+#
+
+if [ $# -ne 1 ]
+then
+ echo "Usage: $0 HttpOrHttpsURL\n"
+ exit 1
+fi
+
+pr_checksum_prog="pagerank"
+
+if [ ! -x $pr_checksum_prog ]
+then
+ echo "Cannot Find Checksum Program: $pr_checksum_prog !"
+ exit 2
+fi
+
+wget=/usr/bin/wget
+prank_url=$1
+mod_prank_url=`echo $prank_url|sed -e 's/:/%3A/g' -e 's/\//%2F/g'`
+prank_checksum=`$pr_checksum_prog $prank_url|sed 's/Checksum=//'`
+
+prank_qurl="http://toolbarqueries.google.com/search?client=navclient-auto&ch=${prank_checksum}&ie=UTF-8&oe=UTF-8&features=Rank&q=info:${mod_prank_url}"
+
+echo -n "Google PR For $prank_url = "
+
+$wget -nv -O - "$prank_qurl" 2>&1|grep "Rank_"|sed 's/Rank_[0-9]:[0-9]://'
+exit 0