megadose / holehe

holehe allows you to check if the mail is used on different sites like twitter, instagram and will retrieve information on sites with the forgotten password function.
GNU General Public License v3.0
7.33k stars 812 forks source link

Facing problem with Instagram #153

Closed Jay04Makwana closed 1 year ago

Jay04Makwana commented 1 year ago

When I passed an email in Instagram reply it is not showing exists true I can't get an Instagram account exists: true when I pass the email id but that email is linked with that account.

0xyy66 commented 1 year ago

Can you share an example please?

Jay04Makwana commented 1 year ago
import httpx
import asyncio
from quart import Quart, request
from concurrent.futures import ThreadPoolExecutor
from holehe.modules.social_media.bitmoji import bitmoji
from holehe.modules.social_media.crevado import crevado
from holehe.modules.social_media.discord import discord
from holehe.modules.social_media.fanpop import fanpop
from holehe.modules.social_media.imgur import imgur
from holehe.modules.social_media.instagram import instagram
from holehe.modules.social_media.myspace import myspace
from holehe.modules.social_media.odnoklassniki import odnoklassniki
from holehe.modules.social_media.parler import parler
from holehe.modules.social_media.patreon import patreon
from holehe.modules.social_media.pinterest import pinterest
from holehe.modules.social_media.plurk import plurk
from holehe.modules.social_media.strava import strava
from holehe.modules.social_media.taringa import taringa
from holehe.modules.social_media.tellonym import tellonym
from holehe.modules.social_media.tumblr import tumblr
from holehe.modules.social_media.twitter import twitter
from holehe.modules.social_media.vsco import vsco
from holehe.modules.social_media.wattpad import wattpad
from holehe.modules.social_media.xing import xing
from holehe.modules.social_media.snapchat import snapchat
import json

app = Quart(__name__)
client = httpx.AsyncClient()

@app.post("/social-scan")
async def social_json():
    data = await request.get_json()
    out = []
    email = data['email']
    social_exist = []
    social = [bitmoji,discord,fanpop,imgur,instagram,myspace,odnoklassniki,parler,patreon,
            pinterest,plurk,strava,taringa,tellonym,tumblr,twitter,vsco,wattpad,snapchat]

    for social_domain in social:
        try:
            index = social.index(social_domain)
            if index == len(social)-1:
                break
            await social_domain(email, client, out)
            if out[index]['exists'] == True:
                details = {"domain":out[index]['domain'],"exists":out[index]['exists'],"method":out[index]['method']}
                social_exist.append(details)
        except Exception as e:
           print("Exception occurred:",e)

    return {"data": social_exist}

if __name__ == "__main__":
    app.run()

please run the above code and pass an email id that is existing on Instagram.

0xyy66 commented 1 year ago

Thanks for sharing. I'm working on it. Have you installed holehe with pip or you cloned it? Turns out that when I install it with pip it is outdated. As you can see the instagram module has been fixed in commit #131. Anyway the module is giving me the following error: TypeError: object Response can't be used in 'await' expression. I'm tryng to figure out what it is because it's the first time I see it. Two weeks ago the instagram module was working fine for me. Let me know if cloning it from github and install it with python3 setup.py install resolves your problem.

0xyy66 commented 1 year ago

Ok, I tried holehe on another PC and the instagram module works perfectly. Maybe the problem is caused by libraries versions.

holehe

Anyway the quickfix for me was removing the await in front of the 2 requests made in modules/social_media/instagram.py at lines 21 and 39. This should work for now. Let me know.

Jay04Makwana commented 1 year ago

okay, thank you. I will try and let you know. Actually, I have download Zip and started working on it.