skip to Main Content

I need to have password protected website without password, i have a dream then the website will check "does your computer containt file acess.txt,if this file contains 123456,website do ok you have an acess and redirects you to index.html

I hosting my website in Node.js
And i also running on Linux Debian

Apologie for my English, im Czech and young.
and yes im a programmer.

2

Answers


  1. does your computer containt file acess.txt,if this file contains 123456,website do ok you have an acess

    You can’t do that without having the user manually pick that file from an input type="file" or drag-and-drop it into your web page. For security reasons, web pages cannot check for files they provide the path of.

    and redirects you to index.html

    That would mean your site is completely insecure anyway — anyone could just go directly to index.html.

    All access checks must happen on the server, not the client (browser).

    Login or Signup to reply.
  2. Simple!

    Replace:

    <input name="post_password" type="password" value="" />
    

    With:

    <input name="post_file" type="file" value="" />
    

    However you can not have JavaScript go snooping through a person’s file system. They must choose to browser and select a file to upload and then submit the form.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search