71 lines
2.3 KiB
XML
71 lines
2.3 KiB
XML
<?xml version="1.0"?>
|
|
<project name="Meterpreter" default="jar">
|
|
|
|
<target name="clean">
|
|
<delete dir="build" />
|
|
</target>
|
|
|
|
<target name="compile">
|
|
<mkdir dir="build/loader" />
|
|
<mkdir dir="build/meterpreter" />
|
|
<mkdir dir="build/stdapi" />
|
|
<javac srcdir="src/loader" destdir="build/loader" source="1.1" target="1.1" debug="no">
|
|
<include name="**/MemoryBufferURL*.java"/>
|
|
</javac>
|
|
<javac srcdir="src/meterpreter" destdir="build/meterpreter" source="1.1" target="1.1" debug="no">
|
|
<classpath>
|
|
<pathelement path="build/loader"/>
|
|
</classpath>
|
|
</javac>
|
|
<javac srcdir="src/stdapi" destdir="build/stdapi" source="1.1" target="1.1" debug="no">
|
|
<classpath>
|
|
<pathelement path="build/loader"/>
|
|
<pathelement path="build/meterpreter"/>
|
|
</classpath>
|
|
</javac>
|
|
</target>
|
|
|
|
<target name="jar" depends="compile">
|
|
<mkdir dir="extensions"/>
|
|
<jar destfile="extensions/meterpreter.jar" basedir="build/meterpreter" />
|
|
<jar destfile="extensions/ext_server_stdapi.jar" basedir="build/stdapi">
|
|
<manifest>
|
|
<attribute name="Extension-Loader" value="com.metasploit.meterpreter.stdapi.Loader"/>
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
<target name="fix-timestamps" depends="jar">
|
|
<mkdir dir="extensions/tmp"/>
|
|
<unzip src="extensions/meterpreter.jar" dest="extensions/tmp"/>
|
|
<touch datetime="01/01/2000 00:00 AM">
|
|
<fileset dir="extensions/tmp" includes="**/*"/>
|
|
</touch>
|
|
<delete file="extensions/meterpreter.jar" />
|
|
<zip destfile="extensions/meterpreter.jar">
|
|
<fileset dir="extensions/tmp" includes="META-INF/**" />
|
|
<fileset dir="extensions/tmp" excludes="META-INF/**" />
|
|
</zip>
|
|
<delete dir="extensions/tmp"/>
|
|
|
|
<mkdir dir="extensions/tmp"/>
|
|
<unzip src="extensions/ext_server_stdapi.jar" dest="extensions/tmp"/>
|
|
<touch datetime="01/01/2000 00:00 AM">
|
|
<fileset dir="extensions/tmp" includes="**/*"/>
|
|
</touch>
|
|
<delete file="extensions/ext_server_stdapi.jar" />
|
|
<zip destfile="extensions/ext_server_stdapi.jar">
|
|
<fileset dir="extensions/tmp" includes="META-INF/**" />
|
|
<fileset dir="extensions/tmp" excludes="META-INF/**" />
|
|
</zip>
|
|
<delete dir="extensions/tmp"/>
|
|
</target>
|
|
|
|
<target name="deploy" depends="fix-timestamps">
|
|
<copy todir="../../../../data/meterpreter">
|
|
<fileset dir="extensions">
|
|
</fileset>
|
|
</copy>
|
|
</target>
|
|
</project>
|