<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>《Python黑帽子》 on Rainwo&#39;s Blog</title>
    <link>https://www.rainwo.xyz/series/python%E9%BB%91%E5%B8%BD%E5%AD%90/</link>
    <description>Recent content in 《Python黑帽子》 on Rainwo&#39;s Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-cn</language>
    <copyright>© 2026 Rainwo</copyright>
    <lastBuildDate>Sun, 27 Dec 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://www.rainwo.xyz/series/python%E9%BB%91%E5%B8%BD%E5%AD%90/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>《Python黑帽子》python3代码实现(第六章)</title>
      <link>https://www.rainwo.xyz/posts/%E7%AC%AC%E5%85%AD%E7%AB%A0-%E6%89%A9%E5%B1%95burp%E4%BB%A3%E7%90%86/</link>
      <pubDate>Sun, 27 Dec 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.rainwo.xyz/posts/%E7%AC%AC%E5%85%AD%E7%AB%A0-%E6%89%A9%E5%B1%95burp%E4%BB%A3%E7%90%86/</guid>
      <description>&lt;h1 class=&#34;relative group&#34;&gt;第六章 扩展Burp代理&#xA;    &lt;div id=&#34;第六章-扩展burp代理&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#%e7%ac%ac%e5%85%ad%e7%ab%a0-%e6%89%a9%e5%b1%95burp%e4%bb%a3%e7%90%86&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h1&gt;&#xA;&lt;blockquote&gt;&lt;p&gt;这一章的学习，个人感觉比前面几章稍微有难度一些，虽然过程挺艰苦的，但还算是勉强做出来了吧：）&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;p&gt;这一章节的内容，因为jython对python3的兼容性不乐观，所以我们将使用python2编写代码。&lt;/p&gt;&#xA;&#xA;&lt;h2 class=&#34;relative group&#34;&gt;Jython？&#xA;    &lt;div id=&#34;jython&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#jython&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Jython是一种完整的语言，而不是一个Java翻译器或仅仅是一个Python&lt;a href=&#34;https://baike.baidu.com/item/%E7%BC%96%E8%AF%91%E5%99%A8/8853067&#34;  target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;编译器&lt;/a&gt;，它是一个Python语言在Java中的完全实现。Jython也有很多从CPython中继承的模块库。最有趣的事情是Jython不像CPython或其他任何高级语言，它提供了对其实现语言的一切存取。所以Jython不仅给你提供了Python的库，同时也提供了所有的Java类。这使其有一个巨大的资源库。&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>《Python黑帽子》python3代码实现(第五章)</title>
      <link>https://www.rainwo.xyz/posts/%E7%AC%AC%E4%BA%94%E7%AB%A0-web%E6%94%BB%E5%87%BB/</link>
      <pubDate>Wed, 21 Oct 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.rainwo.xyz/posts/%E7%AC%AC%E4%BA%94%E7%AB%A0-web%E6%94%BB%E5%87%BB/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;第五章 Web攻击&#xA;    &lt;div id=&#34;第五章-web攻击&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#%e7%ac%ac%e4%ba%94%e7%ab%a0-web%e6%94%bb%e5%87%bb&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&#xA;&lt;h3 class=&#34;relative group&#34;&gt;Web的套接字函数库：&lt;del&gt;urllib2&lt;/del&gt; （&lt;strong&gt;Requests&lt;/strong&gt;）&#xA;    &lt;div id=&#34;web的套接字函数库urllib2-requests&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#web%e7%9a%84%e5%a5%97%e6%8e%a5%e5%ad%97%e5%87%bd%e6%95%b0%e5%ba%93urllib2-requests&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h3&gt;&#xA;&lt;p&gt;这里原著中python2所使用的urllib2模块要被淘汰了，这里我们使用python3的requests模块实现相同的功能。&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>《Python黑帽子》python3代码实现(第四章)</title>
      <link>https://www.rainwo.xyz/posts/%E7%AC%AC%E5%9B%9B%E7%AB%A0-scapy-%E7%BD%91%E7%BB%9C%E7%9A%84%E6%8E%8C%E6%8E%A7%E8%80%85/</link>
      <pubDate>Thu, 03 Sep 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.rainwo.xyz/posts/%E7%AC%AC%E5%9B%9B%E7%AB%A0-scapy-%E7%BD%91%E7%BB%9C%E7%9A%84%E6%8E%8C%E6%8E%A7%E8%80%85/</guid>
      <description>&lt;h1 class=&#34;relative group&#34;&gt;第四章 Scapy: 网络的掌控者&#xA;    &lt;div id=&#34;第四章-scapy-网络的掌控者&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#%e7%ac%ac%e5%9b%9b%e7%ab%a0-scapy-%e7%bd%91%e7%bb%9c%e7%9a%84%e6%8e%8c%e6%8e%a7%e8%80%85&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h1&gt;&#xA;&#xA;&lt;h5 class=&#34;relative group&#34;&gt;&lt;em&gt;窃取Email认证&lt;/em&gt;&#xA;    &lt;div id=&#34;窃取email认证&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#%e7%aa%83%e5%8f%96email%e8%ae%a4%e8%af%81&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h5&gt;&#xA;&lt;p&gt;在我们敲写这一段程序之前我们需要知道&lt;strong&gt;scapy是不支持Windows操作系统的&lt;/strong&gt;，所以此章节所有的脚本都必须在Linux系统上面运行，接下来我们简单了解下嗅探器&lt;code&gt;sniff()&lt;/code&gt;方法：&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>《Python黑帽子》python3代码实现(第三章)</title>
      <link>https://www.rainwo.xyz/posts/%E7%AC%AC%E4%B8%89%E7%AB%A0-%E7%BD%91%E7%BB%9C%E5%8E%9F%E5%A7%8B%E5%A5%97%E6%8E%A5%E5%AD%97%E5%92%8C%E6%B5%81%E9%87%8F%E5%97%85%E6%8E%A2/</link>
      <pubDate>Wed, 02 Sep 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.rainwo.xyz/posts/%E7%AC%AC%E4%B8%89%E7%AB%A0-%E7%BD%91%E7%BB%9C%E5%8E%9F%E5%A7%8B%E5%A5%97%E6%8E%A5%E5%AD%97%E5%92%8C%E6%B5%81%E9%87%8F%E5%97%85%E6%8E%A2/</guid>
      <description>&lt;h1 class=&#34;relative group&#34;&gt;第三章 网络：原始套接字和流量嗅探&#xA;    &lt;div id=&#34;第三章-网络原始套接字和流量嗅探&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#%e7%ac%ac%e4%b8%89%e7%ab%a0-%e7%bd%91%e7%bb%9c%e5%8e%9f%e5%a7%8b%e5%a5%97%e6%8e%a5%e5%ad%97%e5%92%8c%e6%b5%81%e9%87%8f%e5%97%85%e6%8e%a2&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h1&gt;&#xA;&#xA;&lt;h6 class=&#34;relative group&#34;&gt;&lt;em&gt;Windows上和Linux上的包嗅探&lt;/em&gt;&#xA;    &lt;div id=&#34;windows上和linux上的包嗅探&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#windows%e4%b8%8a%e5%92%8clinux%e4%b8%8a%e7%9a%84%e5%8c%85%e5%97%85%e6%8e%a2&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h6&gt;&#xA;&lt;p&gt;在示例中，我们首先导入socket与os模块，根据os.name判断主机操作系统，该变量属性当前只注册了三个值，具体如下：&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>《Python黑帽子》python3代码实现(第二章)</title>
      <link>https://www.rainwo.xyz/posts/python-black-hat/</link>
      <pubDate>Mon, 24 Aug 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.rainwo.xyz/posts/python-black-hat/</guid>
      <description>&lt;h1 class=&#34;relative group&#34;&gt;《Python黑帽子》代码实现&#xA;    &lt;div id=&#34;python黑帽子代码实现&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#python%e9%bb%91%e5%b8%bd%e5%ad%90%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h1&gt;&#xA;&lt;p&gt;本篇笔记全部用python3实现，本人大一在校生第一次写博客，有错误之处希望大家积极指出。&#xA;参考大佬博客：&#xA;&lt;a href=&#34;https://www.cnblogs.com/zhangyuxiang666/p/11010581.html&#34;  target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;https://www.cnblogs.com/zhangyuxiang666/p/11010581.html&lt;/a&gt;&#xA;&lt;a href=&#34;https://blog.csdn.net/qq_39038028/article/details/72860112&#34;  target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;https://blog.csdn.net/qq_39038028/article/details/72860112&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;&lt;h1 class=&#34;relative group&#34;&gt;第二章 网络基础:&#xA;    &lt;div id=&#34;第二章-网络基础&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#%e7%ac%ac%e4%ba%8c%e7%ab%a0-%e7%bd%91%e7%bb%9c%e5%9f%ba%e7%a1%80&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h1&gt;&#xA;&#xA;&lt;h5 class=&#34;relative group&#34;&gt;&lt;em&gt;创建Tcp客户端（tcpClient.py):&lt;/em&gt;&#xA;    &lt;div id=&#34;创建tcp客户端tcpclientpy&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#%e5%88%9b%e5%bb%batcp%e5%ae%a2%e6%88%b7%e7%ab%aftcpclientpy&#34; aria-label=&#34;锚点&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h5&gt;&#xA;&lt;p&gt;示例中引用了首先导入socket模块，使用&lt;code&gt;socket()&lt;/code&gt;方法来创建套接字并实例化对象，&lt;code&gt;AF_INET&lt;/code&gt;表明IPv4地址，&lt;code&gt;SOCK_STREAM&lt;/code&gt;表明是关于TCP套接字，然后使用&lt;code&gt;connect()&lt;/code&gt;方法连接tcp服务端，使用&lt;code&gt;send()&lt;/code&gt;和&lt;code&gt;recv()&lt;/code&gt;方法来发送和接受数据，这里需要注意的是python3套接字的传输需要将数据转为&lt;strong&gt;byte&lt;/strong&gt;的形式，使数据可视化又需要解码为&lt;strong&gt;str&lt;/strong&gt;，这里是简单的构造了一个http请求。&lt;/p&gt;</description>
      
    </item>
    
  </channel>
</rss>
