X hits on this document

395 views

0 shares

0 downloads

0 comments

68 / 120

08:

passwords = new ArrayList<String>();

09:

10:

public boolean addPassword(String password)

11:

{

12:

if (passwords.size() >= MAX_PASSWORDS)

13:

{

14:

System.out.println("[Error] The maximum number of passwords

has been exceeded!");

Table 8.1. Unobfuscated source listing of CheckLimitation.java. 01: public class CheckLimitation {

02:

03:

private static int MAX_PASSWORDS = 5;

04:

private ArrayList<String> passwords;

05:

06:

public CheckLimitation()

07:

{

23:

24:

public static void main(String[] arguments)

25:

{

26: 27: 28: 29: 30: 31: 32:

15: 16: 17: 18: 19:

return false; } else { passwords.add(password); System.out.println("[Info] password (" + password + ")

added successfully.");

}

20: 21:

22:

}

CheckLimitation store = new CheckLimitation(); boolean loop = true; for (int i = 0; i < arguments.length && loop; i++)

if (!store.addPassword(arguments[i])) loop = false;

}

}

return true;

obfuscate the bytecode and then decompile it using Jad to observe the effectiveness of the

obfuscation; the result of decompiling the obfuscated bytecode using Jad is given Table

8.2. As expected, all user-defined variable and method names have been changed to

meaningless ones; of course the names of Java standard library methods must be left as-

is. ProGuard seems to use a different obfuscation scheme for local variables within a

60

Document info
Document views395
Page views396
Page last viewedSun Dec 11 02:18:35 UTC 2016
Pages120
Paragraphs2913
Words25794

Comments