If you want access to more advanced search results, you will have to pay a price. Toll-free directories often offer the smallest bit of information such as the name of the phone number’s cell phone carrier, the location of the carrier, and similar details. Many of these sites can even trace answering services. They will often tell you the name of the person’s cell phone carrier and, more importantly, their location so if someone is harassing you and you have an idea who it is, this information can confirm it. In some cases, it may just be a wrong number, but many people have to deal with strangers constantly calling them.Īs an alternative to sending the call to voicemail, there are online toll-free directories that allow you to do a reverse search on the number and get information about whoever is calling you. Phone calls from people you don’t know can be very difficult to deal with. error, e : usage_exit ( progname, e ) # bail out if we don't have phone, toaddr,smtp ( smtp_server = None and usage_exit ( progname )) or ( phone = None and usage_exit ( progname )) or ( toaddr = None and usage_exit ( progname )) try : #validate phone number validatePhone ( phone ) #validate toaddr validateEmail ( toaddr ) sendmail ( phone, lookup ( phone ), toaddr ) print 'email has been sent to ' toaddr except InvalidEmail, email : print 'Invalid Email Address:', email except InvalidPhoneNumber, phoneNumber : print 'Invalid Phone Number:', phoneNumber except : print 'Unexpected error:', sys. argv, 'he:p:s:', ) #print opts,args for opt, value in opts : if opt in ( '-h', '-help' ): usage_exit ( progname ) if opt in ( '-e', '-email' ): toaddr = value if opt in ( '-p', '-phone' ): phone = value if opt in ( '-s', '-smtp' ): smtp_server = value except getopt. argv ) # get the toaddr, phone,smtpserver from sys.argv try : opts, args = getopt. exit ( 2 ) if _name_ = '_main_' : # init smtp_server = None phone = None toaddr = None progname = os. quit () def usage_exit ( progname, msg = None ): if msg : print msg print print "usage: %s -s|-smtp -e|-email -p|-phone 41 " % progname sys. startmultipartbody ( 'mixed' ) part = writer. addheader ( 'Subject', 'reverse phone lookup result for: ' phoneNumber ) writer. addheader ( 'MIME-Version', '1.0' ) writer. SMTP ( smtp_server ) #t_debuglevel(1) fromaddr = #msg=("From: %s\r\nTo: %s\r\n\r\n" % (fromaddr,toaddr)) msg = data msg = StringIO. close () return data def sendmail ( phoneNumber, data, toaddr ): smtpConn = smtplib. request ( 'GET', WP_PATH % ( list, list list )) response = conn. match ( phoneNumber ) if not match : raise InvalidPhoneNumber, phoneNumber def lookup ( phoneNumber ): list = phonePattern. match ( email ) if not match : raise InvalidEmail, email def validatePhone ( phoneNumber ): match = phonePattern. compile ( r"^\D*1?\D*(\d)\D*(\d*)" ) class InvalidEmail ( Exception ): pass class InvalidPhoneNumber ( Exception ): pass def validateEmail ( email ): match = emailPattern. #!/usr/bin/env python """ Reverse Phone lookup usage: ryp.py -s -e -p 4162986294 It needs SMTP server, your email wishes to receive the response and of course the phone number author: Victor Yang """ import httplib import sys, os import smtplib import MimeWriter, base64, StringIO import getopt import re # change this to WP_SERVER = "WP_PATH = '/find_person_?fid=p
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |