Giter Site home page Giter Site logo

cti1650 / password Goto Github PK

View Code? Open in Web Editor NEW

This project forked from higurashi-takuto/password

0.0 0.0 0.0 9 KB

GitHub Pages などの静的サイトのホスティングサービスで擬似的にパスワード認証をつけるものです。

HTML 66.99% CSS 33.01%

password's Introduction

password

GitHub Pages などの静的サイトのホスティングサービスで擬似的にパスワード認証をつけるものです。

DEMO

リンク

※パスワードは password です。

ファイル

  • index.html
    パスワード入力画面です。
    サンプル

  • check.html
    認証に使用するハッシュ値を確認するためのページです。
    サンプル

  • style.css
    スタイルシートで index.html / check.html 共通のものです。

  • padlock.svg
    ファビコン用画像です。ダークモード対応しています。

  • sha256.js
    SHA-256 を使用するためのライブラリです。 jsSHA を利用しています。

  • 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8/
    パスワード突破後にアクセスされるディレクトリです。

使い方 / 仕組み

ハッシュ化されたパスワードをそのままディレクトリ名に利用し、URL の存在の有無で認証を行なっています。

この方法のデメリットとして URL が知られる / ディレクトリリストが取得される という方法によっても突破されてしまうため、URL の共有やサーバの設定に注意しましょう。

ハッシュ化には SHA-256 を使用しており、入力に対するハッシュ値の確認には check.html が利用できます。ここで取得できるハッシュ値をディレクトリ名に付けましょう。

参考リポジトリ

matteobrusa / Password-protection-for-static-pages

password's People

Contributors

higurashi-takuto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.