Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pass Checker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tetras-libre
Pass Checker
Commits
45e22444
Unverified
Commit
45e22444
authored
8 years ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
style
parent
31d6837f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/css/style.css
+3
-0
3 additions, 0 deletions
src/css/style.css
src/index.py
+24
-10
24 additions, 10 deletions
src/index.py
src/style.css
+0
-149
0 additions, 149 deletions
src/style.css
with
27 additions
and
159 deletions
src/css/style.css
+
3
−
0
View file @
45e22444
...
...
@@ -14,6 +14,9 @@ div#box {
padding
:
0%
2%
3%
2%
;
border-radius
:
0.7em
;
}
div
#form
{
text-align
:
center
;
}
div
#log
{
padding-left
:
10%
;
width
:
90%
;
...
...
This diff is collapsed.
Click to expand it.
src/index.py
+
24
−
10
View file @
45e22444
...
...
@@ -25,36 +25,48 @@ print("Content-type: text/html; charset=utf-8\n")
html
=
"""
<!DOCTYPE html>
<head>
<title>Testeur de mot de passes</title>
<meta charset=
"
UTF-8
"
>
<meta name=
"
author
"
content=
"
David Beniamine
"
>
<link type=
"
text/css
"
rel=
"
stylesheet
"
href=
"
css/style.css
"
/>
<title>Testeur de mot de passes</title>
</head>
<body>
<h1> Testez la qualité d
'
un mot de passe </h1>
<div id=
"
box
"
>
<div id=
"
content
"
>
<div id=
"
logos
"
>
<img style=
"
float:left
"
src=
"
img/tl.png
"
alt=
"
Tetras Libre
"
/>
<h1>
Tetras Pass
</h1>
</div>
"""
if
form
.
getvalue
(
"
password
"
)
is
None
:
# Password not defined => show the form
passwordPrompt
=
"
Veuillez saisir le mot de passe à tester ci dessous :
"
inputsPrompt
=
"
Veuillez saisir une
sui
te de mots ou de dates au format jj/mm/yyyy
séparées par des virgules
:
"
sendPrompt
=
"
Tester
"
passwordPrompt
=
"
Veuillez saisir le mot de passe à tester ci dessous :
"
inputsPrompt
=
"
Veuillez saisir une
lis
te de mots ou de dates au format jj/mm/yyyy
, un indice par ligne
:
"
sendPrompt
=
"
Lancer le test
"
html
+=
"""
<form action=
"
/index.py
"
method=
"
post
"
>
<form action=
"
/index.py
"
method=
"
post
"
id=
"
mainform
"
>
<div id=
"
form
"
>
<h2> Defenseur.se </h2>
<p> {} </p>
<input type=
"
password
"
name=
"
password
"
value=
""
/>
<h2> Attaquant.e </h2>
<p> {} </p>
<input type=
"
text
"
name=
"
inputs
"
value=
""
/
>
<textarea name=
"
inputs
"
form=
"
mainform
"
></textarea
>
<p>
<input type=
"
submit
"
name=
"
send
"
value=
"
{}
"
>
</p>
</div>
</form>
"""
.
format
(
passwordPrompt
,
inputsPrompt
,
sendPrompt
)
else
:
# Split user inputs
field
=
form
.
getvalue
(
"
inputs
"
)
if
field
is
not
None
:
inputs
=
field
.
split
(
'
,
'
)
inputs
=
field
.
split
(
'
\n
'
)
else
:
inputs
=
None
# Retrieve results
...
...
@@ -66,10 +78,10 @@ else:
line
=
re
.
sub
(
'
\*\*(.*)\*\*
'
,
'
<em>\g<1></em>
'
,
line
)
if
line
[
0
]
==
"
\t
"
:
if
inlist
:
html
+=
"
<li>{}</li>
"
.
format
(
line
)
html
+=
"
<li>{}</li>
"
.
format
(
line
)
else
:
inlist
=
True
html
+=
"
<ul><li>{}</li>
"
.
format
(
line
)
html
+=
"
<ul><li>{}</li>
"
.
format
(
line
)
elif
line
[
0
]
!=
"
\n
"
:
if
inlist
:
html
+=
"
</ul>
"
...
...
@@ -77,6 +89,8 @@ else:
html
+=
"
<h3>{}</h3>
"
.
format
(
line
)
html
+=
"""
</div>
</div>
</body>
<foot>
<p>
...
...
This diff is collapsed.
Click to expand it.
src/style.css
deleted
100644 → 0
+
0
−
149
View file @
31d6837f
body
{
font-family
:
sans
;
width
:
90%
;
max-width
:
75em
;
/*1200px*/
height
:
100%
;
margin
:
auto
;
color
:
#2e3436
;
background-color
:
#E5E4E2
;
padding
:
1%
;
}
/*Boite principale*/
div
#box
{
background-color
:
#ffffff
;
padding
:
0%
2%
3%
2%
;
border-radius
:
0.7em
;
}
div
#log
{
padding-left
:
10%
;
width
:
90%
;
max-height
:
400px
;
}
div
.scroll
{
overflow
:
auto
;
}
/*Contenu*/
div
#content
{
padding
:
1.5%
3%
;
}
div
.hllinks
{
padding
:
1%
3%
;
}
div
.right
{
float
:
right
;
width
:
49%
;
}
div
.left
{
float
:
left
;
width
:
49%
;
}
/* Footer*/
div
#foot
{
color
:
gray
;
font-size
:
small
;
border-top
:
thin
solid
;
margin
:
5%
;
}
/* images floattantes*/
div
#logos
img
{
max-height
:
100px
;
max-width
:
150px
;
vertical-align
:
middle
;
}
img
.middle
{
vertical-align
:
middle
;
}
img
.middle-right
{
vertical-align
:
middle
;
float
:
right
;
}
img
.right
{
float
:
right
;
border
:
thin
solid
;
box-shadow
:
0.1em
0.1em
0.2em
0.2em
#bbbabb
;
margin
:
auto
auto
5%
5%
;
padding
:
0.1em
;
}
/*Comportement des liens*/
a
{
color
:
#2e3436
;
}
a
:visited
{
color
:
#aaa9aa
;
}
a
:hover
{
text-decoration
:
underline
;
color
:
#888788
;
}
/* Titres*/
div
.titlebox
{
}
div
#Title
{
text-align
:
center
;
font-weight
:
bold
;
background-color
:
#eeecee
;
border-radius
:
0.5em
;
padding
:
1%
;
margin
:
5%
20%
;
}
h1
{
text-align
:
center
;
font-weight
:
bold
;
background-color
:
#eeecee
;
border-radius
:
0.5em
;
padding
:
2%
;
margin
:
5%
20%
10%
20%
;
}
h2
{
font-size
:
large
;
text-align
:
center
;
background-color
:
#eeecee
;
border-radius
:
0.5em
;
margin
:
5%
25%
;
padding
:
1.5%
;
}
h3
{
font-size
:
large
;
text-align
:
left
;
margin
:
5%
;
}
/* text*/
.right
{
text-align
:
right
;
}
/*tables*/
table
{
width
:
100%
;
text-align
:
left
;
}
th
{
height
:
50px
;
background-color
:
#eeecee
;
}
th
,
td
{
padding
:
15px
;
border-bottom
:
1px
solid
#ddd
;
}
tr
:nth-child
(
odd
)
{
background-color
:
#f2f2f2
}
tr
:hover
{
background-color
:
#f5f5f5
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment