Skip to content

Commit

Permalink
3.1.2更新
Browse files Browse the repository at this point in the history
修复BUG
  • Loading branch information
0Chencc committed Sep 4, 2017
1 parent c7b91b4 commit d635950
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_144">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_144">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
Expand Down
2 changes: 1 addition & 1 deletion src/org/mstsec/CTFcrackTools/Core.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public class Core extends JFrame {
private static JTextArea textArea = new JTextArea();
private Json json =new Json();
private static String JsonPath = new String(System.getProperty("user.dir")+"\\Setting.json");//程序配置文件
private static String Version = "-v3.1.1";
private static String Version = "-v3.1.2";
private static String Note = " Our team is two years old!";
private JTextField hex2;
private JTextField hex8;
Expand Down
94 changes: 80 additions & 14 deletions src/org/mstsec/CTFcrackTools/Func.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.Hashtable;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.python.core.Py;
import org.python.core.PyFunction;
import org.python.core.PyObject;
import org.python.core.PyString;
import org.python.core.PySystemState;
import org.python.util.PythonInterpreter;

import sun.misc.BASE64Decoder;
Expand Down Expand Up @@ -326,50 +329,113 @@ public static String Base64cg(String input){//base64解密gbk
return res.toString();
}
public static String Base32j(String input){
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.execfile(System.getProperty("user.dir")+"\\Lib\\basecode.py");
Properties props = new Properties();
props.put("python.home",System.getProperty("user.dir")+"/Lib");
props.put("python.console.encoding", "UTF-8");
props.put("python.security.respectJavaAccessibility", "false");
props.put("python.import.site","false");
Properties preprops = System.getProperties();
PythonInterpreter.initialize(preprops, props, new String[0]);
PythonInterpreter interpreter = new PythonInterpreter();
PySystemState sys = Py.getSystemState();
sys.path.add(System.getProperty("user.dir")+"/Lib/site-packages");
interpreter.execfile(System.getProperty("user.dir")+"/Lib/basecode.py");
PyFunction func = (PyFunction)interpreter.get("b32e",PyFunction.class);
PyObject rsadstr = func.__call__(new PyString(input));
return (rsadstr.toString());
}
public static String Base32c(String input){
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.execfile(System.getProperty("user.dir")+"\\Lib\\basecode.py");
Properties props = new Properties();
props.put("python.home",System.getProperty("user.dir")+"/Lib");
props.put("python.console.encoding", "UTF-8");
props.put("python.security.respectJavaAccessibility", "false");
props.put("python.import.site","false");
Properties preprops = System.getProperties();
PythonInterpreter.initialize(preprops, props, new String[0]);
PythonInterpreter interpreter = new PythonInterpreter();
PySystemState sys = Py.getSystemState();
sys.path.add(System.getProperty("user.dir")+"/Lib/site-packages");
interpreter.execfile(System.getProperty("user.dir")+"/Lib/basecode.py");
PyFunction func = (PyFunction)interpreter.get("b32d",PyFunction.class);
PyObject rsadstr = func.__call__(new PyString(input));
return (rsadstr.toString());
}
public static String Base16j(String input){
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.execfile(System.getProperty("user.dir")+"\\Lib\\basecode.py");
Properties props = new Properties();
props.put("python.home",System.getProperty("user.dir")+"/Lib");
props.put("python.console.encoding", "UTF-8");
props.put("python.security.respectJavaAccessibility", "false");
props.put("python.import.site","false");
Properties preprops = System.getProperties();
PythonInterpreter.initialize(preprops, props, new String[0]);
PythonInterpreter interpreter = new PythonInterpreter();
PySystemState sys = Py.getSystemState();
sys.path.add(System.getProperty("user.dir")+"/Lib/site-packages");
interpreter.execfile(System.getProperty("user.dir")+"/Lib/basecode.py");
PyFunction func = (PyFunction)interpreter.get("b16e",PyFunction.class);
PyObject rsadstr = func.__call__(new PyString(input));
return (rsadstr.toString());
}
public static String Base16c(String input){
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.execfile(System.getProperty("user.dir")+"\\Lib\\basecode.py");
Properties props = new Properties();
props.put("python.home",System.getProperty("user.dir")+"/Lib");
props.put("python.console.encoding", "UTF-8");
props.put("python.security.respectJavaAccessibility", "false");
props.put("python.import.site","false");
Properties preprops = System.getProperties();
PythonInterpreter.initialize(preprops, props, new String[0]);
PythonInterpreter interpreter = new PythonInterpreter();
PySystemState sys = Py.getSystemState();
sys.path.add(System.getProperty("user.dir")+"/Lib/site-packages");
interpreter.execfile(System.getProperty("user.dir")+"/Lib/basecode.py");
PyFunction func = (PyFunction)interpreter.get("b16d",PyFunction.class);
PyObject rsadstr = func.__call__(new PyString(input));
return (rsadstr.toString());
}
public static String r162ascii(String input){
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.execfile(System.getProperty("user.dir")+"\\Lib\\16andascii.py");
Properties props = new Properties();
props.put("python.home",System.getProperty("user.dir")+"/Lib");
props.put("python.console.encoding", "UTF-8");
props.put("python.security.respectJavaAccessibility", "false");
props.put("python.import.site","false");
Properties preprops = System.getProperties();
PythonInterpreter.initialize(preprops, props, new String[0]);
PythonInterpreter interpreter = new PythonInterpreter();
PySystemState sys = Py.getSystemState();
sys.path.add(System.getProperty("user.dir")+"/Lib/site-packages");
interpreter.execfile(System.getProperty("user.dir")+"/Lib/16andascii.py");
PyFunction func = (PyFunction)interpreter.get("r162ascii",PyFunction.class);
PyObject rsadstr = func.__call__(new PyString(input));
return (rsadstr.toString());
}
public static String ascii216(String input){
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.execfile(System.getProperty("user.dir")+"\\Lib\\16andascii.py");
Properties props = new Properties();
props.put("python.home",System.getProperty("user.dir")+"/Lib");
props.put("python.console.encoding", "UTF-8");
props.put("python.security.respectJavaAccessibility", "false");
props.put("python.import.site","false");
Properties preprops = System.getProperties();
PythonInterpreter.initialize(preprops, props, new String[0]);
PythonInterpreter interpreter = new PythonInterpreter();
PySystemState sys = Py.getSystemState();
sys.path.add(System.getProperty("user.dir")+"/Lib/site-packages");
interpreter.execfile(System.getProperty("user.dir")+"/Lib/16andascii.py");
PyFunction func = (PyFunction)interpreter.get("ascii216",PyFunction.class);
PyObject rsadstr = func.__call__(new PyString(input));
return (rsadstr.toString());
}
public static String Bacon(String input){
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.execfile(System.getProperty("user.dir")+"\\Lib\\peigen.py");
Properties props = new Properties();
props.put("python.home",System.getProperty("user.dir")+"/Lib");
props.put("python.console.encoding", "UTF-8");
props.put("python.security.respectJavaAccessibility", "false");
props.put("python.import.site","false");
Properties preprops = System.getProperties();
PythonInterpreter.initialize(preprops, props, new String[0]);
PythonInterpreter interpreter = new PythonInterpreter();
PySystemState sys = Py.getSystemState();
sys.path.add(System.getProperty("user.dir")+"/Lib/site-packages");
interpreter.execfile(System.getProperty("user.dir")+"/Lib/peigen.py");
PyFunction func = (PyFunction)interpreter.get("run",PyFunction.class);
PyObject jg = func.__call__(new PyString(input));
return jg.toString();
Expand Down

0 comments on commit d635950

Please sign in to comment.