我很高兴向大家知会一声,scioworks Camino的基于Struts的Web Application开发工具已经可以破解了。因为Struts不错,我才想这样,目的只有一个,用来测试检验Struts。
这个工具使用注册码,并使用注册码进行日期判断。让我有点恼火的是,程序会想一个地址发送UDP包,不管怎样,我不希望这样的事情发生。
我想这个工具的破解有两种方式,
1, 认真钻研其算法,然后给出一个KeyGen程序。这种方式对程序本身不会有什么影响,但是研读算法比较费时间。
2, 改写程序控制,然后给出一个替代的class文件。这种方式因为改写了程序控制流程,需要特别小心,不小心的话,原来的程序就会崩溃。
这两种方式各有千秋,取决于你的兴趣所在。因为这个工具经过了代码优化以及别的处理,所以,改写代码稍嫌麻烦。
要做改写代码方式破解的话,你需要一个反编译工具,我推荐你使用jshrink,因为jad好像已经不再做下去了。(别说你还有好多反编译工具,错,大多使用jad Engine。)其次你需要了解一点java虚拟机规范,没有也行,那么你需要熟悉java语言,或者加上一些windows汇编语言知识。
我没有更多耐心所更多的东西。给出源代码,你爱谁谁去。
// Main.java; class file size 15569 bytes
package scioworks.camino;
/*
import BindingSchemaLoader;
import CaminoApp;
import CaminoModel;
import Config;
import ContextPathUtil;
import ExpressException;
import FileReadWriteException;
import InvalidResourceException;
import Main$CMon;
import Main$SMon;
import Navigatable;
import ParseException;
import StrutsSubApp;
*/
import com.jxml.quick.QDoc;
import scioworks.camino.event.ProjectReadyEvent;
import scioworks.camino.gui.LcPanel;
import scioworks.camino.io.DirtyStatusLookup;
import java.awt.Color;
import java.awt.Frame;
import java.io.File;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeMap;
import javax.swing.JOptionPane;
import scioworks.camino.prjModel.CaminoProject;
import scioworks.camino.prjModel.SubApp;
import scioworks.aspen.BaseDialog;
import scioworks.aspen.HelpManager;
import scioworks.aspen.SwingUtil;
import scioworks.aspen.progress.ProgressListener;
import scioworks.common.io.FileUtil;
import scioworks.common.io.filemonitor.FileMonitor;
import scioworks.common.logging.Logger;
import scioworks.common.logging.LoggerFactory;
import scioworks.common.message.Message;
import scioworks.common.message.MessageCategory;
import scioworks.util.crypto.TransformerRev;
import scioworks.camino.strutsModel.Action;
import scioworks.camino.strutsModel.StrutsConfig;
import scioworks.camino.webdd.Servlet;
import scioworks.camino.webdd.ServletMapping;
import scioworks.camino.webdd.WebApp;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.MulticastSocket;
import java.net.InetAddress;
class Main
implements
CaminoModel
{
final static private String _$159506 = "VGhlIGxpY2Vuc2UgaW5mb3JtYXRpb24gaXMgaW52YWxpZA==";
final static private String _$115780 = "Q2FtaW5vIExpY2Vuc2UgSW5mbw==";
final static private String _$159525 = "VHJpYWwgbGljZW5zZSBleHBpcmVzIGluIHswfSBkYXlz";
final static private String _$159544 = "WW91ciB0cmlhbCBsaWNlbnNlIGhhcyBleHBpcmVkLiBWaXNpdCBodHRwOi8vd3d3LnNjaW93b3Jrcy5jb20gdG8gcHVyY2hhc2UgYSBsaWNlbnNlZCBjb3B5IG9mIFNjaW93b3JrcyBDYW1pbm8=";
final static private String _$159561 = "VW5yZWdpc3RlcmVkIFRyaWFsIENvcHk=";
final static private String _$159583 = "usitPzelhkTNlTcaSpAIIiuaalidM";
final static private String _$159605 = "U3RhbmRhcmQ=";
final static private String _$159621 = "RW50ZXJwcmlzZQ==";
static private scioworks.common.logging.Logger _$3187 = scioworks.common.logging.LoggerFactory.getLogger(Main.class);
// scioworks.common.logging.LoggerFactory.getLogger((class$scioworks$camino$Main == null) ? (class$scioworks$camino$Main = Main.class$("scioworks.camino.Main")) : class$scioworks$camino$Main);
private int _$159639;
private String _$159651;
//private Main$CMon _$159668;
//private Main$SMon _$159676;
private int _$159680;
private String _$59575;
private long _$159700;
private String _$59588;
private String _$115870;
private CaminoProject _$62680;
private WebApp _$126484;
private java.util.Map _$159711;
public Main() throws InvalidResourceException {
_$159639 = 12345;
_$159651 = "230.10.10.11";
//_$159668 = null;
//_$159676 = null;
_$159680 = 1;
_$59575 = "";
_$159700 = -1;
_$59588 = "";
_$115870 = "";
_$62680 = null;
_$126484 = null;
_$159711 = new java.util.TreeMap();
getLc(javax.swing.JOptionPane.getRootFrame(), true);
_$3187.info("License Count = ".concat(String.valueOf(_$159680)));
_$3187.info("Serial Number = ".concat(_$59575));
_$115870 = _$159725();
//_$159744();
BindingSchemaLoader.getProjectBindingSchema();
BindingSchemaLoader.getStrutsConfigBindingSchema();
BindingSchemaLoader.getWebDDBindingSchema();
scioworks.aspen.HelpManager.instance();
}
public java.util.List findGlobalForwardsByTarget(Navigatable n1) {
ArrayList a2;
Iterator i3;
StrutsSubApp s4;
List l5;
a2 = new java.util.ArrayList();
i3 = _$159711.values().iterator();
while (i3.hasNext()) {
s4 = (StrutsSubApp) i3.next();
l5 = s4.getStrutsConfig().findGlobalForwardsByTarget(n1);
a2.addAll(l5);
}
return a2;
}
public Navigatable findNavigatable(String s1) {
Iterator i2;
StrutsSubApp s3 = null;
i2 = _$159711.values().iterator();
{
do {
if (i2.hasNext()) {
s3 = (StrutsSubApp) i2.next();
}
}
while (s3.isInSubApp(s1) == false);
return s3.findSubAppNavigatable(s3.makeSubAppRelative(s1));
}
//return null;
}
public Action findAction(String s1) {
Iterator i2;
StrutsSubApp s3 = null;
i2 = _$159711.values().iterator();
{
do {
if (i2.hasNext()) {
s3 = (StrutsSubApp) i2.next();
}
}
while (s3.isInSubApp(s1) == false);
return s3.findSubAppAction(ContextPathUtil.makeSubAppRelative(s3.getPrefix(), s1));
}
//return null;
}
public CaminoProject getProject() {
return _$62680;
}
public WebApp getWebApp() {
return _$126484;
}
public StrutsSubApp getSubApp(String s1) {
return (StrutsSubApp) _$159711.get(s1);
}
public java.util.Set getSubAppPrefixes() {
return _$159711.keySet();
}
java.util.Map getAllSubApps() {
return _$159711;
}
public void initNewProject(CaminoProject c1, scioworks.aspen.progress.ProgressListener p2) throws InvalidResourceException, ParseException, FileReadWriteException {
_$62680 = c1;
initProject(p2);
}
public void initProject(scioworks.aspen.progress.ProgressListener p1) throws InvalidResourceException, ParseException, FileReadWriteException {
List l2;
Iterator i3;
String s4;
String s5;
_$62680.init(this, p1);
_$159775(p1);
verifyWebXml(p1);
_$159711.clear();
l2 = _$126484.getSubAppPrefixes();
i3 = l2.iterator();
while (i3.hasNext()) {
s4 = (String) i3.next();
if (_$62680.getSubApp(s4) != null) {
_$159796(s4, p1);
continue;
}
s5 = java.text.MessageFormat.format("SubApp \"{0}\" is not configured correctly in the project. Please correct it in Project Properties and reload the project.", new String []{s4});
p1.showError(scioworks.common.message.MessageCategory.getCategory("Main"), s5);
}
ProjectReadyEvent.fire(this, true);
}
private void _$159796(String s1, scioworks.aspen.progress.ProgressListener p2) throws InvalidResourceException, ParseException, FileReadWriteException {
StrutsSubApp s3;
s3 = new StrutsSubApp(this, s1);
_$159711.put(s1, s3);
s3.load(p2);
}
public void loadProject(String s1, scioworks.aspen.progress.ProgressListener p2) throws InvalidResourceException, ParseException, FileReadWriteException {
p2.setDescription("Loading project...");
p2.notifyProgress(s1, 0);
_$62680 = CaminoProject.load(s1, p2);
initProject(p2);
}
private void _$159775(scioworks.aspen.progress.ProgressListener p1) throws InvalidResourceException, ParseException, FileReadWriteException {
String s2;
File f3;
s2 = _$62680.getAbsoluteWebAppConfig();
L164:
{
if (s2 != null) {
f3 = scioworks.common.io.FileUtil.getAbsolutePath(_$62680.getFile().getParentFile(), s2);
if (f3.isFile()) {
p1.setDescription("Loading web.xml...");
p1.notifyProgress(String.valueOf(new StringBuffer("web.xml '").append(s2).append("'")), 0);
_$126484 = WebApp.load(_$62680, f3);
break L164;
}
_$3187.error(String.valueOf(new StringBuffer("web.xml '").append(s2).append("' not found")));
throw new FileReadWriteException("Web Deployment Descriptor", s2, 0, null);
}
_$3187.error("web.xml filename is empty.");
throw new FileReadWriteException("Web Deployment Descriptor", s2, 0, null);
}
}
public void clearProject() {
CaminoApp.getInstance().getDirtyStatusLookup().clearDirtyAll();
CaminoApp.getInstance().resetModelEventBroker();
scioworks.common.io.filemonitor.FileMonitor.getInstance().unregisterAll();
_$62680 = null;
_$126484 = null;
_$159711.clear();
ProjectReadyEvent.fire(this, false);
}
public void saveProject() throws ParseException, FileReadWriteException, ExpressException, InvalidResourceException {
Iterator i1;
StrutsSubApp s2;
_$126484.save();
_$62680.save();
i1 = _$159711.values().iterator();
while (i1.hasNext()) {
s2 = (StrutsSubApp) i1.next();
s2.save();
}
}
public void refreshProject(scioworks.aspen.progress.ProgressListener p1) {
verifyWebXml(p1);
}
public void verifyWebXml(scioworks.aspen.progress.ProgressListener p1) {
scioworks.common.message.Message o2;
ServletMapping s3;
String s5;
o2 = null;
if (_$126484.findServlet(_$62680.getActionServletName()) == null) {
_$3187.warn(String.valueOf(new StringBuffer("ActionServlert ").append(_$62680.getActionServletName()).append(" not found")));
o2 = _$159827(o2, p1);
p1.showWarning(scioworks.common.message.MessageCategory.getCategory("Main"), String.valueOf(new StringBuffer("ActionServlet '").append(_$62680.getActionServletName()).append("' not found")), o2);
}
s3 = _$126484.findServletMapping(_$62680.getActionServletName());
if (s3 == null) {
_$3187.warn(String.valueOf(new StringBuffer("Servlet mapping for ").append(_$62680.getActionServletName()).append(" not found")));
o2 = _$159827(o2, p1);
p1.showWarning(scioworks.common.message.MessageCategory.getCategory("Main"), String.valueOf(new StringBuffer("Servlet mapping for servlet '").append(_$62680.getActionServletName()).append("' not found. Assume URI pattern for Actions = '").append("*.do").append("'.")), o2);
}
if ((s3 != null) && ((s3.getUrlExtension() == null) && (s3.getUrlPath() == null))) {
o2 = _$159827(o2, p1);
Object l4 = (s3.getRawUrlPattern() == null) ? "<null>" : s3.getRawUrlPattern();
s5 = java.text.MessageFormat.format("URL Pattern \"{0}\" of the ActionServlet is invalid.", new Object[] {l4} );
_$3187.warn(s5);
p1.showError(scioworks.common.message.MessageCategory.getCategory("Main"), s5, o2);
}
}
public String getTitleMessage() {
StringBuffer s1;
s1 = new StringBuffer("Scioworks Camino ");
s1.append(Config.getVersion());
/*
if ((_$159700 - ((long) 0)) != 0) {
s1.append(" - ");
s1.append(scioworks.util.crypto.TransformerRev.getInstance().simpleDecode("VW5yZWdpc3RlcmVkIFRyaWFsIENvcHk="));
return s1.toString();
}
*/
s1.append("---破解 xy@2002-11-22");
return s1.toString();
}
public int monitorStatus() {
int i1 = 1;
//i1 = _$159676.gc();
//_$159676.slap();
/*
if (i1 >= _$159680) {
return -(_$159680);
}
return _$159680;
*/
return i1;
}
public int lp() {
return _$159639;
}
public String lg() {
return _$159651;
}
public int numOfLc() {
return _$159680;
}
public String sn() {
return _$59575;
}
String sk() {
return _$115870;
}
public String ed(boolean b1) {
if (_$59588.equals("E")) {
if (b1) {
return scioworks.util.crypto.TransformerRev.getInstance().simpleDecode("RW50ZXJwcmlzZQ==");
}
return _$59588;
}
if (b1) {
return scioworks.util.crypto.TransformerRev.getInstance().simpleDecode("U3RhbmRhcmQ=");
}
return "S";
}
public boolean getLc(java.awt.Frame f1, boolean b2) {
int i3;
int i4;
java.util.HashMap o5;
String s6;
String s7;
String s8;
int i7;
LcPanel l10;
BaseDialog b11 = null;
int i12;
i3 = 0;
i4 = 1;
o5 = null;
s6 = Config.getLcKey();
s7 = Config.getLcCompany();
s8 = Config.getLcUser();
{
for (int i=0; i<1; i++) {
if (i3 == 0) {
if ((b2) && (_$159937(s8, s7, s6))) {
i3 = 1;
Config.setLcUser(s8);
Config.setLcCompany(s7);
Config.setLcKey(s6);
Config.saveLicense();
continue;
}
i7 = 1;
o5 = new java.util.HashMap();
o5.put("k", s6);
o5.put("u", s8);
o5.put("c", s7);
l10 = new scioworks.camino.gui.LcPanel();
l10.setModel(o5);
b11 = new scioworks.aspen.BaseDialog(f1, scioworks.util.crypto.TransformerRev.getInstance().simpleDecode("Q2FtaW5vIExpY2Vuc2UgSW5mbw=="), true, l10, l10, true);
try {
if (i4 != 0) {
i4 = 0;
l10.setMessage(scioworks.util.crypto.TransformerRev.getInstance().simpleDecode("Q2FtaW5vIExpY2Vuc2UgSW5mbw=="),Color.black);
}
else {
l10.setMessage(scioworks.util.crypto.TransformerRev.getInstance().simpleDecode("VGhlIGxpY2Vuc2UgaW5mb3JtYXRpb24gaXMgaW52YWxpZA=="), Color.red);
}
b11.show();
if (b11.isOk()) {
o5 = (java.util.HashMap) l10.getModel();
s8 = o5.get("u").toString();
s7 = o5.get("c").toString();
s6 = o5.get("k").toString();
}
else {
return true;
}
continue;
}
finally {
break;
}
}
}
//l14 = throw l13;
scioworks.aspen.SwingUtil.dispose(b11);
return true;
}
//return true;
}
private String _$159954() {
int[] i1;
char[] c2;
int i3;
i1 = new int[] {6,10,24,18,13,28,21,20,5,2,11,23,16,19,4,26,8,0,3,14,1,7,12,22,9,27,17,15,25};
c2 = new char[29];
i3 = 0;
while (i3 < "usitPzelhkTNlTcaSpAIIiuaalidM".length()) {
c2[i1[i3]] = "usitPzelhkTNlTcaSpAIIiuaalidM".charAt(i3);
i3++;
}
return new String(c2).concat(Config.getRelease());
}
private boolean _$159937(String s1, String s2, String s3) {
String s4;
String o5;
String o6;
String o7;
String o8;
String o9;
StringTokenizer s10;
int i12;
boolean b1;
s4 = scioworks.util.crypto.TransformerRev.getInstance().decrypt(s3, _$159954());
if (s4 == null) {
return false;
}
o5 = null;
o6 = null;
o7 = null;
o8 = null;
o9 = null;
s10 = new java.util.StringTokenizer(s4, "|");
try {
o5 = s10.nextToken();
o6 = s10.nextToken();
o8 = s10.nextToken();
o7 = s10.nextToken();
o9 = s10.nextToken();
}
catch (NoSuchElementException n11) {
return true;
}
try {
_$159680 = Integer.parseInt(o6);
}
catch (NumberFormatException n2) {
_$159680 = 1;
}
try {
_$59575 = String.valueOf(new StringBuffer(s3.substring(8, 12)).append("-").append(o8).append("-").append(s3.substring(0, 4)));
}
catch (IndexOutOfBoundsException i1) {
return true;
}
try {
_$159700 = Long.parseLong(o7);
}
catch (NumberFormatException n1) {
_$159700 = -1;
}
_$59588 = o9;
b1 = scioworks.util.crypto.TransformerRev.getInstance().compare(o5, s1, s2);
if ((b1) && ((_$159680 >= 0) && ((_$159700 - ((long) 0)) >= 0))) {
return true;
}
return true;
}
/*
private void _$159744() {
double d1;
long l2;
Object[] o3;
if ((_$159700 - ((long) 0)) == 0) {
return;
}
d1 = (double) ((_$159700 - System.currentTimeMillis()) / ((long) 86400000));
l2 = (long) Math.floor(d1);
if (((l2 - ((long) 0)) >= 0) && ((l2 - ((long) 15)) <= 0)) {
o3 = {new Long(l2 + ((long) 1))};
javax.swing.JOptionPane.showMessageDialog(javax.swing.JOptionPane.getRootFrame(), java.text.MessageFormat.format(scioworks.util.crypto.TransformerRev.getInstance().simpleDecode("VHJpYWwgbGljZW5zZSBleHBpcmVzIGluIHswfSBkYXlz"), o3), scioworks.util.crypto.TransformerRev.getInstance().simpleDecode("Q2FtaW5vIExpY2Vuc2UgSW5mbw=="), 1);
}
else {
javax.swing.JOptionPane.showMessageDialog(javax.swing.JOptionPane.getRootFrame(), scioworks.util.crypto.TransformerRev.getInstance().simpleDecode("WW91ciB0cmlhbCBsaWNlbnNlIGhhcyBleHBpcmVkLiBWaXNpdCBodHRwOi8vd3d3LnNjaW93b3Jrcy5jb20gdG8gcHVyY2hhc2UgYSBsaWNlbnNlZCBjb3B5IG9mIFNjaW93b3JrcyBDYW1pbm8="), scioworks.util.crypto.TransformerRev.getInstance().simpleDecode("Q2FtaW5vIExpY2Vuc2UgSW5mbw=="), 1);
//System.exit(1);
}
}
*/
private String _$159725() {
String s1;
int i2;
InterruptedException i3;
IOException i1;
s1 = Long.toString(System.currentTimeMillis());
i2 = _$159639 + 1;
/*
try {
_$159676 = new Main$SMon(this, i2);
_$159676.start();
_$159668 = new Main$CMon(this, i2, Config.getLcKey(), s1, _$159639, _$159651);
_$159668.start();
try {
Thread.sleep(500);
}
catch (i3) {
}
}
catch (i1) {
}
*/
return s1;
}
private scioworks.common.message.Message _$159827(scioworks.common.message.Message m1, scioworks.aspen.progress.ProgressListener p2) {
Message m2 = null;
if (m1 == null) {
m2 = p2.showWarning(scioworks.common.message.MessageCategory.getCategory("Main"), "Encounter problem parsing web.xml. Please correct the problem via the menu item Project|Web.xml Properties");
}
return m2;
}
static scioworks.common.logging.Logger access$0() {
return _$3187;
}
}
/*
class Main$CMon extends Thread
{
private boolean _$160186;
private int _$160198;
private String _$160211;
private String _$115870;
private int _$159639;
private String _$159651;
public Main$CMon(Main m1, int i2, String s3, String s4, int i5, String s6) throws java.io.IOException {
_$160186 = true;
_$160186 = true;
_$160198 = i2;
_$160211 = s3;
_$115870 = s4;
_$159639 = i5;
_$159651 = s6;
}
public void run() {
java.net.MulticastSocket o1;
InetAddress i2;
int i3;
java.net.DatagramSocket o4;
byte[] b5;
DatagramPacket d6;
String s7;
String s8;
String s9;
InetAddress i10;
DatagramPacket d5;
IOException i7;
IOException i13;
o1 = null;
try {
o1 = new java.net.MulticastSocket(_$159639);
i2 = java.net.InetAddress.getByName(_$159651);
o1.joinGroup(i2);
i3 = _$160211.length();
{
for (;;) {
if (_$160186) {
o4 = null;
try {
b5 = new byte[256];
d6 = new java.net.DatagramPacket(b5, b5.length);
o1.receive(d6);
s7 = new String(d6.getData());
s8 = s7.substring(0, i3);
if (s8.equals(_$160211) == false) {
continue;
}
s9 = s7.substring(i3).trim();
if (s9.equals(_$115870)) {
continue;
}
if (Main.access$0().isDebug()) {
Main.access$0().debug("Received req: ".concat(d6.getAddress().getHostAddress()));
}
i10 = d6.getAddress();
d5 = new java.net.DatagramPacket(b5, b5.length, i10, _$160198);
o4 = new java.net.DatagramSocket();
o4.send(d5);
}
continue;
catch (i7) {
_$160186 = false;
}
}
}
finally {
if (o4 != null) {
o4.close();
}
}
}
o1.leaveGroup(i2);
}
catch (i13) {
}
finally {
if (o1 != null) {
o1.close();
}
}
}
}
class Main$SMon extends Thread
{
private boolean _$160186;
private int _$160198;
private int _$59562;
public Main$SMon(Main m1, int i2) throws java.io.IOException {
_$160186 = true;
_$160198 = i2;
_$59562 = 0;
}
public int gc() {
return _$59562;
}
public void slap() {
InetAddress i1;
byte[] b2;
DatagramPacket d3;
DatagramSocket d4;
IOException i4;
_$160186 = false;
try {
i1 = java.net.InetAddress.getLocalHost();
b2 = new byte[256];
b2 = "KoL".getBytes();
d3 = new java.net.DatagramPacket(b2, b2.length, i1, _$160198);
d4 = new java.net.DatagramSocket();
d4.send(d3);
}
catch (i4) {
Main.access$0().warn("s/rmon not available");
}
}
public void run() {
java.net.DatagramSocket o1;
byte[] b2;
DatagramPacket d3;
DatagramPacket d1;
IOException i4;
o1 = null;
try {
o1 = new java.net.DatagramSocket(_$160198);
b2 = new byte[256];
d3 = new java.net.DatagramPacket(b2, b2.length);
d1 = new java.net.DatagramPacket(b2, b2.length);
while (_$160186) {
l5 = this;
synchronized (l5) {
o1.receive(d1);
if (Main.access$0().isDebug()) {
Main.access$0().debug("Ack: ".concat(d1.getAddress().getHostAddress()));
}
_$59562 = _$59562 + 1;
}
continue;
}
}
catch (i4) {
i4.printStackTrace();
}
finally {
if (o1 != null) {
o1.close();
}
}
}
}
*/