python2安装pwntools
本文最后更新于 2022年1月22日 下午
学无止境
0x00 前言
由于笔者的记性不好,故专门弄一个专区记录下在学习中的重复性操作,不断更新(也是逼迫自己不断学习)~
也会记录一点小 trick XD
python2 安装 pwntools
三条命令解决:
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
sudo python2 get-pip.py
pip2 install pwntools
hexo 博客迁移
- 从原电脑下载源码,删除 node_modules 文件夹,然后重新下载
- 准备好 git 和 node.js,然后进入相应文件夹,用 git 打开,输入如下命令:
npm install hexo-cli -g
npm install
npm install hexo-deployer-git --save
- 此时如果使用主题,需要把删除 node_modules 中的主题重新粘贴替换进来,主题文件就正常了。
- 测试,用 hexo s 来看到你的博客是否迁移成功
- 设置 git
git config --global user.name "xxx"
git config --global user.email "xxx@xx.com"
git init
- 编辑文章后,hexo d 上传成功即说明迁移成功
libc 版本的指定
需要用到 patchelf 和 glibc-all-in-one
patchelf 的安装:
git clone https://github.com/NixOS/patchelf/
cd patchelf
ls
./bootstrap.sh
如果报错则sudo apt-get install autoconf automake libtool
继续执行:
./bootstrap.sh
./configure
make
make check
sudo make install
glibc-all-in-one 的安装:
git clone https://github.com/matrix1001/glibc-all-in-one.git
cd glibc-all-in-one
有可能需要配置软连接到 python:
cd /usr/bin
ln -s /usr/bin/python3.8 python
再运行./update_list
更新到列表 ; cat list
即可看到 libc 列表
下载所需:
download list
download_old old_list
使用场景:
- 根据题目所给的 libc ,找对应版本的连接器(e.g. 2.27-3ubuntu1.6_amd64)
./download 2.27-3ubuntu1.6_amd64
- 然后把 ld 文件和 libc 复制到 pwn 题目录下
cd ./libs/2.27-3ubuntu1.6_amd64/
cp ./ld-2.27.so /tmp
cp ./libc-2.27.so /tmp
- 修改解释器和 libc:
ldd pwn
patchelf --set-interpreter ./ld-2.27.so ./pwn
patchelf --replace-needed libc.so.6 ./libc-2.27.so ./pwn
未完待续…
python2安装pwntools
https://k3ppf0r.github.io/2022/01/22/杂/python2安装pwntools/