Hilfe mit Passwort

Du musst es mit einem editor bearbeiten dann musst
du halt nach dem passwort suchen !!
 
ne moment das ist viel interessanter... also es geht wohl um folgebde Zeuilen code

Code:
  function check()
  {
    num1 = eingabe.substr(0,1); num2 = eingabe.substr(1,1);
    num3 = eingabe.substr(2,1); num4 = eingabe.substr(3,1); 
    if (num1 == "" || num2 == "" || num3 == "" || num4 != "") return wrong();
    
    num1 = parseInt(num1); num2 = parseInt(num2); num3 = parseInt(num3); num4 = parseInt(num2);
    
    isvalue   = ((num3 + (num1 * num4) - num3) / num2 ) - num2 + (((num4 + num3 + num3) - num2) / 2);
    mustvalue = isvalue * (num3 + (num4 * (num1-num1-1)) + num1);
    
    if (isvalue != mustvalue) return wrong();
    {
      if (num4!=(6+(num4*((num2*num4)-(num4*num2)))+3)) return wrong();
      if (num1<5||num3>4) return wrong();
      
      self.location = "page"+eingabe + ".html";
    }
    
  }

Also: es gibt ein return wrong wenn
a) das passwort weniger oder mehr als genu drei stellen hat (if num4!="" then return wrong();)
b) dann wrd gerechnet. und zwar muss isvalue=mustvalue sein. wenn man ein bißchen kürzt (num4 ist ja null) erhält man isvalue=-1.5num2+num3
mustvalue aber = isvalue mal num3+num1
==> num3+num1 muss 1 sein
==>geht aba net weil num3<=4 und num1>=5 sein muss(nächste zeile)

also stimmt da entweder was nicht oder parseint("") liefert nicht 0 wie ich angenommen hab... hab lang nix mehr in JS gemacht, weiß das jemand?

Auf jeden fall ist das Ziel die Seite dann page
Code:
.html vielleicht kann man damit was machen
 
Das ist ja eigentlich "nur" eine Berechnungssache. Oder raten. Wenns nur 3 stellen sind, oder sinds nicht 4 (?), dann gibt es ja "nur" 1000 Möglichkeiten
 
Hi

Kleine Hilfestellung.

Code:
<!-- saved from url=(0060)http://www.y<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
atta-tempel.de/yorpg/schulhp/___JS_/letmein.html -->
<HTML><HEAD><TITLE>Runde 4: Zahlenkombination</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<STYLE type=text/css>A {
	COLOR: yellow; TEXT-DECORATION: none
}
A:hover {
	COLOR: white; TEXT-DECORATION: underline
}
</STYLE>

<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY text=red bgColor=black><B>Runde 4:</B> Zahlenkombination - <A 
href="http://www.yatta-tempel.de/yorpg/schulhp/index.php">Zurück zum 
Arbeitsplatz</A><BR>
<TABLE height=1 cellSpacing=0 cellPadding=0 width="100%" bgColor=red border=0>
  <TBODY>
  <TR>
    <TD></TD></TR></TBODY></TABLE><BR><BR><BR>
<CENTER>
<SCRIPT language=JavaScript>
<!--
  var eingabe = "";
  var t = 0;
  
  function exit()
  {
    self.location = "http://www.google.de/";
  }
  
  function wrong()
  {
    alert("Das war falsch!");
    t++;
    if (t==3) exit();
    eingabe="";
    document.tresor.pwd.value = eingabe;
  }
  
  function Button(id)
  {
    eingabe = eingabe + id;
    document.tresor.pwd.value = eingabe;
  }
  
  function check()
  {
    num1 = eingabe.substr(0,1); num2 = eingabe.substr(1,1);
    num3 = eingabe.substr(2,1); num4 = eingabe.substr(3,1); 
    if (num1 == "" || num2 == "" || num3 == "" || num4 != "") return wrong();
    
    num1 = parseInt(num1); num2 = parseInt(num2); num3 = parseInt(num3); num4 = parseInt(num2);
    
    isvalue   = ((num3 + (num1 * num4) - num3) / num2 ) - num2 + (((num4 + num3 + num3) - num2) / 2);
    mustvalue = isvalue * (num3 + (num4 * (num1-num1-1)) + num1);
    
    if (isvalue != mustvalue) return wrong();
    {
      if (num4!=(6+(num4*((num2*num4)-(num4*num2)))+3)) return wrong();
      if (num1<5||num3>4) return wrong();
      
      self.location = "page"+eingabe + ".html";
    }
    
  } 
//-->
</SCRIPT>

<FORM name=tresor onsubmit="check(); return false;">
<TABLE cellSpacing=4 cellPadding=0 bgColor=silver border=1>
  <TBODY>
  <TR>
    <TD colSpan=3><INPUT style="FONT-SIZE: 54px; WIDTH: 222px; HEIGHT: 70px" 
      readOnly type=password name=pwd height="70" width="222"> </TD></TD>
  <TR>
    <TD><INPUT style="WIDTH: 70px; HEIGHT: 70px" onclick=Button(1); type=button value=1 height="70" width="70"></TD>
    <TD><INPUT style="WIDTH: 70px; HEIGHT: 70px" onclick=Button(2); type=button value=2 height="70" width="70"></TD>
    <TD><INPUT style="WIDTH: 70px; HEIGHT: 70px" onclick=Button(3); type=button value=3 height="70" width="70"></TD></TR>
  <TR>
    <TD><INPUT style="WIDTH: 70px; HEIGHT: 70px" onclick=Button(4); type=button value=4 height="70" width="70"></TD>
    <TD><INPUT style="WIDTH: 70px; HEIGHT: 70px" onclick=Button(5); type=button value=5 height="70" width="70"></TD>
    <TD><INPUT style="WIDTH: 70px; HEIGHT: 70px" onclick=Button(6); type=button value=6 height="70" width="70"></TD></TR>
  <TR>
    <TD><INPUT style="WIDTH: 70px; HEIGHT: 70px" onclick=Button(7); type=button value=7 height="70" width="70"></TD>
    <TD><INPUT style="WIDTH: 70px; HEIGHT: 70px" onclick=Button(8); type=button value=8 height="70" width="70"></TD>
    <TD><INPUT style="WIDTH: 70px; HEIGHT: 70px" onclick=Button(9); type=button value=9 height="70" width="70"></TD></TR>
  <TR>
    <TD colSpan=2><INPUT style="WIDTH: 146px; HEIGHT: 70px" onclick=check(); type=button value=Anmelden height="70" width="146"></TD>
    <TD><INPUT style="WIDTH: 70px; HEIGHT: 70px" onclick=exit(); type=button value=Exit height="70" width="70"></TD></TR></TBODY></TABLE></FORM></CENTER></BODY></HTML>


saludo erde
 
Hackit

@ braindeath


Gib doch mal in der HABO - suche Hackit ein. Dort bekommst Du einige Informationen & Anregungen die Dich weiter bringen.

Greetings Nibble B-)
 
So, hab das ma in VB gecodet.

@Zaireking
Man beachte das num4 = num2 ist ;)


Hier der Code:
Code:
Option Explicit
    Dim num1, num2, num3, num4 As Byte
    Dim isvalue, mustvalue As Integer
    
Private Sub Command1_Click()
    Dim i As Integer
    
    For i = 111 To 999 Step 1
        
        num1 = Mid(CInt(i), 1, 1)
        num2 = Mid(CInt(i), 2, 1)
        num3 = Mid(CInt(i), 3, 1)
        num4 = num2
        
        If num1 = 0 Or num2 = 0 Or num3 = 0 Then
            GoTo ende
                Else
                
        
        isvalue = ((num3 + (num1 * num4) - num3) / num2) - num2 + (((num4 + num3 + num3) - num2) / 2)
        mustvalue = isvalue * (num3 + (num4 * (num1 - num1 - 1)) + num1)
        
        If isvalue <> mustvalue Then
            GoTo ende
            Else
                If num4 <> 6 + (num4 * ((num2 * num4) - (num4 * num2))) + 3 Then
                    GoTo ende
                        Else
                            If num1 < 5 Or num3 > 4 Then
                                GoTo ende
                                Else
                                    MsgBox i
                            End If
                End If
        End If
        End If
ende:
    Next
            
End Sub

Die MsgBox nennt einen dann die Möglichkeiten, einfach eingeben und gucken obs die richtige Seite war :P

Grüße
kleinerMuck
 
Hallo,
ist doch ganz einfach:
num1 = a
num2 = b
num3 = c
num4 = num2 = b

Schritt 1:
isvalue = (c + a?b - c)/b - b + ((b + c + c) - b)/2 = a-b+c
mustvalue = (a - b + c ) * ( c + (b*(a-a-1)+a)) = (a-b+c)^2


Schritt 2:
num4 = (6+(num4*((num2*num4)-(num4*num2)))+3)
b = (6+(b*((b*b)-(b*b)))+3)
b = 9

Schritt 3:
isvalue = mustvalue
a-9+c = (a-9+c)^2

a = 10-c OR a = 9-c

Bedingung:
a >= 5
c <= 4

Mögliche Werte:
a = 9-4 = 5
a = 9-3 = 6
a= 9-2 = 7
a= 9-1 = 8

a = 10-4 = 6
a = 10-3 = 7
a= 10-2 = 8
a= 10-1 = 9

Das war es auch schon.
Da wir wissen das Nummer2 = 9 sein muss, und wegen der ersten IF Anweisung Nummer4 nicht ausgefüllt werden darf, ergeben sich folgende Codes:

594
693
792
891

694
793
892
991

Da aber die Zahl an den Dateinahmen angehängt wird, bekommt man bei allen Möglichkeiten, außer bei einer, eine 404 Fehlermeldung.

Welche jetzt die richtige ist, das überlasse ich euch ;)
 
Zurück
Oben