Skip to content

Instantly share code, notes, and snippets.

@gghatano
Last active September 13, 2021 00:12
Show Gist options
  • Save gghatano/b4d1f398ce48cc5c88c38e75c9a69013 to your computer and use it in GitHub Desktop.
Save gghatano/b4d1f398ce48cc5c88c38e75c9a69013 to your computer and use it in GitHub Desktop.
PWSCUP2021 サンプルスクリプトで攻撃する
# summary:
## create E files for pwscup2021 attack phase by using "rlink.py"
# preparation:
## put directories "pre_anony_d" and "pre_attack" at the same directory as "attack.bash"
## get "rlink.py"
# parameters:
## teamid : your team id
## output_dir: directory name for place the E files
# execution:
## $bash attack.bash
teamid="00" ## <- your team id
dir=$(dirname $0)
output_dir=$dir"/submission" ## <- directory name for E files (default: ./submission/)
seq -w 1 14 | while read target
do
target_file_name=$dir"/pre_anony_d/pre_anony_"$target"_d.csv"
attack_file_name=$dir"/pre_attack/pre_anony_"$target"_for_"$teamid"_ct.csv"
output_file_name=$output_dir"/pre_attack_"$target"_from_"$teamid".csv"
echo $target_file_name
echo $attack_file_name
echo $output_file_name
python3 $dir/rlink.py $attack_file_name $target_file_name $output_file_name
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment