def hunter_domain_search(domain):
    api = "44ac9d0fcf060465933c1591d75c2ace4b1692d8"
    hunter = PyHunter(api)
    info = (hunter.account_information())
    print("Kalan API Hakkı : ",info["calls"]["left"])
    print("hunter domain search..")
    while(True):
        if (info["calls"]["left"] != 0):
            result = hunter.domain_search(domain)
            result = result["emails"]
            for i in range(len(result)):
                email.append(result[i]["value"])
            break

        else:
            print("\nMevcut Api Arama Hakkı Bitti")
            print("""
            1 - Yeni API Ekle
            0 - Çıkış Yap
            """)

            choise = input("Yapmak İstediğiniz İşlemi Seçiniz = ")

            if (choise == "1"):
                api = input("\nYeni Api Değerini Giriniz = ")
            elif (choise == "0"):
                break
            else:
                print("Hatalı Bir Seçim Yaptınız, Tekrar Deneyiniz..")
Esempio n. 2
0
def get_hunterio_emails(company, API_KEY):
    hunter = PyHunter(API_KEY)

    account_info = hunter.account_information()
    calls_remaining = account_info['calls']['left']
    calls_allowed = account_info['calls']['available']
    print_success("[+] Checking hunter.io ({0}/{1} queries remaining)".format(
        calls_remaining, calls_allowed))
    results = hunter.domain_search(company, limit=1000, emails_type="personal")
    company_records = results['emails']

    hunterio_emails = []
    counter = 0
    for record in company_records:
        email = str(record['value'])
        fname = str(record['first_name'])
        lname = str(record['last_name'])
        position = str(record['position'])
        hunterio_emails.append(fname + "," + lname + "," + email + "," +
                               position)
        counter = counter + 1
    return hunterio_emails
    print("\n" + result[0])


def email_verifier(email):
    result = hunter.email_verifier(email)
    if (result["smtp_check"]):
        print("\nsmtp_check = " + str(result["smtp_check"]) + "\t--->\tBöyle Bir Email Adresi Vardır")
    else:
        print("\nsmtp_check = " + str(result["smtp_check"]) + "\t--->\tBöyle Bir Email Adresi Yoktur")


try:
    while (True):
        api = "44ac9d0fcf060465933c1591d75c2ace4b1692d8"
        hunter = PyHunter(api)
        info = (hunter.account_information())
        os.system("clear")
        os.system("figlet TurkHackTeam\n")
        print("\033[94mİstihbarat Tim Osint Hunter Aracına Hoş Geldiniz")

        if (info["calls"]["left"] != 0):
            print("Mevcut Api İçin Kalan Arama Hakkı  = " + info["calls"]["left"])
            print("""
            1 - Domain Arama
            2 - Email Bulma
            3 - Email Doğrulama
            0 - Çıkış
            """)
            choise = input("Yapmak İstediğiniz İşlemi Seçiniz = ")

            if (choise == "1"):
Esempio n. 4
0
            url = x
            print(url)
            results = hunter.domain_search(url)
            printed = json.dumps(results)
            fopen.write(printed)
    fopen.close()
elif (args.fns):
    company1 = input("Enter company of interest..")
    name = input("Enter person of interest")
    results = hunter.email_finder(company=company1, full_name=name, raw=True)
    print(results)
elif (args.v):
    validatepls = input("File with Email addresses to validate..")
    outfile = input("Location of output text file..")
    fopen = open(outfile, 'w')
    with open(validatepls) as f:
        for i in f:
            x = i.rstrip('\n')
            print(x)
            emailname = x
            print(emailname)
            validated = hunter.email_verifier(emailname)
            printed = json.dumps(validated)
            fopen.write(emailname)
            fopen.write('\n')
            fopen.write(printed)
    fopen.close()
elif (args.c):
    number_left = hunter.account_information()
    print(number_left)
Esempio n. 5
0
# On enleve tous les urls du moteur de recherche : ici google
urls = [x for x in urls if "google" not in x]
# On supprime les doublons
urls = list(dict.fromkeys(urls))

# Ici j'ai eu le choix entre 2 strategies.
# 1er solution : Utiliser Hunter.io | Problème : C'est trop chère pour un étudiant
# 2eme solution : Trouvez les emails moi-même à l'aide de des nom de domaine | Problème : C'est galére et les adresses emails scrapper ne sont pas forcément les bonnes

# je vous presente ici la 1er solution mais je ne ferais que une requete car c'est juste un petit projet (Je suis limité à 50 requete par mois en gratuit, sinon il faut payer).

domaineInformation = hunter.domain_search(
    urls[0]
)  # Je prend seulement le premier resulat, si on voudrait obtenir tous les informations il suffirait de faire une boucle for sur ces informations et de les enregistrer

print("Voici les informations obtenue :")
# ICI ON PEUT FAIRE LA BOUCLE
print("Pour le nom de domaine : " + domaineInformation["domain"])
print("Voici la liste des adresses emails :")
for info in domaineInformation["emails"]:
    print(
        "Adresse email : " + info["value"]
    )  # + " " + info["first_name"] + " " + info["last_name"] + " Role : " + info["position"] + " Tél : " + info["phone_number"] + "Linkedin : " + info["linkedin"])

information = hunter.account_information()
print("Il reste " + str(information["calls"]["left"]) +
      " requetes à l'API hunter.io sur le compte. " +
      "Le compte hunter.io appartient à " + information["first_name"] + " " +
      information["last_name"] + ", vous pouvez le contacter à " +
      information["email"])