加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gdbinit.py 789 Bytes
一键复制 编辑 原始数据 按行查看 历史
Disconnect3d 提交于 2021-09-20 16:53 . Add patch command
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import locale
import sys
from os import path, environ
directory, file = path.split(__file__)
directory = path.expanduser(directory)
directory = path.abspath(directory)
sys.path.append(directory)
environ['PWNLIB_NOTERM'] = '1'
# warn if the user has different encoding than utf-8
encoding = locale.getpreferredencoding()
if encoding != 'UTF-8':
print('******')
print('Your encoding ({}) is different than UTF-8. pwndbg might not work properly.'.format(encoding))
print('You might try launching gdb with:')
print(' LC_ALL=en_US.UTF-8 PYTHONIOENCODING=UTF-8 gdb')
print('Make sure that en_US.UTF-8 is activated in /etc/locale.gen and you called locale-gen')
print('******')
import pwndbg # isort:skip
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化