From 886a03118833f8e206f0c822608b56cce8dcbc7c Mon Sep 17 00:00:00 2001 From: ja Date: Tue, 8 Feb 2022 16:23:54 +0100 Subject: [PATCH] revert --- Customers/Default2.aspx.vb | 11 +- .../SDL/Formtemplate IDS Tankkarte.aspx.vb | 4 +- login/login_FLEX.aspx | 366 +++++++++--------- login/login_FLEX.aspx.vb | 12 +- 4 files changed, 198 insertions(+), 195 deletions(-) diff --git a/Customers/Default2.aspx.vb b/Customers/Default2.aspx.vb index 8d8cb33..11c0410 100644 --- a/Customers/Default2.aspx.vb +++ b/Customers/Default2.aspx.vb @@ -1,11 +1,12 @@ Imports Konscious.Security.Cryptography Partial Class Customers_Default2 Inherits System.Web.UI.Page - Dim nIterations As Integer = VERAG_VARIABLES.getiterationnumber * VERAG_VARIABLES.RandomInteger(2, 3) + Dim nIterations As Integer = VERAG_VARIABLES.getiterationnumber Dim MemorySizelocal As Integer = -1 Dim MemorySizeProductionServ As Integer = -1 Dim randzahl As Integer = -1 Protected Sub Page_Load(ByVal sender As Object, e As EventArgs) Handles Me.Load + If Page.IsPostBack Then Page.MaintainScrollPositionOnPostBack = True If Not HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then @@ -23,16 +24,16 @@ Partial Class Customers_Default2 MemorySizeProductionServ = (((nIterations * VERAG_VARIABLES.RandomInteger(1, 2.5)) * 6.485 - ((nIterations * VERAG_VARIABLES.RandomInteger(1, 2)) * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 516 randzahl = VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 0), Math.Pow(2, 2)), Math.Pow(2, 4)) ElseIf Integer.Parse(sld_getbenchmarkheat.Value) > 40 And Integer.Parse(sld_getbenchmarkheat.Value) < 60 Then - MemorySizelocal = (((nIterations * 1.45) * 4.98 - ((nIterations * 1.15) * 1.23) / 4 * 1.5) / 1.05) + 0.95 * 420 + MemorySizelocal = (((nIterations * 5.45) * 4.98 - ((nIterations * 1.15) * 1.23) / 4 * 1.5) / 1.05) + 0.95 * 420 MemorySizeProductionServ = (((nIterations * VERAG_VARIABLES.RandomInteger(1, 2.32)) * 7.485 - ((nIterations * VERAG_VARIABLES.RandomInteger(1, 2.32)) * 0.56) / 1.85 * 2.28) / 7.28) + 1.024 * 646 randzahl = VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 0), Math.Pow(2, 4)), VERAG_VARIABLES.RandomInteger(Math.Pow(2, 3), Math.Pow(2, 4))) ElseIf Integer.Parse(sld_getbenchmarkheat.Value) > 60 And Integer.Parse(sld_getbenchmarkheat.Value) < 80 Then - MemorySizelocal = (((nIterations * 1.85) * 4.98 - ((nIterations * 2) * 1.23) / 4 * 1.5) / 1.05) + 1 * 790 + MemorySizelocal = (((nIterations * VERAG_VARIABLES.RandomInteger(4.85, 8)) * 4.98 - ((nIterations * 2) * 1.23) / 4 * 1.5) / 1.05) + 1 * 790 MemorySizeProductionServ = (((nIterations * VERAG_VARIABLES.RandomInteger(1, 2.32)) * 8.585 - ((nIterations * VERAG_VARIABLES.RandomInteger(1, 2.32)) * 0.56) / 1.85 * 2.28) / 7.28) + 1.024 * 816 randzahl = VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 5)), VERAG_VARIABLES.RandomInteger(Math.Pow(2, 5), Math.Pow(2, 7))) ElseIf Integer.Parse(sld_getbenchmarkheat.Value) > 80 And Integer.Parse(sld_getbenchmarkheat.Value) < 100 Then - MemorySizelocal = (((nIterations * 2) * 4.98 - ((nIterations * 2) * 1.23) / 4 * 1.5) / 1.05) + 1 * 290 - MemorySizeProductionServ = (((nIterations * VERAG_VARIABLES.RandomInteger(1, 3)) * 9.485 - ((nIterations * VERAG_VARIABLES.RandomInteger(1, 3)) * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 416 + MemorySizelocal = (((nIterations * Math.Pow(2, 11)) * 14.98 - ((nIterations * 2) * 1.23) / 4 * 1.5) / 1.05) + 1 * 290 + MemorySizeProductionServ = (((nIterations * * Math.Pow(2, 14)) * 11.485 - ((nIterations * VERAG_VARIABLES.RandomInteger(2, 5)) * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 416 randzahl = VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 3), Math.Pow(2, 4)), VERAG_VARIABLES.RandomInteger(Math.Pow(2, 5), Math.Pow(2, 7))) End If Else diff --git a/Customers/SDL/Formtemplate IDS Tankkarte.aspx.vb b/Customers/SDL/Formtemplate IDS Tankkarte.aspx.vb index c75c488..5c8508a 100644 --- a/Customers/SDL/Formtemplate IDS Tankkarte.aspx.vb +++ b/Customers/SDL/Formtemplate IDS Tankkarte.aspx.vb @@ -78,7 +78,7 @@ Partial Class Customers_Default3 Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(Integer.Parse(Kdnrtext), Kennzeichen) Dim listdetails As New List(Of List(Of String)) For Each l2 In list2 - If l2.KundenNr.ToString = Kundennr AndAlso l2.SDLNr.ToString = SDLNr Then + If l2.KundenNr.ToString = Kundennr AndAlso l2.SDLNr.ToString = SDLNr And l2.History.ToString = History Then Dim strtempbestelltam As String = String.Empty Dim strtempLieferdatum As String = String.Empty Dim strtempKartenNr As String = String.Empty @@ -98,7 +98,7 @@ Partial Class Customers_Default3 If IsNothing(l2.Lieferdatum) = False Then strtempLieferdatum = l2.Lieferdatum.ToString.Substring(0, 10) End If - If l2.KartenNr.ToString = CardNo Then + If IsNothing(l2.KartenNr) = False Then strtempKartenNr = l2.KartenNr.ToString End If If IsNothing(l2.PIN) = False Then diff --git a/login/login_FLEX.aspx b/login/login_FLEX.aspx index 584ad97..7c4dbe7 100644 --- a/login/login_FLEX.aspx +++ b/login/login_FLEX.aspx @@ -4,30 +4,30 @@ - <%@ import Namespace="MySql.Data.MySqlClient"%> - - - - - - - - - - - - + <%@ Import Namespace="MySql.Data.MySqlClient" %> - - VERAG Spedition AG Login - - - + + + + + + + + + + + + + + VERAG Spedition AG Login + + + - - - - + + + + + - - + - - - - - - + - - -
-
-
- -
- - -
- - - - - - + + + + + + + + + + + + + + + + + + + +
- -
- - + + +
+
+ + +
+ + +
+ + + - - - - - - - - - - - - - - - - - -
+
- - -
- - -
- -
- - - I forgot my password -
- - - - - -
-
-
+
+ + +
+ + +
+ + +
+ +
+ + + I forgot my password. +
+ + + + + +
+
+
- -
- - -
- - - - - -
- -
- - + +
+ + +
+ + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
+
- - -
- - -
-
-
- - - I forgot my password -
- - - -
+ + +
+ + +
+ + +
+
+
+ + + I forgot my password. +
+ + + +
-
+ - - + + + - - - - - + - - - \ No newline at end of file + // top.location = '../newpageJulius_Sidebar.aspx'; + } + } + + + + diff --git a/login/login_FLEX.aspx.vb b/login/login_FLEX.aspx.vb index d79bb4c..6d08024 100644 --- a/login/login_FLEX.aspx.vb +++ b/login/login_FLEX.aspx.vb @@ -6,7 +6,7 @@ Partial Class login_FLEX Private Customer_ID As String = String.Empty Private UserNaMe As String = String.Empty Private passw As String = String.Empty - Private USERID As String = String.Empty + Private salt As Byte() Private intzahl As Integer Public intzahliterats As Integer = -1 @@ -14,7 +14,6 @@ Partial Class login_FLEX VERAG_VARIABLES.initerrorcount() End Sub Protected Async Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Page.IsPostBack = True Then Page.MaintainScrollPositionOnPostBack = True intzahliterats = VERAG_VARIABLES.getiterationnumber @@ -22,10 +21,10 @@ Partial Class login_FLEX Try Dim teststr = String.Empty If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then - intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 17)) + intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 15)) teststr = Await TestPerformance.TestHashrateServerAsync(0.052 * VERAG_VARIABLES.GetCpuSpeed()) Else - intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 17)) + intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 15)) teststr = Await TestPerformance.TestHashrateServerAsync(0.052 * VERAG_VARIABLES.GetCpuSpeed()) End If If String.Equals(teststr, String.Empty) = False Then @@ -217,7 +216,7 @@ Partial Class login_FLEX End If If String.Equals(tb3.Text, dr("Password")) = True Then - intzahl = VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(95, 200), Math.Pow(2, 8)) + intzahl = VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(95, 210), Math.Pow(2, 8)) salt = VERAG_VARIABLES.GenerateSalt(intzahl) Dim hashpw As Byte() = Await VERAG_VARIABLES.HashPasswordAsync(passw, salt, intzahliterats, intzahl) If Await VERAG_VARIABLES.VerifyhashAsync(dr("Password").ToString, salt, hashpw, intzahliterats, intzahl) = True Then @@ -419,6 +418,7 @@ Partial Class login_FLEX token = VERAG_VARIABLES.HashPassword(Convert.ToBase64String(time.Concat(Key).ToArray()), salt, intzahliterats, intzahl) Return VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(Convert.ToBase64String(token)) + 'Dim Msg, Style, Title As String 'Msg = "Token Generation failed" & vbCrLf & "A new E-mail has been sent to the intern e-mail given." 'Style = vbRetry + vbExclamation + vbDefaultButton1 @@ -428,6 +428,7 @@ Partial Class login_FLEX 'genToken(username, password, email) token = VERAG_VARIABLES.HashPassword(Convert.ToBase64String(time.Concat(Key).ToArray()), salt, intzahliterats, intzahl) Return VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(Convert.ToBase64String(token)) + 'Else 'MsgBox("Token-Generation has not been successful." & vbCrLf & "Please try again in five seconds!") Dim jetzt As DateTime = DateTime.UtcNow @@ -446,6 +447,7 @@ Partial Class login_FLEX Protected Sub CreateTestusers_Click(sender As Object, e As EventArgs) Dim str As String = String.Empty Dim textbox As TextBox = Page.FindControl("txt_numbuserstes") + str = textbox.Text TestPerformance.createnUsers(Integer.Parse(str))