Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
More robust variable detection
Browse files Browse the repository at this point in the history
  • Loading branch information
HaarigerHarald committed Jun 25, 2016
1 parent c4e6c44 commit 3933c69
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -382,12 +382,12 @@ private boolean decipherSignature(final SparseArray<String> encSignatures) throw
String line;
while ((line = reader.readLine()) != null) {
sb.append(line);
sb.append(" ");

This comment has been minimized.

Copy link
@karthikjanagiraman

karthikjanagiraman Aug 13, 2016

Why are you setting empty string to the sb ?

}
javascriptFile = sb.toString();
} finally {
if (reader != null) {
if (reader != null)
reader.close();
}
urlConnection.disconnect();
}

Expand All @@ -399,7 +399,7 @@ private boolean decipherSignature(final SparseArray<String> encSignatures) throw
if (LOGGING)
Log.d(LOG_TAG, "Decipher Functname: " + decipherFunctionName);

Pattern patMainVariable = Pattern.compile("(var |)" + decipherFunctionName.replace("$", "\\$") +
Pattern patMainVariable = Pattern.compile("(var |\\s|,|;)" + decipherFunctionName.replace("$", "\\$") +
"(=function\\((.{1,3})\\)\\{)");

String mainDecipherFunct;
Expand Down Expand Up @@ -469,6 +469,7 @@ else if (javascriptFile.charAt(i) == '}')
braces--;
}
}

if (LOGGING)
Log.d(LOG_TAG, "Decipher Function: " + decipherFunctions);
decipherViaWebView(encSignatures);
Expand Down

0 comments on commit 3933c69

Please sign in to comment.