Staredit Network > Forums > Technology & Computers > Topic: Lookin for a PAssword Script
Lookin for a PAssword Script
Dec 19 2008, 9:10 pm
By: Riney  

Dec 19 2008, 9:10 pm Riney Post #1

Thigh high affectionado

SImply put, I want to write a code to allow a link to be displayed only if you're an admin on a forum, which will change an Iframe to a different shoutbox (For admins only).

Im aware of the security risks (I mean the link to the shoutbox is gonna be in the source) but Im doing this just for fun. Anybody mind helping? Heres my current work, also It needs to use the OnCLick property or something similar

Code
<TABLE BORDER="1" style="border: 1 solid #0415FB" ><TR style="border: 1 solid #0415FB" ><TD WIDTH="200" style="border: 1 solid #0415FB" ><MARQUEE bgcolor="BLACK" loop="-1" scrollamount="2" width="100%"><FONT COLOR="CYAN">Teh Shoutbox :D</FONT></MARQUEE><TD style="border: 1 solid #0415FB"  BGCOLOR="BLACK"><A HREF="http://40705.shoutbox.us/" TARGET="Shoutbox"><FONT COLOR="LIME">Normal Chat</FONT></A></TD><TD style="border: 1 solid #0415FB"  BGCOLOR="BLACK"><A HREF="http://tinyurl.com/leetcrewtrade" TARGET="Shoutbox"><FONT COLOR="PINK">Trade Chat</FONT></A></TD><TD style="border: 1 solid #0415FB"  BGCOLOR="BLACK"><A HREF="http://drift.ijji.com" TARGET="Shoutbox"><FONT COLOR="ORANGE">IJJI</FONT></A></TD>
</TR></TABLE>
<iframe name="Shoutbox" src="http://40705.shoutbox.us/" width="85%" height="200" frameborder="0" style="border: 1 solid #0415FB" allowTransparency="true"></iframe>


Post has been edited 4 time(s), last time on Dec 19 2008, 10:08 pm by Dark_Marine.



.riney on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Dec 19 2008, 10:06 pm Devourer Post #2

Hello

The code you listed is kinda useless (for me)
I would to it like this:

create a table [mysql-table] and put there a column "admin-flags" standart->no make em to 1 whoever will be the admin
then check if you are the admin via if-script [seassions requires (recommented to make a login-script)

so... if ($_SESSION['admin-flags'] = yes) { LOLOL DISPLAY LINK! } else { LOLOL DON'T DISPLAY LINK }

hope that kinda helped you ;)



Please report errors in the Staredit.Network forum.

Dec 19 2008, 10:10 pm Riney Post #3

Thigh high affectionado

Just visit this http://tinyurl.com/LeetCrew and look at it, I need to figure out how to make a integrated onclick function make a box pop up where you can type in a password and itll change the IFrame if it is accepted, else it says "EFF YOU" and does nothing.



.riney on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Dec 19 2008, 10:13 pm Devourer Post #4

Hello

Quote from name:Dark_Marine
Just visit this http://tinyurl.com/LeetCrew and look at it, I need to figure out how to make a integrated onclick function make a box pop up where you can type in a password and itll change the IFrame if it is accepted, else it says "EFF YOU" and does nothing.

so... you know what javascripts are?
I think you can make it via javascript... button onclick=admin()
etc. visit: http://www.w3schools.com to learn it ;)

EDIT: here is a script [i made by myself ages ago]
this sohuld be in the head section:


<script type="text/javascript">
function AdminFormular ()
{
if (document.Formular.Admin.value != "test") {
alert("Wrong Password");
document.Formular.Admin.focus();
return False; }
else { location.href = "1a2sadhi2hsdajsaodsajosadnoasd.php"; }
}


</script>



and this where the button should be:
<input type="password" size="20" name="Admin"> <input type="button" value="Login" onclick="AdminFormular()">


this just has an input field at the site... but there is a way to make a pop-up box with an input field, too

Post has been edited 1 time(s), last time on Dec 19 2008, 10:19 pm by DeVouReR.



Please report errors in the Staredit.Network forum.

Dec 19 2008, 10:41 pm Riney Post #5

Thigh high affectionado

Now what is the password for the login button?



.riney on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Dec 19 2008, 10:48 pm Devourer Post #6

Hello

Quote from name:Dark_Marine
Now what is the password for the login button?

here is a (updated) code:

<html>
<head>
<script type="text/javascript">
function disp_prompt()
{
var password=prompt("Enter the Password","");
if (password!=PASSWORD)
{
alert("Wrong Password");
document.Formular.Admin.focus();
return False; }
else { location.href = "1a2sadhi2hsdajsaodsajosadnoasd.php"; }
}

</script>
</head>
<body>

<input type="button" onclick="disp_prompt()" value="Login as an admin lol" />

</body>
</html>


that should work...^^
the password here is "PASSWORD"

Post has been edited 1 time(s), last time on Dec 19 2008, 10:54 pm by DeVouReR.



Please report errors in the Staredit.Network forum.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-7-18. : 2:27 am]
Symmetry -- https://staredit.net/topic/18903/ THE REVIEWS ARE HERE! "ok these are pretty good memes" - ssj9Kevin
[2026-7-17. : 2:58 pm]
Ultraviolet -- Symmetry
Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
fr fr
[2026-7-17. : 2:39 am]
Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
[2026-7-16. : 6:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
[2026-7-16. : 6:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[2026-7-16. : 6:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
[2026-7-16. : 2:28 am]
Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
[2026-7-16. : 2:28 am]
Symmetry -- Ohhh imagine a SC map that could delete itself
[2026-7-15. : 8:51 pm]
NudeRaider -- Symmetry
Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
[2026-7-15. : 4:10 am]
Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
Please log in to shout.


Members Online: Moose