Skip to content

Instantly share code, notes, and snippets.

@danielholmstrom
Created January 31, 2013 18:09
Show Gist options
  • Save danielholmstrom/4684899 to your computer and use it in GitHub Desktop.
Save danielholmstrom/4684899 to your computer and use it in GitHub Desktop.
Crash syslog.syslog() in python by logging an empty zip-file.
"""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))
@TheWaWaR
Copy link

TheWaWaR commented Jun 3, 2014

You just solved my problem, Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment