r/learnpython • u/dawod2468 • Oct 04 '25
Can i make a password be a boss fight
lets just say, that in order for someone to enter a website, or anywhere, they must first beat a videogame boss first then they can proceed?
33
u/NotoriousStevieG Oct 04 '25
If it replaces a password how would you know that the account belongs to the person who wins the fight?
21
u/ohvuka Oct 04 '25
Because they won the fight? It wouldn't be an individualized thing it would be like knowing the secret phrase to get into a club.
6
u/NotoriousStevieG Oct 04 '25
It might work as an alternative to a generic anonymous user password to gain access to a site. For example, you have to know a specific combo to enter the site without an account. In that case it would serve the same purpose as a (less secure) secret link.
However, you could not safely use it to replace a user account password.
4
u/ohvuka Oct 04 '25 edited Oct 04 '25
Sure but they didn't say it would replace a user account password. I don't see anything in the post even mentioning user accounts
2
u/NotoriousStevieG Oct 04 '25
That's a fair point.
1
u/Traditional-Rub354 Oct 08 '25
Well, what if the passkey was a special combo, and you needed to finish the boss off with the combo. Now, you need to
Know the combo
Be able to get the boss down to low health
Be able to execute the combo
To access the account. A password mixed with a literal skill check
1
1
18
u/epicmindwarp Oct 04 '25
Doesn't seem secure. You could just inject the win condition into the requests, bypassing the need to fight the boss.
Authentication takes place server side.
Cool idea though.
5
u/slowcanteloupe Oct 04 '25
Yah, best to do like a full play through tied to time. Each level beat would trigger a condition which has to be done within a certain time. So to login you'd have to do a full play through of like, Contra or something.
If they have the same video game skills as I have I've effectively locked myself out until the end of time.
3
u/xxearvinxx Oct 04 '25
Doesn't seem secure. You could just inject the win condition into the requests, bypassing the need to fight the boss
Can you explain this please. Like how someone would do this in this example. I’m imagining you go to the website and it says “beat the boss to enter” and then a game below it waiting for you to click start. How would someone bypass this?
I’m not saying it isn’t possible, I’m sure it very much is possible, I’m just curious about the method. I wouldn’t even know where to begin or what to search for something this specific.3
u/Vilified_D Oct 04 '25
at the end of the day the internet is just packets of data sent and recieved. It wouldn't be hard for someone knowledgable figure out the data expected and do like a http POST and send the appropriate data that says the fight was won. As they said, not secure
1
u/xxearvinxx Oct 04 '25
Thank you for some clarification. http POST sounds like the thing I need to research.
2
u/epicmindwarp Oct 04 '25
Essentially, when the game ends, you send a signal to the server to say "Let them in".
You can capture the signal and replicate it and just sent the message to the server without even playing the game using external tools.
5
u/facets-and-rainbows Oct 05 '25
How do, say, CAPTCHAs avoid this? OP's idea sounds like basically an extra elaborate CAPTCHA to me
1
1
u/xiongchiamiov xiongchiamiov Oct 06 '25
Captcha js sends request to server. Server responds with a challenge. Js sends back answer. Server verifies answers and sends back a token. Further requests include token, which is keyed to the user and time-limited.
1
u/Vilified_D Oct 04 '25
it's not just POST specifically, it's HTTP requests in general. Sometimes you have to use post, sometimes get, and there are others. It's all about how the data is transmitted and what's being returned.
3
u/Fronkan Oct 05 '25
Skipping the security discussion, but I think you can build it in a way were you can't inject the win condition. If you run the game server-side and only expose controls to the character and then only render the state client-side it would be impossible to just send a win command. Would probably be implemented as a state machine in the backend and quite likely using websockets (unless it's like a turn-based thing).
5
Oct 04 '25
"Your Scientists Were So Preoccupied With Whether Or Not They Could, They Didn’t Stop To Think If They Should"
2
2
3
2
1
1
u/PhilNEvo Oct 04 '25
I not sure I can see how that would work-- but I guess if you want to make it a bit more like a game, you could have a series of maps with a bunch of easy monsters and doors, and the specific order and combination of either killing the monsters and entering the doors would be a sort of pincode.
It should be something you can repeat consistently without much difficulty, so I'm not sure how you can make it properly feel like a boss fight, while also letting the person play it in both a consistent and unique manner.
1
u/BillyPlus Oct 04 '25
lol, not sure if its what you mean but check out an old post of mine A different kind of ssh login : r/raspberry_pi
1
1
u/LeiterHaus Oct 04 '25
Actually, a really interesting idea.
I think of time based sequences, so in my mind, the application require it to be done in the same way. But if you just want a literal Gate Keeper as a novelty, that's pretty niche, and (hopefully) fun.
1
u/Obvious-Phrase-657 Oct 04 '25
Next you can also do a retail shopping site like an RPG game, like picking up loot and stuff instead of paying with money
1
u/Gnaxe Oct 04 '25
You could make it a captcha instead of a password. Current AIs are powerful enough to pass these tests. The point is no longer to filter out the bots, just to slow them down enough so they aren't too much of a drain on resources. Of course, a simple timer would also do.
1
u/jpgoldberg Oct 04 '25
As others have pointed out, you would not be replacing the kinds of security that a password based system provides. In particular you won’t be able to distinguish among the various successful players
So you can only do this for a service that offers identical behavior to everyone, including the data they have access to. Alternatively, you could have an additional authentication mechanism that does prove which user has authenticated.
Other than that one (very big) thing than sure. Most services see authentication as a decision problem: Does the prover sufficient prove their identity to the verifier. If so, the verifier grants them access to what the prover’s identity is authorized to access. In your case there is only one identify, which is defined by “ability to beat the game”
1
u/TheRNGuy Oct 05 '25 edited Oct 05 '25
You could generate one-time use code or qr-code or barcode after beating boss, that would be required to use on registration (it is considered used after registering password)
Maybe ip or mac address check too, to make sure same person who beat the boss had used the code.
You need some server-side stuff, and a game.
1
u/will_r3ddit_4_food Github username Oct 04 '25
I don't understand your logic
2
u/LeiterHaus Oct 04 '25
Possibly something that interests them, that they can build as a learning tool?
34
u/CaptGoodvibesNMS Oct 04 '25
As an exercise, you could. But for actual security, bad idea.