首页 > 其他分享 >Katana:一款功能强大的下一代网络爬虫框架

Katana:一款功能强大的下一代网络爬虫框架

时间:2023-05-25 21:38:32浏览次数:49  
标签:www 4965577f youtube Katana 爬虫 功能强大 https desktop com

关于Katana

Katana是一款功能强大的下一代网络爬虫框架,在该工具的帮助下,广大研究人员可以轻松完成资源爬取和渗透测试阶段的信息收集任务。

功能介绍

1、快速且完全可配置的网络资源爬取; 2、支持标准模式和Headless模式; 3、JavaScript解析/爬取; 4、可自定义的自动化表单填充; 5、范围控制-预配置字段/正则表达式; 6、可自定义输出-预定义字段; 7、输入数据支持STDIN、URL和列表文件形式; 8、输出数据支持STDOUT、文件和JSON格式;

工具安装

Katana的使用需要Go v1 .18环境,安装并配置好Go环境之后,广大研究人员就可以运行下列命令来安装Katana:

go install github.com/projectdiscovery/katana/cmd/katana@latest

或者直接访问该项目的【Release页面】下载预编译的工具代码。

Docker安装

docker pull projectdiscovery/katana:latest

使用Docker以标准模式运行Katana:

docker run projectdiscovery/katana:latest -u https://tesla.com

使用Docker以Headless模式运行Katana:

docker run projectdiscovery/katana:latest -u https://tesla.com -system-chrome -headless

Ubuntu安装

首先,我们需要使用下列命令安装该工具所需的依赖组件:

sudo apt update

sudo snap refresh

sudo apt install zip curl wget git

sudo snap install golang --classic

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

sudo apt update

sudo apt install google-chrome-stable

然后运行下列命令安装Katana:

go install github.com/projectdiscovery/katana/cmd/katana@latest

工具使用

URL输入

katana -u https://tesla.com

多目标URL输入(逗号分隔目标)

katana -u https://tesla.com,https://google.com

列表输入

$ cat url_list.txt

 

https://tesla.com

https://google.com

STDIN管道输入

echo https://tesla.com | katana
cat domains | httpx | katana

Katana运行结果样例

katana -u https://youtube.com

 

   __        __                

  / /_____ _/ /____ ____  ___ _

 /  '_/ _  / __/ _  / _ \/ _  /

/_/\_\\_,_/\__/\_,_/_//_/\_,_/ v0.0.1                     

 

      projectdiscovery.io

 

[WRN] Use with caution. You are responsible for your actions.

[WRN] Developers assume no liability and are not responsible for any misuse or damage.

https://www.youtube.com/

https://www.youtube.com/about/

https://www.youtube.com/about/press/

https://www.youtube.com/about/copyright/

https://www.youtube.com/t/contact_us/

https://www.youtube.com/creators/

https://www.youtube.com/ads/

https://www.youtube.com/t/terms

https://www.youtube.com/t/privacy

https://www.youtube.com/about/policies/

https://www.youtube.com/howyoutubeworks?utm_campaign=ytgen&utm_source=ythp&utm_medium=LeftNav&utm_content=txt&u=https%3A%2F%2Fwww.youtube.com%2Fhowyoutubeworks%3Futm_source%3Dythp%26utm_medium%3DLeftNav%26utm_campaign%3Dytgen

https://www.youtube.com/new

https://m.youtube.com/

https://www.youtube.com/s/desktop/4965577f/jsbin/desktop_polymer.vflset/desktop_polymer.js

https://www.youtube.com/s/desktop/4965577f/cssbin/www-main-desktop-home-page-skeleton.css

https://www.youtube.com/s/desktop/4965577f/cssbin/www-onepick.css

https://www.youtube.com/s/_/ytmainappweb/_/ss/k=ytmainappweb.kevlar_base.0Zo5FUcPkCg.L.B1.O/am=gAE/d=0/rs=AGKMywG5nh5Qp-BGPbOaI1evhF5BVGRZGA

https://www.youtube.com/opensearch?locale=en_GB

https://www.youtube.com/manifest.webmanifest

https://www.youtube.com/s/desktop/4965577f/cssbin/www-main-desktop-watch-page-skeleton.css

https://www.youtube.com/s/desktop/4965577f/jsbin/web-animations-next-lite.min.vflset/web-animations-next-lite.min.js

https://www.youtube.com/s/desktop/4965577f/jsbin/custom-elements-es5-adapter.vflset/custom-elements-es5-adapter.js

https://www.youtube.com/s/desktop/4965577f/jsbin/webcomponents-sd.vflset/webcomponents-sd.js

https://www.youtube.com/s/desktop/4965577f/jsbin/intersection-observer.min.vflset/intersection-observer.min.js

https://www.youtube.com/s/desktop/4965577f/jsbin/scheduler.vflset/scheduler.js

https://www.youtube.com/s/desktop/4965577f/jsbin/www-i18n-constants-en_GB.vflset/www-i18n-constants.js

https://www.youtube.com/s/desktop/4965577f/jsbin/www-tampering.vflset/www-tampering.js

https://www.youtube.com/s/desktop/4965577f/jsbin/spf.vflset/spf.js

https://www.youtube.com/s/desktop/4965577f/jsbin/network.vflset/network.js

https://www.youtube.com/howyoutubeworks/

https://www.youtube.com/trends/

https://www.youtube.com/jobs/

https://www.youtube.com/kids/

JSON格式输出

katana -u https://example.com -json | jq .
{

  "timestamp": "2023-03-20T16:23:58.027559+05:30",

  "request": {

    "method": "GET",

    "endpoint": "https://example.com",

    "raw": "GET / HTTP/1.1\r\nHost: example.com\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36\r\nAccept-Encoding: gzip\r\n\r\n"

  },

  "response": {

    "status_code": 200,

    "headers": {

      "accept_ranges": "bytes",

      "expires": "Mon, 27 Mar 2023 10:53:58 GMT",

      "last_modified": "Thu, 17 Oct 2019 07:18:26 GMT",

      "content_type": "text/html; charset=UTF-8",

      "server": "ECS (dcb/7EA3)",

      "vary": "Accept-Encoding",

      "etag": "\"3147526947\"",

      "cache_control": "max-age=604800",

      "x_cache": "HIT",

      "date": "Mon, 20 Mar 2023 10:53:58 GMT",

      "age": "331239"

    },

    "body": "<!doctype html>\n<html>\n<head>\n    <title>Example Domain</title>\n\n    <meta charset=\"utf-8\" />\n    <meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <style type=\"text/css\">\n    body {\n        background-color: #f0f0f2;\n        margin: 0;\n        padding: 0;\n        font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n        \n    }\n    div {\n        width: 600px;\n        margin: 5em auto;\n        padding: 2em;\n        background-color: #fdfdff;\n        border-radius: 0.5em;\n        box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n    }\n    a:link, a:visited {\n        color: #38488f;\n        text-decoration: none;\n    }\n    @media (max-width: 700px) {\n        div {\n            margin: 0 auto;\n            width: auto;\n        }\n    }\n    </style>    \n</head>\n\n<body>\n<div>\n    Example Domain\n    <p>This domain is for use in illustrative examples in documents. You may use this\n    domain in literature without prior coordination or asking for permission.</p>\n    <p><a rel="nofollow" href=\"https://www.iana.org/domains/example\">More information...</a></p>\n</div>\n</body>\n</html>\n",

    "technologies": [

      "Azure",

      "Amazon ECS",

      "Amazon Web Services",

      "Docker",

      "Azure CDN"

    ],

    "raw": "HTTP/1.1 200 OK\r\nContent-Length: 1256\r\nAccept-Ranges: bytes\r\nAge: 331239\r\nCache-Control: max-age=604800\r\nContent-Type: text/html; charset=UTF-8\r\nDate: Mon, 20 Mar 2023 10:53:58 GMT\r\nEtag: \"3147526947\"\r\nExpires: Mon, 27 Mar 2023 10:53:58 GMT\r\nLast-Modified: Thu, 17 Oct 2019 07:18:26 GMT\r\nServer: ECS (dcb/7EA3)\r\nVary: Accept-Encoding\r\nX-Cache: HIT\r\n\r\n<!doctype html>\n<html>\n<head>\n    <title>Example Domain</title>\n\n    <meta charset=\"utf-8\" />\n    <meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <style type=\"text/css\">\n    body {\n        background-color: #f0f0f2;\n        margin: 0;\n        padding: 0;\n        font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n        \n    }\n    div {\n        width: 600px;\n        margin: 5em auto;\n        padding: 2em;\n        background-color: #fdfdff;\n        border-radius: 0.5em;\n        box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n    }\n    a:link, a:visited {\n        color: #38488f;\n        text-decoration: none;\n    }\n    @media (max-width: 700px) {\n        div {\n            margin: 0 auto;\n            width: auto;\n        }\n    }\n    </style>    \n</head>\n\n<body>\n<div>\n    Example Domain\n    <p>This domain is for use in illustrative examples in documents. You may use this\n    domain in literature without prior coordination or asking for permission.</p>\n    <p><a rel="nofollow" href=\"https://www.iana.org/domains/example\">More information...</a></p>\n</div>\n</body>\n</html>\n"

  }

}

工具运行截图

请在此添加图片描述

许可证协议

本项目的开发与发布遵循MIT开源许可证协议。

标签:www,4965577f,youtube,Katana,爬虫,功能强大,https,desktop,com
From: https://blog.51cto.com/u_15323646/6350847

相关文章

  • 动态远程桌面如何用来做爬虫
    爬虫需要动态IP主要是为了避免被目标网站封禁或限制访问。如果使用固定IP进行爬取,很容易被目标网站识别出来并封禁,导致无法继续爬取数据。而使用动态IP可以让爬虫在不同的IP地址之间切换,降低被封禁的风险。此外,动态IP还可以帮助爬虫绕过一些反爬虫机制,提高爬取效率。远程桌面VPS可......
  • aiohttp 异步爬虫实战
    想检测一下内网开放8080端口提供http服务的计算机,写了以下代码:#导入requests包importrequests,pathlib#发送请求defreq(ip):try:print(ip)r=requests.get(ip,timeout=0.5)ifr.status_code==200:......
  • 自写爬虫工具——transfer-headers
    transfer-headers,转换请求头这两天趁有时间浅学了一下易语言,之前一直用python写工具,但python写启动软件慢,而且编译文件太大,易语言学的很浅,用中文写很不习惯,==因为经常做爬虫,经常要把请求头转换到python/代码里,每次做重复工作浪费时间,就自己写了这么个小工具,有的人会说,转换成、......
  • 入门爬虫示例-爬取豆瓣短评
    群里有个小妹妹,让我帮她写的代码,好像是作业什么的。花了几分钟看了一下,随便写写,分享给有需要的童鞋,我用python3写的,实现的功能就是:爬取豆瓣短评,然后将数据写入本地的excel表格,数据大概有,电影名称,评分,评论人数,短评四项,稍微修改下也可以爬取其他数据。这属于入门学习的爬虫,博客里的......
  • Python 自动化爬虫利器 Playwright
    Python自动化爬虫利器PlaywrightPythonPlaywright是一个基于Node.js的自动化测试库,它支持多种浏览器(Chrome、Firefox、Safari、Edge等),并提供了一些方便的API来模拟用户在浏览器中的行为。本篇将介绍PythonPlaywright库的基本使用教程。安装首先需要安装PythonPlay......
  • 医学绘图分析软件prism9 mac版功能强大
    GraphPadPrism9是一款医学绘图分析软件,由美国的一家公司开发。prism9具有直观、友好的用户界面,用户可以利用这款软件在屏幕上进行数据绘制和统计分析。该软件是专门为临床研究人员设计的,是一款功能强大的绘图工具,能够为临床医生提供方便、高效的数据输入。通过使用此软件,您可......
  • Python爬虫为什么需要库
    爬虫需要库是因为爬虫需要从网页中提取数据,并对数据进行处理和存储。库是一组已经封装好的工具,可以帮助爬虫快速地完成这些任务。这些库可以大大简化爬虫的开发过程,提高爬虫的效率和稳定性。Python爬虫常用的库有很多,以下是一些常用的库:1、requests:用于发送HTTP请求,获取网页内容。2......
  • 爬虫为什么会使用到代理ip?
    爬虫使用代理IP的主要目的是为了隐藏自己的真实IP地址,以避免被目标网站封禁或限制访问。如果一个爬虫频繁地向一个网站发送请求,而且每次请求的IP地址都相同,那么这个网站就有可能认为这是一种恶意行为,从而采取封禁或限制访问的措施。使用代理IP可以让爬虫在每次请求时使用不同的IP地......
  • Python多线程爬虫又来了
    Python多线程的主要好处是可以在单个程序中同时执行多个任务,从而提高应用程序的性能和效率。具体来说,多线程有以下几个优点:提高CPU利用率:通过多线程,可以更充分地利用CPU资源,尤其适用于计算密集型的任务。降低IO阻塞:对于需要等待IO操作完成的任务(如网络请求或文件读写),将它们放入......
  • 新手如何学习爬虫
    作为一种常见的网络技术,网络爬虫有很多相关的资源可以帮助新手学习。以下是一些有效的学习路径和资源:1、爬虫基础知识网络爬虫的基础知识包括HTTP协议、HTML/CSS/JavaScript,以及Python等编程语言的基础语法和库等。2、掌握Python编程Python是网络爬虫最常用的编程语言之一,新......