@@ -0,0 +1,860 @@
+import os, os.path, shutil, psutil%0Afrom datetime import date%0Afilename = %22snapshot-%25(date)s.zip%22 %25 %7B%22date%22: date.today().strftime(%22%25Y%25m%25d%22)%7D%0A%0Aprint %22Working directory: %25s%22 %25 os.getcwd()%0A%0Aif os.path.isfile(filename):%0A    print %22Delete existing %25s%22 %25 filename%0A    os.remove(filename)%0A%0Aurl = %22http://honeyproxy.org/download/%25s%22 %25 filename%0Aprint %22Download latest snapshot%22%0Aos.system(%22wget %25s%22 %25 url)%0A%09%0Ahoneyproxy_processes = filter(lambda x: x.name == %22python2%22 and any(%22honeyproxy.py%22 in y for y in x.cmdline), psutil.process_iter())%0Afor p in honeyproxy_processes:%0A%09print %22Kill HoneyProxy instance...%22%0A%09p.kill()%0A%09%0Aif os.path.isdir('./honeyproxy'):%0A%09print %22Delete existing installation%22%0A%09shutil.rmtree('./honeyproxy')%0A%0Aprint %22Unzip new snapshot...%22%0Aos.system(%22unzip -q %25s -d honeyproxy%22 %25 filename)%0Aprint %22Start HoneyProxy...%22%0Aos.system(%22sh honey.sh%22)%0Aprint %22done!%22

add VM Initialization script