-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from franceme/dev
Pulling Dev
- Loading branch information
Showing
4,453 changed files
with
965,649 additions
and
64,630 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
261 changes: 261 additions & 0 deletions
261
Notebook/Custom_Android_Tests/SWAMP_Custom_Android.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,261 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Jar Unit Tests" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 5, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"// Custom Imports\n", | ||
"List <String> addedJars = %jars *.jar\n", | ||
"//*/\n", | ||
"%maven junit:junit:4.12\n", | ||
"%maven org.apache.commons:commons-io:1.3.2\n", | ||
"%maven commons-io:commons-io:2.7\n", | ||
"\n", | ||
"// CryptoGuard imports\n", | ||
"import static org.junit.Assert.assertFalse;\n", | ||
"import static org.junit.Assert.assertTrue;\n", | ||
"import static org.junit.Assert.assertEquals;\n", | ||
"import static org.junit.Assert.assertNull;\n", | ||
"import static org.junit.Assert.assertNotNull;\n", | ||
"import static util.Utils.makeArg;\n", | ||
"import frontEnd.Interface.outputRouting.ExceptionHandler;\n", | ||
"import frontEnd.Interface.ArgumentsCheck;\n", | ||
"import frontEnd.MessagingSystem.routing.Listing;\n", | ||
"import frontEnd.MessagingSystem.routing.EnvironmentInformation;\n", | ||
"import frontEnd.MessagingSystem.routing.structure.Default.Report;\n", | ||
"import frontEnd.MessagingSystem.routing.structure.Scarf.AnalyzerReport;\n", | ||
"import frontEnd.MessagingSystem.routing.structure.Scarf.BugInstance;\n", | ||
"import frontEnd.Interface.EntryPoint;\n", | ||
"import rule.engine.EngineType;\n", | ||
"import frontEnd.argsIdentifier;\n", | ||
"import java.io.File;\n", | ||
"import java.nio.charset.StandardCharsets;\n", | ||
"import java.nio.file.Files;\n", | ||
"import java.nio.file.Paths;\n", | ||
"import java.util.ArrayList;\n", | ||
"import java.util.Arrays;\n", | ||
"import java.util.List;\n", | ||
"import org.junit.After;\n", | ||
"import org.junit.Before;\n", | ||
"import org.junit.Test;\n", | ||
"import org.junit.runner.RunWith;\n", | ||
"import soot.G;\n", | ||
"import util.Utils;\n", | ||
"import org.apache.commons.io.FileUtils;\n", | ||
"import java.util.Scanner;\n", | ||
"import org.apache.commons.io.filefilter.WildcardFileFilter;" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 9, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"// Utililties\n", | ||
"String cur_user = System.getProperty(\"user.name\");\n", | ||
"String java_home = \"/home/\" + cur_user + \"/.sdkman/candidates/java/8*.0.25*\";\n", | ||
"String java7_home = \"/home/\" + cur_user + \"/.sdkman/candidates/java/7*\";\n", | ||
"String android_home = \"/home/\" + cur_user + \"/.sdkman/candidates/android/current\";\n", | ||
"\n", | ||
"//Retrieving a specific path from a wild card based list\n", | ||
"public static String getFileFromWildCard(String path) {\n", | ||
" String[] split = path.split(\"/\");\n", | ||
" StringBuilder build = new StringBuilder();\n", | ||
" for (int itr = 0;itr < split.length - 1;itr ++)\n", | ||
" build.append(split[itr]).append(\"/\");\n", | ||
"\n", | ||
" String[] files = new File(build.toString()).list(new WildcardFileFilter(split[split.length-1]));\n", | ||
"\n", | ||
" if (files.length > 0)\n", | ||
" return build.toString() + files[files.length - 1];\n", | ||
" else\n", | ||
" return null;\n", | ||
"}\n", | ||
"\n", | ||
"java_home = getFileFromWildCard(java_home);\n", | ||
"java7_home = getFileFromWildCard(java7_home);\n", | ||
"\n", | ||
"public static void print(String file) {\n", | ||
" try {\n", | ||
" Scanner reader = new Scanner(new File(file));\n", | ||
"\n", | ||
" while (reader.hasNextLine()) System.out.println(reader.nextLine());\n", | ||
" } catch (FileNotFoundException e) {\n", | ||
" }\n", | ||
"}" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 7, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stderr", | ||
"output_type": "stream", | ||
"text": [ | ||
"Warning: Nashorn engine is planned to be removed from a future JDK release\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"// Source Locations\n", | ||
"String signal = \"Signal_3.5.0.apk\";\n", | ||
"\n", | ||
"public static final String testPath = Utils.osPathJoin(System.getProperty(\"user.dir\"), \"tmp\");\n", | ||
"FileUtils.deleteDirectory(new File (testPath));\n", | ||
"new File(testPath).mkdirs();\n", | ||
"\n", | ||
"String signal_output = testPath + \"/signal.json\"" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### Signal Issue" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"---" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"* Reported Issue\n", | ||
"\n", | ||
"```bash\n", | ||
"\t----\n", | ||
"\tError ID: 16\n", | ||
"\tError Type: File /home/bolo/build/pkg1/Signal-Android-3.5.0/build/intermediates/classes/release/org/thoughtcrime/securesms/components/HidingLinearLayout$1.class not available.\n", | ||
"\tError Message:\n", | ||
"[File /home/bolo/build/pkg1/Signal-Android-3.5.0/build/intermediates/classes/release/org/thoughtcrime/securesms/components/HidingLinearLayout$1.class not available.]\n", | ||
"\t----\n", | ||
"```" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 10, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"public void testing_Signal() {\n", | ||
" G.reset();\n", | ||
" String fileOut = signal_output;\n", | ||
" String fileIn = signal;\n", | ||
"\n", | ||
" new File(fileOut).delete();\n", | ||
" if (isLinux) {\n", | ||
" String args =\n", | ||
" makeArg(argsIdentifier.FORMAT, EngineType.APK)\n", | ||
" + makeArg(argsIdentifier.SOURCE, fileIn)\n", | ||
" + makeArg(argsIdentifier.OUT, fileOut)\n", | ||
" + makeArg(argsIdentifier.NOEXIT)\n", | ||
" + makeArg(argsIdentifier.FORMATOUT, Listing.Default)\n", | ||
" + makeArg(argsIdentifier.ANDROID, android_home)\n", | ||
" + makeArg(argsIdentifier.JAVA, java_home)\n", | ||
" + makeArg(argsIdentifier.PRETTY);\n", | ||
"\n", | ||
" try {\n", | ||
" EntryPoint.main(args.split(\" \"));\n", | ||
" Report report = Report.deserialize(new File(fileOut));\n", | ||
"\n", | ||
" assertFalse(report.getIssues().isEmpty());\n", | ||
" print(fileOut);\n", | ||
" } catch (Exception e) {\n", | ||
" e.printStackTrace();\n", | ||
" assertNull(e);\n", | ||
" }\n", | ||
" }\n", | ||
" }" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 11, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.\n" | ||
] | ||
}, | ||
{ | ||
"name": "stderr", | ||
"output_type": "stream", | ||
"text": [ | ||
"Warning: Nashorn engine is planned to be removed from a future JDK release\n", | ||
"Warning: Nashorn engine is planned to be removed from a future JDK release\n" | ||
] | ||
}, | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
" INFO | 2020-07-13 20:19:01.883 | Interface.ArgumentsCheck (ArgumentsCheck.java:150) | Displaying info level logs\n", | ||
" INFO | 2020-07-13 20:19:02.064 | Interface.ArgumentsCheck (ArgumentsCheck.java:178) | Using the output: Default\n", | ||
" INFO | 2020-07-13 20:19:02.073 | Interface.ArgumentsCheck (ArgumentsCheck.java:342) | Using the source file(s): [Signal_3.5.0.apk]\n", | ||
" INFO | 2020-07-13 20:19:02.100 | routing.EnvironmentInformation (EnvironmentInformation.java:376) | Building the Package Root Dir based on type\n", | ||
" INFO | 2020-07-13 20:19:02.111 | routing.EnvironmentInformation (EnvironmentInformation.java:410) | Building the Root Directory\n", | ||
" INFO | 2020-07-13 20:19:02.124 | Interface.SubRunner (SubRunner.java:57) | Starting the scanning process\n", | ||
" INFO | 2020-07-13 20:19:02.142 | engine.ApkEntry (ApkEntry.java:24) | Checking the rule: InsecureAssymCryptoFinder\n", | ||
" INFO | 2020-07-13 20:21:05.987 | engine.ApkEntry (ApkEntry.java:24) | Checking the rule: BrokenCryptoFinder\n", | ||
" INFO | 2020-07-13 20:22:17.903 | engine.ApkEntry (ApkEntry.java:24) | Checking the rule: UntrustedPrngFinder\n", | ||
" INFO | 2020-07-13 20:22:22.502 | engine.ApkEntry (ApkEntry.java:24) | Checking the rule: SSLSocketFactoryFinder\n", | ||
" INFO | 2020-07-13 20:22:31.467 | engine.ApkEntry (ApkEntry.java:24) | Checking the rule: CustomTrustManagerFinder\n", | ||
" INFO | 2020-07-13 20:22:31.559 | engine.ApkEntry (ApkEntry.java:24) | Checking the rule: HostNameVerifierFinder\n", | ||
" INFO | 2020-07-13 20:22:31.652 | engine.ApkEntry (ApkEntry.java:24) | Checking the rule: BrokenHashFinder\n", | ||
" INFO | 2020-07-13 20:22:43.639 | engine.ApkEntry (ApkEntry.java:24) | Checking the rule: ConstantKeyFinder\n" | ||
] | ||
}, | ||
{ | ||
"ename": "EvaluationInterruptedException", | ||
"evalue": "Evaluator was interrupted while executing: 'testing_Signal()'", | ||
"output_type": "error", | ||
"traceback": [ | ||
"\u001B[1m\u001B[30m| \u001B[1m\u001B[30mtesting_Signal()\u001B[0m", | ||
"\u001B[1m\u001B[31mEvaluation interrupted.\u001B[0m" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"testing_Signal()" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Java", | ||
"language": "java", | ||
"name": "java" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": "java", | ||
"file_extension": ".jshell", | ||
"mimetype": "text/x-java-source", | ||
"name": "Java", | ||
"pygments_lexer": "java", | ||
"version": "11.0.7+10" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
1 change: 1 addition & 0 deletions
1
Notebook/Custom_Android_Tests/Signal-Android-3.5.0/.gitattributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.ai binary |
25 changes: 25 additions & 0 deletions
25
Notebook/Custom_Android_Tests/Signal-Android-3.5.0/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.classpath | ||
project.properties | ||
.project | ||
.settings | ||
bin/ | ||
gen/ | ||
.idea/ | ||
*.iml | ||
out | ||
tests | ||
lint.xml | ||
local.properties | ||
ant.properties | ||
.DS_Store | ||
build.log | ||
build-log.xml | ||
.gradle | ||
build | ||
signing.properties | ||
library/lib/ | ||
library/obj/ | ||
ffpr | ||
test/androidTestEspresso/res/values/arrays.xml | ||
obj/ | ||
jni/libspeex/.deps/ |
7 changes: 7 additions & 0 deletions
7
Notebook/Custom_Android_Tests/Signal-Android-3.5.0/.travis.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
language: android | ||
android: | ||
components: | ||
- platform-tools | ||
- build-tools-19.1.0 | ||
- android-19 | ||
- extra-android-m2repository |
11 changes: 11 additions & 0 deletions
11
Notebook/Custom_Android_Tests/Signal-Android-3.5.0/.tx/config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[main] | ||
host = https://www.transifex.com | ||
lang_map = fr_CA:fr-rCA,pt_BR:pt-rBR,pt_PT:pt,zh_CN:zh-rCN,zh_HK:zh-rHK,zh_TW:zh-rTW,da_DK:da-rDK,de_DE:de,tr_TR:tr,fr_FR:fr,es_ES:es,hu_HU:hu,sv_SE:sv-rSE,bg_BG:bg,el_GR:el,kn_IN:kn-rIN,cs_CZ:cs,sr:sr,he:iw,id:in | ||
|
||
|
||
[textsecure-official.master] | ||
file_filter = res/values-<lang>/strings.xml | ||
source_file = res/values/strings.xml | ||
source_lang = en | ||
type = ANDROID | ||
|
Oops, something went wrong.