-
Notifications
You must be signed in to change notification settings - Fork 11
/
bitcrack.sh
42 lines (37 loc) · 1.08 KB
/
bitcrack.sh
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
39
40
41
42
#!/bin/bash
# Author Dario Clavijo 2020
# GPLv3
set -x
DRIVEDIR='/content/drive/My Drive/BTC/'
OUT=$DRIVEDIR/out.txt
INPUT=$DRIVEDIR/INPUT.txt
RANGE="ffff:ffffffffffffffff"
COMPRESSION='compressed'
RANGE2=$(echo $RANGE | sed -e 's/:/_/g')
CONTINUE=$DRIVEDIR/bitcrack_continue.$COMPRESSION."$RANGE2".txt
MODEL=$(nvidia-smi | grep Tesla | awk '{ print $4 }')
if [ "$MODEL" == "T4" ]; then
COMPUTE_CAP=75
fi
if [ "$MODEL" == "P100-PCIE..." ]; then
COMPUTE_CAP=60
fi
if [ "$MODEL" == "P4" ]; then
COMPUTE_CAP=61
fi
if [ "$MODEL" == "K80" ]; then
COMPUTE_CAP=37
fi
mkdir '/content/drive/My Drive/BTC/'
EXTRA_OPTS=-b 36 -t 512 -p 2600
pwd
cd /content
#rm -rf BitCrack
git clone https://github.com/daedalus/BitCrack
cd BitCrack
#cat Makefile | sed -e "s/\/usr\/local\/cuda/\/usr\/local\/cuda-10.0\//g;s/COMPUTE_CAP=30/COMPUTE_CAP=$COMPUTE_CAP/g" > /tmp/Makefile
#mv /tmp/Makefile .
#grep Makefile -e COMPUTE_CAP
make BUILD_CUDA=1 COMPUTE_CAP=$COMPUTE_CAP -j 4
bin/cuBitCrack --compression "$COMPRESSION" --keyspace "$RANGE" --continue "$CONTINUE" --out "$OUT" --in "$INPUT" $EXTRA_OPTS
cd /content