<commit_before>#! /bin/bash

# (c) 2007 <NAME>
# Met veel dank aan <NAME> en <NAME> voor hun
# reverse-engineering informatie van BlackBoard;
#
# (c) 2010 <NAME>
# Aangepast aan de niewe Bb inlogmethode (zonder challenge-response)
#
# (c) 2015 <NAME>
# Jeetje, een security patch voor bb-scripts. Wie had dat ooit gedacht.

BBUSER="$1"

BBLOGIN="https://blackboard.ru.nl/webapps/login/"
BBPORTAL="https://blackboard.ru.nl/webapps/portal/frameset.jsp"

CURL="curl --silent --cookie bb.cookie --cookie-jar bb.cookie"

BASE64="base64 -w0"

b64() {
	builtin echo -n "$1" | $BASE64
}

b64_uni() {
	builtin echo -n "$1" | sed -r 's/(.)(.)?/\1\n\2\n/g' | tr '\n' '\000' | $BASE64
}

umask 077

if [ ! -e bb.cookie ] || $CURL "$BBPORTAL" | grep -q 'LoadLoginPage()'; then
	if [ -z "$BBUSER" ]; then
		read -p "User: " BBUSER
	fi

	read -p "Password: " -s pass
	echo
	echo Thank you. BlackBoard is being circumvented for your pleasure.<commit_msg>fix login check (again)<commit_after>#! /bin/bash

# (c) 2007 <NAME>
# Met veel dank aan <NAME> en <NAME> voor hun
# reverse-engineering informatie van BlackBoard;
#
# (c) 2010 <NAME>
# Aangepast aan de niewe Bb inlogmethode (zonder challenge-response)
#
# (c) 2015 <NAME>
# Jeetje, een security patch voor bb-scripts. Wie had dat ooit gedacht.

BBUSER="$1"

BBLOGIN="https://blackboard.ru.nl/webapps/login/"

CURL="curl --silent --cookie bb.cookie --cookie-jar bb.cookie --location"

BASE64="base64 -w0"

b64() {
	builtin echo -n "$1" | $BASE64
}

b64_uni() {
	builtin echo -n "$1" | sed -r 's/(.)(.)?/\1\n\2\n/g' | tr '\n' '\000' | $BASE64
}

umask 077

if [ ! -e bb.cookie ] || $CURL "$BBLOGIN" | grep -q 'loadLoginPage()'; then
	if [ -z "$BBUSER" ]; then
		read -p "User: " BBUSER
	fi

	read -p "Password: " -s pass
	echo
	echo Thank you. BlackBoard is being circumvented for your pleasure.
{'fraction_non_alphanumeric': 0.17576419213973798, 'fraction_numerical': 0.039301310043668124, 'mean_word_length': 3.4490291262135924, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '702960', 'n_tokens_mistral': 799, 'n_tokens_neox': 735, 'n_words': 218}