python---kali linux anzhuang pexpect

来源:互联网 发布:vb6.0软件发展 编辑:程序博客网 时间:2024/06/05 11:50

python—kali linux anzhuang pexpect

1.downlaod pexpect

root@kali:/usr/share/scrapy# cd ..root@kali:/usr/share# git clone https://github.com/pexpect/pexpect.gitCloning into 'pexpect'...remote: Counting objects: 6377, done.remote: Compressing objects: 100% (15/15), done.remote: Total 6377 (delta 4), reused 6 (delta 1), pack-reused 6361Receiving objects: 100% (6377/6377), 8.31 MiB | 315.00 KiB/s, done.Resolving deltas: 100% (3975/3975), done.Checking connectivity... done.root@kali:/usr/share# cd pexpect/root@kali:/usr/share/pexpect# lsDEVELOPERS.rst  doc  examples  LICENSE  MANIFEST.in  notes  pexpect  README.rst  requirements-testing.txt  setup.cfg  setup.py  tests  toolsroot@kali:/usr/share/pexpect# python setup.py install/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'  warnings.warn(msg)running install..................................................................................................running install_egg_infoWriting /usr/local/lib/python2.7/dist-packages/pexpect-4.3.1.egg-inforoot@kali:/usr/share/pexpect# 

2.downlao pty

root@kali:/usr/share/pexpect# cd ..root@kali:/usr/share# tar -zxvf ptyprocess-0.5.2.tar.gz ptyprocess-0.5.2/.gitignoreptyprocess-0.5.2/.travis.ymlptyprocess-0.5.2/LICENSEptyprocess-0.5.2/README.rstptyprocess-0.5.2/docs/Makefileptyprocess-0.5.2/docs/api.rstptyprocess-0.5.2/docs/conf.pyptyprocess-0.5.2/docs/images/pty_vs_popen.pngptyprocess-0.5.2/docs/images/pty_vs_popen.svgptyprocess-0.5.2/docs/index.rstptyprocess-0.5.2/flit.iniptyprocess-0.5.2/ptyprocess/__init__.pyptyprocess-0.5.2/ptyprocess/_fork_pty.pyptyprocess-0.5.2/ptyprocess/ptyprocess.pyptyprocess-0.5.2/ptyprocess/util.pyptyprocess-0.5.2/readthedocs.ymlptyprocess-0.5.2/tests/__init__.pyptyprocess-0.5.2/tests/test_echo.pyptyprocess-0.5.2/tests/test_invalid_binary.pyptyprocess-0.5.2/tests/test_preexec_fn.pyptyprocess-0.5.2/tests/test_spawn.pyptyprocess-0.5.2/tests/test_wait.pyptyprocess-0.5.2/setup.pyptyprocess-0.5.2/PKG-INFOroot@kali:/usr/share# cd ptyprocess-0.5.2/root@kali:/usr/share/ptyprocess-0.5.2# lsdocs  flit.ini  LICENSE  PKG-INFO  ptyprocess  README.rst  readthedocs.yml  setup.py  testsroot@kali:/usr/share/ptyprocess-0.5.2# python setup.py installrunning installrunning buildrunning build_pycreating buildcreating build/lib.linux-i686-2.7creating build/lib.linux-i686-2.7/ptyprocesscopying ptyprocess/util.py -> build/lib.linux-i686-2.7/ptyprocesscopying ptyprocess/ptyprocess.py -> build/lib.linux-i686-2.7/ptyprocesscopying ptyprocess/_fork_pty.py -> build/lib.linux-i686-2.7/ptyprocesscopying ptyprocess/__init__.py -> build/lib.linux-i686-2.7/ptyprocessrunning install_libcreating /usr/local/lib/python2.7/dist-packages/ptyprocesscopying build/lib.linux-i686-2.7/ptyprocess/util.py -> /usr/local/lib/python2.7/dist-packages/ptyprocesscopying build/lib.linux-i686-2.7/ptyprocess/ptyprocess.py -> /usr/local/lib/python2.7/dist-packages/ptyprocesscopying build/lib.linux-i686-2.7/ptyprocess/_fork_pty.py -> /usr/local/lib/python2.7/dist-packages/ptyprocesscopying build/lib.linux-i686-2.7/ptyprocess/__init__.py -> /usr/local/lib/python2.7/dist-packages/ptyprocessbyte-compiling /usr/local/lib/python2.7/dist-packages/ptyprocess/util.py to util.pycbyte-compiling /usr/local/lib/python2.7/dist-packages/ptyprocess/ptyprocess.py to ptyprocess.pycbyte-compiling /usr/local/lib/python2.7/dist-packages/ptyprocess/_fork_pty.py to _fork_pty.pycbyte-compiling /usr/local/lib/python2.7/dist-packages/ptyprocess/__init__.py to __init__.pycrunning install_egg_infoWriting /usr/local/lib/python2.7/dist-packages/ptyprocess-0.5.2.egg-inforoot@kali:/usr/share/ptyprocess-0.5.2# cd ..

3.download setuptools

root@kali:/usr/share# cd pexpect/root@kali:/usr/share/pexpect# python setup.py install/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'  warnings.warn(msg)running installrunning buildrunning build_pyrunning install_libbyte-compiling /usr/local/lib/python2.7/dist-packages/pexpect/_async.py to _async.pyc  File "/usr/local/lib/python2.7/dist-packages/pexpect/_async.py", line 18    transport, pw = yield from asyncio.get_event_loop()\                             ^SyntaxError: invalid syntaxrunning install_egg_infoRemoving /usr/local/lib/python2.7/dist-packages/pexpect-4.3.1.egg-infoWriting /usr/local/lib/python2.7/dist-packages/pexpect-4.3.1.egg-inforoot@kali:/usr/share/pexpect# sudo apt-get install python-setuptoolsReading package lists... DoneBuilding dependency tree       Reading state information... Donepython-setuptools is already the newest version.0 upgraded, 0 newly installed, 0 to remove and 2130 not upgraded.root@kali:/usr/share/pexpect# sudo apt-get install setuptoolsReading package lists... DoneBuilding dependency tree       Reading state information... DoneE: Unable to locate package setuptoolsroot@kali:/usr/share/pexpect# cd ..

more Error!!!

root@kali:/usr/share/pexpect# cd ..root@kali:/usr/share# git clone https://github.com/pypa/setuptools.gitCloning into 'setuptools'...remote: Counting objects: 37255, done.remote: Compressing objects: 100% (21/21), done.remote: Total 37255 (delta 12), reused 22 (delta 9), pack-reused 37225Receiving objects: 100% (37255/37255), 33.05 MiB | 293.00 KiB/s, done.Resolving deltas: 100% (18388/18388), done.Checking connectivity... done.root@kali:/usr/share# cd setuptools/root@kali:/usr/share/setuptools# lsappveyor.yml  CHANGES.rst  docs             launcher.c  MANIFEST.in              pavement.py    pytest.ini  setup.cfg  setuptools  tox.inibootstrap.py  conftest.py  easy_install.py  LICENSE     msvc-build-launcher.cmd  pkg_resources  README.rst  setup.py   testsroot@kali:/usr/share/setuptools# python setup.py installTraceback (most recent call last):  File "setup.py", line 186, in <module>    require_metadata()  File "setup.py", line 24, in require_metadata    raise RuntimeError(msg)RuntimeError: Cannot build setuptools without metadata. Run `bootstrap.py`.root@kali:/usr/share/setuptools# python bootstrap.py adding minimal entry_pointsRegenerating egg_info.........................................................................................................writing manifest file 'setuptools.egg-info/SOURCES.txt'root@kali:/usr/share/setuptools# python easy_install.py setuptoolsProcessing setuptoolserror: Couldn't find a setup script in /usr/share/setuptools/setuptoolsroot@kali:/usr/share/setuptools# python easy_install.py setup*Processing setup.cfgerror: Not a recognized archive type: setup.cfgroot@kali:/usr/share/setuptools# lsappveyor.yml  CHANGES.rst  docs             launcher.c  MANIFEST.in              pavement.py    pytest.ini  setup.cfg  setuptools           testsbootstrap.py  conftest.py  easy_install.py  LICENSE     msvc-build-launcher.cmd  pkg_resources  README.rst  setup.py   setuptools.egg-info  tox.iniroot@kali:/usr/share/setuptools# python easy_install.py pexpectSearching for pexpectBest match: pexpect 4.3.1Adding pexpect 4.3.1 to easy-install.pth fileUsing /usr/local/lib/python2.7/dist-packagesProcessing dependencies for pexpectFinished processing dependencies for pexpectroot@kali:/usr/share/setuptools# pythonPython 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import pexpect>>> import pxssh>>> exitUse exit() or Ctrl-D (i.e. EOF) to exit>>> exit()root@kali:/usr/share/setuptools# 

OK!!!

阅读全文
'); })();
0 0
原创粉丝点击
热门IT博客
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 咽口水时耳朵响怎么办 吞口水耳朵痛是怎么办 怀孕后大腿根疼怎么办 耳垂长了个脓包怎么办 头痒怎么办最快最有效 婴儿起了热疹怎么办 剑灵内力没有了怎么办 对上学有恐惧症怎么办 经常被别人说傻怎么办 伪声老是太监音怎么办 比熊幼犬半夜叫怎么办 两个月比熊拉稀怎么办 比熊幼犬一直叫怎么办 狗狗不吃狗粮怎么办 2岁泰迪不吃狗粮怎么办 4个月婴幼儿腹泻怎么办 9个月婴幼儿腹泻怎么办 3个月婴幼儿腹泻怎么办 2个月婴幼儿腹泻怎么办 7个月婴幼儿腹泻怎么办 孕妇吃了八角热怎么办 被鱼骨刺到喉咙怎么办 手背被鱼刺刺了怎么办 网购彩票中大奖怎么办 卓易彩票中10000怎么办 被暗访组查到了怎么办 淘宝网店封号了怎么办 股票跌的太厉害怎么办 在美国中了彩票怎么办 微信支付错了怎么办 全民彩票中500万怎么办 赌博欠10万外债怎么办 4k电视不清晰怎么办 4k电视画面模糊怎么办 脚被钉子扎肿了怎么办 脚底被钉子扎了怎么办 壳牌加油卡丢了怎么办 中石油的加油卡怎么办 单位加油卡丢了怎么办 中石化卡丢了怎么办 购物卡过期五年怎么办