Skip to content

Commit af0691d

Browse files
committed
Add animal-sniffer-plugin for Android API
Include the animal-scents for Android API in this commit, so that users who do not have Android SDK can still check meterpreter API compatibility with Android API. Some classes, like screenshot have been excluded since they need AWT (but they are excluded in Android Meterpreter anyway). To regenerate the scents file, run mvn -Dandroid.sdk.path=... -P regenerate package
1 parent 4abeb1b commit af0691d

File tree

4 files changed

+167
-0
lines changed

4 files changed

+167
-0
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<project>
2+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>com.metasploit</groupId>
4+
<artifactId>android-api3-scents</artifactId>
5+
<version>1.5_r4</version>
6+
<packaging>pom</packaging>
7+
<build>
8+
<plugins>
9+
<plugin>
10+
<groupId>org.codehaus.mojo</groupId>
11+
<artifactId>build-helper-maven-plugin</artifactId>
12+
<version>1.8</version>
13+
<executions>
14+
<execution>
15+
<id>attach-artifacts</id>
16+
<phase>package</phase>
17+
<goals>
18+
<goal>attach-artifact</goal>
19+
</goals>
20+
<configuration>
21+
<artifacts>
22+
<artifact>
23+
<file>${project.artifactId}-${project.version}.signature</file>
24+
<type>signature</type>
25+
</artifact>
26+
</artifacts>
27+
</configuration>
28+
</execution>
29+
</executions>
30+
</plugin>
31+
</plugins>
32+
</build>
33+
<profiles>
34+
<profile>
35+
<!-- regenerate the .signature file like this: -->
36+
<!-- mvn -Dandroid.sdk.path=... -P regenerate package -->
37+
<id>regenerate</id>
38+
<build>
39+
<plugins>
40+
<plugin>
41+
<groupId>org.codehaus.mojo</groupId>
42+
<artifactId>animal-sniffer-maven-plugin</artifactId>
43+
<version>1.9</version>
44+
<executions>
45+
<execution>
46+
<id>regenerate</id>
47+
<phase>package</phase>
48+
<goals>
49+
<goal>build</goal>
50+
</goals>
51+
</execution>
52+
</executions>
53+
<configuration>
54+
<javaHomeClassPath>
55+
<javaHomeClassPath>${android.sdk.path}/platforms/android-3/android.jar</javaHomeClassPath>
56+
</javaHomeClassPath>
57+
</configuration>
58+
</plugin>
59+
<plugin>
60+
<artifactId>maven-antrun-plugin</artifactId>
61+
<version>1.7</version>
62+
<executions>
63+
<execution>
64+
<phase>package</phase>
65+
<goals>
66+
<goal>run</goal>
67+
</goals>
68+
<configuration>
69+
<target>
70+
<copy todir="${project.basedir}"
71+
file="${project.basedir}/target/${project.artifactId}-${project.version}.signature" />
72+
</target>
73+
</configuration>
74+
</execution>
75+
</executions>
76+
</plugin>
77+
</plugins>
78+
</build>
79+
</profile>
80+
</profiles>
81+
</project>
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.metasploit</groupId>
5+
<artifactId>Metasploit-JavaPayload-Compatibility-android-api3</artifactId>
6+
<parent>
7+
<groupId>com.metasploit</groupId>
8+
<artifactId>Metasploit-JavaPayload-Compatibility-parent</artifactId>
9+
<version>1-SNAPSHOT</version>
10+
</parent>
11+
<packaging>jar</packaging>
12+
<name>JavaPayload Compatibility Checks (Android API 3)</name>
13+
<url>http://www.metasploit.com/</url>
14+
<dependencies>
15+
<dependency>
16+
<groupId>com.google.android</groupId>
17+
<artifactId>android</artifactId>
18+
<version>1.5_r4</version>
19+
</dependency>
20+
</dependencies>
21+
<build>
22+
<plugins>
23+
<plugin>
24+
<groupId>org.apache.maven.plugins</groupId>
25+
<artifactId>maven-compiler-plugin</artifactId>
26+
<version>3.0</version>
27+
<configuration>
28+
<source>1.5</source>
29+
<target>1.5</target>
30+
</configuration>
31+
</plugin>
32+
<plugin>
33+
<artifactId>maven-antrun-plugin</artifactId>
34+
<version>1.7</version>
35+
<executions>
36+
<execution>
37+
<id>copy-source</id>
38+
<phase>generate-sources</phase>
39+
<goals>
40+
<goal>run</goal>
41+
</goals>
42+
<configuration>
43+
<target>
44+
<mkdir dir="${project.basedir}/target/generated-sources/copy/" />
45+
<copy todir="${project.basedir}/target/generated-sources/copy">
46+
<fileset dir="${project.basedir}/../java16/target/generated-sources/copy">
47+
<include name="**/*.java" />
48+
<exclude name="**/stdapi_net_config_get_interfaces_V1_6.java" />
49+
<exclude name="**/stdapi_fs_stat_V1_6.java" />
50+
<exclude name="**/stdapi_ui_desktop_screenshot_V1_4.java" />
51+
<exclude name="metasploit/PayloadApplet.java" />
52+
</fileset>
53+
<fileset dir="${project.basedir}/../../androidpayload/app/src" includes="**/*.java" excludes="**/MainActivity.java" />
54+
<fileset dir="${project.basedir}/../../androidpayload/library/src" includes="**/*.java" />
55+
</copy>
56+
</target>
57+
</configuration>
58+
</execution>
59+
</executions>
60+
</plugin>
61+
<plugin>
62+
<groupId>org.codehaus.mojo</groupId>
63+
<artifactId>animal-sniffer-maven-plugin</artifactId>
64+
<version>1.9</version>
65+
<executions>
66+
<execution>
67+
<id>verify-java</id>
68+
<phase>test</phase>
69+
<goals>
70+
<goal>check</goal>
71+
</goals>
72+
<configuration>
73+
<signature>
74+
<groupId>com.metasploit</groupId>
75+
<artifactId>android-api3-scents</artifactId>
76+
<version>1.5_r4</version>
77+
</signature>
78+
</configuration>
79+
</execution>
80+
</executions>
81+
</plugin>
82+
</plugins>
83+
</build>
84+
</project>

external/source/javapayload/version-compatibility-check/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,7 @@
5454
<module>java14</module>
5555
<module>java13</module>
5656
<module>java12</module>
57+
<module>android-api3-scents</module>
58+
<module>android-api3</module>
5759
</modules>
5860
</project>

0 commit comments

Comments
 (0)