更换博客图片为本地
没注意Imgur被墙了,把博客上的图下载回来重传到GitHub上
因为之前用的PicGo这款软件,所以直接用Sublime Text 3写个正则(https://.*)(\.png|jpg)从C:\Users\Administrator\AppData\Roaming\PicGo\data.json里提取下图片链接
提取后写个小脚本,直接保存到博客目录的/source/images/下
代码如下
'''@Description: @Author: [email protected]: https://github.com/[email protected]: [email protected]: 2019-04-12 09:56:[email protected]: 2019-04-12 11:12:20'''import requestsfrom random import choice'''USER_AGENTS 随机头信息'''USER_AGENTS = [ " ...
批量去除后缀脚本
批量去除一个文件夹目录下的文件后缀的脚本
'''@Description: @Author: [email protected]: https://github.com/[email protected]: [email protected]: 2019-03-23 23:37:[email protected]: 2019-03-23 23:58:22'''import osdef getFileExt(path): ''' 获取指定目录下的所有指定后缀的文件名 ''' f_list = os.listdir(path) for file in f_list: fileName=file #print(fileName) file_ext=os.path.splitext(file)[-1] #print(file_ext) #print(os.path.splitext(file)[0]) ...
Wallhaven.cc 小爬虫
一个月前无意中发现个壁纸站wallhaven.cc,写了个小爬虫挂服务器上了。
直接上代码吧
'''@Description: wallhaven.cc [email protected]: [email protected]: https://github.com/[email protected]: 2019-02-12 20:20:[email protected]: [email protected]: 2019-02-12 20:40:41'''import osimport timefrom random import choiceimport requests'''USER_AGENTS 随机头信息'''USER_AGENTS = [ "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AcooBrowser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)", ...
搭建乌云漏洞库+知识库
乌云2年多了。。突发奇想在内网搭建个知识库+漏洞库
准备为了方便,我用了Windows服务器,详细配置如下
服务器配置
Windows Server 2016 DCApache 2.4.25PHP 5.6.30MySQL 5.7.17-log
所需文件下载地址
知识库:链接:https://pan.baidu.com/s/1CZVZxdHzl7L8y3dGWN-aOQ提取码:uuuo漏洞库链接:https://pan.baidu.com/s/1LGSwDmVwtlffyM8I-1hQzw提取码:8duw
步骤漏洞库
将漏洞库中的wooyun目录下所有文件移入mysql的data目录,然后查看数据库中是否存在名称为wooyun的数据库库和bugs、whitehats的数据表mysql> SHOW DATABASES;+--------------------+| Database |+--------------------+| information_schema || mysql || performance_schema | ...