<commit_before><project name="ZAP-Extensions" default="build-all" basedir=".">
	<description>Build ZAP extensions</description>

	<property name="src" location="../src" />
	<property name="build" location="build" />
	<property name="dist" location="zap-exts" />
	<property name="dist.lib.dir" location="../lib" />
	<!-- This assumes you also have the zaproxy project -->
	<property name="zap.plugin.dir" location="../../zaproxy/src/plugin" />

	<target name="clean">
		<delete dir="${dist}" includeEmptyDirs="true" />
		<delete dir="${build}" includeEmptyDirs="true" />
	</target>

	<target name="init">
		<!-- Create the build directory structure used by compile -->
		<mkdir dir="${dist}" />
		<mkdir dir="${build}" />
	</target>

	<target name="compile" depends="init" description="compile the source">
		<echo message="Compiling the source..." />
		<!-- Compile the java code from ${src} into ${build} -->
		<!--javac srcdir="${src}" destdir="${build}" classpath="zap.jar"/-->
		<javac srcdir="${src}" destdir="${build}">
			<classpath>
				<fileset dir="${dist.lib.dir}">
					<include name="**/*.jar" />
				</fileset>
			</classpath>
		</javac>
	</target>

	<!--
	 Build the specified extension
	 type should be one of:
	 	alpha
	 	beta
	 	release
	 	example
	 version should be an integer that increments on each release, starting at 1
	 -->

	<target name="build-csrfcountermeasures" description="build the CSRF Countermeasures extension">
		<antcall target="build-extension"> 
			<param name="extension" value="csrfcountermeasuresscan"/> 
			<param name="type" value="alpha"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>
	
	<target name="build-extension" description="build the specified extension">
		<jar jarfile="${dist}/zap-ext-${extension}-${type}-${version}.jar" update="true" compress="false">
			<zipfileset dir="${build}" prefix="">
				<include name="org/zaproxy/zap/extension/${extension}/**"/>
			</zipfileset>
			<zipfileset dir="${src}" prefix="">
				<include name="org/zaproxy/zap/extension/${extension}/Messages*"/>
			</zipfileset>
		</jar>
	</target>

	<target name="build-exampleActiveScan" description="build the exampleActiveScan extension">
		<antcall target="build-extension"> 
			<param name="extension" value="exampleActiveScan"/> 
			<param name="type" value="example"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>

	<target name="build-examplePassiveScan" description="build the examplePassiveScan extension">
		<antcall target="build-extension"> 
			<param name="extension" value="examplePassiveScan"/> 
			<param name="type" value="example"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>

	<target name="build-exampleRightClickMsg" description="build the exampleRightClickMsg extension">
		<antcall target="build-extension"> 
			<param name="extension" value="exampleRightClickMsg"/> 
			<param name="type" value="example"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>

	<target name="build-exampleTopMenu" description="build the exampleTopMenu extension">
		<antcall target="build-extension"> 
			<param name="extension" value="exampleTopMenu"/> 
			<param name="type" value="example"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>

	<target name="build-highlighter" description="build the highlighter extension">
		<antcall target="build-extension"> 
			<param name="extension" value="highlighter"/> 
			<param name="type" value="alpha"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>

	<target name="build-scripts" description="build the scripts extension">
		<antcall target="build-extension"> 
			<param name="extension" value="scripts"/> 
			<param name="type" value="beta"/> 
			<param name="version" value="3"/> 
		</antcall>
	</target>

	<target name="build-sessionfixation" description="build the SessionFixation extension">
		<antcall target="build-extension"> 
			<param name="extension" value="sessionfixationscan"/> 
			<param name="type" value="alpha"/> 
			<param name="version" value="6"/> 
		</antcall>
	</target>

	<target name="build-tokengen" description="build the tokengen extension">
		<!-- Cant use build-extension as other classes needed -->
		<!--antcall target="build-extension"> <param name="extension" value="tokengen"/> </antcall-->
		<property name="tokengen.type" value="alpha" />
		<property name="tokengen.version" value="1" />
		<jar jarfile="${dist}/zap-ext-tokengen-${tokengen.type}-${tokengen.version}.jar" update="true" compress="false">
			<zipfileset dir="${build}" prefix="">
				<include name="org/zaproxy/zap/extension/tokengen/**"/>
				<include name="com/fasteasytrade/JRandTest/**"/>
			</zipfileset>
			<zipfileset dir="${src}" prefix="">
				<include name="org/zaproxy/zap/extension/tokengen/Messages*"/>
			</zipfileset>
		</jar>
	</target>

	<target name="build-viewStatePScan" description="build the viewStatePScan extension">
		<antcall target="build-extension"> 
			<param name="extension" value="viewStatePScan"/> 
			<param name="type" value="alpha"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>
	
	<target name="build-all" depends="clean,compile" description="build all of the extensions">
		<!-- Keep in alphabetical order ;) -->
		<antcall target="build-csrfcountermeasures"/>
		<antcall target="build-exampleActiveScan"/>
		<antcall target="build-examplePassiveScan"/>
		<antcall target="build-exampleRightClickMsg"/>
		<antcall target="build-exampleTopMenu"/>
		<antcall target="build-highlighter"/>
		<antcall target="build-scripts"/>
		<antcall target="build-sessionfixation"/>
		<antcall target="build-tokengen"/>
		<antcall target="build-viewStatePScan"/>
	</target>

	<target name="deploy-extension" description="deploy the specified extension">
		<copy todir="${zap.plugin.dir}">
			<fileset dir="${dist}">
			<include name="zap-ext-${extension}-*.jar"/>
			</fileset>
		</copy>
		<!--copy file="${dist}/zap-ext-${extension}.jar" toDir="${zap.plugin.dir}" overwrite="true" /-->
	</target>

	<target name="deploy-csrfcountermeasures" description="deploy the csrfcountermeasures extension">
		<antcall target="deploy-extension"> <param name="extension" value="csrfcountermeasuresscan"/> </antcall>
	</target>

	<target name="deploy-exampleActiveScan" description="deploy the exampleActiveScan extension">
		<antcall target="deploy-extension"> <param name="extension" value="exampleActiveScan"/> </antcall>
	</target>

	<target name="deploy-examplePassiveScan" description="deploy the examplePassiveScan extension">
		<antcall target="deploy-extension"> <param name="extension" value="examplePassiveScan"/> </antcall>
	</target>

	<target name="deploy-exampleRightClickMsg" description="deploy the exampleRightClickMsg extension">
		<antcall target="deploy-extension"> <param name="extension" value="exampleRightClickMsg"/> </antcall>
	</target>

	<target name="deploy-exampleTopMenu" description="deploy the exampleTopMenu extension">
		<antcall target="deploy-extension"> <param name="extension" value="exampleTopMenu"/> </antcall>
	</target>

	<target name="deploy-highlighter" description="deploy the highlighter extension">
		<antcall target="deploy-extension"> <param name="extension" value="highlighter"/> </antcall>
	</target>

	<target name="deploy-scripts" description="deploy the scripts extension">
		<antcall target="deploy-extension"> <param name="extension" value="scripts"/> </antcall>
	</target>

	<target name="deploy-sessionfixationscan" description="deploy the sessionfixation extension">
		<antcall target="deploy-extension"> <param name="extension" value="sessionfixationscan"/> </antcall>
	</target>

	<target name="deploy-tokengen" description="deploy the tokengen extension">
		<antcall target="deploy-extension"> <param name="extension" value="tokengen"/> </antcall>
	</target>

	<target name="deploy-viewStatePScan" description="deploy the viewStatePScan extension">
		<antcall target="deploy-extension"> <param name="extension" value="viewStatePScan"/> </antcall>
	</target>
	
	<target name="deploy-all" depends="build-all" description="deploy all of the extensions">
		<!-- Keep in alphabetical order ;) -->
		<antcall target="deploy-csrfcountermeasures"/>
		<antcall target="deploy-exampleActiveScan"/>
		<antcall target="deploy-examplePassiveScan"/>
		<antcall target="deploy-exampleRightClickMsg"/>
		<antcall target="deploy-exampleTopMenu"/>
		<antcall target="deploy-highlighter"/>
		<antcall target="deploy-scripts"/>
		<antcall target="deploy-sessionfixationscan"/>
		<antcall target="deploy-tokengen"/>
		<antcall target="deploy-viewStatePScan"/>
	</target>

</project><commit_msg>Added support for 'Max-Age' directive in check for long-lived session ids<commit_after><project name="ZAP-Extensions" default="build-all" basedir=".">
	<description>Build ZAP extensions</description>

	<property name="src" location="../src" />
	<property name="build" location="build" />
	<property name="dist" location="zap-exts" />
	<property name="dist.lib.dir" location="../lib" />
	<!-- This assumes you also have the zaproxy project -->
	<property name="zap.plugin.dir" location="../../zaproxy/src/plugin" />

	<target name="clean">
		<delete dir="${dist}" includeEmptyDirs="true" />
		<delete dir="${build}" includeEmptyDirs="true" />
	</target>

	<target name="init">
		<!-- Create the build directory structure used by compile -->
		<mkdir dir="${dist}" />
		<mkdir dir="${build}" />
	</target>

	<target name="compile" depends="init" description="compile the source">
		<echo message="Compiling the source..." />
		<!-- Compile the java code from ${src} into ${build} -->
		<!--javac srcdir="${src}" destdir="${build}" classpath="zap.jar"/-->
		<javac srcdir="${src}" destdir="${build}">
			<classpath>
				<fileset dir="${dist.lib.dir}">
					<include name="**/*.jar" />
				</fileset>
			</classpath>
		</javac>
	</target>

	<!--
	 Build the specified extension
	 type should be one of:
	 	alpha
	 	beta
	 	release
	 	example
	 version should be an integer that increments on each release, starting at 1
	 -->

	<target name="build-csrfcountermeasures" description="build the CSRF Countermeasures extension">
		<antcall target="build-extension"> 
			<param name="extension" value="csrfcountermeasuresscan"/> 
			<param name="type" value="alpha"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>
	
	<target name="build-extension" description="build the specified extension">
		<jar jarfile="${dist}/zap-ext-${extension}-${type}-${version}.jar" update="true" compress="false">
			<zipfileset dir="${build}" prefix="">
				<include name="org/zaproxy/zap/extension/${extension}/**"/>
			</zipfileset>
			<zipfileset dir="${src}" prefix="">
				<include name="org/zaproxy/zap/extension/${extension}/Messages*"/>
			</zipfileset>
		</jar>
	</target>

	<target name="build-exampleActiveScan" description="build the exampleActiveScan extension">
		<antcall target="build-extension"> 
			<param name="extension" value="exampleActiveScan"/> 
			<param name="type" value="example"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>

	<target name="build-examplePassiveScan" description="build the examplePassiveScan extension">
		<antcall target="build-extension"> 
			<param name="extension" value="examplePassiveScan"/> 
			<param name="type" value="example"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>

	<target name="build-exampleRightClickMsg" description="build the exampleRightClickMsg extension">
		<antcall target="build-extension"> 
			<param name="extension" value="exampleRightClickMsg"/> 
			<param name="type" value="example"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>

	<target name="build-exampleTopMenu" description="build the exampleTopMenu extension">
		<antcall target="build-extension"> 
			<param name="extension" value="exampleTopMenu"/> 
			<param name="type" value="example"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>

	<target name="build-highlighter" description="build the highlighter extension">
		<antcall target="build-extension"> 
			<param name="extension" value="highlighter"/> 
			<param name="type" value="alpha"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>

	<target name="build-scripts" description="build the scripts extension">
		<antcall target="build-extension"> 
			<param name="extension" value="scripts"/> 
			<param name="type" value="beta"/> 
			<param name="version" value="3"/> 
		</antcall>
	</target>

	<target name="build-sessionfixation" description="build the SessionFixation extension">
		<antcall target="build-extension"> 
			<param name="extension" value="sessionfixationscan"/> 
			<param name="type" value="alpha"/> 
			<param name="version" value="8"/> 
		</antcall>
	</target>

	<target name="build-tokengen" description="build the tokengen extension">
		<!-- Cant use build-extension as other classes needed -->
		<!--antcall target="build-extension"> <param name="extension" value="tokengen"/> </antcall-->
		<property name="tokengen.type" value="alpha" />
		<property name="tokengen.version" value="1" />
		<jar jarfile="${dist}/zap-ext-tokengen-${tokengen.type}-${tokengen.version}.jar" update="true" compress="false">
			<zipfileset dir="${build}" prefix="">
				<include name="org/zaproxy/zap/extension/tokengen/**"/>
				<include name="com/fasteasytrade/JRandTest/**"/>
			</zipfileset>
			<zipfileset dir="${src}" prefix="">
				<include name="org/zaproxy/zap/extension/tokengen/Messages*"/>
			</zipfileset>
		</jar>
	</target>

	<target name="build-viewStatePScan" description="build the viewStatePScan extension">
		<antcall target="build-extension"> 
			<param name="extension" value="viewStatePScan"/> 
			<param name="type" value="alpha"/> 
			<param name="version" value="1"/> 
		</antcall>
	</target>
	
	<target name="build-all" depends="clean,compile" description="build all of the extensions">
		<!-- Keep in alphabetical order ;) -->
		<antcall target="build-csrfcountermeasures"/>
		<antcall target="build-exampleActiveScan"/>
		<antcall target="build-examplePassiveScan"/>
		<antcall target="build-exampleRightClickMsg"/>
		<antcall target="build-exampleTopMenu"/>
		<antcall target="build-highlighter"/>
		<antcall target="build-scripts"/>
		<antcall target="build-sessionfixation"/>
		<antcall target="build-tokengen"/>
		<antcall target="build-viewStatePScan"/>
	</target>

	<target name="deploy-extension" description="deploy the specified extension">
		<copy todir="${zap.plugin.dir}">
			<fileset dir="${dist}">
			<include name="zap-ext-${extension}-*.jar"/>
			</fileset>
		</copy>
		<!--copy file="${dist}/zap-ext-${extension}.jar" toDir="${zap.plugin.dir}" overwrite="true" /-->
	</target>

	<target name="deploy-csrfcountermeasures" description="deploy the csrfcountermeasures extension">
		<antcall target="deploy-extension"> <param name="extension" value="csrfcountermeasuresscan"/> </antcall>
	</target>

	<target name="deploy-exampleActiveScan" description="deploy the exampleActiveScan extension">
		<antcall target="deploy-extension"> <param name="extension" value="exampleActiveScan"/> </antcall>
	</target>

	<target name="deploy-examplePassiveScan" description="deploy the examplePassiveScan extension">
		<antcall target="deploy-extension"> <param name="extension" value="examplePassiveScan"/> </antcall>
	</target>

	<target name="deploy-exampleRightClickMsg" description="deploy the exampleRightClickMsg extension">
		<antcall target="deploy-extension"> <param name="extension" value="exampleRightClickMsg"/> </antcall>
	</target>

	<target name="deploy-exampleTopMenu" description="deploy the exampleTopMenu extension">
		<antcall target="deploy-extension"> <param name="extension" value="exampleTopMenu"/> </antcall>
	</target>

	<target name="deploy-highlighter" description="deploy the highlighter extension">
		<antcall target="deploy-extension"> <param name="extension" value="highlighter"/> </antcall>
	</target>

	<target name="deploy-scripts" description="deploy the scripts extension">
		<antcall target="deploy-extension"> <param name="extension" value="scripts"/> </antcall>
	</target>

	<target name="deploy-sessionfixationscan" description="deploy the sessionfixation extension">
		<antcall target="deploy-extension"> <param name="extension" value="sessionfixationscan"/> </antcall>
	</target>

	<target name="deploy-tokengen" description="deploy the tokengen extension">
		<antcall target="deploy-extension"> <param name="extension" value="tokengen"/> </antcall>
	</target>

	<target name="deploy-viewStatePScan" description="deploy the viewStatePScan extension">
		<antcall target="deploy-extension"> <param name="extension" value="viewStatePScan"/> </antcall>
	</target>
	
	<target name="deploy-all" depends="build-all" description="deploy all of the extensions">
		<!-- Keep in alphabetical order ;) -->
		<antcall target="deploy-csrfcountermeasures"/>
		<antcall target="deploy-exampleActiveScan"/>
		<antcall target="deploy-examplePassiveScan"/>
		<antcall target="deploy-exampleRightClickMsg"/>
		<antcall target="deploy-exampleTopMenu"/>
		<antcall target="deploy-highlighter"/>
		<antcall target="deploy-scripts"/>
		<antcall target="deploy-sessionfixationscan"/>
		<antcall target="deploy-tokengen"/>
		<antcall target="deploy-viewStatePScan"/>
	</target>

</project>
{'fraction_non_alphanumeric': 0.17772402672195348, 'fraction_numerical': 0.0012669891730016124, 'mean_word_length': 5.298512876314835, 'pattern_counts': {'":': 0, '<': 415, '<?xml version=': 0, '>': 415, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '754824', 'n_tokens_mistral': 5771, 'n_tokens_neox': 5181, 'n_words': 1151}