<commit_before><?php
include("config.inc.php");
header("Content-type: text/plain");

/* Get lt for login */
$login_page = file_get_contents("https://cas.uha.fr/cas/login");
$pattern = '@name="lt" value="([^"]+)" />@';
preg_match($pattern, $login_page, $matches);
$lt = $matches[1];

/* Get Cookie and link to emploidutemps */
$data_string = "username=theophile.helleboid%40uha.fr&password=<PASSWORD>&lt=$lt";
$handle = curl_init("https://cas.uha.fr/cas/login?service=http%3A%2F%2Femploidutemps.uha.fr%2Fade%2Fstandard%2Fgui%2Finterface.jsp");
curl_setopt($handle, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded')); //, 'Content-length: ') 
curl_setopt($handle, CURLOPT_POST, true);
curl_setopt($handle, CURLOPT_POSTFIELDS, $data_string /* $data */);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.7) Gecko/20100701 Firefox/3.6.7");
curl_setopt($handle, CURLOPT_REFERER, "https://cas.uha.fr/cas/login");
curl_setopt($handle, CURLOPT_HEADER, true);
curl_setopt($handle, CURLOPT_WRITEHEADER, fopen("head.txt", "w+"));
$content = curl_exec($handle);
/* Get Cookie */<commit_msg>Protection (tres faible) du mdp<commit_after><?php
include("config.inc.php");
header("Content-type: text/plain");

/* Get lt for login */
$login_page = file_get_contents("https://cas.uha.fr/cas/login");
$pattern = '@name="lt" value="([^"]+)" />@';
preg_match($pattern, $login_page, $matches);
$lt = $matches[1];

// base 64 :
// username=prenom.nom40uha.fr&password=<PASSWORD>

/* Get Cookie and link to emploidutemps */
$data_string = base64_decode("dXNlcm5hbWU9dGhlb3BoaWxlLmhlbGxlYm9pZCU0MHVoYS5mciZwYXNzd29yZD1iYWxhbXVydWdhbg==")."&lt=$lt";
$handle = curl_init("https://cas.uha.fr/cas/login?service=http%3A%2F%2Femploidutemps.uha.fr%2Fade%2Fstandard%2Fgui%2Finterface.jsp");
curl_setopt($handle, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded')); //, 'Content-length: ') 
curl_setopt($handle, CURLOPT_POST, true);
curl_setopt($handle, CURLOPT_POSTFIELDS, $data_string /* $data */);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.7) Gecko/20100701 Firefox/3.6.7");
curl_setopt($handle, CURLOPT_REFERER, "https://cas.uha.fr/cas/login");
curl_setopt($handle, CURLOPT_HEADER, true);
curl_setopt($handle, CURLOPT_WRITEHEADER, fopen("head.txt", "w+"));
$content = curl_exec($handle);
/* Get Cookie */
{'fraction_non_alphanumeric': 0.1942246835443038, 'fraction_numerical': 0.028085443037974684, 'mean_word_length': 7.346534653465347, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, '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': '7101717', 'n_tokens_mistral': 1078, 'n_tokens_neox': 1000, 'n_words': 145}