Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 24, 2024 - @131.42 (what is this?)
Forum activity rating: Three Stars Posts: 42/1k.beats ~ Boop! The forum will close in 869.beats! Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts    Start New Topic
News: :4u: :transport: More is More :transport: :4u:

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Password Hiding?


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


Be a part of the Future!

⛺︎ My Room
iMood: MrMidnight

View Profile WWW

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

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



ThunderPerfectWitchcraft
Sr. Member ⚓︎
****


Here be dragons

⛺︎ My Room

View Profile WWW

Thanks for being rad!First 1000 Members!Joined 2023!
« Reply #1 on: February 06, 2024 @964.12 »

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 ⚓︎
*****


So many stars!

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

View Profile WWW

Thanks for being rad!a puppy for your travelsAlways My PalFirst 1000 Members!spring 2023!Squirtle!!!!MIDI WarriorMIDI Warrior1234 Posts!OzspeckCool Dude AwardRising Star of the Web AwardMessage BuddyPocket Icelogist!OG! Joined 2021!...
« Reply #2 on: February 06, 2024 @996.61 »

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
Memory
Guest
« Reply #3 on: February 07, 2024 @443.92 »

[removed by author]
« Last Edit: July 31, 2024 @643.53 by j » Logged
ThunderPerfectWitchcraft
Sr. Member ⚓︎
****


Here be dragons

⛺︎ My Room

View Profile WWW

Thanks for being rad!First 1000 Members!Joined 2023!
« Reply #4 on: February 07, 2024 @616.47 »

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 ⚓︎
*


Be a part of the Future!

⛺︎ My Room
iMood: MrMidnight

View Profile WWW

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

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



Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (1)

Password Managers? 🗝️

Started by MelooonBoard ☞ ∙ Life on the Web

Replies: 25
Views: 2220
Last post April 18, 2024 @401.54
by BlazingCobaltX

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies 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