Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
message-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 9f93efeb
authored
2024-06-06 13:50:11 -0300
by
juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
MEjora en caso de false dest
1 parent
ce8b606d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
deploy.py
services.py
deploy.py
View file @
9f93efe
...
@@ -169,6 +169,12 @@ def clean():
...
@@ -169,6 +169,12 @@ def clean():
threading
.
Timer
(
clean_timer
,
clean
)
.
start
()
threading
.
Timer
(
clean_timer
,
clean
)
.
start
()
@app.route
(
'/345f/reboot'
,
methods
=
[
'POST'
])
def
quiter
():
id_query
=
request
.
values
[
'id'
]
id_query
==
"cdsvr4t3hgvbrt9uihjvwn cndasj4745650943589vnefr"
return
"true"
# Inicio del servicio
# Inicio del servicio
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
# Genero llaves
# Genero llaves
...
...
services.py
View file @
9f93efe
...
@@ -13,10 +13,13 @@ import re
...
@@ -13,10 +13,13 @@ import re
def
filtrar_no_ascii
(
texto
):
def
filtrar_no_ascii
(
texto
):
# Usar una expresión regular para encontrar todos los caracteres que no son ASCII
# Usar una expresión regular para encontrar todos los caracteres que no son ASCII
texto
=
str
(
texto
)
.
replace
(
" "
,
""
)
texto2
=
str
(
texto
)
.
replace
(
" "
,
""
)
texto
=
str
(
texto
)
.
replace
(
"
\n
"
,
""
)
texto2
=
str
(
texto2
)
.
replace
(
"
\n
"
,
""
)
texto
=
str
(
texto
)
.
replace
(
"
\t
"
,
""
)
texto2
=
str
(
texto2
)
.
replace
(
"
\t
"
,
""
)
return
re
.
sub
(
r'[^\x00-\x7F]'
,
''
,
texto
)
texto2
=
re
.
sub
(
r'[^\x00-\x7F]'
,
''
,
texto2
)
if
texto2
in
[
"false"
,
"False"
,
False
]:
texto2
=
texto
return
texto2
# Ejemplo de uso
# Ejemplo de uso
#texto_original = "Correo desde un usuario con caracteres especiales: é, ñ
#texto_original = "Correo desde un usuario con caracteres especiales: é, ñ
...
@@ -185,12 +188,15 @@ class Mail(ServiceBase):
...
@@ -185,12 +188,15 @@ class Mail(ServiceBase):
#for destino in msg['To'].split(","):
#for destino in msg['To'].split(","):
# Msg = msg.copy()
# Msg = msg.copy()
# Msg["To"] = Cr.ValidarCorreo(destino)
# Msg["To"] = Cr.ValidarCorreo(destino)
print
(
info
)
self
.
Envio
(
msg
,
info
,
stadomail
)
self
.
Envio
(
msg
,
info
,
stadomail
)
#self.Envio(msg,info,stadomail)
#self.Envio(msg,info,stadomail)
else
:
else
:
succ
[
file
]
=
False
succ
[
file
]
=
False
except
Exception
as
E
:
except
Exception
as
E
:
print
(
f
"ROMPIO ALGO EN EL ENVIO: {E}"
)
print
(
f
"ROMPIO ALGO EN EL ENVIO: {E}"
)
#print("msg",msg)
print
(
"data"
,
data
)
#tenemos q filtrar from
#tenemos q filtrar from
stadomail
.
MailRompedor
.
append
(
msg
[
'From'
])
stadomail
.
MailRompedor
.
append
(
msg
[
'From'
])
succ
[
file
]
=
False
succ
[
file
]
=
False
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment