diff --git a/asq/asq_rep.py b/asq/asq_sel.py similarity index 100% rename from asq/asq_rep.py rename to asq/asq_sel.py diff --git a/asq/asq_spot.py b/asq/asq_spot.py deleted file mode 100644 index 6a1fa01..0000000 --- a/asq/asq_spot.py +++ /dev/null @@ -1,56 +0,0 @@ -import sys -import time -from selenium import webdriver -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.support.ui import Select -from selenium.webdriver.common.by import By - -def check_exists_name(name): - try: - driver.find_element(By.NAME, name) - except NoSuchElementException: - return False - return True - -i=.2 -driver = webdriver.Firefox(executable_path='./geckodriver') -pattern = '%d.%m.%Y %H:%M:%S' -target = int(time.mktime(time.strptime(sys.argv[3], pattern))) - -while True: - driver.get('https://campusonline.uni-ulm.de/CoronaNG/user/mycorona.html') - - if (check_exists_name('uid')): - username = driver.find_element(By.NAME, 'uid') - password = driver.find_element(By.NAME, 'password') - username.send_keys(sys.argv[1]) - password.send_keys(sys.argv[2]) - password.submit() - time.sleep(i) - driver.get('https://campusonline.uni-ulm.de/CoronaNG/user/mycorona.html') - elif (target-time.clock_gettime(time.CLOCK_REALTIME)>0): - button = driver.find_element(By.XPATH, '/html/body/div/div/div[4]/div[2]/div[1]/div/div/div[1]/div/form[1]/div/div/table/tbody/tr[6]/td/select') - select = Select(driver.find_element(By.XPATH, '/html/body/div/div/div[4]/div[2]/div[1]/div/div/div[1]/div/form[1]/div/div/table/tbody/tr[6]/td/select')) - select.select_by_visible_text('Alle markieren') - button.submit() - time.sleep(i) - select = Select(driver.find_element(By.XPATH, '/html/body/div/div/div[4]/div[2]/div[1]/div/div/div[1]/div/form[1]/div/div/table/tbody/tr[6]/td/select')) - select.select_by_visible_text('An Markierten teilnehmen') - - button = driver.find_element(By.XPATH, '/html/body/div/div/div[4]/div[2]/div[1]/div/div/div[1]/div/form[1]/div/div/table/tbody/tr[6]/td/select') - time.sleep(target-time.clock_gettime(time.CLOCK_REALTIME)) - button.submit() - time.sleep(i) - else: - button = driver.find_element(By.XPATH, '/html/body/div/div/div[4]/div[2]/div[1]/div/div/div[1]/div/form[1]/div/div/table/tbody/tr[6]/td/select') - select = Select(driver.find_element(By.XPATH, '/html/body/div/div/div[4]/div[2]/div[1]/div/div/div[1]/div/form[1]/div/div/table/tbody/tr[6]/td/select')) - select.select_by_visible_text('Alle markieren') - button.submit() - time.sleep(i) - select = Select(driver.find_element(By.XPATH, '/html/body/div/div/div[4]/div[2]/div[1]/div/div/div[1]/div/form[1]/div/div/table/tbody/tr[6]/td/select')) - select.select_by_visible_text('An Markierten teilnehmen') - button = driver.find_element(By.XPATH, '/html/body/div/div/div[4]/div[2]/div[1]/div/div/div[1]/div/form[1]/div/div/table/tbody/tr[6]/td/select') - button.submit() - time.sleep(i) - -driver.quit() diff --git a/mymuesli/mymuesli.sh b/mymuesli/mymuesli.sh index 9b95175..04f0e06 100755 --- a/mymuesli/mymuesli.sh +++ b/mymuesli/mymuesli.sh @@ -1,11 +1,28 @@ #!/bin/bash -BASE_URL="https://mymuesli.com/" -STRING_ALPHABET="abcdefghijklmnopqrstuvwxyz123456789" -STRING_LENGTH="6" -STRING="aaaaaa" -for i in 1 2 ; do - curl ${BASE_URL}$STRING | grep "Einlösbar bis" && echo $output +base_url="https://www.mymuesli.com/" +string_alphabet=`echo {a..z} {0..9}` +curl_options="--connect-timeout 1 --silent" +grep_options="--quiet" +for c1 in $string_alphabet; do +for c2 in $string_alphabet; do +for c3 in $string_alphabet; do +for c4 in $string_alphabet; do +for c5 in $string_alphabet; do +for c6 in $string_alphabet; do + curl $curl_options ${base_url}$c1$c2$c3$c4$c5$c6 | rg $grep_options "Nicht gefunden" + if [ ${PIPESTATUS[1]} -eq 1 ]; then + echo ${base_url}$c1$c2$c3$c4$c5$c6 + fi done +done +done +done +done +done + +#for i in 1 2 ; do + # curl $CURL_OPTIONS ${BASE_URL}$STRING | rg "" +#done incrementString()