from
kivy.app
import
App
from
kivy.uix.boxlayout
import
BoxLayout
from
kivy.uix.button
import
Button
from
kivy.uix.textinput
import
TextInput
from
kivy.uix.popup
import
Popup
from
kivy.uix.label
import
Label
class
CheckApp(App):
def
build(
self
):
self
.layout
=
BoxLayout(
'vertical'
,
10
,
10
,
*
*
(
'orientation'
,
'spacing'
,
'padding'
))
self
.
input
=
TextInput(
'Enter Password'
,
True
,
*
*
(
'text'
,
'multiline'
))
self
.button
=
Button(
'Check'
, (
1
,
0.5
),
*
*
(
'text'
,
'size_hint'
))
self
.button.bind(
self
.check_input,
*
*
(
'on_press'
,))
self
.layout.add_widget(
self
.
input
)
self
.layout.add_widget(
self
.button)
return
self
.layout
def
check_input(
self
, instance):
if
self
.
input
.text
=
=
'crackme_20240710_android_gui_py_y7238wyqdu5y4w_52pj'
:
self
.show_popup(
'Correct!'
,
'Input is correct!'
)
return
None
None
.show_popup(
'Incorrect!'
,
'Input is incorrect!'
)
def
show_popup(
self
, title, content):
popup_layout
=
BoxLayout(
'vertical'
,
10
,
10
,
*
*
(
'orientation'
,
'spacing'
,
'padding'
))
label
=
Label(content,
*
*
(
'text'
,))
close_button
=
Button(
'Close'
,
*
*
(
'text'
,))
close_button.bind(
self
.close_popup,
*
*
(
'on_press'
,))
popup_layout.add_widget(label)
popup_layout.add_widget(close_button)
self
.popup
=
Popup(title, popup_layout, (
None
,
None
), (
500
,
300
),
*
*
(
'title'
,
'content'
,
'size_hint'
,
'size'
))
self
.popup.
open
()
def
close_popup(
self
, instance):
self
.popup.dismiss()
if
__name__
=
=
'__main__'
:
CheckApp().run()
return
None