Skip to content

Commit

Permalink
woooo
Browse files Browse the repository at this point in the history
  • Loading branch information
Konloch committed Nov 19, 2015
1 parent 722a7cb commit 5668fa4
Show file tree
Hide file tree
Showing 92 changed files with 4,693 additions and 7,411 deletions.
1 change: 1 addition & 0 deletions README.txt
Expand Up @@ -30,6 +30,7 @@ Contributors:
Afffsdd
Szperak
Zooty
samczsun
If I missed you, please feel free to contact me @Konloch or konloch@gmail.com

Contribution Guide Lines/Coding Conventions:
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/jhe/hexed/JHexEditorASCII.java
Expand Up @@ -69,7 +69,7 @@ public void paint(Graphics g) {
g.setColor(Color.black);
}

String s = "" + new Character((char) he.buff[n]);
String s = String.valueOf(he.buff[n]);
if ((he.buff[n] < 20) || (he.buff[n] > 126))
s = "" + (char) 16;
he.printString(g, s, (x++), y);
Expand Down
94 changes: 0 additions & 94 deletions src/main/java/me/konloch/kontainer/io/DiskReader.java

This file was deleted.

200 changes: 0 additions & 200 deletions src/main/java/me/konloch/kontainer/io/DiskWriter.java

This file was deleted.

70 changes: 35 additions & 35 deletions src/main/java/the/bytecode/club/bytecodeviewer/APKTool.java
@@ -1,47 +1,47 @@
package the.bytecode.club.bytecodeviewer;

import java.io.File;

import org.apache.commons.io.FileUtils;
import org.zeroturnaround.zip.ZipUtil;

import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;

/***************************************************************************
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
* Copyright (C) 2014 Kalen 'Konloch' Kinloch - http://bytecodeviewer.com *
* *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/

public class APKTool {

public static synchronized void decodeResources(File input, File output) {
try {
File dir = new File(BytecodeViewer.tempDirectory+BytecodeViewer.fs+"Decoded Resources");
FileUtils.deleteDirectory(dir);
brut.apktool.Main.main(new String[]{"-s", "-f", "-o", dir.getAbsolutePath(), "decode", input.getAbsolutePath()});
File original = new File(dir.getAbsolutePath() + BytecodeViewer.fs + "original");
FileUtils.deleteDirectory(original);
File classes = new File(dir.getAbsolutePath() + BytecodeViewer.fs + "classes.dex");
classes.delete();
File apktool = new File(dir.getAbsolutePath() + BytecodeViewer.fs + "apktool.yml");
apktool.delete();
File zip = new File(BytecodeViewer.tempDirectory+BytecodeViewer.fs+MiscUtils.randomString(12)+".zip");
ZipUtils.zipFolder(dir.getAbsolutePath(), zip.getAbsolutePath(), null);
if(zip.exists())
zip.renameTo(output);
FileUtils.deleteDirectory(dir);
} catch(Exception e) {
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
}
}
public static synchronized void decodeResources(File input, File output) {
try {
Path temporaryDirectory = Files.createTempDirectory("apkresources");
Files.delete(temporaryDirectory);
brut.apktool.Main.main(new String[]{"-s", "-f", "-o", temporaryDirectory.toAbsolutePath().toString(), "decode", input.getAbsolutePath()});
File directory = temporaryDirectory.toFile();
File original = new File(directory, "original");
FileUtils.deleteDirectory(original);
File classes = new File(directory, "classes.dex");
classes.delete();
File apktool = new File(directory, "apktool.yml");
apktool.delete();
ZipUtil.pack(directory, output);
FileUtils.deleteDirectory(directory);
} catch (Exception e) {
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
}
}
}

0 comments on commit 5668fa4

Please sign in to comment.