Added suggested text for cracking times
git-svn-id: http://webgoat.googlecode.com/svn/trunk@449 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
parent
881c54ef2c
commit
a03bab2267
@ -9,6 +9,8 @@ import org.apache.ecs.StringElement;
|
|||||||
import org.apache.ecs.html.BR;
|
import org.apache.ecs.html.BR;
|
||||||
import org.apache.ecs.html.Div;
|
import org.apache.ecs.html.Div;
|
||||||
import org.apache.ecs.html.Input;
|
import org.apache.ecs.html.Input;
|
||||||
|
import org.apache.ecs.html.LI;
|
||||||
|
import org.apache.ecs.html.OL;
|
||||||
import org.apache.ecs.html.TD;
|
import org.apache.ecs.html.TD;
|
||||||
import org.apache.ecs.html.TR;
|
import org.apache.ecs.html.TR;
|
||||||
import org.apache.ecs.html.Table;
|
import org.apache.ecs.html.Table;
|
||||||
@ -63,6 +65,26 @@ public class PasswordStrength extends LessonAdapter
|
|||||||
ElementContainer ec = new ElementContainer();
|
ElementContainer ec = new ElementContainer();
|
||||||
|
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
if (s.getParser().getStringParameter("pass1", "").equals("0")
|
||||||
|
&& s.getParser().getStringParameter("pass2", "").equals("1394")
|
||||||
|
&& s.getParser().getStringParameter("pass3", "").equals("5")
|
||||||
|
&& s.getParser().getStringParameter("pass4", "").equals("2")
|
||||||
|
&& s.getParser().getStringParameter("pass5", "").equals("41"))
|
||||||
|
{
|
||||||
|
makeSuccess(s);
|
||||||
|
ec.addElement(new StringElement("As a guideline not bound to a single solution."));
|
||||||
|
ec.addElement(new BR());
|
||||||
|
ec.addElement(new StringElement("Assuming the brute-force power of 1,000,000 hash/second: "));
|
||||||
|
ec.addElement(new BR());
|
||||||
|
OL ol = new OL();
|
||||||
|
ol.addElement(new LI("123456 - 0 seconds (dictionary based, one of top 100)"));
|
||||||
|
ol.addElement(new LI("abzfez - up to 5 minutes ( 26 chars on 6 positions = 26^6 seconds)"));
|
||||||
|
ol.addElement(new LI("a9z1ez - up to 40 minutes ( 26+10 chars on 6 positions = 36^6 seconds)"));
|
||||||
|
ol.addElement(new LI("aB8fEz - up to 16 hours ( 26+26+10 chars on 6 positions = 62^6 seconds)"));
|
||||||
|
ol.addElement(new LI("z8!E?7 - up to 50 days ( 127 chars on 6 positions = 127^6 seconds)"));
|
||||||
|
ec.addElement(ol);
|
||||||
|
} else
|
||||||
{
|
{
|
||||||
|
|
||||||
ec.addElement(new StringElement("How much time you need for these passwords? "));
|
ec.addElement(new StringElement("How much time you need for these passwords? "));
|
||||||
@ -133,20 +155,13 @@ public class PasswordStrength extends LessonAdapter
|
|||||||
Element b = ECSFactory.makeButton("Go!");
|
Element b = ECSFactory.makeButton("Go!");
|
||||||
div.addElement(b);
|
div.addElement(b);
|
||||||
ec.addElement(div);
|
ec.addElement(div);
|
||||||
|
}
|
||||||
} catch (Exception e)
|
} catch (Exception e)
|
||||||
{
|
{
|
||||||
s.setMessage("Error generating " + this.getClass().getName());
|
s.setMessage("Error generating " + this.getClass().getName());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s.getParser().getStringParameter("pass1", "").equals("0")
|
|
||||||
&& s.getParser().getStringParameter("pass2", "").equals("1394")
|
|
||||||
&& s.getParser().getStringParameter("pass3", "").equals("5")
|
|
||||||
&& s.getParser().getStringParameter("pass4", "").equals("2")
|
|
||||||
&& s.getParser().getStringParameter("pass5", "").equals("41"))
|
|
||||||
{
|
|
||||||
makeSuccess(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (ec);
|
return (ec);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user