P.S: I can't post any code using CODE and PHP tag, its goes to 403 Forbidden.
My original intention is to post the Cross Site Request Forgery Token on the post request, its goes to 403 Forbidden.
I just realised I cannot put code input here, basically my issues is:
1) I am trying to modify an existing login form
2) The CSRF token is in the GET request upon successfully authentication the user and store also store in the SESSION
3) The CSRF token will be visible on the URL and will compare against the session
4) This is to prevent another site to login to this site remotely.
5) Work like to put it in the POST request instead.
2ndly, the php console is not giving meaningful error when running.
Basically the variable does not have a $ and there is a missing ) at the end.
But this is the type of error message that PHP gives. Is there a better online compiler or editor in this case?
I also come across error like I have missing ;, but the interpreter says:
I understand PHP is currently at 7 and most people will be using framework like lavarel. But I am not a developer, I am just going through this coursework to understand the security flaws.
I am also using this method to launch start my test application, is there a way with lesser steps?
My original intention is to post the Cross Site Request Forgery Token on the post request, its goes to 403 Forbidden.
I just realised I cannot put code input here, basically my issues is:
1) I am trying to modify an existing login form
2) The CSRF token is in the GET request upon successfully authentication the user and store also store in the SESSION
3) The CSRF token will be visible on the URL and will compare against the session
4) This is to prevent another site to login to this site remotely.
5) Work like to put it in the POST request instead.
2ndly, the php console is not giving meaningful error when running.
Basically the variable does not have a $ and there is a missing ) at the end.
But this is the type of error message that PHP gives. Is there a better online compiler or editor in this case?
Error: There is 1 more opening parenthesis '(' found
This count is unaware if parenthesis are inside of a string
(hash_equals(session_token, get_token) { } else { header('Location: login.php'); } ?>
PHP Syntax Check: Parse error: syntax error, unexpected '{' in your code on line 1
if (hash_equals(session_token, get_token) {
I also come across error like I have missing ;, but the interpreter says:
127.0.0.1:53320 [500]: /information_gathering/lab1/staff.php - syntax error, unexpected '}' in /var/www/information_gathering/lab1/staff.php on line 14
I understand PHP is currently at 7 and most people will be using framework like lavarel. But I am not a developer, I am just going through this coursework to understand the security flaws.
I am also using this method to launch start my test application, is there a way with lesser steps?
Web Service:
1. cd /root/Desktop/www/
2. php -S 0.0.0.0:8080 #Refer Figure 1
Database:
1. service mariadb start
2. chromium --no-sandbox http://127.0.0.1:8080/adminer-4.7.7.php # Enter the Username and Password
3. show databases;
Last edited: