<gh_stars>1-10
#!/usr/bin/python

#Purpose: To make Scavenger more object oriented and cleaner.
#Contains files for Who is searches / searching exploit-db.com 
from shodan import WebAPI  #shodan API requirements
from bs4 import BeautifulSoup as BS
import whois
import sys
import urllib
import os

class ExploitDB:

	#Function table
	#Purpose: this is used in the srchExploitDB function to parse out the links and the exploit name
	def table(x): 
		if x:
			return x.startswith("list_explot_description") and not "class2 " in x #class2 was stolen from an example, we need a string argument there, may be replaced in future for something more relavent.
		else:
			return False

	#Function srchExploitDB
	#Purpose: Search and display the first ten pages of exploits for user defined search terms.
	def srchExploitDB(srchTerm):
		num = 1 # used as counter for first printing 10 pages

	#TODO: Better parsing of strings.
		for num in range (1,10,1): # Printing first ten pages from exploit-db
			response = urllib.urlopen('http://www.exploit-db.com/search/?action=search&filter_page=' +str(num) +'&filter_description='+ srchTerm +'&filter_exploit_text=&filter_author=&filter_platform=0&filter_type=0&filter_lang_id=0&filter_port=&filter_osvdb=&filter_cve=')

			soup = BS(response)
			rows = soup.findAll('td', {'class': table}) #
			for row in rows:
				print row

			num += 1

	#Function whoisSrch
	#Purpose: performing who is searches
	def whoisSrch():
		site = raw_input('Enter IP or URL: ')
		result = os.system('whois '+ site) #The native whois search provides more data than any python modules I have found
		print result

#!/usr/bin/python

#Purpose: To make Scavenger more object oriented and cleaner.
#Contains files for Who is searches / searching exploit-db.com 
from shodan import WebAPI  #shodan API requirements
from bs4 import BeautifulSoup as BS
import whois
import sys
import urllib
import os

class ExploitDB:

	#Function table
	#Purpose: this is used in the srchExploitDB function to parse out the links and the exploit name
	def table(x): 
		if x:
			return x.startswith("list_explot_description") and not "class2 " in x #class2 was stolen from an example, we need a string argument there, may be replaced in future for something more relavent.
		else:
			return False

	#Function srchExploitDB
	#Purpose: Search and display the first ten pages of exploits for user defined search terms.
	def srchExploitDB(srchTerm):
		num = 1 # used as counter for first printing 10 pages

	#TODO: Better parsing of strings.
		for num in range (1,10,1): # Printing first ten pages from exploit-db
			response = urllib.urlopen('http://www.exploit-db.com/search/?action=search&filter_page=' +str(num) +'&filter_description='+ srchTerm +'&filter_exploit_text=&filter_author=&filter_platform=0&filter_type=0&filter_lang_id=0&filter_port=&filter_osvdb=&filter_cve=')

			soup = BS(response)
			rows = soup.findAll('td', {'class': table}) #
			for row in rows:
				print row

			num += 1

	#Function whoisSrch
	#Purpose: performing who is searches
	def whoisSrch():
		site = raw_input('Enter IP or URL: ')
		result = os.system('whois '+ site) #The native whois search provides more data than any python modules I have found
		print result
#!/usr/bin/python #Purpose: To make Scavenger more object oriented and cleaner. #Contains files for Who is searches / searching exploit-db.com #shodan API requirements #Function table #Purpose: this is used in the srchExploitDB function to parse out the links and the exploit name #class2 was stolen from an example, we need a string argument there, may be replaced in future for something more relavent. #Function srchExploitDB #Purpose: Search and display the first ten pages of exploits for user defined search terms. # used as counter for first printing 10 pages #TODO: Better parsing of strings. # Printing first ten pages from exploit-db # #Function whoisSrch #Purpose: performing who is searches #The native whois search provides more data than any python modules I have found