@appthreat/atom 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/index.js +1 -0
- package/package.json +34 -0
- package/plugins/.gitkeep +0 -0
- package/plugins/atom-1.0.0/bin/atom +361 -0
- package/plugins/atom-1.0.0/bin/atom.bat +184 -0
- package/plugins/atom-1.0.0/lib/au.com.bytecode.opencsv-2.4.jar +0 -0
- package/plugins/atom-1.0.0/lib/ca.mcgill.sable.jasmin-3.0.3.jar +0 -0
- package/plugins/atom-1.0.0/lib/ca.mcgill.sable.java_cup-0.9.2.jar +0 -0
- package/plugins/atom-1.0.0/lib/ca.mcgill.sable.polyglot-2006.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.diffplug.spotless.spotless-eclipse-base-3.5.2.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.diffplug.spotless.spotless-eclipse-cdt-10.5.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.fasterxml.jackson.core.jackson-annotations-2.15.1.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.fasterxml.jackson.core.jackson-core-2.15.1.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.fasterxml.jackson.core.jackson-databind-2.15.1.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.github.pathikrit.better-files_3-3.9.2.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.github.scopt.scopt_3-4.1.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.github.tototoshi.scala-csv_3-1.3.10.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.google.code.findbugs.jsr305-3.0.2.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.google.code.gson.gson-2.8.9.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.google.errorprone.error_prone_annotations-2.11.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.google.guava.failureaccess-1.0.1.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.google.guava.guava-31.1-jre.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.google.guava.listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.google.j2objc.j2objc-annotations-1.3.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.google.protobuf.protobuf-java-3.21.7.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.google.protobuf.protobuf-java-util-3.21.2.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.h2database.h2-mvstore-1.4.200.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.lihaoyi.geny_3-0.7.1.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.lihaoyi.ujson_3-2.0.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.lihaoyi.upack_3-2.0.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.lihaoyi.upickle-core_3-2.0.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.lihaoyi.upickle-implicits_3-2.0.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.lihaoyi.upickle_3-2.0.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.massisframework.j-text-utils-0.3.4.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.michaelpollmeier.versionsort-1.0.11.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.sun.istack.istack-commons-runtime-3.0.7.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.sun.xml.fastinfoset.FastInfoset-1.2.15.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.thoughtworks.paranamer.paranamer-2.8.jar +0 -0
- package/plugins/atom-1.0.0/lib/com.typesafe.config-1.4.2.jar +0 -0
- package/plugins/atom-1.0.0/lib/commons-io.commons-io-2.7.jar +0 -0
- package/plugins/atom-1.0.0/lib/commons-lang.commons-lang-2.6.jar +0 -0
- package/plugins/atom-1.0.0/lib/de.upb.cs.swt.axml-2.1.3.jar +0 -0
- package/plugins/atom-1.0.0/lib/de.upb.cs.swt.heros-1.2.3.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.appthreat.atom-1.0.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.circe.circe-core_3-0.14.5.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.circe.circe-generic_3-0.14.5.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.circe.circe-jawn_3-0.14.5.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.circe.circe-numbers_3-0.14.5.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.circe.circe-parser_3-0.14.5.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.joern.c2cpg_3-1.1.1742.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.joern.dataflowengineoss_3-1.1.1742.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.joern.javaparser-core-3.24.3-SL3.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.joern.javaparser-symbol-solver-core-3.24.3-SL3.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.joern.javasrc2cpg_3-1.1.1742.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.joern.jimple2cpg_3-1.1.1742.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.joern.jssrc2cpg_3-1.1.1742.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.joern.pysrc2cpg_3-1.1.1742.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.joern.semanticcpg_3-1.1.1742.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.joern.x2cpg_3-1.1.1742.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.shiftleft.codepropertygraph-domain-classes_3-1.3.600.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.shiftleft.codepropertygraph-protos_3-1.3.600.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.shiftleft.codepropertygraph_3-1.3.600.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.shiftleft.overflowdb-core-1.171.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.shiftleft.overflowdb-formats_3-1.171.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.shiftleft.overflowdb-traversal_3-1.171.jar +0 -0
- package/plugins/atom-1.0.0/lib/io.spray.spray-json_3-1.3.6.jar +0 -0
- package/plugins/atom-1.0.0/lib/javax.activation.javax.activation-api-1.2.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/javax.annotation.javax.annotation-api-1.3.2.jar +0 -0
- package/plugins/atom-1.0.0/lib/javax.xml.bind.jaxb-api-2.4.0-b180830.0359.jar +0 -0
- package/plugins/atom-1.0.0/lib/net.lingala.zip4j.zip4j-2.11.5.jar +0 -0
- package/plugins/atom-1.0.0/lib/net.oneandone.reflections8.reflections8-0.11.7.jar +0 -0
- package/plugins/atom-1.0.0/lib/net.sf.trove4j.core-3.1.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.antlr.antlr4-runtime-4.7.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.apache.logging.log4j.log4j-api-2.19.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.apache.logging.log4j.log4j-core-2.19.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.apache.logging.log4j.log4j-slf4j2-impl-2.19.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.checkerframework.checker-qual-3.12.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.core.commands-3.10.300.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.core.contenttype-3.8.200.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.core.filebuffers-3.7.200.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.core.filesystem-1.9.500.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.core.jobs-3.13.200.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.core.resources-3.18.200.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.core.runtime-3.26.100.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.equinox.app-1.6.200.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.equinox.common-3.17.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.equinox.preferences-3.10.100.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.equinox.registry-3.11.200.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.osgi-3.18.300.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.text-3.12.300.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.functionaljava.functionaljava-4.2.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.glassfish.jaxb.jaxb-runtime-2.4.0-b180830.0438.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.glassfish.jaxb.txw2-2.4.0-b180830.0438.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.gradle.gradle-tooling-api-7.6.1.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.javassist.javassist-3.29.0-GA.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.jline.jline-3.23.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.json4s.json4s-ast_3-4.0.6.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.json4s.json4s-core_3-4.0.6.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.json4s.json4s-native-core_3-4.0.6.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.json4s.json4s-native_3-4.0.6.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.json4s.json4s-scalap_3-4.0.6.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.jvnet.staxex.stax-ex-1.8.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.msgpack.msgpack-core-0.9.1.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.osgi.org.osgi.service.prefs-1.1.2.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.osgi.osgi.annotation-8.0.1.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.ow2.asm.asm-9.4.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.ow2.asm.asm-analysis-9.4.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.ow2.asm.asm-commons-9.4.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.ow2.asm.asm-tree-9.4.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.ow2.asm.asm-util-9.4.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.projectlombok.lombok-1.18.28.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.scala-lang.modules.scala-parallel-collections_3-1.0.4.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.scala-lang.modules.scala-parser-combinators_3-2.2.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.scala-lang.modules.scala-xml_3-2.1.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.scala-lang.scala-library-2.13.10.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.scala-lang.scala3-library_3-3.3.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.slf4j.slf4j-api-2.0.7.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.smali.dexlib2-2.5.2.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.soot-oss.soot-4.4.1.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.typelevel.cats-core_3-2.9.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.typelevel.cats-kernel_3-2.9.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/org.typelevel.jawn-parser_3-1.4.0.jar +0 -0
- package/plugins/atom-1.0.0/lib/xmlpull.xmlpull-1.1.3.4d_b4_min.jar +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Atom npm wrapper
|
|
2
|
+
|
|
3
|
+
This package wraps the atom distributable and makes it available via the npm package registry. Atom is an upcoming intermediate representation for application and packages that is optimized for threat analysis and supply-chain security use cases.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```shell
|
|
8
|
+
npm install @appthreat/atom
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Ensure Java 17/19 is available in the PATH.
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log("atom plugins check");
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@appthreat/atom",
|
|
3
|
+
"version": "0.7.1",
|
|
4
|
+
"description": "Create atom (⚛) representation for your application, packages and libraries",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"atom": "./plugins/atom-1.0.0/bin/atom"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"pretty": "prettier --write *.js --trailing-comma=none"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/AppThreat/atom.git"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"code",
|
|
18
|
+
"analysis",
|
|
19
|
+
"threat",
|
|
20
|
+
"sbom",
|
|
21
|
+
"supply",
|
|
22
|
+
"chain"
|
|
23
|
+
],
|
|
24
|
+
"author": "Team AppThreat <cloud@appthreat.com>",
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/AppThreat/atom/issues"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/AppThreat/atom#readme",
|
|
30
|
+
"files": [
|
|
31
|
+
"*.js",
|
|
32
|
+
"plugins/"
|
|
33
|
+
]
|
|
34
|
+
}
|
package/plugins/.gitkeep
ADDED
|
File without changes
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
### ------------------------------- ###
|
|
4
|
+
### Helper methods for BASH scripts ###
|
|
5
|
+
### ------------------------------- ###
|
|
6
|
+
|
|
7
|
+
die() {
|
|
8
|
+
echo "$@" 1>&2
|
|
9
|
+
exit 1
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
realpath () {
|
|
13
|
+
(
|
|
14
|
+
TARGET_FILE="$1"
|
|
15
|
+
CHECK_CYGWIN="$2"
|
|
16
|
+
|
|
17
|
+
cd "$(dirname "$TARGET_FILE")"
|
|
18
|
+
TARGET_FILE=$(basename "$TARGET_FILE")
|
|
19
|
+
|
|
20
|
+
COUNT=0
|
|
21
|
+
while [ -L "$TARGET_FILE" -a $COUNT -lt 100 ]
|
|
22
|
+
do
|
|
23
|
+
TARGET_FILE=$(readlink "$TARGET_FILE")
|
|
24
|
+
cd "$(dirname "$TARGET_FILE")"
|
|
25
|
+
TARGET_FILE=$(basename "$TARGET_FILE")
|
|
26
|
+
COUNT=$(($COUNT + 1))
|
|
27
|
+
done
|
|
28
|
+
|
|
29
|
+
if [ "$TARGET_FILE" == "." -o "$TARGET_FILE" == ".." ]; then
|
|
30
|
+
cd "$TARGET_FILE"
|
|
31
|
+
fi
|
|
32
|
+
TARGET_DIR="$(pwd -P)"
|
|
33
|
+
if [ "$TARGET_DIR" == "/" ]; then
|
|
34
|
+
TARGET_FILE="/$TARGET_FILE"
|
|
35
|
+
else
|
|
36
|
+
TARGET_FILE="$TARGET_DIR/$TARGET_FILE"
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
# make sure we grab the actual windows path, instead of cygwin's path.
|
|
40
|
+
if [[ "x$CHECK_CYGWIN" == "x" ]]; then
|
|
41
|
+
echo "$TARGET_FILE"
|
|
42
|
+
else
|
|
43
|
+
echo $(cygwinpath "$TARGET_FILE")
|
|
44
|
+
fi
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
# TODO - Do we need to detect msys?
|
|
49
|
+
|
|
50
|
+
# Uses uname to detect if we're in the odd cygwin environment.
|
|
51
|
+
is_cygwin() {
|
|
52
|
+
local os=$(uname -s)
|
|
53
|
+
case "$os" in
|
|
54
|
+
CYGWIN*) return 0 ;;
|
|
55
|
+
*) return 1 ;;
|
|
56
|
+
esac
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
# This can fix cygwin style /cygdrive paths so we get the
|
|
60
|
+
# windows style paths.
|
|
61
|
+
cygwinpath() {
|
|
62
|
+
local file="$1"
|
|
63
|
+
if is_cygwin; then
|
|
64
|
+
echo $(cygpath -w $file)
|
|
65
|
+
else
|
|
66
|
+
echo $file
|
|
67
|
+
fi
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
# Make something URI friendly
|
|
71
|
+
make_url() {
|
|
72
|
+
url="$1"
|
|
73
|
+
local nospaces=${url// /%20}
|
|
74
|
+
if is_cygwin; then
|
|
75
|
+
echo "/${nospaces//\\//}"
|
|
76
|
+
else
|
|
77
|
+
echo "$nospaces"
|
|
78
|
+
fi
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
# This crazy function reads in a vanilla "linux" classpath string (only : are separators, and all /),
|
|
82
|
+
# and returns a classpath with windows style paths, and ; separators.
|
|
83
|
+
fixCygwinClasspath() {
|
|
84
|
+
OLDIFS=$IFS
|
|
85
|
+
IFS=":"
|
|
86
|
+
read -a classpath_members <<< "$1"
|
|
87
|
+
declare -a fixed_members
|
|
88
|
+
IFS=$OLDIFS
|
|
89
|
+
for i in "${!classpath_members[@]}"
|
|
90
|
+
do
|
|
91
|
+
fixed_members[i]=$(realpath "${classpath_members[i]}" "fix")
|
|
92
|
+
done
|
|
93
|
+
IFS=";"
|
|
94
|
+
echo "${fixed_members[*]}"
|
|
95
|
+
IFS=$OLDIFS
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
# Fix the classpath we use for cygwin.
|
|
99
|
+
fix_classpath() {
|
|
100
|
+
cp="$1"
|
|
101
|
+
if is_cygwin; then
|
|
102
|
+
echo "$(fixCygwinClasspath "$cp")"
|
|
103
|
+
else
|
|
104
|
+
echo "$cp"
|
|
105
|
+
fi
|
|
106
|
+
}
|
|
107
|
+
# Detect if we should use JAVA_HOME or just try PATH.
|
|
108
|
+
get_java_cmd() {
|
|
109
|
+
# High-priority override for Jlink images
|
|
110
|
+
if [[ -n "$bundled_jvm" ]]; then
|
|
111
|
+
echo "$bundled_jvm/bin/java"
|
|
112
|
+
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
|
|
113
|
+
echo "$JAVA_HOME/bin/java"
|
|
114
|
+
else
|
|
115
|
+
echo "java"
|
|
116
|
+
fi
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
echoerr () {
|
|
120
|
+
echo 1>&2 "$@"
|
|
121
|
+
}
|
|
122
|
+
vlog () {
|
|
123
|
+
[[ $verbose || $debug ]] && echoerr "$@"
|
|
124
|
+
}
|
|
125
|
+
dlog () {
|
|
126
|
+
[[ $debug ]] && echoerr "$@"
|
|
127
|
+
}
|
|
128
|
+
execRunner () {
|
|
129
|
+
# print the arguments one to a line, quoting any containing spaces
|
|
130
|
+
[[ $verbose || $debug ]] && echo "# Executing command line:" && {
|
|
131
|
+
for arg; do
|
|
132
|
+
if printf "%s\n" "$arg" | grep -q ' '; then
|
|
133
|
+
printf "\"%s\"\n" "$arg"
|
|
134
|
+
else
|
|
135
|
+
printf "%s\n" "$arg"
|
|
136
|
+
fi
|
|
137
|
+
done
|
|
138
|
+
echo ""
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
# we use "exec" here for our pids to be accurate.
|
|
142
|
+
exec "$@"
|
|
143
|
+
}
|
|
144
|
+
addJava () {
|
|
145
|
+
dlog "[addJava] arg = '$1'"
|
|
146
|
+
java_args+=( "$1" )
|
|
147
|
+
}
|
|
148
|
+
addApp () {
|
|
149
|
+
dlog "[addApp] arg = '$1'"
|
|
150
|
+
app_commands+=( "$1" )
|
|
151
|
+
}
|
|
152
|
+
addResidual () {
|
|
153
|
+
dlog "[residual] arg = '$1'"
|
|
154
|
+
residual_args+=( "$1" )
|
|
155
|
+
}
|
|
156
|
+
addDebugger () {
|
|
157
|
+
addJava "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=$1"
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
require_arg () {
|
|
161
|
+
local type="$1"
|
|
162
|
+
local opt="$2"
|
|
163
|
+
local arg="$3"
|
|
164
|
+
if [[ -z "$arg" ]] || [[ "${arg:0:1}" == "-" ]]; then
|
|
165
|
+
die "$opt requires <$type> argument"
|
|
166
|
+
fi
|
|
167
|
+
}
|
|
168
|
+
is_function_defined() {
|
|
169
|
+
declare -f "$1" > /dev/null
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
# Attempt to detect if the script is running via a GUI or not
|
|
173
|
+
# TODO - Determine where/how we use this generically
|
|
174
|
+
detect_terminal_for_ui() {
|
|
175
|
+
[[ ! -t 0 ]] && [[ "${#residual_args}" == "0" ]] && {
|
|
176
|
+
echo "true"
|
|
177
|
+
}
|
|
178
|
+
# SPECIAL TEST FOR MAC
|
|
179
|
+
[[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]] && [[ "${#residual_args}" == "0" ]] && {
|
|
180
|
+
echo "true"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
# Processes incoming arguments and places them in appropriate global variables. called by the run method.
|
|
185
|
+
process_args () {
|
|
186
|
+
local no_more_snp_opts=0
|
|
187
|
+
while [[ $# -gt 0 ]]; do
|
|
188
|
+
case "$1" in
|
|
189
|
+
--) shift && no_more_snp_opts=1 && break ;;
|
|
190
|
+
-h|-help) usage; exit 1 ;;
|
|
191
|
+
-v|-verbose) verbose=1 && shift ;;
|
|
192
|
+
-d|-debug) debug=1 && shift ;;
|
|
193
|
+
|
|
194
|
+
-no-version-check) no_version_check=1 && shift ;;
|
|
195
|
+
|
|
196
|
+
-mem) echo "!! WARNING !! -mem option is ignored. Please use -J-Xmx and -J-Xms" && shift 2 ;;
|
|
197
|
+
-jvm-debug) require_arg port "$1" "$2" && addDebugger $2 && shift 2 ;;
|
|
198
|
+
|
|
199
|
+
-main) custom_mainclass="$2" && shift 2 ;;
|
|
200
|
+
|
|
201
|
+
-java-home) require_arg path "$1" "$2" && jre=`eval echo $2` && java_cmd="$jre/bin/java" && shift 2 ;;
|
|
202
|
+
|
|
203
|
+
-D*|-agentlib*|-XX*) addJava "$1" && shift ;;
|
|
204
|
+
-J*) addJava "${1:2}" && shift ;;
|
|
205
|
+
*) addResidual "$1" && shift ;;
|
|
206
|
+
esac
|
|
207
|
+
done
|
|
208
|
+
|
|
209
|
+
if [[ no_more_snp_opts ]]; then
|
|
210
|
+
while [[ $# -gt 0 ]]; do
|
|
211
|
+
addResidual "$1" && shift
|
|
212
|
+
done
|
|
213
|
+
fi
|
|
214
|
+
|
|
215
|
+
is_function_defined process_my_args && {
|
|
216
|
+
myargs=("${residual_args[@]}")
|
|
217
|
+
residual_args=()
|
|
218
|
+
process_my_args "${myargs[@]}"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
# Actually runs the script.
|
|
223
|
+
run() {
|
|
224
|
+
# TODO - check for sane environment
|
|
225
|
+
|
|
226
|
+
# process the combined args, then reset "$@" to the residuals
|
|
227
|
+
process_args "$@"
|
|
228
|
+
set -- "${residual_args[@]}"
|
|
229
|
+
argumentCount=$#
|
|
230
|
+
|
|
231
|
+
#check for jline terminal fixes on cygwin
|
|
232
|
+
if is_cygwin; then
|
|
233
|
+
stty -icanon min 1 -echo > /dev/null 2>&1
|
|
234
|
+
addJava "-Djline.terminal=jline.UnixTerminal"
|
|
235
|
+
addJava "-Dsbt.cygwin=true"
|
|
236
|
+
fi
|
|
237
|
+
|
|
238
|
+
# check java version
|
|
239
|
+
if [[ ! $no_version_check ]]; then
|
|
240
|
+
java_version_check
|
|
241
|
+
fi
|
|
242
|
+
|
|
243
|
+
if [ -n "$custom_mainclass" ]; then
|
|
244
|
+
mainclass=("$custom_mainclass")
|
|
245
|
+
else
|
|
246
|
+
mainclass=("${app_mainclass[@]}")
|
|
247
|
+
fi
|
|
248
|
+
|
|
249
|
+
# Now we check to see if there are any java opts on the environment. These get listed first, with the script able to override them.
|
|
250
|
+
if [[ "$JAVA_OPTS" != "" ]]; then
|
|
251
|
+
java_opts="${JAVA_OPTS}"
|
|
252
|
+
fi
|
|
253
|
+
|
|
254
|
+
# run sbt
|
|
255
|
+
execRunner "$java_cmd" \
|
|
256
|
+
${java_opts[@]} \
|
|
257
|
+
"${java_args[@]}" \
|
|
258
|
+
-cp "$(fix_classpath "$app_classpath")" \
|
|
259
|
+
"${mainclass[@]}" \
|
|
260
|
+
"${app_commands[@]}" \
|
|
261
|
+
"${residual_args[@]}"
|
|
262
|
+
|
|
263
|
+
local exit_code=$?
|
|
264
|
+
if is_cygwin; then
|
|
265
|
+
stty icanon echo > /dev/null 2>&1
|
|
266
|
+
fi
|
|
267
|
+
exit $exit_code
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
# Loads a configuration file full of default command line options for this script.
|
|
271
|
+
loadConfigFile() {
|
|
272
|
+
cat "$1" | sed $'/^\#/d;s/\r$//'
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
# Now check to see if it's a good enough version
|
|
276
|
+
# TODO - Check to see if we have a configured default java version, otherwise use 1.6
|
|
277
|
+
java_version_check() {
|
|
278
|
+
readonly java_version=$("$java_cmd" -version 2>&1 | awk -F '"' '/version/ {print $2}')
|
|
279
|
+
if [[ "$java_version" == "" ]]; then
|
|
280
|
+
echo
|
|
281
|
+
echo No java installations was detected.
|
|
282
|
+
echo Please go to http://www.java.com/getjava/ and download
|
|
283
|
+
echo
|
|
284
|
+
exit 1
|
|
285
|
+
else
|
|
286
|
+
local major=$(echo "$java_version" | cut -d'.' -f1)
|
|
287
|
+
if [[ "$major" -eq "1" ]]; then
|
|
288
|
+
local major=$(echo "$java_version" | cut -d'.' -f2)
|
|
289
|
+
fi
|
|
290
|
+
if [[ "$major" -lt "6" ]]; then
|
|
291
|
+
echo
|
|
292
|
+
echo The java installation you have is not up to date
|
|
293
|
+
echo $app_name requires at least version 1.6+, you have
|
|
294
|
+
echo version $java_version
|
|
295
|
+
echo
|
|
296
|
+
echo Please go to http://www.java.com/getjava/ and download
|
|
297
|
+
echo a valid Java Runtime and install before running $app_name.
|
|
298
|
+
echo
|
|
299
|
+
exit 1
|
|
300
|
+
fi
|
|
301
|
+
fi
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
### ------------------------------- ###
|
|
305
|
+
### Start of customized settings ###
|
|
306
|
+
### ------------------------------- ###
|
|
307
|
+
usage() {
|
|
308
|
+
cat <<EOM
|
|
309
|
+
Usage: $script_name [options]
|
|
310
|
+
|
|
311
|
+
-h | -help print this message
|
|
312
|
+
-v | -verbose this runner is chattier
|
|
313
|
+
-d | -debug enable debug output for the launcher script
|
|
314
|
+
-no-version-check Don't run the java version check.
|
|
315
|
+
-main <classname> Define a custom main class
|
|
316
|
+
-jvm-debug <port> Turn on JVM debugging, open at the given port.
|
|
317
|
+
|
|
318
|
+
# java version (default: java from PATH, currently $(java -version 2>&1 | grep version))
|
|
319
|
+
-java-home <path> alternate JAVA_HOME
|
|
320
|
+
|
|
321
|
+
# jvm options and output control
|
|
322
|
+
JAVA_OPTS environment variable, if unset uses "$java_opts"
|
|
323
|
+
-Dkey=val pass -Dkey=val directly to the java runtime
|
|
324
|
+
-J-X pass option -X directly to the java runtime
|
|
325
|
+
(-J is stripped)
|
|
326
|
+
|
|
327
|
+
# special option
|
|
328
|
+
-- To stop parsing built-in commands from the rest of the command-line.
|
|
329
|
+
e.g.) enabling debug and sending -d as app argument
|
|
330
|
+
\$ ./start-script -d -- -d
|
|
331
|
+
|
|
332
|
+
In the case of duplicated or conflicting options, basically the order above
|
|
333
|
+
shows precedence: JAVA_OPTS lowest, command line options highest except "--".
|
|
334
|
+
Available main classes:
|
|
335
|
+
io.appthreat.atom.Atom
|
|
336
|
+
EOM
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
### ------------------------------- ###
|
|
340
|
+
### Main script ###
|
|
341
|
+
### ------------------------------- ###
|
|
342
|
+
|
|
343
|
+
declare -a residual_args
|
|
344
|
+
declare -a java_args
|
|
345
|
+
declare -a app_commands
|
|
346
|
+
declare -r real_script_path="$(realpath "$0")"
|
|
347
|
+
declare -r app_home="$(realpath "$(dirname "$real_script_path")")"
|
|
348
|
+
# TODO - Check whether this is ok in cygwin...
|
|
349
|
+
declare -r lib_dir="$(realpath "${app_home}/../lib")"
|
|
350
|
+
declare -a app_mainclass=(io.appthreat.atom.Atom)
|
|
351
|
+
|
|
352
|
+
declare -r script_conf_file="${app_home}/../conf/application.ini"
|
|
353
|
+
declare -r app_classpath="$lib_dir/io.appthreat.atom-1.0.0.jar:$lib_dir/org.scala-lang.scala3-library_3-3.3.0.jar:$lib_dir/com.github.pathikrit.better-files_3-3.9.2.jar:$lib_dir/com.github.scopt.scopt_3-4.1.0.jar:$lib_dir/org.apache.logging.log4j.log4j-core-2.19.0.jar:$lib_dir/org.apache.logging.log4j.log4j-slf4j2-impl-2.19.0.jar:$lib_dir/io.joern.c2cpg_3-1.1.1742.jar:$lib_dir/io.joern.dataflowengineoss_3-1.1.1742.jar:$lib_dir/io.joern.pysrc2cpg_3-1.1.1742.jar:$lib_dir/io.joern.javasrc2cpg_3-1.1.1742.jar:$lib_dir/io.joern.jssrc2cpg_3-1.1.1742.jar:$lib_dir/io.joern.jimple2cpg_3-1.1.1742.jar:$lib_dir/org.scala-lang.scala-library-2.13.10.jar:$lib_dir/org.apache.logging.log4j.log4j-api-2.19.0.jar:$lib_dir/org.slf4j.slf4j-api-2.0.7.jar:$lib_dir/io.joern.semanticcpg_3-1.1.1742.jar:$lib_dir/io.joern.x2cpg_3-1.1.1742.jar:$lib_dir/org.scala-lang.modules.scala-parallel-collections_3-1.0.4.jar:$lib_dir/com.diffplug.spotless.spotless-eclipse-cdt-10.5.0.jar:$lib_dir/org.jline.jline-3.23.0.jar:$lib_dir/org.antlr.antlr4-runtime-4.7.jar:$lib_dir/io.circe.circe-core_3-0.14.5.jar:$lib_dir/io.circe.circe-generic_3-0.14.5.jar:$lib_dir/io.circe.circe-parser_3-0.14.5.jar:$lib_dir/io.shiftleft.codepropertygraph_3-1.3.600.jar:$lib_dir/io.joern.javaparser-symbol-solver-core-3.24.3-SL3.jar:$lib_dir/org.gradle.gradle-tooling-api-7.6.1.jar:$lib_dir/org.projectlombok.lombok-1.18.28.jar:$lib_dir/org.scala-lang.modules.scala-parser-combinators_3-2.2.0.jar:$lib_dir/net.lingala.zip4j.zip4j-2.11.5.jar:$lib_dir/com.lihaoyi.upickle_3-2.0.0.jar:$lib_dir/com.fasterxml.jackson.core.jackson-databind-2.15.1.jar:$lib_dir/com.typesafe.config-1.4.2.jar:$lib_dir/com.michaelpollmeier.versionsort-1.0.11.jar:$lib_dir/org.soot-oss.soot-4.4.1.jar:$lib_dir/org.json4s.json4s-native_3-4.0.6.jar:$lib_dir/com.diffplug.spotless.spotless-eclipse-base-3.5.2.jar:$lib_dir/org.eclipse.platform.org.eclipse.core.filebuffers-3.7.200.jar:$lib_dir/io.circe.circe-numbers_3-0.14.5.jar:$lib_dir/org.typelevel.cats-core_3-2.9.0.jar:$lib_dir/io.circe.circe-jawn_3-0.14.5.jar:$lib_dir/io.shiftleft.codepropertygraph-protos_3-1.3.600.jar:$lib_dir/io.shiftleft.codepropertygraph-domain-classes_3-1.3.600.jar:$lib_dir/io.shiftleft.overflowdb-traversal_3-1.171.jar:$lib_dir/io.shiftleft.overflowdb-formats_3-1.171.jar:$lib_dir/io.joern.javaparser-core-3.24.3-SL3.jar:$lib_dir/org.javassist.javassist-3.29.0-GA.jar:$lib_dir/com.google.guava.guava-31.1-jre.jar:$lib_dir/com.lihaoyi.ujson_3-2.0.0.jar:$lib_dir/com.lihaoyi.upack_3-2.0.0.jar:$lib_dir/com.lihaoyi.upickle-implicits_3-2.0.0.jar:$lib_dir/com.fasterxml.jackson.core.jackson-annotations-2.15.1.jar:$lib_dir/com.fasterxml.jackson.core.jackson-core-2.15.1.jar:$lib_dir/commons-io.commons-io-2.7.jar:$lib_dir/org.smali.dexlib2-2.5.2.jar:$lib_dir/org.ow2.asm.asm-9.4.jar:$lib_dir/org.ow2.asm.asm-tree-9.4.jar:$lib_dir/org.ow2.asm.asm-util-9.4.jar:$lib_dir/org.ow2.asm.asm-commons-9.4.jar:$lib_dir/xmlpull.xmlpull-1.1.3.4d_b4_min.jar:$lib_dir/de.upb.cs.swt.axml-2.1.3.jar:$lib_dir/ca.mcgill.sable.polyglot-2006.jar:$lib_dir/de.upb.cs.swt.heros-1.2.3.jar:$lib_dir/ca.mcgill.sable.jasmin-3.0.3.jar:$lib_dir/javax.annotation.javax.annotation-api-1.3.2.jar:$lib_dir/javax.xml.bind.jaxb-api-2.4.0-b180830.0359.jar:$lib_dir/org.glassfish.jaxb.jaxb-runtime-2.4.0-b180830.0438.jar:$lib_dir/com.google.protobuf.protobuf-java-3.21.7.jar:$lib_dir/com.google.protobuf.protobuf-java-util-3.21.2.jar:$lib_dir/org.json4s.json4s-core_3-4.0.6.jar:$lib_dir/org.json4s.json4s-native-core_3-4.0.6.jar:$lib_dir/org.eclipse.platform.org.eclipse.core.resources-3.18.200.jar:$lib_dir/org.eclipse.platform.org.eclipse.core.runtime-3.26.100.jar:$lib_dir/org.eclipse.platform.org.eclipse.text-3.12.300.jar:$lib_dir/org.eclipse.platform.org.eclipse.core.filesystem-1.9.500.jar:$lib_dir/org.typelevel.cats-kernel_3-2.9.0.jar:$lib_dir/org.typelevel.jawn-parser_3-1.4.0.jar:$lib_dir/io.shiftleft.overflowdb-core-1.171.jar:$lib_dir/net.oneandone.reflections8.reflections8-0.11.7.jar:$lib_dir/com.massisframework.j-text-utils-0.3.4.jar:$lib_dir/com.github.tototoshi.scala-csv_3-1.3.10.jar:$lib_dir/org.scala-lang.modules.scala-xml_3-2.1.0.jar:$lib_dir/io.spray.spray-json_3-1.3.6.jar:$lib_dir/com.google.guava.failureaccess-1.0.1.jar:$lib_dir/com.google.guava.listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:$lib_dir/com.google.code.findbugs.jsr305-3.0.2.jar:$lib_dir/org.checkerframework.checker-qual-3.12.0.jar:$lib_dir/com.google.errorprone.error_prone_annotations-2.11.0.jar:$lib_dir/com.google.j2objc.j2objc-annotations-1.3.jar:$lib_dir/com.lihaoyi.upickle-core_3-2.0.0.jar:$lib_dir/org.ow2.asm.asm-analysis-9.4.jar:$lib_dir/org.functionaljava.functionaljava-4.2.jar:$lib_dir/ca.mcgill.sable.java_cup-0.9.2.jar:$lib_dir/javax.activation.javax.activation-api-1.2.0.jar:$lib_dir/org.glassfish.jaxb.txw2-2.4.0-b180830.0438.jar:$lib_dir/com.sun.istack.istack-commons-runtime-3.0.7.jar:$lib_dir/org.jvnet.staxex.stax-ex-1.8.jar:$lib_dir/com.sun.xml.fastinfoset.FastInfoset-1.2.15.jar:$lib_dir/com.google.code.gson.gson-2.8.9.jar:$lib_dir/org.json4s.json4s-ast_3-4.0.6.jar:$lib_dir/org.json4s.json4s-scalap_3-4.0.6.jar:$lib_dir/com.thoughtworks.paranamer.paranamer-2.8.jar:$lib_dir/org.eclipse.platform.org.eclipse.osgi-3.18.300.jar:$lib_dir/org.eclipse.platform.org.eclipse.equinox.common-3.17.0.jar:$lib_dir/org.eclipse.platform.org.eclipse.core.jobs-3.13.200.jar:$lib_dir/org.eclipse.platform.org.eclipse.equinox.registry-3.11.200.jar:$lib_dir/org.eclipse.platform.org.eclipse.equinox.preferences-3.10.100.jar:$lib_dir/org.eclipse.platform.org.eclipse.core.contenttype-3.8.200.jar:$lib_dir/org.eclipse.platform.org.eclipse.equinox.app-1.6.200.jar:$lib_dir/org.eclipse.platform.org.eclipse.core.commands-3.10.300.jar:$lib_dir/net.sf.trove4j.core-3.1.0.jar:$lib_dir/org.msgpack.msgpack-core-0.9.1.jar:$lib_dir/com.h2database.h2-mvstore-1.4.200.jar:$lib_dir/commons-lang.commons-lang-2.6.jar:$lib_dir/au.com.bytecode.opencsv-2.4.jar:$lib_dir/com.lihaoyi.geny_3-0.7.1.jar:$lib_dir/org.osgi.org.osgi.service.prefs-1.1.2.jar:$lib_dir/org.osgi.osgi.annotation-8.0.1.jar"
|
|
354
|
+
|
|
355
|
+
# java_cmd is overrode in process_args when -java-home is used
|
|
356
|
+
declare java_cmd=$(get_java_cmd)
|
|
357
|
+
|
|
358
|
+
# if configuration files exist, prepend their contents to $@ so it can be processed by this runner
|
|
359
|
+
[[ -f "$script_conf_file" ]] && set -- $(loadConfigFile "$script_conf_file") "$@"
|
|
360
|
+
|
|
361
|
+
run "$@"
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
@REM atom launcher script
|
|
2
|
+
@REM
|
|
3
|
+
@REM Environment:
|
|
4
|
+
@REM JAVA_HOME - location of a JDK home dir (optional if java on path)
|
|
5
|
+
@REM CFG_OPTS - JVM options (optional)
|
|
6
|
+
@REM Configuration:
|
|
7
|
+
@REM ATOM_config.txt found in the ATOM_HOME.
|
|
8
|
+
@setlocal enabledelayedexpansion
|
|
9
|
+
@setlocal enableextensions
|
|
10
|
+
|
|
11
|
+
@echo off
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
if "%ATOM_HOME%"=="" (
|
|
15
|
+
set "APP_HOME=%~dp0\\.."
|
|
16
|
+
|
|
17
|
+
rem Also set the old env name for backwards compatibility
|
|
18
|
+
set "ATOM_HOME=%~dp0\\.."
|
|
19
|
+
) else (
|
|
20
|
+
set "APP_HOME=%ATOM_HOME%"
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
set "APP_LIB_DIR=%APP_HOME%\lib\"
|
|
24
|
+
|
|
25
|
+
rem Detect if we were double clicked, although theoretically A user could
|
|
26
|
+
rem manually run cmd /c
|
|
27
|
+
for %%x in (!cmdcmdline!) do if %%~x==/c set DOUBLECLICKED=1
|
|
28
|
+
|
|
29
|
+
rem FIRST we load the config file of extra options.
|
|
30
|
+
set "CFG_FILE=%APP_HOME%\ATOM_config.txt"
|
|
31
|
+
set CFG_OPTS=
|
|
32
|
+
call :parse_config "%CFG_FILE%" CFG_OPTS
|
|
33
|
+
|
|
34
|
+
rem We use the value of the JAVA_OPTS environment variable if defined, rather than the config.
|
|
35
|
+
set _JAVA_OPTS=%JAVA_OPTS%
|
|
36
|
+
if "!_JAVA_OPTS!"=="" set _JAVA_OPTS=!CFG_OPTS!
|
|
37
|
+
|
|
38
|
+
rem We keep in _JAVA_PARAMS all -J-prefixed and -D-prefixed arguments
|
|
39
|
+
rem "-J" is stripped, "-D" is left as is, and everything is appended to JAVA_OPTS
|
|
40
|
+
set _JAVA_PARAMS=
|
|
41
|
+
set _APP_ARGS=
|
|
42
|
+
|
|
43
|
+
set "APP_CLASSPATH=%APP_LIB_DIR%\io.appthreat.atom-1.0.0.jar;%APP_LIB_DIR%\org.scala-lang.scala3-library_3-3.3.0.jar;%APP_LIB_DIR%\com.github.pathikrit.better-files_3-3.9.2.jar;%APP_LIB_DIR%\com.github.scopt.scopt_3-4.1.0.jar;%APP_LIB_DIR%\org.apache.logging.log4j.log4j-core-2.19.0.jar;%APP_LIB_DIR%\org.apache.logging.log4j.log4j-slf4j2-impl-2.19.0.jar;%APP_LIB_DIR%\io.joern.c2cpg_3-1.1.1742.jar;%APP_LIB_DIR%\io.joern.dataflowengineoss_3-1.1.1742.jar;%APP_LIB_DIR%\io.joern.pysrc2cpg_3-1.1.1742.jar;%APP_LIB_DIR%\io.joern.javasrc2cpg_3-1.1.1742.jar;%APP_LIB_DIR%\io.joern.jssrc2cpg_3-1.1.1742.jar;%APP_LIB_DIR%\io.joern.jimple2cpg_3-1.1.1742.jar;%APP_LIB_DIR%\org.scala-lang.scala-library-2.13.10.jar;%APP_LIB_DIR%\org.apache.logging.log4j.log4j-api-2.19.0.jar;%APP_LIB_DIR%\org.slf4j.slf4j-api-2.0.7.jar;%APP_LIB_DIR%\io.joern.semanticcpg_3-1.1.1742.jar;%APP_LIB_DIR%\io.joern.x2cpg_3-1.1.1742.jar;%APP_LIB_DIR%\org.scala-lang.modules.scala-parallel-collections_3-1.0.4.jar;%APP_LIB_DIR%\com.diffplug.spotless.spotless-eclipse-cdt-10.5.0.jar;%APP_LIB_DIR%\org.jline.jline-3.23.0.jar;%APP_LIB_DIR%\org.antlr.antlr4-runtime-4.7.jar;%APP_LIB_DIR%\io.circe.circe-core_3-0.14.5.jar;%APP_LIB_DIR%\io.circe.circe-generic_3-0.14.5.jar;%APP_LIB_DIR%\io.circe.circe-parser_3-0.14.5.jar;%APP_LIB_DIR%\io.shiftleft.codepropertygraph_3-1.3.600.jar;%APP_LIB_DIR%\io.joern.javaparser-symbol-solver-core-3.24.3-SL3.jar;%APP_LIB_DIR%\org.gradle.gradle-tooling-api-7.6.1.jar;%APP_LIB_DIR%\org.projectlombok.lombok-1.18.28.jar;%APP_LIB_DIR%\org.scala-lang.modules.scala-parser-combinators_3-2.2.0.jar;%APP_LIB_DIR%\net.lingala.zip4j.zip4j-2.11.5.jar;%APP_LIB_DIR%\com.lihaoyi.upickle_3-2.0.0.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-databind-2.15.1.jar;%APP_LIB_DIR%\com.typesafe.config-1.4.2.jar;%APP_LIB_DIR%\com.michaelpollmeier.versionsort-1.0.11.jar;%APP_LIB_DIR%\org.soot-oss.soot-4.4.1.jar;%APP_LIB_DIR%\org.json4s.json4s-native_3-4.0.6.jar;%APP_LIB_DIR%\com.diffplug.spotless.spotless-eclipse-base-3.5.2.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.core.filebuffers-3.7.200.jar;%APP_LIB_DIR%\io.circe.circe-numbers_3-0.14.5.jar;%APP_LIB_DIR%\org.typelevel.cats-core_3-2.9.0.jar;%APP_LIB_DIR%\io.circe.circe-jawn_3-0.14.5.jar;%APP_LIB_DIR%\io.shiftleft.codepropertygraph-protos_3-1.3.600.jar;%APP_LIB_DIR%\io.shiftleft.codepropertygraph-domain-classes_3-1.3.600.jar;%APP_LIB_DIR%\io.shiftleft.overflowdb-traversal_3-1.171.jar;%APP_LIB_DIR%\io.shiftleft.overflowdb-formats_3-1.171.jar;%APP_LIB_DIR%\io.joern.javaparser-core-3.24.3-SL3.jar;%APP_LIB_DIR%\org.javassist.javassist-3.29.0-GA.jar;%APP_LIB_DIR%\com.google.guava.guava-31.1-jre.jar;%APP_LIB_DIR%\com.lihaoyi.ujson_3-2.0.0.jar;%APP_LIB_DIR%\com.lihaoyi.upack_3-2.0.0.jar;%APP_LIB_DIR%\com.lihaoyi.upickle-implicits_3-2.0.0.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-annotations-2.15.1.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-core-2.15.1.jar;%APP_LIB_DIR%\commons-io.commons-io-2.7.jar;%APP_LIB_DIR%\org.smali.dexlib2-2.5.2.jar;%APP_LIB_DIR%\org.ow2.asm.asm-9.4.jar;%APP_LIB_DIR%\org.ow2.asm.asm-tree-9.4.jar;%APP_LIB_DIR%\org.ow2.asm.asm-util-9.4.jar;%APP_LIB_DIR%\org.ow2.asm.asm-commons-9.4.jar;%APP_LIB_DIR%\xmlpull.xmlpull-1.1.3.4d_b4_min.jar;%APP_LIB_DIR%\de.upb.cs.swt.axml-2.1.3.jar;%APP_LIB_DIR%\ca.mcgill.sable.polyglot-2006.jar;%APP_LIB_DIR%\de.upb.cs.swt.heros-1.2.3.jar;%APP_LIB_DIR%\ca.mcgill.sable.jasmin-3.0.3.jar;%APP_LIB_DIR%\javax.annotation.javax.annotation-api-1.3.2.jar;%APP_LIB_DIR%\javax.xml.bind.jaxb-api-2.4.0-b180830.0359.jar;%APP_LIB_DIR%\org.glassfish.jaxb.jaxb-runtime-2.4.0-b180830.0438.jar;%APP_LIB_DIR%\com.google.protobuf.protobuf-java-3.21.7.jar;%APP_LIB_DIR%\com.google.protobuf.protobuf-java-util-3.21.2.jar;%APP_LIB_DIR%\org.json4s.json4s-core_3-4.0.6.jar;%APP_LIB_DIR%\org.json4s.json4s-native-core_3-4.0.6.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.core.resources-3.18.200.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.core.runtime-3.26.100.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.text-3.12.300.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.core.filesystem-1.9.500.jar;%APP_LIB_DIR%\org.typelevel.cats-kernel_3-2.9.0.jar;%APP_LIB_DIR%\org.typelevel.jawn-parser_3-1.4.0.jar;%APP_LIB_DIR%\io.shiftleft.overflowdb-core-1.171.jar;%APP_LIB_DIR%\net.oneandone.reflections8.reflections8-0.11.7.jar;%APP_LIB_DIR%\com.massisframework.j-text-utils-0.3.4.jar;%APP_LIB_DIR%\com.github.tototoshi.scala-csv_3-1.3.10.jar;%APP_LIB_DIR%\org.scala-lang.modules.scala-xml_3-2.1.0.jar;%APP_LIB_DIR%\io.spray.spray-json_3-1.3.6.jar;%APP_LIB_DIR%\com.google.guava.failureaccess-1.0.1.jar;%APP_LIB_DIR%\com.google.guava.listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;%APP_LIB_DIR%\com.google.code.findbugs.jsr305-3.0.2.jar;%APP_LIB_DIR%\org.checkerframework.checker-qual-3.12.0.jar;%APP_LIB_DIR%\com.google.errorprone.error_prone_annotations-2.11.0.jar;%APP_LIB_DIR%\com.google.j2objc.j2objc-annotations-1.3.jar;%APP_LIB_DIR%\com.lihaoyi.upickle-core_3-2.0.0.jar;%APP_LIB_DIR%\org.ow2.asm.asm-analysis-9.4.jar;%APP_LIB_DIR%\org.functionaljava.functionaljava-4.2.jar;%APP_LIB_DIR%\ca.mcgill.sable.java_cup-0.9.2.jar;%APP_LIB_DIR%\javax.activation.javax.activation-api-1.2.0.jar;%APP_LIB_DIR%\org.glassfish.jaxb.txw2-2.4.0-b180830.0438.jar;%APP_LIB_DIR%\com.sun.istack.istack-commons-runtime-3.0.7.jar;%APP_LIB_DIR%\org.jvnet.staxex.stax-ex-1.8.jar;%APP_LIB_DIR%\com.sun.xml.fastinfoset.FastInfoset-1.2.15.jar;%APP_LIB_DIR%\com.google.code.gson.gson-2.8.9.jar;%APP_LIB_DIR%\org.json4s.json4s-ast_3-4.0.6.jar;%APP_LIB_DIR%\org.json4s.json4s-scalap_3-4.0.6.jar;%APP_LIB_DIR%\com.thoughtworks.paranamer.paranamer-2.8.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.osgi-3.18.300.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.equinox.common-3.17.0.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.core.jobs-3.13.200.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.equinox.registry-3.11.200.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.equinox.preferences-3.10.100.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.core.contenttype-3.8.200.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.equinox.app-1.6.200.jar;%APP_LIB_DIR%\org.eclipse.platform.org.eclipse.core.commands-3.10.300.jar;%APP_LIB_DIR%\net.sf.trove4j.core-3.1.0.jar;%APP_LIB_DIR%\org.msgpack.msgpack-core-0.9.1.jar;%APP_LIB_DIR%\com.h2database.h2-mvstore-1.4.200.jar;%APP_LIB_DIR%\commons-lang.commons-lang-2.6.jar;%APP_LIB_DIR%\au.com.bytecode.opencsv-2.4.jar;%APP_LIB_DIR%\com.lihaoyi.geny_3-0.7.1.jar;%APP_LIB_DIR%\org.osgi.org.osgi.service.prefs-1.1.2.jar;%APP_LIB_DIR%\org.osgi.osgi.annotation-8.0.1.jar"
|
|
44
|
+
set "APP_MAIN_CLASS=io.appthreat.atom.Atom"
|
|
45
|
+
set "SCRIPT_CONF_FILE=%APP_HOME%\conf\application.ini"
|
|
46
|
+
|
|
47
|
+
rem Bundled JRE has priority over standard environment variables
|
|
48
|
+
if defined BUNDLED_JVM (
|
|
49
|
+
set "_JAVACMD=%BUNDLED_JVM%\bin\java.exe"
|
|
50
|
+
) else (
|
|
51
|
+
if "%JAVACMD%" neq "" (
|
|
52
|
+
set "_JAVACMD=%JAVACMD%"
|
|
53
|
+
) else (
|
|
54
|
+
if "%JAVA_HOME%" neq "" (
|
|
55
|
+
if exist "%JAVA_HOME%\bin\java.exe" set "_JAVACMD=%JAVA_HOME%\bin\java.exe"
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
if "%_JAVACMD%"=="" set _JAVACMD=java
|
|
61
|
+
|
|
62
|
+
rem Detect if this java is ok to use.
|
|
63
|
+
for /F %%j in ('"%_JAVACMD%" -version 2^>^&1') do (
|
|
64
|
+
if %%~j==java set JAVAINSTALLED=1
|
|
65
|
+
if %%~j==openjdk set JAVAINSTALLED=1
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
rem BAT has no logical or, so we do it OLD SCHOOL! Oppan Redmond Style
|
|
69
|
+
set JAVAOK=true
|
|
70
|
+
if not defined JAVAINSTALLED set JAVAOK=false
|
|
71
|
+
|
|
72
|
+
if "%JAVAOK%"=="false" (
|
|
73
|
+
echo.
|
|
74
|
+
echo A Java JDK is not installed or can't be found.
|
|
75
|
+
if not "%JAVA_HOME%"=="" (
|
|
76
|
+
echo JAVA_HOME = "%JAVA_HOME%"
|
|
77
|
+
)
|
|
78
|
+
echo.
|
|
79
|
+
echo Please go to
|
|
80
|
+
echo http://www.oracle.com/technetwork/java/javase/downloads/index.html
|
|
81
|
+
echo and download a valid Java JDK and install before running atom.
|
|
82
|
+
echo.
|
|
83
|
+
echo If you think this message is in error, please check
|
|
84
|
+
echo your environment variables to see if "java.exe" and "javac.exe" are
|
|
85
|
+
echo available via JAVA_HOME or PATH.
|
|
86
|
+
echo.
|
|
87
|
+
if defined DOUBLECLICKED pause
|
|
88
|
+
exit /B 1
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
rem if configuration files exist, prepend their contents to the script arguments so it can be processed by this runner
|
|
92
|
+
call :parse_config "%SCRIPT_CONF_FILE%" SCRIPT_CONF_ARGS
|
|
93
|
+
|
|
94
|
+
call :process_args %SCRIPT_CONF_ARGS% %%*
|
|
95
|
+
|
|
96
|
+
set _JAVA_OPTS=!_JAVA_OPTS! !_JAVA_PARAMS!
|
|
97
|
+
|
|
98
|
+
if defined CUSTOM_MAIN_CLASS (
|
|
99
|
+
set MAIN_CLASS=!CUSTOM_MAIN_CLASS!
|
|
100
|
+
) else (
|
|
101
|
+
set MAIN_CLASS=!APP_MAIN_CLASS!
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
rem Call the application and pass all arguments unchanged.
|
|
105
|
+
"%_JAVACMD%" !_JAVA_OPTS! !ATOM_OPTS! -cp "%APP_CLASSPATH%" %MAIN_CLASS% !_APP_ARGS!
|
|
106
|
+
|
|
107
|
+
@endlocal
|
|
108
|
+
|
|
109
|
+
exit /B %ERRORLEVEL%
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
rem Loads a configuration file full of default command line options for this script.
|
|
113
|
+
rem First argument is the path to the config file.
|
|
114
|
+
rem Second argument is the name of the environment variable to write to.
|
|
115
|
+
:parse_config
|
|
116
|
+
set _PARSE_FILE=%~1
|
|
117
|
+
set _PARSE_OUT=
|
|
118
|
+
if exist "%_PARSE_FILE%" (
|
|
119
|
+
FOR /F "tokens=* eol=# usebackq delims=" %%i IN ("%_PARSE_FILE%") DO (
|
|
120
|
+
set _PARSE_OUT=!_PARSE_OUT! %%i
|
|
121
|
+
)
|
|
122
|
+
)
|
|
123
|
+
set %2=!_PARSE_OUT!
|
|
124
|
+
exit /B 0
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
:add_java
|
|
128
|
+
set _JAVA_PARAMS=!_JAVA_PARAMS! %*
|
|
129
|
+
exit /B 0
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
:add_app
|
|
133
|
+
set _APP_ARGS=!_APP_ARGS! %*
|
|
134
|
+
exit /B 0
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
rem Processes incoming arguments and places them in appropriate global variables
|
|
138
|
+
:process_args
|
|
139
|
+
:param_loop
|
|
140
|
+
call set _PARAM1=%%1
|
|
141
|
+
set "_TEST_PARAM=%~1"
|
|
142
|
+
|
|
143
|
+
if ["!_PARAM1!"]==[""] goto param_afterloop
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
rem ignore arguments that do not start with '-'
|
|
147
|
+
if "%_TEST_PARAM:~0,1%"=="-" goto param_java_check
|
|
148
|
+
set _APP_ARGS=!_APP_ARGS! !_PARAM1!
|
|
149
|
+
shift
|
|
150
|
+
goto param_loop
|
|
151
|
+
|
|
152
|
+
:param_java_check
|
|
153
|
+
if "!_TEST_PARAM:~0,2!"=="-J" (
|
|
154
|
+
rem strip -J prefix
|
|
155
|
+
set _JAVA_PARAMS=!_JAVA_PARAMS! !_TEST_PARAM:~2!
|
|
156
|
+
shift
|
|
157
|
+
goto param_loop
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
if "!_TEST_PARAM:~0,2!"=="-D" (
|
|
161
|
+
rem test if this was double-quoted property "-Dprop=42"
|
|
162
|
+
for /F "delims== tokens=1,*" %%G in ("!_TEST_PARAM!") DO (
|
|
163
|
+
if not ["%%H"] == [""] (
|
|
164
|
+
set _JAVA_PARAMS=!_JAVA_PARAMS! !_PARAM1!
|
|
165
|
+
) else if [%2] neq [] (
|
|
166
|
+
rem it was a normal property: -Dprop=42 or -Drop="42"
|
|
167
|
+
call set _PARAM1=%%1=%%2
|
|
168
|
+
set _JAVA_PARAMS=!_JAVA_PARAMS! !_PARAM1!
|
|
169
|
+
shift
|
|
170
|
+
)
|
|
171
|
+
)
|
|
172
|
+
) else (
|
|
173
|
+
if "!_TEST_PARAM!"=="-main" (
|
|
174
|
+
call set CUSTOM_MAIN_CLASS=%%2
|
|
175
|
+
shift
|
|
176
|
+
) else (
|
|
177
|
+
set _APP_ARGS=!_APP_ARGS! !_PARAM1!
|
|
178
|
+
)
|
|
179
|
+
)
|
|
180
|
+
shift
|
|
181
|
+
goto param_loop
|
|
182
|
+
:param_afterloop
|
|
183
|
+
|
|
184
|
+
exit /B 0
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/plugins/atom-1.0.0/lib/org.eclipse.platform.org.eclipse.equinox.preferences-3.10.100.jar
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|