python虚拟环境打包
主要是为了减少py的体积

带图形化的可以不使用-F
使用-D启动速度会更快
python requirements.txt生成
pipreqs ./ --encoding=utf8

python 内嵌浏览器网页
import wxfrom wx.html2 import WebViewclass MyHtmlFrame(wx.Frame):def __init__(self, parent, title):wx.Frame.__init__(self, parent, -1, title, size=(1024, 768))web_view =WebView.New(self)web_view.LoadURL("https://cn.bing.com/translator")app = wx.App()frm = MyHtmlFrame(None, "Simple HTML Browser")frm.Show()app.MainLoop()
更新Invoke-Mimikatz
import fileinputimport base64with open("./Win32/mimikatz.exe", "rb") as f:win32 = base64.b64encode(f.read()).decode()with open("./x64/mimikatz.exe", "rb") as f:x64 = base64.b64encode(f.read()).decode()for line in fileinput.FileInput("./Invoke-Mimikatz.ps1", inplace=1):line = line.rstrip('\r\n')if "$PEBytes64 = " in line:print("$PEBytes64 = '" + x64 + "'")elif "$PEBytes32 = " in line:print("$PEBytes32 = '" + win32 + "'")else:print(line)
Python 正则表达式匹配两个指定字符串中间的内容
A(.*?)B 表示截取 A/B 中间的字符串
import retxt='@font-face{font-family:"customfont"; src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAACHMAHUrlQa1/U/GjaKLvBmPZEW9aysrJJd8fcdtKlebEw+i+9+ss+zY9V28te/XU+6HyW/QK0Vmv==)'bs64_str = re.findall("charset=utf-8;base64,(.*?)\)", txt)[0]print(bs64_str)#d09GRgABAAAAACHMAHUrlQa1/U/GjaKLvBmPZEW9aysrJJd8fcdtKlebEw+i+9+ss+zY9V28te/XU+6HyW/QK0Vmv===
ssl报错问题
requests.packages.urllib3.disable_warnings()r=requests.get(host,timeout=3,verify=False,proxies=proxies)
