NTC's website has a nice feature called Telephone search. This is particularly handy when you get a call from landline (PSTN) number and have no idea who's calling. Ofcourse you can go to the site and search, but the following bash script makes it faster.
#!/bin/bash
#
# Nepal Telecom PSTN Number to Name search
#
if [ "$1" == "" ] ; then
echo "Usage: " $0 "phone_number"
exit
fi
# Prefix 01, if not provided
if [[ $1 =~ ^01 ]] ; then
NUMBER=$1
else
NUMBER="01$1"
fi
wget -q http://ntc.net.np/telsearchRes.php
--post-data "searchFor=name&telno=$NUMBER&submitted=Search" -O - | html2text | grep "$NUMBER" | tr '_' ' ' | sed 's/ [\ ]*/ /g'
Save the file, chmod it as executable.
To use,
./telsearch 5544132
| 1 |015544132|Ntc |Cellular Mobile And New S|Jawalakhel|
Jwalanta,
ReplyDeleteYour script is good, but NT's database is crappy.
I searched my home phone number. It shows some other guy's name. :)
Cool!
ReplyDeleteYou know one can easily reap it. Just give % as Username :D
It seems a great research of NTC. This service is very helpful for everyone who wants to know about name of the person who's calling.
ReplyDeletelooks like this does not work anymore!! :(
ReplyDeletekuşadası
ReplyDeletemilas
çeşme
bağcılar
urfa
25Y7
Hii nice reading your blog
ReplyDelete