mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 11:34:18 +00:00
NON LO SO NEMMENO IO AIUTO
This commit is contained in:
parent
95a85a9602
commit
58706e445e
3 changed files with 20 additions and 16 deletions
|
@ -86,6 +86,6 @@
|
|||
y="0"
|
||||
style="text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#783f04;fill-opacity:1;" /></flowRegion><flowPara
|
||||
id="flowPara3723"
|
||||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:28.96000099px;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu Medium';fill:#783f04;fill-opacity:1;">{}<flowPara
|
||||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:28.96000099px;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu Medium';fill:#783f04;fill-opacity:1;">REPLACEME<flowPara
|
||||
id="flowPara19" /></flowPara></flowRoot> </g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
32
bot.py
32
bot.py
|
@ -478,19 +478,21 @@ def getrygimage():
|
|||
telegram.sendmessage("Puoi mettere solo due lettere.")
|
||||
else:
|
||||
# FIXME: percorsi assoluti
|
||||
directory = "/var/www/html/rygimages/{}.png"
|
||||
infile = open("/royal/bot/basiclogo.svg", "r")
|
||||
print(infile.read())
|
||||
indata = infile.read().format(cmd[1]).encode("utf-8")
|
||||
print(indata.decode("utf-8"))
|
||||
directory = "/var/www/html/rygimages/{}.png".format(cmd[1])
|
||||
infile = open("basiclogo.svg", "rb")
|
||||
# FIXME: possibile exploit qui
|
||||
indata = infile.read().replace(b"REPLACEME", cmd[1].encode("utf-8"))
|
||||
infile.close()
|
||||
try:
|
||||
outfile = open(directory.format(cmd[1]), "x")
|
||||
outfile = open(directory, "x")
|
||||
outfile.write("")
|
||||
outfile.close()
|
||||
except Exception:
|
||||
except FileExistsError:
|
||||
pass
|
||||
outfile = open(directory.format(cmd[1]), "wb")
|
||||
cairosvg.svg2png(bytestring=indata, write_to=outfile)
|
||||
outfile = open(directory, "wb")
|
||||
outdata = cairosvg.svg2png(bytestring=indata)
|
||||
print(outdata)
|
||||
outfile.write(outdata)
|
||||
outfile.close()
|
||||
telegram.sendmessage("[Scarica](http://royal.steffo.me/rygimages/{}.png)"
|
||||
" la tua immagine del profilo Royal Games!".format(cmd[1]),
|
||||
|
@ -671,8 +673,10 @@ while True:
|
|||
else:
|
||||
print("@" + username + " bloccato.")
|
||||
except Exception as e:
|
||||
telegram.sendmessage(chr(9762) + " *Errore critico:\n*"
|
||||
"{0}\n\n"
|
||||
"Secondo me, è colpa dello stagista.".format(repr(e)), -2141322)
|
||||
print("\033[1mERRORE CRITICO:\n"
|
||||
"{0}\033[0m".format(repr(e)))
|
||||
if __debug__:
|
||||
raise
|
||||
else:
|
||||
telegram.sendmessage(chr(9762) + " *Errore critico:\n*"
|
||||
"{0}\n\n"
|
||||
"Secondo me, è colpa dello stagista.".format(repr(e)), -2141322)
|
||||
print("\033[1mERRORE CRITICO:\n{0}\033[0m".format(repr(e)))
|
||||
|
|
2
sm
2
sm
|
@ -1 +1 @@
|
|||
Subproject commit b3beb7f76214d6a8fa5d5954da762a4165442d4a
|
||||
Subproject commit ce3275c9b51ee7e7bb18020ae93d498a54cd7466
|
Loading…
Reference in a new issue