mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +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"
|
y="0"
|
||||||
style="text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#783f04;fill-opacity:1;" /></flowRegion><flowPara
|
style="text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#783f04;fill-opacity:1;" /></flowRegion><flowPara
|
||||||
id="flowPara3723"
|
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>
|
id="flowPara19" /></flowPara></flowRoot> </g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
26
bot.py
26
bot.py
|
@ -478,19 +478,21 @@ def getrygimage():
|
||||||
telegram.sendmessage("Puoi mettere solo due lettere.")
|
telegram.sendmessage("Puoi mettere solo due lettere.")
|
||||||
else:
|
else:
|
||||||
# FIXME: percorsi assoluti
|
# FIXME: percorsi assoluti
|
||||||
directory = "/var/www/html/rygimages/{}.png"
|
directory = "/var/www/html/rygimages/{}.png".format(cmd[1])
|
||||||
infile = open("/royal/bot/basiclogo.svg", "r")
|
infile = open("basiclogo.svg", "rb")
|
||||||
print(infile.read())
|
# FIXME: possibile exploit qui
|
||||||
indata = infile.read().format(cmd[1]).encode("utf-8")
|
indata = infile.read().replace(b"REPLACEME", cmd[1].encode("utf-8"))
|
||||||
print(indata.decode("utf-8"))
|
|
||||||
infile.close()
|
infile.close()
|
||||||
try:
|
try:
|
||||||
outfile = open(directory.format(cmd[1]), "x")
|
outfile = open(directory, "x")
|
||||||
|
outfile.write("")
|
||||||
outfile.close()
|
outfile.close()
|
||||||
except Exception:
|
except FileExistsError:
|
||||||
pass
|
pass
|
||||||
outfile = open(directory.format(cmd[1]), "wb")
|
outfile = open(directory, "wb")
|
||||||
cairosvg.svg2png(bytestring=indata, write_to=outfile)
|
outdata = cairosvg.svg2png(bytestring=indata)
|
||||||
|
print(outdata)
|
||||||
|
outfile.write(outdata)
|
||||||
outfile.close()
|
outfile.close()
|
||||||
telegram.sendmessage("[Scarica](http://royal.steffo.me/rygimages/{}.png)"
|
telegram.sendmessage("[Scarica](http://royal.steffo.me/rygimages/{}.png)"
|
||||||
" la tua immagine del profilo Royal Games!".format(cmd[1]),
|
" la tua immagine del profilo Royal Games!".format(cmd[1]),
|
||||||
|
@ -671,8 +673,10 @@ while True:
|
||||||
else:
|
else:
|
||||||
print("@" + username + " bloccato.")
|
print("@" + username + " bloccato.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
if __debug__:
|
||||||
|
raise
|
||||||
|
else:
|
||||||
telegram.sendmessage(chr(9762) + " *Errore critico:\n*"
|
telegram.sendmessage(chr(9762) + " *Errore critico:\n*"
|
||||||
"{0}\n\n"
|
"{0}\n\n"
|
||||||
"Secondo me, è colpa dello stagista.".format(repr(e)), -2141322)
|
"Secondo me, è colpa dello stagista.".format(repr(e)), -2141322)
|
||||||
print("\033[1mERRORE CRITICO:\n"
|
print("\033[1mERRORE CRITICO:\n{0}\033[0m".format(repr(e)))
|
||||||
"{0}\033[0m".format(repr(e)))
|
|
||||||
|
|
2
sm
2
sm
|
@ -1 +1 @@
|
||||||
Subproject commit b3beb7f76214d6a8fa5d5954da762a4165442d4a
|
Subproject commit ce3275c9b51ee7e7bb18020ae93d498a54cd7466
|
Loading…
Reference in a new issue