Chat Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining MelonLand?
May 14, 2026 - @548.24 (what is this?)
Activity rating: Four Stars Posts & Arts: 66/1k.beats Random | Recent Posts | Guild Recents
News: :wizard: You can make anything on the web! :wizard: Guild Events: Spring Themed Projects

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Password Hiding?


« previous next »
Pages: [1] Print Embed
Author Topic: Password Hiding?  (Read 2194 times)
moonsetterindustries
Newbie ⚓︎
*
View Profile WWW


Be a part of the Future!
⛺︎ My Room
iMood: MrMidnight

Artifacts:
Joined 2024!
« on: February 06, 2024 @952.20 » Embed

Hello all! Please, tell me if I'm posting too much on here, but I just remembered a question.

Is there a way to hide the password to a puzzle from being inspect elemented?

My friend jumpscared me by immediately doing that, with no hard feelings, and I was wondering if there would be a way to hide it somehow...

It's right in the HTML and obvious if you know what to do and look for...

Thank you.
Logged

https://moonsetterindustries.neocities.org/Assets/moonad2.gif

https://img.flowergame.net/1121626.pnghttps://img.flowergame.net/1121492.pnghttps://img.flowergame.net/1121905.pnghttps://img.flowergame.net/1121860.png
ThunderPerfectWitchcraft
Hero Member ⚓︎
*****
View Profile WWWArt


Here be dragons
⛺︎ My Room

Artifacts:
Great Posts PacmanThanks for being rad!First 1000 Members!Joined 2023!
« Reply #1 on: February 06, 2024 @964.12 » Embed

Don't worry, you are welcome!

I don't know how your puzzle looks like, but there are several ways. If you have php available, things are easy since you can compare the userinput serversided and don't need to debunk your password.
If not you can convert the answer and the user input with md5 and compare the result - note that this is not "secure" as it can easily be circumvented, but for a small gamy puzzle it is good enough :).
Logged

Melooon
Hero Member ⚓︎
*****
View Profile WWWArt


So many stars!
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
old-timey tunes~♪Flinstone VitaminAlways working hard!PoochKnown Apple shillcoolest melon on the web!
« Reply #2 on: February 06, 2024 @996.61 » Embed

convert the answer and the user input with md5
Seconding this! Store the password as encrypted text in your Javascript, then encrypt the password your visitor enters and compare it to see if it's the same as your pre-encrypted version. MD5 or Base64 or any other encode are fine! (This seems like a good guide) It won't stop a hacker, but it'll stump less experienced websters :grin:

More ideas that would help based on what I see here: https://moonsetterindustries.neocities.org/PASSWORD
  • Put your Javascript in a separate file, that would make it a little harder to find
  • Give your variables more obscure names instead of "password" :ok:
Logged


everything lost will be recovered, when you drift into the arms of the undiscovered

Artifact Swap: Cup o' JaneI met Dan Q on Melonland!poochLasagna
Memory
Guest

« Reply #3 on: February 07, 2024 @443.92 » Embed

[removed by author]
« Last Edit: July 31, 2024 @643.53 by Memory » Logged
ThunderPerfectWitchcraft
Hero Member ⚓︎
*****
View Profile WWWArt


Here be dragons
⛺︎ My Room

Artifacts:
Great Posts PacmanThanks for being rad!First 1000 Members!Joined 2023!
« Reply #4 on: February 07, 2024 @616.47 » Embed

I'd like to add that, theoretically, it would be possible to store data crypted with some strong routine (like AES) on your server and use javascript to decrypt it - this should be secure (as secure as the chosen password is, actually), but I can't say anything about the performance of this solution.
Logged

moonsetterindustries
Newbie ⚓︎
*
View Profile WWW


Be a part of the Future!
⛺︎ My Room
iMood: MrMidnight

Artifacts:
Joined 2024!
« Reply #5 on: February 07, 2024 @947.84 » Embed

it's impossible to hide a password from a client using a client-side language like Javascript, because the client always has access to the source code. the above suggestions are great, and if you're looking to mitigate farther, you could obfuscate your code using something like this!

OH THIS IS BEAUTIFUL AND WORKS PERFECTLY! THANK YOU!!!  :chef:
Logged

https://moonsetterindustries.neocities.org/Assets/moonad2.gif

https://img.flowergame.net/1121626.pnghttps://img.flowergame.net/1121492.pnghttps://img.flowergame.net/1121905.pnghttps://img.flowergame.net/1121860.png
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi

MelonLand Nav

@000

Want to Login or Join ?

Minecraft: Online
Join: craft.melonking.net