Created
September 17, 2014 16:59
-
-
Save shuhaowu/286e6681d6faa473ebb0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from fabric.api import run | |
def check_apt(): | |
apt_sha = "cfd9d742f7c99d55214257fdad42ead547547c5a05af9d4569a256205af28fa7" | |
result = run("sha256sum /var/cache/apt/archives/apt_0.9.7.9+deb7u3_amd64.deb") | |
if apt_sha in result: | |
print "Everything is okay" | |
else: | |
print "Potential attack?" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment