-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
executable file
·38 lines (26 loc) · 977 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
N := 501636842
# download pwned passwords file
pwned-passwords-2.0.txt.7z:
wget https://downloads.pwnedpasswords.com/passwords/pwned-passwords-2.0.txt.7z
test-filter:
bloom --gzip create -p 1e-6 -n 100 pwned-passwords-2.0.bloom.test.gz
7z x pwned-passwords-2.0.txt.7z -so | awk -F":" '{print $$1}' | head -n 100 | bloom --gzip insert pwned-passwords-2.0.bloom.test.gz
# create the Bloom filter
pwned-passwords-2.0.bloom: pwned-passwords-2.0.txt.7z
bloom --gzip create -p 1e-6 -n ${N} pwned-passwords-2.0.bloom.gz
7z x pwned-passwords-2.0.txt.7z -so | awk -F":" '{print $$1}' | bloom --gzip insert pwned-passwords-2.0.bloom.gz
bloom-filter: pwned-passwords-2.0.bloom.gz
bloom-tool:
go get github.com/dcso/bloom
go install github.com/dcso/bloom/bloom
test: bloom-tool server test-filter
run:
hibb
run-test:
hibb -f pwned-passwords-2.0.bloom.test.gz
server:
go get ./...
go install ./...
all: bloom-tool server bloom-filter
.DEFAULT_GOAL := all