I am a total newbie.
I've made a small script to login in sites, but it doesn't work in a particular one (the one I made this script for)
and I get this error if I use DEBUG:
in terminal
Error 403--Forbidden From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1: 10.4.4 403 Forbidden The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
OR instead of the webpage I get a page with the ORACLE ACCESS MANAGER logo and this message
Error System error. Please re-try your action. If you continue to get this error, please contact the Administrator.
Is there any extra security layer that doesn't let me to enter and how to bypass it?
Here is the code:
const Nightmare = require('nightmare');
const nightmare = Nightmare({ show: true});
nightmare
.goto('path')
.type('input[name="username"]', 'username')
.type('input[name="password"]', 'password')
.click('input[type="submit"][value = "OK"]')
.wait(5000)
.evaluate(() => document.querySelector('body').innerText)
.end()
.then(console.log)
.catch(error => {
console.error('Search failed:', error)
});
So the problem was lying that the 'path' in the .goto method for that particular site shouldn't be the url of the login page but the url that the site redirects me after I normally login or any other address that I have access to after I have logged in the site.