commit b631b53a66d739277caff6dac3f00156b9854df9 Author: Yatmesh Date: Thu Jul 30 15:53:50 2026 +0530 V001: Login UI screen using the phonenumber diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/Guestpolicy.html b/Guestpolicy.html new file mode 100644 index 0000000..8a6ee72 --- /dev/null +++ b/Guestpolicy.html @@ -0,0 +1,96 @@ + + + + + + Wi-Fi Guest Policy + + +
+
+ +

Wi-Fi Access Terms & Conditions

+

    Bhaktivedanta Hospital offers complimentary Wi-Fi Internet access to patients, attendants and visitors. To access our Internet service, please register with your mobile number and, if required, obtain the current password from the reception / help desk.

+

Terms of service apply:

+ +
+
  • Wi-Fi access is available in designated patient, visitor and public areas of the hospital.
  • +
  • It is provided free of charge to patients, attendants and visitors.
  • +
  • Access is subject to the following terms and conditions. These terms and conditions may be revised at any time.
  • +
    +

    Logging in and out of the Hotspot:

    + +
    +
  • You must enter your mobile number to log in, and a password if one has been issued to you.
  • +
  • You will need a wireless-enabled device with a browser and its own power source.
  • +
  • You must agree to accept the terms and conditions of use by selecting 'I Agree'.
  • +
    + +

    You will be automatically logged out of the Hotspot if:

    + +
    +
  • Your session time limit, set by the hospital, has been reached.
  • +
  • You move out of Wi-Fi coverage or the wireless connection is lost.
  • +
  • The hospital determines it necessary for network security or medical-equipment safety reasons.
  • +
    + +
    +
  • Your access is terminated by reason of a breach of these terms and conditions.
  • +
  • The wireless connection of the Hotspot you are accessing is lost, disconnected or becomes out of range.
  • +
  • Speed and reliability of the Hotspot.
  • +
  • Bhaktivedanta Hospital does not guarantee continuous, stable, fault-free or secure access.
  • +
  • The hospital will endeavor to rectify any malfunctions, faults or problems with our Hotspot but is not obliged to do so in any specified time frame.
  • +
  • Wi-Fi speed may be higher or lower and will vary depending on many factors including the capabilities of your wireless device, the amount of traffic and general congestion of the network, your location within the hospital, and interference from medical equipment.
  • + +
    +

    Priority of Clinical Systems

    +

    Guest Wi-Fi is provided on a best-effort basis on a network that is logically separated from the hospital's clinical and administrative systems. The hospital reserves the right to limit, throttle, or suspend guest Wi-Fi access at any time to protect the performance, security, or availability of clinical networks and medical devices.

    + +

    Security

    +

    Your access and use of the Hotspot is at your own risk. You are solely responsible for protecting your usernames, passwords and security-based information. The onus is on you to ensure firewalls and virus protection is in place on your wireless device.

    +

    Bhaktivedanta Hospital is not liable for any loss or damage you may sustain as a result of using the Hotspot.

    + +

    User Standards and Obligations

    +

    The Hotspot is intended to be used in a manner that is not offensive in any way to the community at large, and that does not disrupt hospital operations or patient care. Bhaktivedanta Hospital has absolute and sole discretion to limit or block access to unacceptable websites. This includes but is not limited to websites and/or content that:

    + +
    + +
  • Could cause Bhaktivedanta Hospital to breach any law governing its conduct or to incur a liability to any third party.
  • +
  • Could interfere with the integrity and/or performance of the Hotspot, the hospital's network, medical devices, or equipment.
  • +
  • Depicts, alludes to, or promotes offensive or illegal behavior.
  • +
  • Promotes racism, bigotry, hatred or physical harm to any group or individual.
  • + +
  • Harasses or promotes harassment of another person.
  • +
  • Exploits people in a sexual or violent manner.
  • +
  • Contains nudity, violence or offensive subject matter or which may connect to adult websites.
  • +
  • Promotes conduct that is abusive, threatening, obscene or defamatory.
  • +
  • Intentionally infringes copyright.
  • +
  • Involves the transmission of junk mail, chain letters or unsolicited mailing, instant messaging or spamming.
  • +
  • Promotes criminal activity.
  • +
  • Contains viruses, Trojan horses, worms, time bombs, cancelbots, or other computer programming routines that may damage, interfere or intercept access.
  • +
  • If Bhaktivedanta Hospital becomes aware that websites are accessed in contravention of these terms and conditions, it reserves the right to immediately terminate and block access without prior notice.
  • +

    +Users should be aware that the browsing or downloading of illegal information from the internet could lead to prosecution. In case of any breach of the above terms and conditions by the user which leads to a criminal investigation, the hospital shall abide by local laws and co-operate with investigating authorities by sharing necessary details about the user.

    + +
    + +

    Privacy:

    + +
    + +
  • Bhaktivedanta Hospital respects your right to privacy and will not capture any personal information while accessing the Hotspot beyond what is required to provide the service, unless your consent is granted.
  • +
  • Once you access the Hotspot and open the internet browser application, the hospital may capture and process information about the web browser type and/or operating system used by your device in order to determine the most effective means of displaying the requested website on your device.
  • +
  • Bhaktivedanta Hospital will collect and store the mobile number, IP address and MAC address of the device that has accessed the Hotspot, once the terms and conditions have been agreed to. This information is kept separate from your clinical / medical records.
  • +
  • Bhaktivedanta Hospital is not liable for the privacy policies applied by owners or operators of websites. You are solely responsible for checking the terms of use and privacy policy of each website you visit and determining whether you accept such terms of use and privacy policies.
  • + +
    + +

    Release and Indemnity

    +

    You release and discharge Bhaktivedanta Hospital from any liability which might arise from your use of the Bhaktivedanta Hospital Wi-Fi Hotspot service including liability in relation to defamatory or offensive material or any breach of copyright which may occur as a result of your use.

    +

    You agree to indemnify and must defend and hold harmless Bhaktivedanta Hospital, its employees and agents, from and against all loss, damage, liability, charge, expense (including all reasonable legal and other professional costs on a full indemnity basis) of any nature or kind arising from your breach of these terms and conditions.

    + + +
    + + + diff --git a/alogin.html b/alogin.html new file mode 100644 index 0000000..386864c --- /dev/null +++ b/alogin.html @@ -0,0 +1,37 @@ + + + + + + + + + + Bhaktivedanta Hospital Wi-Fi - Redirect + + + + + + +



    +



    +



    +



    +
    +
    +

    You are connected!

    +

    If nothing happens, click here

    +
    +
    + + + diff --git a/api.json b/api.json new file mode 100644 index 0000000..7074b29 --- /dev/null +++ b/api.json @@ -0,0 +1,11 @@ +{ + "captive": $(if logged-in == 'yes')false$(else)true$(endif), + "user-portal-url": "$(link-login-only)", +$(if session-timeout-secs != 0) + "seconds-remaining": $(session-timeout-secs), +$(endif) +$(if remain-bytes-total) + "bytes-remaining": $(remain-bytes-total), +$(endif) + "can-extend-session": true +} diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..762f86b --- /dev/null +++ b/css/style.css @@ -0,0 +1 @@ +a,body,div,form,html,input,label,p,span{margin:0;padding:0;border:0;font-family:sans-serif,Arial}body,html{min-height:100%;overflow-x:hidden}body{background:#a2a09b;background:-webkit-linear-gradient(315deg,hsla(236.6,0%,53.52%,1) 0,hsla(236.6,0%,53.52%,0) 70%),-webkit-linear-gradient(65deg,hsla(220.75,34.93%,26.52%,1) 10%,hsla(220.75,34.93%,26.52%,0) 80%),-webkit-linear-gradient(135deg,hsla(46.42,36.62%,83.92%,1) 15%,hsla(46.42,36.62%,83.92%,0) 80%),-webkit-linear-gradient(205deg,hsla(191.32,50.68%,56.45%,1) 100%,hsla(191.32,50.68%,56.45%,0) 70%);background:linear-gradient(135deg,hsla(236.6,0%,53.52%,1) 0,hsla(236.6,0%,53.52%,0) 70%),linear-gradient(25deg,hsla(220.75,34.93%,26.52%,1) 10%,hsla(220.75,34.93%,26.52%,0) 80%),linear-gradient(315deg,hsla(46.42,36.62%,83.92%,1) 15%,hsla(46.42,36.62%,83.92%,0) 80%),linear-gradient(245deg,hsla(191.32,50.68%,56.45%,1) 100%,hsla(191.32,50.68%,56.45%,0) 70%)}a{color:#486173}input,label{vertical-align:middle;white-space:normal;background:0 0;line-height:1}label{position:relative;display:block}p::first-letter{text-transform:uppercase}.main{min-height:calc(100vh - 90px);width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ie-fixMinHeight{display:-webkit-box;display:-ms-flexbox;display:flex}.ico{height:16px;position:absolute;top:0;left:0;margin-top:13px;margin-left:14px}.logo{max-width:200px;display:block;margin:0 auto 30px auto}.logo *{fill:#fff}.lite .logo *{fill:#444}h1{text-align:center;color:#ee9736;font-size:70px!important}*{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:16px}.wrap{margin:auto;padding:40px;-webkit-transition:width .3s ease-in-out;transition:width .3s ease-in-out}@media only screen and (min-width:1px) and (max-width:575px){.wrap{width:100%}}form{width:100%;margin-bottom:20px}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.info{color:#fff;text-align:center;margin-bottom:30px}input{outline:0;}input:focus{outline:0}input[type=password],input[type=text]{width:100%;border:1px solid background-color: rgba(255,255,255,.8);height:44px;padding:3px 20px 3px 40px;margin-bottom:20px;border-radius:6px;background-color:rgba(255,255,255,.8);-webkit-transition:-webkit-box-shadow .3s ease-in-out;transition:-webkit-box-shadow .3s ease-in-out;transition:box-shadow .3s ease-in-out;transition:box-shadow .3s ease-in-out,-webkit-box-shadow .3s ease-in-out}input[type=password]:focus,input[type=text]:focus{-webkit-box-shadow:0 0 5px 0 rgba(255,255,255,1);box-shadow:0 0 5px 0 rgba(255,255,255,1)}.bt{opacity:.4}input[type=submit]{background:#3e4d59;color:#fff;border:0;cursor:pointer;text-align:center;width:100%;height:44px;border-radius:6px;-webkit-transition:background .3s ease-in-out;transition:background .3s ease-in-out}input[type=submit]:focus,input[type=submit]:hover{background:#33404a}table{border-collapse:collapse;width:100%;margin-bottom:20px}table td{color:#fff;border-bottom:1px solid #e6e6e6;padding:10px 4px 10px 0}table td:first-child{font-weight:700}.lite{background:#fff}.lite input[type=password],.lite input[type=text]{border:1px solid #c3c3c3}.lite .info,.lite h1,.lite table td{color:#444}.lite input[type=password]:focus,.lite input[type=text]:focus{-webkit-box-shadow:0 0 5px 0 rgba(62,77,89,.2);box-shadow:0 0 5px 0 rgba(62,77,89,.2)}.dark{background:#343434}.dark input[type=submit]{background:#dc3a41}.dark input[type=submit]:focus,.dark input[type=submit]:hover{background:#b92f35}.dark input[type=password],.dark input[type=text]{background-color:#fff}.dark a{color:#dc3a41}.dark table td{border-bottom:1px solid #505050}.info.alert{color:#da3d41}@media (min-width:576px){.wrap{width:410px}*{font-size:14px!important}} \ No newline at end of file diff --git a/error.html b/error.html new file mode 100644 index 0000000..c4f76b4 --- /dev/null +++ b/error.html @@ -0,0 +1,24 @@ + + + + + + + + Bhaktivedanta Hospital Wi-Fi - Error + + + + + +
    +
    +
    +

    Wi-Fi error: $(error)

    +

    Log in page: $(link-login)

    +
    +
    +
    + + + diff --git a/errors.txt b/errors.txt new file mode 100644 index 0000000..1cf9092 --- /dev/null +++ b/errors.txt @@ -0,0 +1,104 @@ +# This file contains error messages which are shown to user, when http/https +# login is used. +# These messages can be changed to make user interface more friendly, including +# translations to different languages. +# +# Various variables can be used here as well. Most frequently used ones are: +# $(error-orig) - original error message from hotspot +# $(ip) - ip address of a client +# $(username) - username of client trying to log in + +# internal-error +# It should never happen. If it will, error page will be shown +# displaying this error message (error-orig will describe what has happened) + +internal-error = internal error ($(error-orig)) + +# config-error +# Should never happen if hotspot is configured properly. + +config-error = configuration error ($(error-orig)) + +# not-logged-in +# Will happen, if status or logout page is requested by user, +# which actually is not logged in + +not-logged-in = you are not logged in (ip $(ip)) + +# ippool-empty +# IP address for user is to be assigned from ip pool, but there are no more +# addresses in that pool + +ippool-empty = cannot assign ip address - no more free addresses from pool + +# shutting-down +# When shutdown is executed, new clients are not accepted + +shutting-down = hotspot service is shutting down + +# user-session-limit +# If user profile has limit of shared-users, then this error will be shown +# after reaching this limit + +user-session-limit = no more sessions are allowed for user $(username) + +# license-session-limit +# Depending on licence number of active hotspot clients is limited to +# one or another amount. If this limit is reached, following error is displayed. + +license-session-limit = session limit reached ($(error-orig)) + +# wrong-mac-username +# If username looks like MAC address (12:34:56:78:9a:bc), but is not +# a MAC address of this client, login is rejected + +wrong-mac-username = invalid username ($(username)): this MAC address is not yours + +# chap-missing +# If http-chap login method is used, but hotspot program does not receive +# back encrypted password, this error message is shown. +# Possible reasons of failure: +# - JavaScript is not enabled in web browser; +# - login.html page is not valid; +# - challenge value has expired on server (more than 1h of inactivity); +# - http-chap login method is recently removed; +# If JavaScript is enabled and login.html page is valid, +# then retrying to login usually fixes this problem. + +chap-missing = web browser did not send challenge response (try again, enable JavaScript) + +# invalid-username +# Most general case of invalid username or password. If RADIUS server +# has sent an error string with Access-Reject message, then it will +# override this setting. + +invalid-username = invalid username or password + +# invalid-mac +# Local users (on hotspot server) can be bound to some MAC address. If login +# from different MAC is tried, this error message will be shown. + +invalid-mac = user $(username) is not allowed to log in from this MAC address + +# uptime-limit, traffic-limit +# For local hotspot users in case if limits are reached + +uptime-limit = user $(username) has reached uptime limit +traffic-limit = user $(username) has reached traffic limit + +# radius-timeout +# User is authenticated by RADIUS server, but no response is received from it, +# following error will be shown. + +radius-timeout = RADIUS server is not responding + +# auth-in-progress +# Authorization in progress. Client already has issued an authorization request +# which is not yet complete. + +auth-in-progress = already authorizing, retry later + +# radius-reply +# Radius server returned some custom error message + +radius-reply = $(error-orig) diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..816f993 Binary files /dev/null and b/favicon.ico differ diff --git a/img/background.jpg b/img/background.jpg new file mode 100644 index 0000000..578b537 Binary files /dev/null and b/img/background.jpg differ diff --git a/img/logo.jpg b/img/logo.jpg new file mode 100644 index 0000000..790a6aa Binary files /dev/null and b/img/logo.jpg differ diff --git a/img/logo.svg b/img/logo.svg new file mode 100644 index 0000000..4582b64 --- /dev/null +++ b/img/logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/img/password.svg b/img/password.svg new file mode 100644 index 0000000..7a65989 --- /dev/null +++ b/img/password.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/img/phone.svg b/img/phone.svg new file mode 100644 index 0000000..47d722a --- /dev/null +++ b/img/phone.svg @@ -0,0 +1 @@ + diff --git a/img/user.svg b/img/user.svg new file mode 100644 index 0000000..ac6e551 --- /dev/null +++ b/img/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/login.html b/login.html new file mode 100644 index 0000000..7348f8e --- /dev/null +++ b/login.html @@ -0,0 +1,215 @@ + + + + + + + + + + Bhaktivedanta Hospital Wi-Fi - Log in + + + + + + +
    +

    Welcome to Bhaktivedanta Hospital

    + + + +
    + + + + +
    + + + +
    +
    +
    +
    + + + +
    + Bhaktivedanta Hospital + +
    + +

    + + +
    + + +
    + + + Terms and Conditions +
    + + +
    + + + + +
    +

    +
    + Powered by TheCAOffice +
    + +
    +
    +
    +


    + + + + + diff --git a/logout.html b/logout.html new file mode 100644 index 0000000..18be884 --- /dev/null +++ b/logout.html @@ -0,0 +1,44 @@ + + + + + + +Bhaktivedanta Hospital Wi-Fi - Log out + + + + + + +
    +
    +
    +

    You have logged out

    + + + + + + $(if session-time-left) + + $(endif) + +
    Mobile Number$(username)
    IP address$(ip)
    MAC address$(mac)
    Session time$(uptime)
    Time left$(session-time-left)
    Bytes up / down:$(bytes-in-nice) / $(bytes-out-nice)
    + +
    + +
    +
    +
    +
    + + + diff --git a/md5.js b/md5.js new file mode 100644 index 0000000..a6e6339 --- /dev/null +++ b/md5.js @@ -0,0 +1,217 @@ +/* + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 1.1 Copyright (C) Paul Johnston 1999 - 2002. + * Code also contributed by Greg Holt + * See http://pajhome.org.uk/site/legal.html for details. + */ + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF) + var msw = (x >> 16) + (y >> 16) + (lsw >> 16) + return (msw << 16) | (lsw & 0xFFFF) +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)) +} + +/* + * These functions implement the four basic operations the algorithm uses. + */ +function cmn(q, a, b, x, s, t) +{ + return safe_add(rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b) +} +function ff(a, b, c, d, x, s, t) +{ + return cmn((b & c) | ((~b) & d), a, b, x, s, t) +} +function gg(a, b, c, d, x, s, t) +{ + return cmn((b & d) | (c & (~d)), a, b, x, s, t) +} +function hh(a, b, c, d, x, s, t) +{ + return cmn(b ^ c ^ d, a, b, x, s, t) +} +function ii(a, b, c, d, x, s, t) +{ + return cmn(c ^ (b | (~d)), a, b, x, s, t) +} + +/* + * Calculate the MD5 of an array of little-endian words, producing an array + * of little-endian words. + */ +function coreMD5(x) +{ + var a = 1732584193 + var b = -271733879 + var c = -1732584194 + var d = 271733878 + + for(i = 0; i < x.length; i += 16) + { + var olda = a + var oldb = b + var oldc = c + var oldd = d + + a = ff(a, b, c, d, x[i+ 0], 7 , -680876936) + d = ff(d, a, b, c, x[i+ 1], 12, -389564586) + c = ff(c, d, a, b, x[i+ 2], 17, 606105819) + b = ff(b, c, d, a, x[i+ 3], 22, -1044525330) + a = ff(a, b, c, d, x[i+ 4], 7 , -176418897) + d = ff(d, a, b, c, x[i+ 5], 12, 1200080426) + c = ff(c, d, a, b, x[i+ 6], 17, -1473231341) + b = ff(b, c, d, a, x[i+ 7], 22, -45705983) + a = ff(a, b, c, d, x[i+ 8], 7 , 1770035416) + d = ff(d, a, b, c, x[i+ 9], 12, -1958414417) + c = ff(c, d, a, b, x[i+10], 17, -42063) + b = ff(b, c, d, a, x[i+11], 22, -1990404162) + a = ff(a, b, c, d, x[i+12], 7 , 1804603682) + d = ff(d, a, b, c, x[i+13], 12, -40341101) + c = ff(c, d, a, b, x[i+14], 17, -1502002290) + b = ff(b, c, d, a, x[i+15], 22, 1236535329) + + a = gg(a, b, c, d, x[i+ 1], 5 , -165796510) + d = gg(d, a, b, c, x[i+ 6], 9 , -1069501632) + c = gg(c, d, a, b, x[i+11], 14, 643717713) + b = gg(b, c, d, a, x[i+ 0], 20, -373897302) + a = gg(a, b, c, d, x[i+ 5], 5 , -701558691) + d = gg(d, a, b, c, x[i+10], 9 , 38016083) + c = gg(c, d, a, b, x[i+15], 14, -660478335) + b = gg(b, c, d, a, x[i+ 4], 20, -405537848) + a = gg(a, b, c, d, x[i+ 9], 5 , 568446438) + d = gg(d, a, b, c, x[i+14], 9 , -1019803690) + c = gg(c, d, a, b, x[i+ 3], 14, -187363961) + b = gg(b, c, d, a, x[i+ 8], 20, 1163531501) + a = gg(a, b, c, d, x[i+13], 5 , -1444681467) + d = gg(d, a, b, c, x[i+ 2], 9 , -51403784) + c = gg(c, d, a, b, x[i+ 7], 14, 1735328473) + b = gg(b, c, d, a, x[i+12], 20, -1926607734) + + a = hh(a, b, c, d, x[i+ 5], 4 , -378558) + d = hh(d, a, b, c, x[i+ 8], 11, -2022574463) + c = hh(c, d, a, b, x[i+11], 16, 1839030562) + b = hh(b, c, d, a, x[i+14], 23, -35309556) + a = hh(a, b, c, d, x[i+ 1], 4 , -1530992060) + d = hh(d, a, b, c, x[i+ 4], 11, 1272893353) + c = hh(c, d, a, b, x[i+ 7], 16, -155497632) + b = hh(b, c, d, a, x[i+10], 23, -1094730640) + a = hh(a, b, c, d, x[i+13], 4 , 681279174) + d = hh(d, a, b, c, x[i+ 0], 11, -358537222) + c = hh(c, d, a, b, x[i+ 3], 16, -722521979) + b = hh(b, c, d, a, x[i+ 6], 23, 76029189) + a = hh(a, b, c, d, x[i+ 9], 4 , -640364487) + d = hh(d, a, b, c, x[i+12], 11, -421815835) + c = hh(c, d, a, b, x[i+15], 16, 530742520) + b = hh(b, c, d, a, x[i+ 2], 23, -995338651) + + a = ii(a, b, c, d, x[i+ 0], 6 , -198630844) + d = ii(d, a, b, c, x[i+ 7], 10, 1126891415) + c = ii(c, d, a, b, x[i+14], 15, -1416354905) + b = ii(b, c, d, a, x[i+ 5], 21, -57434055) + a = ii(a, b, c, d, x[i+12], 6 , 1700485571) + d = ii(d, a, b, c, x[i+ 3], 10, -1894986606) + c = ii(c, d, a, b, x[i+10], 15, -1051523) + b = ii(b, c, d, a, x[i+ 1], 21, -2054922799) + a = ii(a, b, c, d, x[i+ 8], 6 , 1873313359) + d = ii(d, a, b, c, x[i+15], 10, -30611744) + c = ii(c, d, a, b, x[i+ 6], 15, -1560198380) + b = ii(b, c, d, a, x[i+13], 21, 1309151649) + a = ii(a, b, c, d, x[i+ 4], 6 , -145523070) + d = ii(d, a, b, c, x[i+11], 10, -1120210379) + c = ii(c, d, a, b, x[i+ 2], 15, 718787259) + b = ii(b, c, d, a, x[i+ 9], 21, -343485551) + + a = safe_add(a, olda) + b = safe_add(b, oldb) + c = safe_add(c, oldc) + d = safe_add(d, oldd) + } + return [a, b, c, d] +} + +/* + * Convert an array of little-endian words to a hex string. + */ +function binl2hex(binarray) +{ + var hex_tab = "0123456789abcdef" + var str = "" + for(var i = 0; i < binarray.length * 4; i++) + { + str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8)) & 0xF) + } + return str +} + +/* + * Convert an array of little-endian words to a base64 encoded string. + */ +function binl2b64(binarray) +{ + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" + var str = "" + for(var i = 0; i < binarray.length * 32; i += 6) + { + str += tab.charAt(((binarray[i>>5] << (i%32)) & 0x3F) | + ((binarray[i>>5+1] >> (32-i%32)) & 0x3F)) + } + return str +} + +/* + * Convert an 8-bit character string to a sequence of 16-word blocks, stored + * as an array, and append appropriate padding for MD4/5 calculation. + * If any of the characters are >255, the high byte is silently ignored. + */ +function str2binl(str) +{ + var nblk = ((str.length + 8) >> 6) + 1 // number of 16-word blocks + var blks = new Array(nblk * 16) + for(var i = 0; i < nblk * 16; i++) blks[i] = 0 + for(var i = 0; i < str.length; i++) + blks[i>>2] |= (str.charCodeAt(i) & 0xFF) << ((i%4) * 8) + blks[i>>2] |= 0x80 << ((i%4) * 8) + blks[nblk*16-2] = str.length * 8 + return blks +} + +/* + * Convert a wide-character string to a sequence of 16-word blocks, stored as + * an array, and append appropriate padding for MD4/5 calculation. + */ +function strw2binl(str) +{ + var nblk = ((str.length + 4) >> 5) + 1 // number of 16-word blocks + var blks = new Array(nblk * 16) + for(var i = 0; i < nblk * 16; i++) blks[i] = 0 + for(var i = 0; i < str.length; i++) + blks[i>>1] |= str.charCodeAt(i) << ((i%2) * 16) + blks[i>>1] |= 0x80 << ((i%2) * 16) + blks[nblk*16-2] = str.length * 16 + return blks +} + +/* + * External interface + */ +function hexMD5 (str) { return binl2hex(coreMD5( str2binl(str))) } +function hexMD5w(str) { return binl2hex(coreMD5(strw2binl(str))) } +function b64MD5 (str) { return binl2b64(coreMD5( str2binl(str))) } +function b64MD5w(str) { return binl2b64(coreMD5(strw2binl(str))) } +/* Backward compatibility */ +function calcMD5(str) { return binl2hex(coreMD5( str2binl(str))) } diff --git a/radvert.html b/radvert.html new file mode 100644 index 0000000..7d06375 --- /dev/null +++ b/radvert.html @@ -0,0 +1,41 @@ + + + + + + + +Bhaktivedanta Hospital Wi-Fi - Advertisement + + + + + +
    +
    +
    +

    Advertisement

    +

    If nothing happens, open advertisement manually.

    +
    +
    +
    + + diff --git a/redirect.html b/redirect.html new file mode 100644 index 0000000..d900e1b --- /dev/null +++ b/redirect.html @@ -0,0 +1,12 @@ +$(if http-status == 302)Hotspot redirect$(endif) +$(if http-header == "Location")$(link-redirect)$(endif) + + +Bhaktivedanta Hospital Wi-Fi + + + + + + + diff --git a/rlogin.html b/rlogin.html new file mode 100644 index 0000000..bb91aa1 --- /dev/null +++ b/rlogin.html @@ -0,0 +1,27 @@ +$(if http-status == 302)Hotspot login required$(endif) +$(if http-header == "Location")$(link-redirect)$(endif) + + + +Bhaktivedanta Hospital Wi-Fi + + + + + + + diff --git a/status.html b/status.html new file mode 100644 index 0000000..7fef628 --- /dev/null +++ b/status.html @@ -0,0 +1,73 @@ + + + + + + + + + +Bhaktivedanta Hospital Wi-Fi - Status + + + + + + +

    + +
    +
    +
    + +
    + Bhaktivedanta Hospital +
    + +

    Hi, $(username)!

    + +
    + + + + + + + + + + + + + + +
    IP address$(ip)
    Bytes up / down$(bytes-in-nice) / $(bytes-out-nice)
    Connected / left$(uptime) / $(session-time-left)
    Connected$(uptime)
    Status + Advertisement required
    Status refresh$(refresh-timeout)
    + +
    + + +
    +
    +
    +
    + +