Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
a Summer day - @668.66 (what is this?)
Activity rating: Four Stars Posts & Arts: 55/1k.beats Random | Recent Posts | Guild Recents
News: :cry: Are u having fun? Guild Events: Summerween Watch-a-thon

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


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


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

Artifacts:
Joined 2024!
« on: a Winter night » 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:
I got robbed by Dan Q on Melonland!Great Posts PacmanThanks for being rad!First 1000 Members!Joined 2023!
« Reply #1 on: a Winter night » 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


Artifact Swap: Spell: Rain Storm (makes the player who holds this immune to fire magic)
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:
I got robbed by Dan Q on Melonland!Flinstone VitaminAlways working hard!Known Apple shillcoolest melon on the web!Emergency feel-good tea
« Reply #2 on: a Winter night » 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: UnpleasantWildflowers!seahorseybitsy catSquidwardRed TulipMellohiHelp, my tail is stuck!cyberziI met Dan Q on Melonland!?Stinky CheeseFlowersPlank
Memory
Guest

« Reply #3 on: a Winter day » Embed

[removed by author]
« Last Edit: a Summer day by Memory » Logged
ThunderPerfectWitchcraft
Hero Member ⚓︎
*****
View Profile WWWArt


Here be dragons
⛺︎ My Room

Artifacts:
I got robbed by Dan Q on Melonland!Great Posts PacmanThanks for being rad!First 1000 Members!Joined 2023!
« Reply #4 on: a Winter day » 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


Artifact Swap: Spell: Rain Storm (makes the player who holds this immune to fire magic)
moonsetterindustries
Newbie ⚓︎
*
View Profile WWW


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

Artifacts:
Joined 2024!
« Reply #5 on: a Winter night » 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 | Supporters ♥ 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 @000

Minecraft: Online
Who: zurna