Пример #1
0
 def main(self, kwargs):
     if len(sys.argv) <= 1:
         self.usage()
     try:
         opts, args = getopt.getopt(kwargs, "t:s:i:h:",
                                    ["target=", "source=", "info=", "help"])
     except Exception as error:
         self.usage()
     for opt, arg in opts:
         if opt in ("-t", "--target"):
             self.target = self.checkurl(arg)
         if opt in ("-s", "--source"):
             source = arg
             if source not in ("all", "google", "bing", "yahoo", "pgp"):
                 self.banner()
                 sys.exit(
                     self.printf.error(
                         "Invalid search engine! Try with: all, google, bing, yahoo or pgp"
                     ))
             self.banner()
             netcraft.netcraft(self.target).search()
             if source == "google":
                 self.google()
                 self.info()
             elif source == "bing":
                 self.bing()
                 self.info()
             elif source == "yahoo":
                 self.yahoo()
                 self.info()
             elif source == "pgp":
                 self.pgp()
                 self.info()
             elif source == "all":
                 self.all()
                 self.info()
         if opt in ("-i", "--info"):
             email = self.checkemail(arg)
             self.banner()
             self.getinfo(email)
         if opt in ("-h", "--help"):
             self.usage()
Пример #2
0
	def main(self,kwargs):
		if len(sys.argv) <= 1:
			self.usage()
		try:
			opts,args = getopt.getopt(kwargs,"t:s:i:h:",["target=","source=","info=","help"])
		except Exception as error:
			self.usage()
		for opt,arg in opts:
			if opt in ("-t","--target"):
				self.target = self.checkurl(arg) 
			if opt in ("-s","--source"):
				source = arg
				if source not in ("all","google","bing","yahoo","pgp"):
					self.banner()
					sys.exit(self.printf.error("Invalid search engine! Try with: all, google, bing, yahoo or pgp"))
				self.banner()
				netcraft.netcraft(self.target).search()
				if source == "google":
					self.google()
					self.info()
				elif source == "bing":
					self.bing()
					self.info()
				elif source == "yahoo":
					self.yahoo()
					self.info()
				elif source == "pgp":
					self.pgp()
					self.info()
				elif source == "all":
					self.all()
					self.info()
			if opt in ("-i","--info"):
				email = self.checkemail(arg)
				self.banner()
				self.getinfo(email)
			if opt in ("-h","--help"):
				self.usage()