This is supposed to decrypt a file. I’m trying to figure out the algorithm but am having a bit of an issue understanding what is going on. Any hints? Thanks!
localStringBuilder1 = new StringBuilder("");
localStringBuilder2 = new StringBuilder("");
Matcher localMatcher = Pattern.compile("[a-zA-z_\\-]+\\.html").matcher(paramString); //paramString is the encrypted file
localMatcher.find();
String str2 = localMatcher.group();
for (Integer localInteger1 = Integer.valueOf(0); localInteger1
.intValue() < str2.length(); localInteger1 = Integer
.valueOf(1 + localInteger1.intValue())) {
localStringBuilder2.append(1 + Math.round(str2
.codePointAt(localInteger1.intValue()) % 3));
if (localInteger1.intValue() < "fdjkhireuhsdthuirdfg".length())
localStringBuilder2.append(1 + Math
.round("fdjkhireuhsdthuirdfg".codePointAt(localInteger1
.intValue()) % 3));
}
Update: Simplified Loop
for (int i = 0; i < str2.length(); i++) {
localStringBuilder2.append(1 + Math.round(str2
.codePointAt(i) % 3));
if (i < "fdjkhireuhsdthuirdfg".length())
localStringBuilder2.append(1 + Math
.round("fdjkhireuhsdthuirdfg".codePointAt(i) % 3));
}
And you can find complete source code over here
EDIT
Big thanks to Vandey who solved the string produced: “21321223331121”
This however doesn’t get the full answer.
The next part is (beats the hell out of me):
label249: if (localInteger2.intValue() < i);
try
{
localStringBuilder1.append((char)(Integer.parseInt(str1.substring(0 + localInteger2.intValue(), 2 + localInteger2.intValue()), 16) - Integer.parseInt(localStringBuilder2.substring(localInteger2.intValue() / 2 % localStringBuilder2.length(), 1 + localInteger2.intValue() / 2 % localStringBuilder2.length()))));
label327: localInteger2 = Integer.valueOf(2 + localInteger2.intValue());
break label249;
str3 = localStringBuilder1.toString();
}
catch (StringIndexOutOfBoundsException localStringIndexOutOfBoundsException)
{
break label327;
}
str2 is hardcoded here, work for it , otherwise it shoould be pretty close to it. Anyone, feel free to edit it to the right direction. The last printline was added just to see what it prints .
And sorry for misleading variable name.