Code Cleanup
This commit is contained in:
parent
845ae248ab
commit
5334a2da20
1 changed files with 22 additions and 21 deletions
|
@ -25,30 +25,32 @@ public class ExampleStringDecrypter extends Plugin {
|
|||
boolean needsWarning = false;
|
||||
|
||||
for (ClassNode cn : classNodesList) {
|
||||
try {
|
||||
//load the class node into the classloader
|
||||
BCV.getClassNodeLoader().addClass(cn);
|
||||
|
||||
//load the class node into the classloader
|
||||
BCV.getClassNodeLoader().addClass(cn);
|
||||
|
||||
for (Object o : cn.fields.toArray()) {
|
||||
FieldNode f = (FieldNode) o;
|
||||
|
||||
//if the class contains the field z, get the class object from the class node
|
||||
//then print out the value of the fields inside the class
|
||||
//if the strings get decrypted on init, this allows you to dump the current values
|
||||
|
||||
if (f.name.equals("z")) {
|
||||
try {
|
||||
for (Field f2 : BCV.getClassNodeLoader().nodeToClass(cn).getFields()) {
|
||||
String s = (String) f2.get(null);
|
||||
if (s != null && !s.isEmpty())
|
||||
gui.appendText(cn + ":" + s);
|
||||
for (Object o : cn.fields.toArray()) {
|
||||
FieldNode f = (FieldNode) o;
|
||||
|
||||
//if the class contains the field z, get the class object from the class node
|
||||
//then print out the value of the fields inside the class
|
||||
//if the strings get decrypted on init, this allows you to dump the current values
|
||||
|
||||
if (f.name.equals("z")) {
|
||||
try {
|
||||
for (Field f2 : BCV.getClassNodeLoader().nodeToClass(cn).getFields()) {
|
||||
String s = (String) f2.get(null);
|
||||
if (s != null && !s.isEmpty())
|
||||
gui.appendText(cn + ":" + s);
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
gui.appendText("Failed loading class " + cn.name);
|
||||
e.printStackTrace();
|
||||
needsWarning = true;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
gui.appendText("Failed loading class " + cn.name);
|
||||
e.printStackTrace();
|
||||
needsWarning = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,5 +62,4 @@ public class ExampleStringDecrypter extends Plugin {
|
|||
gui.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue