Created
December 26, 2013 02:58
-
-
Save JanJastrow/8129199 to your computer and use it in GitHub Desktop.
Had to check wether the password contains an 0 or an O… Did it by javascript, but could never use it because of motherflipping restrictions…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<td class="td2" id="pass_pass"><b>3NV`-0NDj+</b></td> | |
<script type="text/javascript"> | |
function check_me() { | |
var passwort = document.getElementById('pass_pass').firstChild.innerHTML; | |
/* Liest den Inhalt des ersten Unterelements der ID 'pass_pass' aus und speichert in Variable 'passwort' */ | |
/* Prüft, ob eine 0 (Null) im Passwort vorhanden ist. */ | |
if (passwort.indexOf("0") != -1) { /* Kontrolliert, ob eine 0 in der Variable 'passwort' gefunden wurde */ | |
/* Ersetzt in der Variable 'passwort' das "0" gegen "<span style='color: #ff00ff;'>0</span>" */ | |
var passwort = passwort.replace(/0/g, "<span style='color: #ff00ff;'>0</span>"); | |
} | |
/* Prüft ob ein O (Oh) im Passwort enthalten ist */ | |
if (passwort.indexOf("O") != -1) { /* Kontrolliert, ob eine O in der Variable 'ersetzt' gefunden wurde */ | |
/* Ersetzt in der Variable 'ersetzt' das "O" gegen "<span style='color: #ff8400;'>O</span>" */ | |
var passwort = passwort.replace(/O/g, "<span style='color: #ff8400;'>O</span>"); | |
} | |
document.getElementById("pass_pass").firstChild.innerHTML = passwort; | |
/* Gibt die nun ersetzte Variable zurück in das erste Unterelement der ID "pass_pass" */ | |
} | |
window.onload = check_me; /* Javascript beim Laden der Seite ausführen */ | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment