How to use the censys.Censys function in censys

To help you get started, we’ve selected a few censys examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github s0m30ne / pymsf / msf_python.py View on Github external
def send_command(self, command, search, thread_num, exec_cmd, startIP, endIP, ipfile):
        """Execute a command"""
        if search == "censys":
            self.search = Censys()
        elif search == "zoomeye":
            self.search = Zoomeye()
        elif search == "shodan":
            self.search = Shodan()
        elif search == "local":
            self.search = Local()
        else:
            print "you got a wrong type of search engine, you can select censys, shodan or zoomeye as your scan engine."
            sys.exit()
        
        if self.setQuery(command):
            return {'prompt': '', 'busy': False, 'data': 'QUERY => %s\n' % self.query}
        elif self.setPage(command):
            return {'prompt': '', 'busy': False, 'data': 'PAGE => %d\n' % self.page}
        else:
            if command == "exploit\n" or command == "run\n":
github jgamblin / censys / censys.py View on Github external
try:
            if 'title' in payload['80']['http']['get'].keys():
                print "[+] Title: %s" % payload['80']['http']['get']['title']
            if 'server' in payload['80']['http']['get']['headers'].keys():
                print "[+] Server: %s" % payload['80']['http']['get']['headers']['server']
        except Exception as error:
            print error
 
parser = argparse.ArgumentParser(description = 'CENSYS.IO Web Server Search')
parser.add_argument('-f', '--find', help='CENSYS Search', required = True)
 
 
args = parser.parse_args()
ip = args.find
 
censys = Censys(ip)
censys.search()