Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
O
objQRcode
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thorfin89
objQRcode
Commits
4f6d0fd6
Commit
4f6d0fd6
authored
Dec 30, 2023
by
Thorfin89
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Codage WIFI opérationnel
parent
296e1c54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
README.md
README.md
+1
-0
main.py
main.py
+17
-6
No files found.
README.md
View file @
4f6d0fd6
...
@@ -6,6 +6,7 @@ C'est en faite une interface graphique pour qrcode sous python.
...
@@ -6,6 +6,7 @@ C'est en faite une interface graphique pour qrcode sous python.
## Paquets à installer :
## Paquets à installer :
-
qrcode
-
qrcode
-
pillow
-
pillow
-
tk-tools
## Codage d'un accès Wifi :
## Codage d'un accès Wifi :
WIFI:T:
*cryptage(nopass, WEP, WAPA)*
;S:ssid;P:
*motdepasse*
;H:
*caché(true)*
WIFI:T:
*cryptage(nopass, WEP, WAPA)*
;S:ssid;P:
*motdepasse*
;H:
*caché(true)*
...
...
main.py
View file @
4f6d0fd6
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
from
tkinter
import
*
from
tkinter
import
*
from
tkinter
import
messagebox
from
tkinter
import
messagebox
from
tkinter.colorchooser
import
askcolor
from
tkinter.colorchooser
import
askcolor
from
tk_tools
import
SmartSpinBox
import
qrcode
import
qrcode
from
qrcode.constants
import
ERROR_CORRECT_M
from
qrcode.constants
import
ERROR_CORRECT_M
...
@@ -46,24 +47,33 @@ def set_fg_color():
...
@@ -46,24 +47,33 @@ def set_fg_color():
create_qrcode
()
create_qrcode
()
def
no_password
(
value
):
if
value
==
"Aucun"
:
titre_saisie_pass
.
config
(
state
=
DISABLED
)
saisie_pass
.
delete
(
0
,
'end'
)
saisie_pass
.
config
(
state
=
DISABLED
)
else
:
titre_saisie_pass
.
config
(
state
=
NORMAL
)
saisie_pass
.
config
(
state
=
NORMAL
)
def
transfert
():
def
transfert
():
if
saisie_ssid
.
get
()
!=
""
:
if
saisie_ssid
.
get
()
!=
""
:
ssid
=
saisie_ssid
.
get
()
ssid
=
saisie_ssid
.
get
()
crypt
=
choix_crypt
.
get
()
crypt
=
choix_crypt
.
get
()
password
=
saisie_pass
.
get
()
password
=
saisie_pass
.
get
()
#
à remplacer par une checkbox avec commande de masquage du code
#
SSID caché OUI/NON
if
choix_cache
.
get
()
==
"OUI"
:
if
choix_cache
.
get
()
==
"OUI"
:
cache
=
"True"
cache
=
"True"
else
:
else
:
cache
=
""
cache
=
""
texte_a_coder
.
delete
(
0
,
'end'
)
texte_a_coder
.
delete
(
0
,
'end'
)
code_wifi
=
"WIFI:T:"
+
crypt
+
";S:"
+
ssid
+
";P:"
+
password
+
";H:"
+
cache
code_wifi
=
"WIFI:T:"
+
crypt
+
";S:"
+
ssid
+
";P:"
+
password
+
";H:"
+
cache
texte_a_coder
.
insert
(
0
,
code_wifi
)
texte_a_coder
.
insert
(
0
,
code_wifi
)
create_qrcode
()
create_qrcode
()
else
:
else
:
messagebox
.
showerror
(
"Erreur"
,
"Saisissez un SSID"
)
messagebox
.
showerror
(
"Erreur"
,
"Saisissez un SSID"
)
...
@@ -183,15 +193,16 @@ titre_saisie_ssid.place(x=30, y=200)
...
@@ -183,15 +193,16 @@ titre_saisie_ssid.place(x=30, y=200)
saisie_ssid
=
Entry
(
left_frame
,
width
=
40
)
saisie_ssid
=
Entry
(
left_frame
,
width
=
40
)
saisie_ssid
.
place
(
x
=
30
,
y
=
225
)
saisie_ssid
.
place
(
x
=
30
,
y
=
225
)
# Password
# Password
titre_saisie_pass
=
Label
(
left_frame
,
text
=
'Mot de passe :'
,
bg
=
"#CCCCCC"
,
state
=
DISABLED
)
titre_saisie_pass
=
Label
(
left_frame
,
text
=
'Mot de passe :'
,
bg
=
"#CCCCCC"
)
titre_saisie_pass
.
place
(
x
=
30
,
y
=
250
)
titre_saisie_pass
.
place
(
x
=
30
,
y
=
250
)
saisie_pass
=
Entry
(
left_frame
,
width
=
40
,
state
=
DISABLED
)
saisie_pass
=
Entry
(
left_frame
,
width
=
40
)
saisie_pass
.
place
(
x
=
30
,
y
=
275
)
saisie_pass
.
place
(
x
=
30
,
y
=
275
)
# Cryptage
# Cryptage
titre_choix_crypt
=
Label
(
left_frame
,
text
=
'Cryptage :'
,
bg
=
"#CCCCCC"
)
titre_choix_crypt
=
Label
(
left_frame
,
text
=
'Cryptage :'
,
bg
=
"#CCCCCC"
)
titre_choix_crypt
.
place
(
x
=
300
,
y
=
200
)
titre_choix_crypt
.
place
(
x
=
300
,
y
=
200
)
crypt_list
=
[
"WPA"
,
"WEP"
,
"Aucun"
]
crypt_list
=
[
"WPA"
,
"WEP"
,
"Aucun"
]
choix_crypt
=
Spinbox
(
left_frame
,
values
=
crypt_list
,
width
=
8
,
justify
=
CENTER
)
choix_crypt
=
SmartSpinBox
(
root
,
entry_type
=
'str'
,
width
=
8
,
justify
=
CENTER
,
values
=
crypt_list
,
callback
=
no_password
)
choix_crypt
.
place
(
x
=
300
,
y
=
225
)
choix_crypt
.
place
(
x
=
300
,
y
=
225
)
# Caché
# Caché
titre_cache
=
Label
(
left_frame
,
text
=
'Caché :'
,
bg
=
"#CCCCCC"
)
titre_cache
=
Label
(
left_frame
,
text
=
'Caché :'
,
bg
=
"#CCCCCC"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment