igcreator icon indicating copy to clipboard operation
igcreator copied to clipboard

The IP address you are using has been flagged

Open Killfaeh opened this issue 5 years ago • 15 comments

Hi !

I drew on your source code to create my program 2 days ago and it worked fine. But i experience something strange for several hours. When I try to create a new account, Instagram give this response : {"account_created": false, "errors": {"email": [{"message": "This field is required.", "code": "email_required"}], "username": [{"message": "This field is required.", "code": "username_required"}], "password": [{"message": "This field is required.", "code": "password_required"}]}, "status": "ok", "error_type": "form_validation_error"}

as if I didn't send the data. I send the request through a tor proxy that I relaunch each time I execute the program. So, I don't think it is a ip blocked problem.

Did you experience this issue ?

Killfaeh avatar Oct 24 '18 01:10 Killfaeh

Tomorrow I will see what happens :)

juanmicl avatar Oct 24 '18 01:10 juanmicl

Thanks !

If it can help, here is my version of the code. It is a function from a class.

`function createInstagramAccount() { $curl = curl_init();

    // First Instagram call to get cookies 
    $httpHeader = array(
        "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "accept-language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7", 
        "accept-encoding: gzip, deflate, br", 
        "cache-control: no-cache", 
        "pragma: no-cache", 
        "upgrade-insecure-requests: 1", 
        "user-agent: ". $this->userAgent, 
        "referer: https://www.google.fr/", 
        "origin: www.google.fr"
    ); 
    
    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://www.instagram.com/?hl=fr",
        CURLOPT_PUT => false,
        CURLOPT_POST => false,
        CURLOPT_COOKIE => true,
        CURLOPT_COOKIEJAR => $this->cookieFile,
        CURLOPT_COOKIEFILE => $this->cookieFile,
        CURLOPT_USERAGENT => $this->userAgent,
        CURLOPT_REFERER => "https://www.google.fr/",
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HEADER => true, 
        CURLOPT_PROXY => "http://127.0.0.1:9050/",
        CURLOPT_PROXYTYPE => CURLPROXY_SOCKS5,
        CURLOPT_HTTPHEADER => $httpHeader,
    ));
    
    $response = curl_exec($curl);
    
    $cookies = array();
    
    $match = array();
    preg_match_all('#Set-Cookie: ([a-zA-Z0-9_]*)=([^;]*); #', $response, $match);
    
    for ($i = 0; $i < count($match[0]); $i++)
        $cookies[$match[1][$i]] = $match[2][$i]; 
    
    $strCookie = "";
      
    foreach ($cookies as $key =>$value)
        $strCookie = $key . "=" . $value . "; "; 
    
    // Second Instagram call to create an account 
    $payload = array(
        'email' => urlencode($this->email),
        'username' => $this->username,
        'password' => $this->password,
        'first_name' => urlencode($this->first_name),
        'client_id' => substr(str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 28),
        'seamless_login_enabled' => '1',
        'gdpr_s' => '%5B0%2C2%2C0%2Cnull%5D',
        'tos_version' => 'eu',
        'opt_into_one_tap' => 'false'
    );
    
    $httpHeader = array(
        "accept: */*", 
        "accept-language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7", 
        "content-length: " . strlen(json_encode($payload)), 
        "content-type: application/x-www-form-urlencoded", 
        "cache-control: no-cache", 
        "pragma: no-cache", 
        "connection: keep-alive", 
        "host: www.instagram.com", 
        "origin: https://www.instagram.com", 
        "referer: https://www.instagram.com/", 
        "user-agent: " . $this->userAgent, 
        "x-csrftoken: " . $cookies['csrftoken'], 
        "x-instagram-ajax: 1", 
        "x-requested-with: XMLHttpRequest", 
        "cookie: " . $strCookie
    ); 
    
    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://www.instagram.com/accounts/web_create_ajax/",
        CURLOPT_PUT => false,
        CURLOPT_POST => true, 
        CURLOPT_POSTFIELDS => $payload,
        CURLOPT_COOKIE => true, 
        CURLOPT_COOKIEJAR => $this->cookieFile, 
        CURLOPT_COOKIEFILE => $this->cookieFile, 
        CURLOPT_USERAGENT => $this->userAgent, 
        CURLOPT_REFERER => "https://www.instagram.com/", 
        CURLOPT_FOLLOWLOCATION => true, 
        CURLOPT_RETURNTRANSFER => true, 
        CURLOPT_HEADER => false, 
        CURLOPT_PROXY => "http://127.0.0.1:9050/", 
        CURLOPT_PROXYTYPE => CURLPROXY_SOCKS5, 
        CURLOPT_HTTPHEADER => $httpHeader,
    ));
    
    $response = curl_exec($curl);
    
    return $response;
}`

Killfaeh avatar Oct 24 '18 11:10 Killfaeh

I have tested my code and still workinf fine :+1: I recommend you to install composer and use it will be easier for you and I will give you support. I can't give support about other code rewrited from my own :(

juanmicl avatar Oct 24 '18 11:10 juanmicl

I tried with your code directly. It works without a proxy, but if I use my tor proxy I have to add this option CURLOPT_PROXYTYPE => CURLPROXY_SOCKS5

And I have this message from Insta : {"account_created": false, "errors": {"ip": ["The IP address you are using has been flagged as an open proxy. If you believe this to be incorrect, please visit http://help.instagram.com/"]}, "status": "ok", "error_type": "signup_block"}

Killfaeh avatar Oct 24 '18 12:10 Killfaeh

This is because instagram flagged this IP as proxy, you need to try with other proxy.

I recommend you to use HTTPS proxies.

juanmicl avatar Oct 24 '18 12:10 juanmicl

Ok. That's strange, I relaunch tor for each new account creation and so I change ip each time. It works some days ago. Did Instagram blocked all tor ip ?

Killfaeh avatar Oct 24 '18 12:10 Killfaeh

Probably yes. I think you should find other method.

juanmicl avatar Oct 24 '18 12:10 juanmicl

Hi !

I made some new tests with tor and I have some new details.

As said sooner when I use your code with proxy, via tor, I have the message {"account_created": false, "errors": {"ip": ["The IP address you are using has been flagged as an open proxy. If you believe this to be incorrect, please visit http://help.instagram.com/"]}, "status": "ok", "error_type": "signup_block"}

But when I add cookies to your code (with a first call to Instagram before trying to create an account) I have the first message I talked about {"account_created": false, "errors": {"email": [{"message": "This field is required.", "code": "email_required"}], "username": [{"message": "This field is required.", "code": "username_required"}], "password": [{"message": "This field is required.", "code": "password_required"}]}, "status": "ok", "error_type": "form_validation_error"}

It worked ONCE with the cookies yesterday and I fail to reproduce the success conditions for now.

It worked perfectly some days ago and I find strange that all tor ip have been blocked only because of my tests. They are too many tor exit nodes. And when I try to connect to an existing account via tor, only some of them are flagged as blocked. I success to connect via the others. I think the problem is elsewhere.

I tried with a http free proxy too (so without tor). I find one responding but I have the message {"account_created": false, "errors": {"ip": ["The IP address you are using has been flagged as an open proxy. If you believe this to be incorrect, please visit http://help.instagram.com/"]}, "status": "ok", "error_type": "signup_block"} even when I use cookies this time. So, this one seems to be really blocked.

I’ll come back if I have new details.

Have a nice day.

Killfaeh avatar Oct 25 '18 12:10 Killfaeh

What cookies did you use?

juanmicl avatar Oct 29 '18 17:10 juanmicl

Did some test yesterday and I think this error is related to cookies.

Will try to fix this as soon as possible :+1:

juanmicl avatar Jan 11 '19 08:01 juanmicl

hello sir ... can you make a video guide to use this on codeigniter? I will pay for that, thank you

kangarif43 avatar May 02 '19 03:05 kangarif43

Hi!

I use your source code to create my program but I found a signup_block problem can you share how to overcome the signup_block problem?

image

kangarif43 avatar May 03 '19 13:05 kangarif43

I have tried using a proxy or not using the results with signup_block

kangarif43 avatar May 03 '19 13:05 kangarif43

Hi !

I made some new tests with tor and I have some new details.

As said sooner when I use your code with proxy, via tor, I have the message {"account_created": false, "errors": {"ip": ["The IP address you are using has been flagged as an open proxy. If you believe this to be incorrect, please visit http://help.instagram.com/"]}, "status": "ok", "error_type": "signup_block"}

But when I add cookies to your code (with a first call to Instagram before trying to create an account) I have the first message I talked about {"account_created": false, "errors": {"email": [{"message": "This field is required.", "code": "email_required"}], "username": [{"message": "This field is required.", "code": "username_required"}], "password": [{"message": "This field is required.", "code": "password_required"}]}, "status": "ok", "error_type": "form_validation_error"}

It worked ONCE with the cookies yesterday and I fail to reproduce the success conditions for now.

It worked perfectly some days ago and I find strange that all tor ip have been blocked only because of my tests. They are too many tor exit nodes. And when I try to connect to an existing account via tor, only some of them are flagged as blocked. I success to connect via the others. I think the problem is elsewhere.

I tried with a http free proxy too (so without tor). I find one responding but I have the message {"account_created": false, "errors": {"ip": ["The IP address you are using has been flagged as an open proxy. If you believe this to be incorrect, please visit http://help.instagram.com/"]}, "status": "ok", "error_type": "signup_block"} even when I use cookies this time. So, this one seems to be really blocked.

I’ll come back if I have new details.

Have a nice day.

hello did you make this work?

kangarif43 avatar May 13 '19 13:05 kangarif43

I think Instagram patched this way, I'm not sure but would have to make some tests. And probably would have to recode the package... You can contribute if you have some knowledge of php and if you want we can make on python or something else. Now I don't have time to do that :pensive:

juanmicl avatar May 26 '19 20:05 juanmicl