The original
source for the class PasswordChecker appears here:
public class PasswordChecker {
public boolean checkPassword(String pass) {
byte[] pwChars = pass.getBytes();
for (int i = 0; i < pwChars.length; i++) {
pwChars[i] += i + 1;
}
String pwPlus = new String(pwChars);
return pwPlus.equals("qcvw|uyl");
}
}
Gray Hat Hacking: The Ethical Hacker??™s Handbook
290
JReversePro is an open source Java decompiler that is itself written in Java. Running
JReversePro on the compiled PasswordChecker.class file yields the following:
// JReversePro v 1.4.1 Wed Mar 24 22:08:32 PST 2004
// http://jrevpro.sourceforge.net
// Copyright (C)2000 2001 2002 Karthik Kumar.
// JReversePro comes with ABSOLUTELY NO WARRANTY;
// This is free software, and you are welcome to redistribute
// it under certain conditions; See the File 'COPYING' for more details.
// Decompiled by JReversePro 1.4.1
// Home : http://jrevpro.sourceforge.net
// JVM VERSION: 46.0
// SOURCEFILE: PasswordChecker.java
public class PasswordChecker{
public PasswordChecker()
{
;
return;
}
public boolean checkPassword(String string)
{
byte[] iArr = string.getBytes();
int j = 0;
String string3;
for (;j < iArr.length;) {
iArr[j] = (byte)(iArr[j] + j + 1);
j++;
}
string3 = new String(iArr);
return (string3.
Pages:
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528