学习记录:pwntools安装及其环境配置

1,环境:kali2.0 64位

2,安装pwntools

安装 capstone

cd ~
git clone https://github.com/aquynh/capstone
cd capstone
make
make install
cd ~
git clone https://github.com/Gallopsled/pwntools
cd pwntools
python setup.py install
cd ~
python
>>> import pw
 
>>> pwn.asm("xor eax,eax")
'1\xc0'
安装成功

 
 
 3,python 自动补全 

首先查看自己的python路径

python
>>> import sys
>>> sys.path
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/wx-3.0-gtk2']
>>> exit()


然后 建立自己的startup.py

vi /usr/lib/python2.7/startup.py

  1 #!/usr/bin/python
  2 # python tab file
  3 
  4 import sys
  5 import readline
  6 import rlcompleter
  7 import atexit
  8 import os
  9 #tab completion
 10 readline.parse_and_bind('tab: complete')
 11 #history file
 12 histfile = os.path.join(os.environ['HOME'],'.pythonhistory')
 13 try:
 14     readline.read_history_file(histfile)
 15 except IOError:
 16     pass
 17 atexit.register(readline.write_history_file,histfile)
 18 del os,histfile,readline,rlcompleter


实践:(双击tab 自动补全)

root@kali:~# python
Python 2.7.11 (default, Jan 11 2016, 21:04:40) 
[GCC 5.3.1 20160101] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import startup
>>> import sys
>>> sys.


参考文章:http://www.cnblogs.com/pcat/p/5451780.html

http://www.tuicool.com/articles/iAfuamr

http://www.cnblogs.com/crazyforever/p/5014024.html


  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值