
【每日学习】
Pz_mstr
混子程序员
展开
-
PHP异常处理中的finally
PHP异常处理中的finally代码段分析原创 2022-07-09 16:31:48 · 467 阅读 · 2 评论 -
python遍历文件夹内文件并检索文件中的中文内容
前言有个需求,遍历文件夹内的文件,并搜索文件中是否存在特定关键字(中文)代码import os import refrom os import path def cn_to_unicode(in_str, need_str=True, debug=False): out = [] for s in in_str: # 获得该字符的数值 val = ord(s) # print(val) # 小于0xff则为AS原创 2022-05-01 20:22:31 · 2090 阅读 · 0 评论 -
【HTB WP】Vaccine
前言Hack the box - Vaccine WP原文用onenote写的,懒得搬运了,凑合看吧这几天试了一下HTB,感觉挺好玩的,属于是kail熟悉练习了小知识记录这次用到了zip2john、john和sudo -l,记录一下zip2john这东西原理是啥?有源代码的,不过懒得看了,作用是提取加密压缩包哈希信息john提取到压缩包哈希信息后,使用sudo john passwd.hash进行爆破(应该是有个内置密码本)sudo -l即sudo --list可以列出当前用户原创 2022-02-23 18:57:46 · 792 阅读 · 0 评论 -
为zotero同步服务搭建个人webdav应用
前言后面要进入博士阶段的研究生活了,在硕士期间,文献和笔记的管理极其混乱,因此打算打造一套新的好用的文献阅读,管理,写作体系。当前环境试用过citavi,endnote等软件,citavi的特点是笔记功能丰富,endnote则是接口比较多;以上都有我不太喜欢的问题,就是搜索或者说下载pdf不方便。当前环境:dblp进行文献检索,选中期望阅读的文献并导出bibzotero导入bib文件,并对文献分类,然后再使用找到可用的pdf功能进行pdf下载。如果pdf下载功能失效的话,则手动下载啦,毕竟很多原创 2021-11-24 11:03:23 · 2024 阅读 · 4 评论 -
PHP-Parser windows安装简易教程
前言本来想装到ubuntu上的,但是ubuntu的php是源码安装的,缺了个openssl库,重新整起来有点费劲,有空再弄吧,直接整了个Windows的项目地址 https://github.com/nikic/PHP-Parser安装过程下载 composer https://getcomposer.org/Composer-Setup.exe安装好之后执行命令composer require nikic/php-parser...原创 2021-09-23 21:46:13 · 723 阅读 · 0 评论 -
c语言连接mysql数据库记录
环境配置sudo apt-get install libmysql++-dev使用方法头文件引用#include <mysql/mysql.h>编译gcc mysql.c -lmysqlclient -o testmysql原创 2021-08-02 23:02:03 · 174 阅读 · 0 评论 -
Texlive 2021安装卡在be patient解决方案
总体安装教程可以去这里看看,非常仔细 https://blog.csdn.net/Mikchy/article/details/94448707本文就补充一下这种情况怎么处理,如下图,在be patient这里等了好久了没反应…解决方案同学们,可能需要科学上网,记得调成全局模式哦原因没去细究,估计某个模块需要网络吧...原创 2021-05-20 22:35:17 · 2254 阅读 · 1 评论 -
快速查找c语言项目中某函数的定义
环境ubuntu方法一般来说,c语言项目中某个函数的定义会有两种,funcname记得换成你需要找的名字直接定义:搜索关键字void <funcname>宏定义:搜索关键字define <funcname>那么我们通过命令行对c语言项目内的文件内容进行遍历,{法1,法2}指上面说的两种情况,任选一种即可find ./ -name '*' | xargs grep '{法1,法2}' 2>/dev/null实践...原创 2020-12-22 22:02:47 · 1898 阅读 · 0 评论 -
PHP7.1.24编译安装
downloadphp-7.1.24.tar.xzinstalltar -zxvf php-7.1.24.tar.xzcd php-7.1.24./configuremakesudo make isntallbug fix0x01 undefined reference to `libiconv’在makefile文件中找到EXTRA_LIBS,在后面加上-liconv,其作用是完成内部编码方式和外部编码方式的转换。...原创 2020-12-21 11:00:13 · 367 阅读 · 1 评论 -
ubuntu 安装多版本PHP
add repositorysudo add-apt-repository ppa:ondrej/php sudo apt-get updateinstall php core(php-7.4 for example)sudo apt install php7.4 php7.4-common php7.4-cliinstall php extensionssudo apt install php7.4-curl php7.4-json php7.4-gd php7.4-mbstring p原创 2020-12-20 10:08:44 · 567 阅读 · 2 评论 -
linux find命令不输出报错信息
find / -name "*filename*" 2>/dev/null*filename*改成你想要查找的文件即可,模糊查找请加上相应的通配符原创 2020-12-19 11:11:41 · 5304 阅读 · 1 评论 -
RIPS-0.55 对securing fuction的检查方法
直入主题可以看到,这里调用scan_parameter进行判断,判断是否是清洁函数,跟进到scan_parameterscan_parameter关注的参数是$F_SECURES,继续跟进很简单,将$in_securing标记为true方便后面判断,这个项目的代码我没全部读完,这里盲猜一下。这里的$in_securing会在sink点时作为判断条件,如果发现用户可控变量的$in_securing为true则认为漏洞不存在。好吧作为一个严谨的博主,我还是简单看一下后面是不是这样。很显然,符原创 2020-11-15 23:05:23 · 245 阅读 · 1 评论 -
vld安装教程
做个搬运工https://www.cnblogs.com/miao-zp/p/6374311.html转载 2020-11-15 21:02:42 · 368 阅读 · 0 评论 -
git协同开发简明教程
需求clone master并创建分支将分支内容合并到master1.clone master并创建分支git clone [url]cd [刚刚clone的项目]git checkout mastergit checkout -b [分支名]git add *git commit -m "init branch"git push origin [分支名]2.将分支内容合并到master前提是分支已提交git checkout mastergit merge [分支名]g原创 2020-11-03 21:54:46 · 147 阅读 · 0 评论 -
ConfigParser模块速查
简介configParser,用于读取配置文件的库。python2中,该库名为ConfigParserpython3中,该库名为configparser配置文件格式[]内的值为section,section下面为类似于key-value的配置内容[db]db_host = 127.0.0.1db_port = 3306db_user = rootdb_pass = roothost_port = 69[sql]thread = 10简单使用1.获取所用section节点i原创 2020-11-03 15:44:12 · 409 阅读 · 0 评论 -
pyinotify模块速查
环境要求Linux >= 2.6.13Python ≥ 2.4 (including Python 3.x)pyinotify检测文件系统的变化,依赖于Linux内核的inotify功能。1.安装pip install pyinotify2.简单使用import pyinotifymonitorObj = pyinotify.WatchManager()monitorObj.add_watch(path,pyinotify.ALL_EVENTS, rec=True, aut原创 2020-11-03 10:14:42 · 940 阅读 · 1 评论 -
linux sed正则匹配:在指定字符前后添加内容
要求一个字符串由姓名,年龄,性别组成,如mstr4r17Man将这个字符串用逗号将姓名,年龄,性别分开,如mstr4r,17,Man解决方法使用$,$用于代替之前匹配出来的字符串,,&,表示在匹配出来的字符串前后加一个逗号echo "mstr4r17Man" | sed "s/[0-9]\{1,3\}/,&,/g"...原创 2020-10-24 16:12:45 · 3366 阅读 · 2 评论 -
C++中的std
参考文章https://blog.csdn.net/calvin_zhou/article/details/78440145这博主讲的挺清楚的,不重复了,做个小结吧小结std::是个名称空间标识符,C++标准库中的函数或者对象都是在命名空间std中定义的一般来说,std都是要调用C++标准库时使用...原创 2020-10-19 10:30:13 · 641 阅读 · 0 评论 -
vector::push_back in c++
参考http://www.cplusplus.com/reference/vector/vector/push_back/push_back函数这个文档写的非常清楚,将一个元素放到vector的最后。所以为什么要取push back呢?让人觉得多多少少有回退什么的感觉原创 2020-10-19 10:25:43 · 118 阅读 · 0 评论 -
C++中的iterator->second
原文链接std::map<X, Y>实际储存了一串std::pair<const X, Y>std::map<std::string, int> m = /* fill it */;auto it = m.begin();这里,如果你用*it,那么你将得到map第一个元素的std::pair:现在你可以接收std::pair的两个元素:(*it).first会得到key,(*it).second会得到value。这等同于it->first和it-&转载 2020-10-18 20:39:50 · 967 阅读 · 0 评论 -
Pin简明入门教程
PinIntel 推出的跨平台程序插装工具简明教程Pin版本:3.2参考:官方英文教程插桩主要包括两个工作在何处插入代码,插入什么样的代码要在插入点执行什么代码一些概念Pintools: Pin通过Pintools实现对目标程序的插桩分析,也是用户主要编写,用于完成自定义插桩工作的工具。Traces: 从一个分支开始,到一个无条件跳转分支结束(包括call和return),可以想到的是,traces会从一个分支的入口开始,但可能会有多个出口。BBL: Pin将Traces分割成b原创 2020-10-18 19:52:00 · 2028 阅读 · 0 评论 -
IDA自带python缺package解决方案
有两种解决方案让idapython直接使用系统python已有的库sys.path.append('/usr/local/lib/python2.7/site-packages/')pip安装库到ida自带的python中如果有自动化需求的话,推荐本方法pip2 install networkx --target="/home/ppz/IDA6.4/python/lib/python2.7"...原创 2020-10-11 16:30:13 · 1494 阅读 · 0 评论 -
在VMware上安装Android虚拟机
安装参考:Installing Android on VMware ESXi:A How-To Guide简单说一下,安装步骤跟着上面走就完事了,主要是在安装成功后需要进行一个GRUB的修改,步骤如下:进入系统后,打开虚拟终端,按下面步骤操作# mkdir /mnt/sda# mount /dev/block/sda1 /mnt/sda# vi /mnt/sda/grub/menu.lst之后将第一个title(第一个boot loader选项)的"quiet"改为"nomodeset xfo原创 2020-10-11 11:08:12 · 6265 阅读 · 2 评论 -
[系统使用]禁止windows自动更新
这里用比较绝的方法:更改windows更新获取地址开始>>运行>>gpedit.msc,打开本地组策略编辑器,定位到计算机配置>>管理模板>>Windows组件>>Windows更新,在右侧的“指定Intranet Microsoft 更新服务器位置”中制定WSUS(windows Server update services)服务器的地址,可选更改“配置自动更新”、“自动更新检测频率”。效果如下所示...原创 2020-09-23 22:43:29 · 432 阅读 · 0 评论 -
[bug]编译安装ecryptfs中遇到的问题
environmentubuntu 16.04 x64bug1Build error: pk11func.h: No such file or directorysolve1from:https://answers.launchpad.net/ecryptfs/+question/128144sudo apt install libnss3-devbug2./libecryptfs_wrap.c:124:20: fatal error: Python.h: No such file or原创 2020-09-22 10:11:26 · 489 阅读 · 0 评论 -
[bug]编译报错configure: error: Cannot find pam解决方案
参考文章https://mariadb.com/kb/en/installing-correct-libraries-for-pam-and-readline/解决方法对于Centos 和 RHEL-buildsudo yum install pam-devel对于Debian/Ubuntusudo apt-get install libpam0g-dev对于debian6/maverick/nattysudo apt-get install libreadline5-devOn o原创 2020-09-22 09:47:19 · 2830 阅读 · 0 评论 -
Some special phrases in system security
0x01Update never stop0x02 phrasesinstruction reordering:指令重排序register allocation:寄存器分配原创 2020-01-17 17:17:05 · 150 阅读 · 0 评论 -
linux ext4文件系统超级块损坏修复
前言误操作 dd if=/var/www/html/admin.php of=/dev/sdb之后系统报磁盘空间不足,意识到出事了解决debugfs -w /dev/sdb返回,/dev/sdb: Bad magic number in super-block while opening filesystem判断出应该是超级块出错mke2fs -n /dev/sdb模拟创建文...原创 2020-01-03 00:41:57 · 4289 阅读 · 0 评论 -
遇到的深度学习的一些概念
ArticleNeural Network Embeddings ExplainedTensorFlow Guide to EmbeddingsBook Recommendation System Using EmbeddingsEmbedding 的理解Graph Embedding:深度学习推荐系统的"基本操作"原创 2019-11-22 22:19:35 · 159 阅读 · 0 评论 -
docker pull的镜像更新源问题
问题pull下来的镜像没有vi等各种基本软件,需要安装,系统源又太慢,使用如下命令(复制一次执行)mv /etc/apt/sources.list /etc/apt/sources.list.bak &&echo "deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse"...原创 2019-11-10 20:17:57 · 979 阅读 · 0 评论 -
[10/22/2019]Fuzz的基本概念记录
fuzz的一些概念本文为日常记录文,内容为《FUZZING Brute Force Vulnerability Discovery》的阅读记录第四章 常见的协议元素名字-值对块标识符块长度校验和第五章 有效模糊测试的需求可重现性:fuzzer应该具备重现测试结果的能力文档记录可重用性:构建一些可重用的特征,以便未来在测试另一种不通的文件格式时能够节省时间(考虑抽象或者使f...原创 2019-10-22 21:21:49 · 366 阅读 · 0 评论 -
[12.25]university's firewall cause the error of FTP connection
StoryI purchased a tengxu-yun server long time ago.When I got it,i can’t wait to establish a FTP server on it.But the problem is my laptop can connect with my FTP server,but it can’t read the catalog...原创 2018-12-25 11:43:39 · 200 阅读 · 0 评论 -
[12.24]a simple tool to obfuscate IP address
Today,When I browse through the twitter as usual,I found a simple tool which can Convert an IP address into Integer, Hexadecimal , Octal Or IPv6.Here is the post of it:https://amp.kitploit.com/2018/1...原创 2018-12-24 23:52:41 · 356 阅读 · 0 评论 -
pip换源
pip国内的一些镜像阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 豆瓣(douban) http://pypi.douban.com/simple/ 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ 中...转载 2018-11-21 22:31:48 · 182 阅读 · 0 评论 -
安装win32pipe
python2安装winpipe时找不到该module正确方法:pip install pypiwin32原创 2018-11-03 13:33:22 · 1167 阅读 · 0 评论 -
ubuntu16.04安装LAMP
1.安装Apachesudo apt-get install apache2测试: 浏览器访问localhost,出现Apache2网页。查看状态:ervice apache2 status操作:service apache2 start/stop/restartWeb目录: /var/www/html安装目录: /etc/apache2/全局配置: /et...原创 2018-10-30 20:09:32 · 313 阅读 · 0 评论 -
php PCNTL模块启用
windows下不能使用需要在CLI下使用php -m 查看已安装模块php -i | grep pcntl 查看模块是否可用原创 2018-11-01 09:27:08 · 1167 阅读 · 0 评论 -
[1.11]50 principles for Scaling Web sites
前言《高扩展性网站的50条原则》读后感系列文章1第一章 化简方程本章主要提及对于管理者的一些建议本章中提到了六条原则,分别是不要过度设计设计时要考虑扩展性(DID方法)把方案一简再简减少DNS查找尽可能减少对象使用同一品牌的网络设备一些思考其实这一章感觉稍有混乱,前三条是设计和实施时的原则,而后三条似乎又比较具体,且跟化简关系不大,暂且不吐槽总的来说,设计的时候...原创 2019-01-11 16:49:01 · 240 阅读 · 0 评论 -
[1.16]Today of php Trojan analysis
中文摘要每日记录。最近生病了,就一个样例本文内容包含php木马分析,函数preg_replace_callback_array,php正则匹配模式学习Sample1<?php $subject = 'little hann'; preg_replace_callback_array( [ '~[t]+~i' => functio...原创 2019-01-16 22:49:26 · 290 阅读 · 0 评论 -
写毕设word使用记录
0x00 前言记录一下使用word写毕设的一些之前不会的小技巧0x01 单倍行距间距不一样“单倍行距”不比固定值,它是跟字号成比例关系的。如果你设置行距的上下行有大字号的,“单倍行距”肯定就大了。0x02 word怎样制作第几页,共几页插入页码,选择x/y格式,修改为第x页,共y页即可0x03 Word论文写作如何实现公式居中、编号右对齐第一步:插入表格在公式所在行居中插入一行三列...原创 2019-02-26 10:22:51 · 398 阅读 · 0 评论