<commit_before>#!/bin/sh

#init credentials for webgoat
curl --retry 10 --retry-delay 5 "http://$1:8080/WebGoat/register.mvc" -H "Origin: http://$1:8080" -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-GB,da-DK;q=0.8,da;q=0.6,fr-CA;q=0.4,fr;q=0.2,en-US;q=0.2,en;q=0.2' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H "Referer: http://$1:8080/WebGoat/register.mvc" -H 'Connection: keep-alive' --data 'username=admintest&password=<PASSWORD>&matchingPassword=<PASSWORD>&agree=agree' --compressed

#init database for citizenstig
curl --retry 10 --retry-delay 5 "http://$1:8081/set-up-database.php"

#init dwva
export USER_TOKEN=$(curl "http://$1/setup.php" -c dwvacookie -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-GB,da-DK;q=0.8,da;q=0.6,fr-CA;q=0.4,fr;q=0.2,en-US;q=0.2,en;q=0.2' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H "Referer: http://$1/setup.php" -H 'Connection: keep-alive' -H 'Cache-Control: max-age=0' --compressed 2>/dev/null | grep user_token | cut -d "'" -f 6)
curl --retry 10 "http://$1/setup.php" -L -b dwvacookie -H "Origin: http://$1" -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-GB,da-DK;q=0.8,da;q=0.6,fr-CA;q=0.4,fr;q=0.2,en-US;q=0.2,en;q=0.2' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H "Referer: http://$1/setup.php" -H 'Connection: keep-alive' --data "create_db=Create+%2F+Reset+Database&user_token=$USER_<PASSWORD>" --compressed

#init wordpress
curl "http://$1:8088/wp-admin/install.php?step=1" -H "Origin: http://$1:8088" -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-GB,da-DK;q=0.8,da;q=0.6,fr-CA;q=0.4,fr;q=0.2,en-US;q=0.2,en;q=0.2' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H "Referer: http://$1:8088/wp-admin/install.php" -H 'Connection: keep-alive' --data 'language=' --compressed
curl "http://$1:8088/wp-admin/install.php?step=2" -H "Origin: http://$1:8088" -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-GB,da-DK;q=0.8,da;q=0.6,fr-CA;q=0.4,fr;q=0.2,en-US;q=0.2,en;q=0.2' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H "Referer: http://$1:8088/wp-admin/install.php?step=1" -H 'Connection: keep-alive' --data 'weblog_title=test&user_name=test&admin_password=<PASSWORD>&admin_password2=<PASSWORD>&admin_email=test%40test.com&Submit=Install+WordPress&language=' --compressed<commit_msg>[ci] Decrease curl retry from 10 to 3<commit_after>#!/bin/sh

#init credentials for webgoat
curl --retry 3 --retry-delay 5 "http://$1:8080/WebGoat/register.mvc" -H "Origin: http://$1:8080" -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-GB,da-DK;q=0.8,da;q=0.6,fr-CA;q=0.4,fr;q=0.2,en-US;q=0.2,en;q=0.2' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H "Referer: http://$1:8080/WebGoat/register.mvc" -H 'Connection: keep-alive' --data 'username=admintest&password=<PASSWORD>&matchingPassword=<PASSWORD>&agree=agree' --compressed

#init database for citizenstig
curl --retry 3 --retry-delay 5 "http://$1:8081/set-up-database.php"

#init dwva
export USER_TOKEN=$(curl "http://$1/setup.php" -c dwvacookie -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-GB,da-DK;q=0.8,da;q=0.6,fr-CA;q=0.4,fr;q=0.2,en-US;q=0.2,en;q=0.2' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H "Referer: http://$1/setup.php" -H 'Connection: keep-alive' -H 'Cache-Control: max-age=0' --compressed 2>/dev/null | grep user_token | cut -d "'" -f 6)
curl --retry 3 "http://$1/setup.php" -L -b dwvacookie -H "Origin: http://$1" -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-GB,da-DK;q=0.8,da;q=0.6,fr-CA;q=0.4,fr;q=0.2,en-US;q=0.2,en;q=0.2' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H "Referer: http://$1/setup.php" -H 'Connection: keep-alive' --data "create_db=Create+%2F+Reset+Database&user_token=$USER_TOKEN" --compressed

#init wordpress
curl "http://$1:8088/wp-admin/install.php?step=1" -H "Origin: http://$1:8088" -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-GB,da-DK;q=0.8,da;q=0.6,fr-CA;q=0.4,fr;q=0.2,en-US;q=0.2,en;q=0.2' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H "Referer: http://$1:8088/wp-admin/install.php" -H 'Connection: keep-alive' --data 'language=' --compressed
curl "http://$1:8088/wp-admin/install.php?step=2" -H "Origin: http://$1:8088" -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-GB,da-DK;q=0.8,da;q=0.6,fr-CA;q=0.4,fr;q=0.2,en-US;q=0.2,en;q=0.2' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H "Referer: http://$1:8088/wp-admin/install.php?step=1" -H 'Connection: keep-alive' --data 'weblog_title=test&user_name=test&admin_password=<PASSWORD>&admin_password2=<PASSWORD>&admin_email=test%40test.com&Submit=Install+WordPress&language=' --compressed
{'fraction_non_alphanumeric': 0.21568627450980393, 'fraction_numerical': 0.07977437550362611, 'mean_word_length': 4.929140127388535, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 20}, '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': '1854873', 'n_tokens_mistral': 3530, 'n_tokens_neox': 3254, 'n_words': 548}