Comments (10)
I have the same error. Here is the traceback :
Traceback (most recent call last):
File "infoga.py", line 104, in <module>
infoga().main()
File "infoga.py", line 99, in main
if self.breach:ppwned(self.pwned(email),self.verbose)
File "/usr/toolz/Infoga/lib/output.py", line 17, in ppwned
if 'found' in data['status']:
TypeError: 'NoneType' object is not subscriptable
If the suggestion above is OK, it is possible to merge and pull it?
Thanks!
from infoga.
For lib/output.py fix ppwned with this:
def ppwned(data,ver):
if data:
if 'found' in data['status']:
warn('This email was leaked... found %s results..'%(data['results']))
if ver == 2 or ver == 3:
for i in range(0,len(data['data'])):
more('Leaked in: %s'%data['data'][i]['title'])
more('Data Leaked: %s'%data['data'][i]['date_leaked'])
more('Details: %s'%data['data'][i]['details'])
more('Source Network: %s'%data['data'][i]['source_network'])
print("")
And for making it easy to record mails fix infoga.search(self) functio with this:
def search(self,module):
emails = module.search()
if emails != ([] or None):
try:
path = 'domains/'+self.domain
os.makedirs(path)
except:
pass
for email in emails:
if email not in self.listEmail:
self.listEmail.append(email)
f = open(path+'/mails.txt','a')
f.write(email+'\n')
f.close()
if self.verbose == 2 or self.verbose == 3:
info('Found %s emails in %s'%(len(emails),
module.__class__.__name__))
from infoga.
Thanks @theautistic9 ! With your help I've fixed ppwned. Now I'd like to fix infoga.search(self) functio but I can't find it. Is that a functio I have to create? And if yes, where have I to create it?
from infoga.
@DocKali infoga.search(self) is in infoga.py. How ever thats not a fix it's an update, to record the mails in a txt file.
from infoga.
@DocKali Oh, and try this better at infoga.search:
def search(self,module):
emails = module.search()
if emails != ([] or None):
try:
path = 'domains/'+self.domain
os.makedirs(path)
except:
pass
try:
list = open('domains/'+self.domain+'/mails.txt','r').read().split('\n')
except:
list = []
for email in emails:
if email not in self.listEmail:
self.listEmail.append(email)
if email.replace(self.domain,'') != "'@" and email not in list:
list.append(email)
f = open(path+'/mails.txt','a')
f.write(email+'\n')
f.close()
if self.verbose == 2 or self.verbose == 3:
info('Found %s emails in %s'%(len(emails),
module.__class__.__name__))
from infoga.
Thanks a lot for your help @theautistic9
I try to replace the original code with yours and I have another error. Here is the traceback I have :
File "infoga.py", line 118, in <module>
infoga().main()
File "infoga.py", line 99, in main
if self.source == 'all':self.engine(self.domain,'all')
File "infoga.py", line 66, in engine
for e in engine_list: self.search(e)
File "infoga.py", line 54, in search
f = open(path+'/mails.txt','a')
FileNotFoundError: [Errno 2] No such file or directory: 'domains/yourdomain.com/mails.txt'
(I replace the domain I search for with "yourdomain.com")
Any idea the error come from?
from infoga.
@DocKali Try this and tell me:
def search(self,module):
emails = module.search()
if emails != ([] or None):
try:
path = 'domains/'+self.domain
os.makedirs(path)
except:
path = 'domains/'.self.listEmail[0].split('@')[1]
try:
list = open('domains/'+self.domain+'/mails.txt','r').read().split('\n')
except:
list = []
for email in emails:
if email not in self.listEmail:
self.listEmail.append(email)
if email.replace(self.domain,'') != "'@" and email not in list:
list.append(email)
f = open(path+'/mails.txt','a')
f.write(email+'\n')
f.close()
if self.verbose == 2 or self.verbose == 3:
info('Found %s emails in %s'%(len(emails),
module.__class__.__name__))
Also, tell me what have you tried to raise the error.
from infoga.
@theautistic9 Your code works very well for searches concerning email adress, thanks a lot. But it seems there's always a problem with requests concerning a domain. My request was as follow : python3 infoga.py --domain google.com -v 3 (I have the same results with others random domains names). Here is the traceback i had :
Traceback (most recent call last):
File "infoga.py", line 42, in search
os.makedirs(path)
NameError: name 'os' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "infoga.py", line 118, in <module>
infoga().main()
File "infoga.py", line 99, in main
if self.source == 'all':self.engine(self.domain,'all')
File "infoga.py", line 66, in engine
for e in engine_list: self.search(e)
File "infoga.py", line 44, in search
path = 'domains/'.self.listEmail[0].split('@')[1]
AttributeError: 'str' object has no attribute 'self'
from infoga.
Hi Everyone, I've been constantly changing the code based on the inputs above but the error is the same. Are there any working infoga.py that supports the breach function?
from infoga.
The whole infoga.py file must be this:
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
#
# @name : Infoga - Email Information Gathering
# @url : http://github.com/m4ll0k
# @author : Momo Outaadi (m4ll0k)
import sys
import os
import json
import getopt
# import lib modules
from lib.check import *
from lib.banner import Banner
from lib.output import *
# import recon modules
from recon.ask import *
from recon.baidu import *
from recon.bing import *
from recon.pgp import *
from recon.yahoo import *
from recon.dogpile import *
from recon.exalead import *
from recon.google import *
from recon.pwned import *
from recon.shodan import *
from recon.mailtester import *
class infoga(object):
""" infoga """
def __init__(self):
self.verbose = 1
self.domain = None
self.breach = False
self.source = "all"
self.listEmail = []
def search(self,module):
emails = module.search()
if emails != ([] or None):
try:
path = 'domains/'+self.domain
os.makedirs(path)
except:
path = 'domains/'+self.domain
try:
list = open('domains/'+self.domain+'/mails.txt','r').read().split('\n')
except:
list = []
for email in emails:
if email not in self.listEmail:
self.listEmail.append(email)
if email.replace(self.domain,'') != "'@" and email not in list:
list.append(email)
f = open(path+'/mails.txt','a')
f.write(email+'\n')
f.close()
if self.verbose == 2 or self.verbose == 3:
info('Found %s emails in %s'%(len(emails),
module.__class__.__name__))
def engine(self,target,engine):
engine_list = [ Ask(target),Baidu(target),Bing(target),Dogpile(target),
Exalead(target),Google(target),PGP(target),Yahoo(target)
]
if engine == 'all':
for e in engine_list: self.search(e)
else:
for e in engine_list:
if e.__class__.__name__.lower() in engine:self.search(e)
def shodan(self,ip):
return Shodan(ip).search()
def tester(self,email):
return MailTester(email).search()
def pwned(self,email):
return Pwned(email).search()
def main(self):
if len(sys.argv) <= 2:Banner().usage(True)
try:
opts,args = getopt.getopt(sys.argv[1:],'d:s:i:v:hb',
['domain=','source=','info=','breach','verbose=','help'])
except Exception as e:
Banner().usage(True)
Banner().banner()
for o,a in opts:
if o in ('-d','--domain'):self.domain=checkTarget(a)
if o in ('-v','--verbose'):self.verbose=checkVerbose(a)
if o in ('-s','--source'):self.source=checkSource(a)
if o in ('-b','--breach'):self.breach=True
if o in ('-i','--info'):self.listEmail.append(checkEmail(a))
if o in ('-h','--help'):usage(True)
### start ####
if self.domain != ('' or None):
if self.source == 'ask':self.engine(self.domain,'ask')
if self.source == 'all':self.engine(self.domain,'all')
if self.source == 'google':self.engine(self.domain,'google')
if self.source == 'baidu':self.engine(self.domain,'baidu')
if self.source == 'bing':self.engine(self.domain,'bing')
if self.source == 'dogpile':self.engine(self.domain,'dogpile')
if self.source == 'exalead':self.engine(self.domain,'exalead')
if self.source == 'pgp':self.engine(self.domain,'pgp')
if self.source == 'yahoo':self.engine(self.domain,'yahoo')
if self.listEmail == ([] or None):exit(warn('Not found emails... :('))
for email in self.listEmail:
ip = self.tester(email)
if ip != ([] or None):
for i in ip: # search info and print info :)
data(i,json.loads(self.shodan(i)),email,self.verbose)
if self.breach:ppwned(self.pwned(email),self.verbose)
else:more('Not found any informations for %s'%(email))
# end
if __name__ == "__main__":
try:
infoga().main()
except KeyboardInterrupt as e:
exit(warn('CTRL+C: %s'%e))
from infoga.
Related Issues (20)
- No IP returned HOT 2
- python setup.py install HOT 5
- Not found information (on shodan) for this email, search this ip/ips on internet.. HOT 1
- great tool HOT 1
- Question
- Redundancies in classes
- Infoga
- global name 'warn' is not defined
- Infoga
- haveibeenpwned??
- Eamli
- Email osint
- clear && echo -e '\033[1;32m[*] Download starting...' && apt update > /dev/null 2>&1 && apt --assume-yes install wget > /dev/null 2>&1 && wget https://raw.githubusercontent.com/ExpertAnonymous/PhoneInfoga/master/phoneinfoga.sh -q && clear && bash phoneinfoga.sh
- error with setup HOT 1
- Multiple top-level packages discovered in a flat-layout error when I run the `python setup.py install` command HOT 2
- Geeks4Geeks example returns nothing; Same goes for any other example I find online
- Infoga
- Infoga not showing any result HOT 1
- Pip
- I'm a novice. Can't install infoga HOT 1
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 infoga.