diff --git a/README.md b/README.md index 6bfc611..a054c61 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,12 @@ curl -I "https://apps.ihk-berlin.de/tibrosBB/BB_auszubildende.jsp" curl -I "https://apps.ihk-berlin.de/favicon.ico" ``` -At this point, the server has sent us 2 cookies that we'll to include in the header of the POST request when we posting the login form(Note that the order of the cookies is important): +At this point, the server has sent us 2 cookies that we'll need to include in the header of the POST request when we posting the login form(Note that the order of the cookies is important): ```sh // Where REPLACEME_*, add the appropriate information: -curl -v -X POST "https://apps.ihk-berlin.de/tibrosBB/azubiHome.jsp" -H "Cookie: TSESSIONID=REPLACEME_SESSION1; TSESSIONID=REPLACEME_SESSION2" -d "login=REPLACEME_USER&pass=REPLACEME_PASS&anmelden=" +curl -v -X POST "https://apps.ihk-berlin.de/tibrosBB/azubiHome.jsp" +-H "Cookie: TSESSIONID=REPLACEME_SESSION1; TSESSIONID=REPLACEME_SESSION2" +-d "login=REPLACEME_USER&pass=REPLACEME_PASS&anmelden=" ``` NOTE: If the server has accepted our POST request and successfully identified us, it will send us back a new cookie as response, otherwise, we get no cookie back.
@@ -28,21 +30,23 @@ We'll treat the new cookie from the response as `REPLACEME_SESSION3`(you'll see Now that we're logged in, the next step is to try and access some of the user's pages that requires authentication and see if we get OK from the server. For our purpose, we need to retrieve the exam results page, which is `azubiErgebnisse.jsp?id=1`, but here it's get a little bit tricky, as if we try directly visiting -the results page, without first visiting the `azubiErgebnisse.jsp`, then the server will destroy our session and log us out automatically. -The way to access the results page, we use the following commands: +the results page, without first visiting the `azubiErgebnisse.jsp`, the server will destroy our session and log us out automatically. +The way to access the results page, we use the following commands in the following order: ```sh // Simulate a visit in order to let the server confirm that we visited this page before we go any further: -curl "https://apps.ihk-berlin.de/tibrosBB/azubiPruef.jsp" -H "Cookie: TSESSIONID=REPLACEME_SESSION3; TSESSIONID=REPLACEME_SESSION2" +curl "https://apps.ihk-berlin.de/tibrosBB/azubiPruef.jsp" +-H "Cookie: TSESSIONID=REPLACEME_SESSION3; TSESSIONID=REPLACEME_SESSION2" // Now we are safe to visit here and get what we wanted: -curl "https://apps.ihk-berlin.de/tibrosBB/azubiErgebnisse.jsp?id=1" -H "Cookie: TSESSIONID=REPLACEME_SESSION3; TSESSIONID=REPLACEME_SESSION2" +curl "https://apps.ihk-berlin.de/tibrosBB/azubiErgebnisse.jsp?id=1" +-H "Cookie: TSESSIONID=REPLACEME_SESSION3; TSESSIONID=REPLACEME_SESSION2" ``` -Note that now every request we send, we always including the 2 cookies in the request-header for any type of request, because that's how the server identifies our session and the user that is currently authenticated.
+Note that now every request we send, we always including the 2 cookies in the request-header for any type of request, because that's how the server identifies our login-session and that the user that is currently authenticated.
-Also note that this can be easily done by creating a cookie jar: `curl --cookie-jar` or `curl -c`, but to have a better understanding I show the request commands the manual way. +Also note that this can be easily done by creating a cookie jar: `curl --cookie-jar` or `curl -c`, but to have a better understanding I show the process the manual way. -In C# we simply bind a `CookieContainer` to an `HttpClientHandler` that will be used in `HttpClient` and it saves us the trouble :) +In C# we simply bind a `CookieContainer` to an `HttpClientHandler` that will be used in `HttpClient` and it saves us all this trouble, but we still need to visit the pages in the right order :) diff --git a/src/IHK.ResultsNotifier/IHK.ResultsNotifier.csproj b/src/IHK.ResultsNotifier/IHK.ResultsNotifier.csproj index 1455e8f..4a381a5 100644 --- a/src/IHK.ResultsNotifier/IHK.ResultsNotifier.csproj +++ b/src/IHK.ResultsNotifier/IHK.ResultsNotifier.csproj @@ -7,7 +7,7 @@ {B717B701-620D-4714-8E9B-8963BF433CDE} WinExe IHK.ResultsNotifier - IHK-ResultsNotifier-v2.0.1 + IHK-ResultsNotifier-v2.0.2 v4.6.1 512 true diff --git a/src/IHK.ResultsNotifier/Properties/AssemblyInfo.cs b/src/IHK.ResultsNotifier/Properties/AssemblyInfo.cs index 4ceb041..727fb64 100644 --- a/src/IHK.ResultsNotifier/Properties/AssemblyInfo.cs +++ b/src/IHK.ResultsNotifier/Properties/AssemblyInfo.cs @@ -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("2.0.1.0")] -[assembly: AssemblyFileVersion("2.0.1.0")] +[assembly: AssemblyVersion("2.0.2.0")] +[assembly: AssemblyFileVersion("2.0.2.0")]