Skip to content

Commit

Permalink
Bump version from 1.0.0 to 1.0.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
giladreich committed Jun 19, 2018
1 parent 0e86f45 commit f66a241
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 18 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@ When the new results are available, the tool will make a sound and will bring it

### Main Window Interface

#### No Results Example:

![Main Window Interface1](/pictures/main_window1.png)

#### Listening for Results Example:

![Main Window Interface2](/pictures/main_window2.png)

#### Found Results Example:

![Main Window Interface3](/pictures/main_window3.png)


Expand All @@ -32,31 +40,21 @@ With the new cookie/session-key + the session-key from the `favicon.ico`, we can

The following steps will show how it works using curl:


// We send the first request to get the first cookie:
```sh
// We send the first request to get the first cookie:
curl -I "https://apps.ihk-berlin.de/tibrosBB/BB_auszubildende.jsp"
```

// We send another request to get the second cookie from server:
```sh
curl -I "https://apps.ihk-berlin.de/favicon.ico"
```

// Send a post request with the session keys we get from step 1 and 2(where replaceme delete and add your new session key):
```sh
curl -v -X POST "https://apps.ihk-berlin.de/tibrosBB/azubiHome.jsp" -H "Cookie: TSESSIONID=replacemeSession1; TSESSIONID=replacemeSession2" -d "login=replacemeUser&pass=replacemePass&anmelden="
```

// We must first visit this website before jumping to step 5 link, as it will kick our session out if we do:
```sh
curl "https://apps.ihk-berlin.de/tibrosBB/azubiPruef.jsp" -H "Cookie: TSESSIONID=replacemeSession3; TSESSIONID=replacemeSession2"
```

// IMPORTANT NOTE: Jumping directly to this link won't work, you must first visit the link before with the same session keys.

// Get the last link with the exam results:
```sh
curl "https://apps.ihk-berlin.de/tibrosBB/azubiErgebnisse.jsp?id=1" -H "Cookie: TSESSIONID=replacemeSession3; TSESSIONID=replacemeSession2"
```
Expand Down
Binary file modified pictures/login_window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pictures/login_window_typing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pictures/main_window1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pictures/main_window2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pictures/main_window3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/IHK.ResultsNotifier/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
6 changes: 3 additions & 3 deletions src/IHK.ResultsNotifier/Utils/HttpClientIHK.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ public bool AuthenticateUser(string username, string password)
{
List<Cookie> collectedCookies = CollectSomeCookies();

List<KeyValuePair<string, string>> userCredintials = new List<KeyValuePair<string, string>>
List<KeyValuePair<string, string>> userCredentials = new List<KeyValuePair<string, string>>
{
new KeyValuePair<string, string>(PARM_USER, username),
new KeyValuePair<string, string>(PARM_PASS, password),
new KeyValuePair<string, string>(PARM_NOTUSED, "")
};

HttpContent postData = new FormUrlEncodedContent(userCredintials);
HttpContent postData = new FormUrlEncodedContent(userCredentials);

// NOTE: If the server accepted our login credintials, it will replace us a new cookie
// NOTE: If the server accepted our login credentials, it will replace us a new cookie
// with the first cookie from the cookie jar and much tastier! nom nom...
HttpResponseMessage loginResp = SendRequest(() => client.PostAsync(LOGIN_PAGE, postData).Result);
List<Cookie> cookies = GetCookies(COOKIE_PATH);
Expand Down
4 changes: 2 additions & 2 deletions src/IHK.ResultsNotifier/Windows/LoginWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private void LoadConfiguration()

private void btnLogin_Click(object sender, EventArgs e)
{
if (!IsValidCredintials())
if (!IsValidCredentials())
return;

webClient = new HttpClientIHK();
Expand All @@ -61,7 +61,7 @@ private void btnLogin_Click(object sender, EventArgs e)
Hide();
}

private bool IsValidCredintials()
private bool IsValidCredentials()
{
bool isNotEmptyAndRulesMatch = tbxUser.TextSearch.Length >= MIN_USER_CHARS
&& !String.IsNullOrEmpty(tbxPassword.Text);
Expand Down

0 comments on commit f66a241

Please sign in to comment.