当前位置:网站首页>BP plug-in temporary code record
BP plug-in temporary code record
2022-07-27 02:42:00 【freshfox】
package burp;
import java.io.PrintWriter;
import java.util.List;
//import org.apache.http.client.methods.HttpPost;
public class BurpExtender implements IBurpExtender, IHttpListener,
IProxyListener, IScannerListener, IExtensionStateListener {
private IBurpExtenderCallbacks callbacks;
private PrintWriter stdout;
//
// implement IBurpExtender
//
@Override
public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) {
// keep a reference to our callbacks object
this.callbacks = callbacks;
// set our extension name
callbacks.setExtensionName("Event listeners");
// obtain our output stream
stdout = new PrintWriter(callbacks.getStdout(), true);
// register ourselves as an HTTP listener
callbacks.registerHttpListener(this);
// register ourselves as a Proxy listener
callbacks.registerProxyListener(this);
// register ourselves as a Scanner listener
callbacks.registerScannerListener(this);
// register ourselves as an extension state listener
callbacks.registerExtensionStateListener(this);
}
//
// implement IHttpListener
//
public String[] getHeaderNameValue(String header) {
String arr[] = {"", ""};
int index = header.indexOf(":");
if (index ==-1){
return arr;
}
arr[0] = header.substring(0, index);
arr[1] = header.substring(index + 1);
return arr;
}
@Override
public void processHttpMessage(int toolFlag, boolean messageIsRequest, IHttpRequestResponse messageInfo) {
if (!messageIsRequest) {
IExtensionHelpers helpers = this.callbacks.getHelpers();
IRequestInfo info = helpers.analyzeRequest(messageInfo.getRequest());
List<String> headers = info.getHeaders();
for (int i = 0; i < headers.size(); i++) {
//stdout.println(headers.get(i));
String header[] = getHeaderNameValue(headers.get(i));
stdout.println("header name : " + header[0] + " header value : " + header[1]);
}
}
}
//
// implement IProxyListener
//
@Override
public void processProxyMessage(boolean messageIsRequest, IInterceptedProxyMessage message) {
stdout.println(
(messageIsRequest ? "Proxy request to " : "Proxy response from ") +
message.getMessageInfo().getHttpService());
}
//
// implement IScannerListener
//
@Override
public void newScanIssue(IScanIssue issue) {
stdout.println("New scan issue: " + issue.getIssueName());
}
//
// implement IExtensionStateListener
//
@Override
public void extensionUnloaded() {
stdout.println("Extension was unloaded");
}
}边栏推荐
- Witness that the "decoding 2022 strong star of China's network security" is about to set sail
- Hcip first day
- What is the principle of synchronized lock escalation in multithreading?
- 项目时区问题解决
- excel整行删除,图片一起删除
- 什么是进程?
- 毕业进入HW,从测试工程师到项目经理,现如今在鹅厂年收入百万,我的给大家的一些建议...
- 平成千字文(へいせいせんじもん) (平成12年9月10日 石渡 明 作) 宇宙広遠 銀河永久 日月運行 不乱無休 地球公転 季節変移 黄道星座 太陽年周 故郷群島 南熱北冷 海洋温暖 気候順良 青空飛雲 諸野深緑 湖泉静息 谷川清流 春桜一面 新芽
- Hcip day 5 OSPF extended configuration experiment
- [use SQLite3 library to realize student information management system in Visual Studio 2019]
猜你喜欢

C语言程序的编译上

Risc-v tool chain compilation notes

What is the principle of synchronized lock escalation in multithreading?

小姐姐笔记:我是如何学习简单源码拓展视野的

Plato farm is expected to further expand its ecosystem through elephant swap

Hcip day 5 OSPF extended configuration experiment

Make static routing accessible to the whole network through ENSP

在腾讯测试岗干了5年,7月无情被辞,想给还在划水的兄弟提个醒.....

从单表到分表实现数据平滑迁移

【Redis】快速入门
随机推荐
Tabbar of customized wechat applet on uni app
蚂蚁京东新浪10位架构师424页佳作深入分布式缓存从原理到实践pdf
Fist guessing applet based on Object-C novice on the road
Witness that the "decoding 2022 strong star of China's network security" is about to set sail
关于序列化变量保存的坑,加了索引器的数据不能序列化
见证中国网安力量 “解码2022中国网安强星”即将启航
项目时区问题解决
OSPF路由信息协议-拓扑实验
The latest JD SMS login + silly girl robot nanny level deployment tutorial (July 24, 2022)
Ubuntu基于docker的mysql主从数据库配置
php+swoole
动态设置小程序swiper的高度
f8抓交通、f9抓兔子、f10turtle
Area optimization of digital chips: detailed explanation of question 1 in the digital direction of the third "Huawei Cup" graduate innovation core competition
【用C语言绘制谢尔宾斯基三角形】
Record the star user of handsomeblog
线程和进程
Redis安装及运行(linux)
N methods of SQL optimization
Is it necessary to open an account on site for securities speculation? Is it safe to open an account online