Fix zmap script
This commit is contained in:
parent
b584db73cc
commit
28e5196412
7
zmap.sh
7
zmap.sh
|
@ -4,6 +4,7 @@
|
|||
LOCAL_DATA_PATH=/data
|
||||
REMOTE_USER=root
|
||||
REMOTE_HOST=localhost
|
||||
REMOTE_KEY=~/.ssh/id_rsa
|
||||
REMOTE_DATA_PATH=/data
|
||||
REMOTE_TILES_PATH=/tiles
|
||||
REMOTE_IPMAP_PATH=/scripts/ipmap.py
|
||||
|
@ -28,10 +29,10 @@ CURRENT_REMOTE_TILES_PATH="$REMOTE_TILES_PATH/$DATE"
|
|||
|
||||
mkdir -p "$CURRENT_LOCAL_DATA_PATH" &&
|
||||
zmap -B '100M' -M icmp_echo_time '0.0.0.0/0' -f 'saddr,rtt_us,success' -o "$LOCAL_CSV_PATH" &&
|
||||
ssh "$REMOTE" "mkdir -p '$CURRENT_REMOTE_DATA_PATH'" &&
|
||||
scp "$LOCAL_CSV_PATH" "'$REMOTE':'$REMOTE_CSV_PATH'" &&
|
||||
ssh -i "$REMOTE_KEY" "$REMOTE" "mkdir -p '$CURRENT_REMOTE_DATA_PATH'" &&
|
||||
scp -i "$REMOTE_KEY" "$LOCAL_CSV_PATH" "$REMOTE:$REMOTE_CSV_PATH" &&
|
||||
rm "$LOCAL_CSV_PATH" &&
|
||||
ssh "$REMOTE" "
|
||||
ssh -i "$REMOTE_KEY" "$REMOTE" "
|
||||
'$REMOTE_IPMAP_PATH' convert '$REMOTE_CSV_PATH' '$REMOTE_PARQUET_PATH' &&
|
||||
rm '$REMOTE_CSV_PATH' &&
|
||||
mkdir -p '$CURRENT_REMOTE_TILES_PATH' &&
|
||||
|
|
Loading…
Reference in New Issue