Created
January 31, 2013 18:09
-
-
Save danielholmstrom/4684899 to your computer and use it in GitHub Desktop.
Crash syslog.syslog() in python by logging an empty zip-file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""How to crash syslog.syslog | |
File: crash_syslog.py | |
Running this will product this output: | |
Traceback (most recent call last): | |
File "./crash_syslog.py", line 12, in <module> | |
syslog(LOG_INFO, base64.b64decode(b64)) | |
TypeError: [priority,] message string | |
""" | |
import base64 | |
from syslog import syslog, LOG_INFO | |
b64 = 'UEsFBgAAAAAAAAAAAAAAAAAAAAAAAA==' | |
"""An empty zip file, base64 encoded""" | |
if __name__ == '__main__': | |
syslog(LOG_INFO, base64.b64decode(b64)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You just solved my problem, Thank you so much!