Sunday, September 8, 2013

3CA Get Alexa Rank



insert your sites in alexa.lst file beside bash script and give permission to bash script (chmod +x script.sh) Then Run it (./script.sh)

#!/bin/bash
# 3CA Get Alexa Rank 
# Usage : insert your sites in  alexa.lst file beside bash script and give permission to bash script (chmod +x script.sh) Then Run it (./script.sh) !!
#Coded by : Red V!per

B="\033[1m"
N="\033[0m"
L="\033[5m"
C="\033[m"


get_rank()
{
rm -rf alexa.php
wget -q --user-agent="Mozilla/4.0 (Windows; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)" -O alexa.php "http://www.alexa.com/siteinfo/$1"
rank=`cat alexa.php | grep "Global rank" | cut -d '"' -f 5 | cut -d '>' -f 2 | cut -d '<' -f 1`
 
if [ ! -z "$rank" ] ; then
   echo -e "$B[+] $1 \e[1;32m[$rank] \e[0m"
   echo "$1 [$rank]" >> alexa_rank.lst
else
   echo -e "$B[-] $1 \e[1;31m[-] \e[0m"
fi
rm -rf alexa.php
}


for alexa in `cat alexa.lst`
do
get_rank $alexa
done 


No comments:

Post a Comment