首先,我们需要将Notepad++语言改为英文。
接下来,下载Python Script插件的压缩包(我选的是Full版本)。
最后,把压缩包解压到Notepad++的程序根目录
最终的文件树应该是这样:
Notepad++ (your main Notepad++ directory, probably under "C:Program Files")
+
|-- python26.dll (this is important. This needs to go in the main program directory of Notepad++, next to notepad++.exe)
| (unless you have a Python installation already, in which case it's probably in C:windows already)
+-- plugins
|-- PythonScript.dll
|
|-- PythonScript
|
| |-- lib
| |
| | |-- (*.py) lots of *.py files and subdirectories
| |
| |-- scripts
|
| |-- (machine-level scripts)
|
|
|-- doc
|
| |-- PythonScript
|
| |-- PythonScript.chm (optional, if it's not there context-sensitive help will use the web)
|
|
|
|
|
|-- Config (this config directory can also be in %APPDATA%Notepad++pluginsconfig)
|
-- PythonScript
|-- scripts
|-- (user level scripts go here)
现在,打开Notepad++->Plugins->Python Script->Show Console
若是能成功弹出命令行窗口,那便是安装成功了。
接下来,让我们来编写脚本(这里只能使用Python2.7的语法)
#coding=utf-8
import os
import sys
os.chdir(r"D:test")
for path in os.listdir(r"D:test"):
print(path)
notepad.open(path)
notepad.runMenuCommand("Encoding","Convert to UTF-8")
notepad.save()
notepad.close()
这代码也是非常简洁明了的,嗯,这样就可以批量将test下的所有文件转换为UTF-8格式了。
FROM :rickyhao.com | rickyhao.com
/01 权限提升概述一,提权概述权限提升(privilege escalation):攻击者通过安全漏洞把获取到的受限制的低权限用户突破限制,提权至高权 限的管理员用户,从而获得对整个系统得控制权。 Windows:user –> administrat…
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论