Skip to main content

Pwntools Extension that Just Works

Project description

PwNo

✨ Pwntools Extensions that Just Works! ✨

license

pypi python

GitHub last commit

快速拓展你的 pwntools,使其更加易用,针对 pwn 开发

Features

  • 开箱即用
  • 完整的类型注解
  • 好用简单的小工具
  • And more...

TL;DR

一键缩写

see context

from pwn import *
from pwno import *

p = process(['/path/to/your/elf'])

sl(b'cat /flag')
ia()  # 无需设置!

And More ...

Installation

使用 pip 安装
pip install PwNo
本地安装
git clone https://github.com/MuelNova/PwNo
cd PwNo
pip install -e .

Usage

只需在你的 exp.py 导入

from pwno import *

Docs

context

PwNo 为脚本实现了缩写功能以加速你的脚本编写,而你不需要做任何操作

默认的导出:

​ >>> send = process.send ​ >>> sl = process.sendline ​ >>> sa = process.sendafter ​ >>> sla = process.sendlineafter

​ >>> recv = process.recv ​ >>> recvu = process.recvuntil ​ >>> recvn = process.recvn ​ >>> recvl = process.recvline

​ >>> ia = process.interactive

from pwn import *
from pwno import *

p = process(['/path/to/your/elf'])

sl(b'cat /flag')  # equals to p.sendline(b'cat /flag')
ia()  # equals to p.interactive()

这对变量名没有任何要求

from pwn import *
from pwno import *

I_Hate_PWN = remote('weird.challenge.pwn', 11451)

sl(b'cat /flag')  # equals to I_Hate_PWN.sendline(b'cat /flag')
ia()  # equals to I_Hate_PWN.interactive()

同时也支持循环操作,甚至修改变量名!在原来的 process 不可用的情况下,PwNo 会重新找到最新创建的 process/remote

from pwn import *
from pwno import *

p = process(['/path/to/your/elf'])
# I hate the name 'p'
p.close()
while True:
    sh = process(['/path/to/your/elf'])

    sl('I like sh!')  # equals to sh.sendline('I like sh!')
    sh.close()

abbr

不喜欢 PwNo 设置的缩写?Make your own!

PwNo 导出了方法 abbr,使用它,你可以轻松的设置你自己的缩写,或是设置全局的缩写

from pwn import *
from pwno import *

p = process(['/path/to/your/elf'])
sh = process(['/path/to/your/elf'])

new_sl = abbr(process.sendline)  # Global Abbreviation
new_sl(b'sh')  # equals to sh.sendline(b'sh')


my_sl = abbr(p.sendline)
my_sl(b'OH~~~')  # equals to p.sendline(b'OH~~~')
new_sl(b'sh')  # equals to sh.sendline(b'sh')

sh.close()
new_sl(b'p')  # equals to p.sendline(b'p')

typing

pack

PwNo 为常用的包装与解包函数添加了类型注解,现在你终于不需要对着标红的 p64 \ u32 眉头紧皱了!

TypeHint

helper

PwNo 提供了省时省力的小工具加快你的解题。

uu64 / uu32

泄露地址仍然使用 u64(recv(6).ljust(8, b'\x00'))?为什么不试试

uu64(recv(6))

Editing...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pwno-0.1.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

pwno-0.1.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file pwno-0.1.1.tar.gz.

File metadata

  • Download URL: pwno-0.1.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for pwno-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8b59ddd35408ec7edbd0cf57b431fe46b166a25efe85a46e9ac7c7e1c7e69109
MD5 827a8aebdbe4797f33e50e913637b836
BLAKE2b-256 2f2cead3c17e4844cb1858cbddbc0e04c13bef60756d4be401659ed8505053b1

See more details on using hashes here.

File details

Details for the file pwno-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pwno-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for pwno-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49a7156aac25a4d0c5ae7d8cfba75c696755eab05e8fc54f0806a7abfafcc068
MD5 b5fcd049a525df3d2aa44c0078f966a0
BLAKE2b-256 e2ddc243c881ebdb9679a05ce83b4b75307dd0c600bc56e08d277b604df313ab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page