Comments (7)
Need to fix that part of the code. Right now it only HTML works.
Original comment by [email protected]
on 12 Feb 2013 at 9:14
- Changed state: Accepted
from theharvester.
Need to fix that part of the code. Right now it only HTML works.
Original comment by [email protected]
on 12 Feb 2013 at 9:14
from theharvester.
if filename!="":
try:
print "Saving file"
html = htmlExport.htmlExport(all_emails,full,vhost,dnsres,dnsrev,filename,word,shodanres,dnstldres)
save = html.writehtml()
filename = filename.split(".")[0]+".xml"
file = open(filename,'w')
file.write('<theHarvester>\n')
for x in all_emails:
file.write('<email>'+x+'</email>\n')
for x in all_hosts:
file.write('<host>'+x+'</host>\n')
for x in vhost:
file.write('<vhost>'+x+'</vhost>\n')
file.write('</theHarvester>\n')
file.close
sys.exit()
except Exception,e:
print e
print "Error creating the file"
Original comment by [email protected]
on 25 Sep 2013 at 8:39
from theharvester.
file.write('<?xml version="1.0" encoding="UTF-8"?>\n')
Original comment by [email protected]
on 25 Sep 2013 at 8:43
from theharvester.
Minor typo, but should file.close not be file.close() ?
Original comment by [email protected]
on 4 Jan 2014 at 11:40
from theharvester.
The problem is that I can save the output in a HTML file if I search with
google but not with linkedin
ex:
theharvester -d target.com -f example.html -l 500 -b google --> IT WORKS!
theharvester -d target.com -f example2.html -l 200 -b linkedin --> DOESN'T WORKS
It doesn't generate any file and any output. (Last version.)
Thanks
Original comment by [email protected]
on 29 May 2014 at 2:35
from theharvester.
After the linkedin part runs its course it does a sys.exit() so it nevers makes
it to the xml formatting. I just commented that line out. I also made some
other adjustments to create the xml file. I created these variables underneath
the start function.
all_emails=[]
all_hosts=[]
people=[]
vhost=[]
then this is my code for the xml file creation.
if filename!="":
print "inside loop"
if "html" in filename:
try:
print "Saving HTML file"
html = htmlExport.htmlExport(all_emails,full,vhost,dnsres,dnsrev,filename,word,shodanres,dnstldres)
save = html.writehtml()
sys.exit()
except Exception,e:
print e
print "Error creating the file"
elif "xml" in filename:
print "SAVING XML FILE"
filename = filename.split(".")[0]+".xml"
file = open(filename,'w')
file.write('<?xml version="1.0" encoding="UTF-8"?>\n')
file.write('<theHarvester>')
#print people
if len(people) > 0:
for x in people:
file.write('<person>' + re.sub('[<>]','',x) + '</person>')
#print all_emails
if len(all_emails) > 0:
for x in all_emails:
file.write('<email>'+re.sub('[<>]','',x)+'</email>')
#print ip_and_hosts
if len(all_hosts) > 0:
for x in full_host.check():
host = x.split(':')
file.write('<hostname>'+re.sub('[<>]','',host[1]) + '<ip>'+host[0]+'</ip></hostname>')
if len(vhost) > 0:
for x in vhost:
file.write('<vhost>'+re.sub('[<>]','',x)+'</vhost>')
file.write('</theHarvester>')
file.close()
else:
print "File format not supported...Aborting Save"
I'm not a developer so there might be ways of doing this but it seemed to work
in all my tests. Good Luck!
Original comment by [email protected]
on 28 Aug 2014 at 11:11
Attachments:
from theharvester.
Related Issues (20)
- Feature Request: Show where results were found HOT 2
- Proxy support HOT 1
- Won't run due to dependency issue? HOT 2
- Bug HOT 1
- Linkedin search HOT 1
- Debug information accidentally left in 2.2a? HOT 1
- Case sensitive regex HOT 1
- Email addresses inside [] brackets will be listed as starting with [ (left bracket) HOT 1
- html reports not generating completely
- Incomplete harvesting HOT 1
- exalead not in list of search engines
- local variable 'full' referenced before assignment
- Uncle to scrape google for over 1000 results
- how to install the api-key HOT 1
- dns-brute forcing error and fix HOT 4
- Exalead - Invalid search engine HOT 1
- Emails appear incorrect when Google results are truncated
- Search engines added by me HOT 1
- Permisson
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from theharvester.