博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Jetty-attack-test
阅读量:4617 次
发布时间:2019-06-09

本文共 1244 字,大约阅读时间需要 4 分钟。

import httplib, urllib, ssl, string, sys, getoptfrom urlparse import urlparse'''Author: Gotham Digital SciencePurpose: This tool is intended to provide a quick-and-dirty way for organizations to test whether          their Jetty web server versions are vulnerable to JetLeak. Currently, this script does          not handle sites with invalid SSL certs. This will be fixed in a future iteration.'''if len(sys.argv) < 3:    print("Usage: jetleak.py [url] [port]")    sys.exit(1)url = urlparse(sys.argv[1])if url.scheme == '' and url.netloc == '':    print("Error: Invalid URL Entered.")    sys.exit(1)port = sys.argv[2]conn = Noneif url.scheme == "https":    conn = httplib.HTTPSConnection(url.netloc + ":" + port)elif url.scheme == "http":    conn = httplib.HTTPConnection(url.netloc + ":" + port)else:     print("Error: Only 'http' or 'https' URL Schemes Supported")    sys.exit(1)    x = "\x00"headers = {
"Referer": x}conn.request("POST", "/", "", headers)r1 = conn.getresponse()if (r1.status == 400 and ("Illegal character 0x0 in state" in r1.reason)): print("\r\nThis version of Jetty is VULNERABLE to JetLeak!")else: print("\r\nThis version of Jetty is NOT vulnerable to JetLeak.")

 

转载于:https://www.cnblogs.com/crac/p/6697044.html

你可能感兴趣的文章
所谓输入掩码技术,即只有数字键起作用
查看>>
Display对象,Displayable对象
查看>>
安装oracle11G,10G时都会出现:注册ocx时出现OLE初始化错误或ocx装载错误对话框
查看>>
数据结构(并查集):COGS 260. [NOI2002] 银河英雄传说
查看>>
生产环境下正则的应用实例(一)
查看>>
在CentOS7命令行模式下安装虚拟机
查看>>
Arduino可穿戴开发入门教程Arduino开发环境介绍
查看>>
Windows平台flex+gcc词法分析实验工具包
查看>>
3.Python基础 序列sequence
查看>>
Chapter 4 Syntax Analysis
查看>>
eclipse查看源码的配置
查看>>
通过AI识图判断图片是否为小票
查看>>
Linux——makefile编写
查看>>
vi/vim使用
查看>>
讨论Spring整合Mybatis时一级缓存失效得问题
查看>>
Maven私服配置Setting和Pom文件
查看>>
Linux搭建Nexus3.X构建maven私服
查看>>
Notepad++使用NppFTP插件编辑linux上的文件
查看>>
NPOI 操作Excel
查看>>
MySql【Error笔记】
查看>>