<commit_before># sudo apt-get install libpcap-dev

SRC=knock-0.7
TAR=${SRC}.tar.gz
URL=http://www.zeroflux.org/proj/knock/files/${TAR}

all: knock.bc knockd.bc

${TAR}:
	wget ${URL}

${SRC}: ${TAR}
	tar xvfz ${TAR}

${SRC}/knockd: ${SRC}
	cd ${SRC}; CC=gclang ./configure; make; 

knockd.bc: ${SRC}/knockd modules
	get-bc -m -o knockd.bc ${SRC}/knockd

knock.bc: ${SRC}/knock modules
	get-bc -m -o knock.bc ${SRC}/knock

modules: ${SRC}/knockd
	cp ./knock-0.7/src/.knockd.o.bc knockd.o.bc
	cp ./knock-0.7/src/.list.o.bc list.o.bc


test: knockd.bc
	gclang knockd.o.bc list.o.bc -o knockd_from_bitcode -lpcap


clean:
	rm -rf *.bc *.llvm.manifest knockd_from_bitcode	knockd_slashed slash_specialized

spotless: clean
	rm -rf ${TAR} ${SRC}
<commit_msg>Makefile tweaks. (so as to not annoy JV)<commit_after># sudo apt-get install libpcap-dev

SRC=knock-0.7
TAR=${SRC}.tar.gz
URL=http://www.zeroflux.org/proj/knock/files/${TAR}

all: knock.bc knockd.bc

${TAR}:
	wget ${URL}

${SRC}: ${TAR}
	tar xvfz ${TAR}

${SRC}/knockd: ${SRC}
	cd ${SRC}; CC=gclang ./configure; make; 

knockd.bc: ${SRC}/knockd modules
	get-bc -m -o knockd.bc ${SRC}/knockd

knock.bc: ${SRC}/knock modules
	get-bc -m -o knock.bc ${SRC}/knock

modules: ${SRC}/knockd
	cp ./knock-0.7/src/.knockd.o.bc knockd.o.bc
	cp ./knock-0.7/src/.list.o.bc list.o.bc


test: knockd.bc
	gclang knockd.o.bc list.o.bc -o knockd_from_bitcode -lpcap


clean:
	rm -rf .*.o *.bc *.llvm.manifest knockd_from_bitcode	knockd_slashed slash_specialized

spotless: clean
	rm -rf ${TAR} ${SRC}

{'fraction_non_alphanumeric': 0.1906005221932115, 'fraction_numerical': 0.007832898172323759, 'mean_word_length': 3.5088235294117647, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3688143', 'n_tokens_mistral': 725, 'n_tokens_neox': 675, 'n_words': 152}