Click here to Skip to main content
14,449,906 members
Rate this:
Please Sign up or sign in to vote.
Convert Python to vb.net


What I have tried:

username = input("Enter your username : ")
password = input("Enter your password : ")
 
        hd2 = {
    'User-Agent': 'Instagram 113.0.0.39.122 Android (24/5.0; 515dpi; 1440x2416; huawei/google; Nexus 6P; angler; angler; en_US)',
    "Accept": "*/*",
    "Accept-Encoding": "gzip, deflate",
    "Accept-Language": "en-US",
    "X-IG-Capabilities": "3brTvw==",
    "X-IG-Connection-Type": "WIFI",
    "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    'Host': 'i.instagram.com'
 
 
    data = {'uuid': uid,
        'password': password,
        'username': username,
        'device_id': uid,
        'from_reg': 'false',
        '_csrftoken': 'missing',
        'login_attempt_count': '0'}    
    url = 'https://i.instagram.com/api/v1/'
            endpoint = 'accounts/login/'
    ss = requests.session()
            endpoint2 = 'users/check_username/'  
        def check1(user):
      #suggestions
    data2 = {
            "_uuid":uid,
            "username":f"{user}",
            "_csrftoken":ss.cookies['csrftoken']
        }
    re = requests.post(url + endpoint2,data=data2,headers=hd2).text
    return not "suggestions" in re
 
def work():
 
    log = ss.post(url + endpoint, data=data, headers=hd2)
    if ('{"logged_in_user":') in log.text:
        print("Logged in @" + username)
        ss.cookies = log.cookies
    else:
        exit(0)
    slp = int(input("Enter sleep: "))
    listf = input("file name:")
    listuser = open(listf,"r").read().splitlines()
    for user in listuser:
 
             if check1(user):
                print(f"{user} = 14 Days")
              else:
                print(f"{user} = Hmm No")
              else:
            print(f"{user} = Not Banned")
        sleep(slp)
 
 
work()
Posted
Updated 10-Feb-20 3:40am
Comments
Maciej Los 10-Feb-20 8:37am
   
What's your question?
Dave Kreskowiak 10-Feb-20 11:34am
   
If you're looking for someone to convert the code for you, that's not going to happen.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Everything in your "What I have tried:" section is Python not VB.NET

Try using one of these on line converters[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100