Q
Q
QWATRIX2020-06-04 01:11:37
API
QWATRIX, 2020-06-04 01:11:37

How to fix an error in working with the API?

A long time ago I wrote an authorization script with one site and everything worked as it should.
And now it's broken. I didn't change anything myself.
Here is the code:
5ed81ede99a37066476147.png

$post_data = json_encode(["email" => $mail,"password" => 'password123456']);



  $curl = curl_init();
  
  curl_setopt_array($curl, [
    CURLOPT_URL => "https://lampyre.io/api/1.5/accounts",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => 1,
    CURLOPT_POSTFIELDS => $post_data
  ]);


  $response = curl_exec($curl);
  curl_close($curl);

The $mail variable contains the mail to register.

The site gives the following error:
<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>


Sometimes at the end there is:
<!— a padding to disable MSIE and Chrome friendly error page —>
<!— a padding to disable MSIE and Chrome friendly error page —>
<!— a padding to disable MSIE and Chrome friendly error page —>
<!— a padding to disable MSIE and Chrome friendly error page —>
<!— a padding to disable MSIE and Chrome friendly error page —>
<!— a padding to disable MSIE and Chrome friendly error page —>

I did not find a solution to my problem on the Internet.
Help me please.

Again, everything worked before.

The api was pulled from the site through Burp, everything works on the site, but not here.

I even made a CURL request through the command line, similar to a request from a browser (generated a burp), but gives the same error.

What can be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2020-06-04
@QWATRIX

Put up protection. How to bypass? Experiment. From other IPs, with normal headers and stuff like that

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question