D
D
Den26262019-08-13 22:08:17
CSRF
Den2626, 2019-08-13 22:08:17

How to get a token if there is a CSRF Token in the form?

Hello. There is a bot that does certain actions on the site and recently a new request appeared on the site, after which the form itself appears (which used to be right away) and, most importantly, a CSRF Token appeared in the form. I changed the algorithm of the bot a little now 2 seconds before sending forms, the bot makes PRE-requests, it helped a little. But the site does not give out a token very often. Question: how can I implement the bot's algorithm to receive a token (if possible). The bot is written in PHP and sends requests via GuzzleHTTP. Thank you

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivan, 2018-01-06
@hollanditkzn

But in the penultimate line you do not have a semicolon. Did you copy it wrong too or is it really not there?
After this
root /var/www/html
And read the documentation .
Must be http:// prefix
proxy_pass http://127.0.0.1:8080;

D
Denis Michurin, 2018-01-06
@denistu10

At least I do not see the closing bracket of the server section

server {
        listen 80 default_server;
        root /var/www/html;

        index index.php index.html index.htm index.nginx-debian.html;

        server_name localhost 127.0.0.1;
        access_log /var/log/nginx/access.log;

        location / {
                proxy_pass 127.0.0.1:80;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_connect_timeout 120;
                proxy_send_timeout 120;
                proxy_read_timeout 180;
                try_files $uri $uri/ =404;
        }
        location ~*\.(jpg|jpeg|gif|png|ico|css|bmp|swf|js|html|txt)${
                root /var/www/html
        }
}

And yes, proxy_pass in the nginx settings is 127.0.0.1:80, and apache is running at *: 8080

K
ky0, 2018-01-06
@ky0

nginx -t, he testconfigwill tell you what is wrong with the config.

I
Igor Maksimov, 2018-01-09
@Chunk

Learn to read the logs, usually there is all the debug info. (/var/log/nginx/*)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question