FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
APIKit/src/main/java/burp/utils/HttpRequestResponse.java at main · SecLoop/APIKit · GitHub
SecLoop
/
APIKit
Public
forked from
API-Security/APIKit
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
APIKit
/
src
/
main
/
java
/
burp
/
utils
/
HttpRequestResponse.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
87 lines (71 loc) · 2.22 KB
Breadcrumbs
APIKit
/
src
/
main
/
java
/
burp
/
utils
/
HttpRequestResponse.java
Copy path
File metadata and controls
87 lines (71 loc) · 2.22 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package
burp
.
utils
;
import
burp
.
BurpExtender
;
import
burp
.
CookieManager
;
import
burp
.
IHttpRequestResponse
;
import
burp
.
IHttpService
;
import
java
.
nio
.
charset
.
StandardCharsets
;
import
java
.
util
.
concurrent
.
CompletableFuture
;
public
class
HttpRequestResponse
implements
IHttpRequestResponse
{
byte
[]
request
;
byte
[]
response
;
String
comment
;
IHttpService
httpService
;
@
Override
public
byte
[]
getRequest
() {
return
this
.
request
;
}
@
Override
public
void
setRequest
(
byte
[]
request
) {
this
.
request
=
request
;
}
public
void
sendRequest
() {
// 如果开启自动发送, 发出请求, 否则设置为空
if
(
BurpExtender
.
getConfigPanel
().
getAutoSendRequest
()) {
this
.
setRequest
(
CookieManager
.
getRequest
(
httpService
,
request
));
this
.
setResponse
(
"Loading..."
.
getBytes
());
CompletableFuture
.
supplyAsync
(() -> {
try
{
IHttpRequestResponse
newHttpRequestResponse
=
BurpExtender
.
getCallbacks
().
makeHttpRequest
(
httpService
,
request
);
this
.
setResponse
(
newHttpRequestResponse
.
getResponse
());
}
catch
(
Exception
e
) {
BurpExtender
.
getStderr
().
println
(
CommonUtils
.
exceptionToString
(
e
));
this
.
setResponse
(
CommonUtils
.
exceptionToString
(
e
).
getBytes
());
}
return
null
;
},
Executor
.
getExecutor
());
}
else
{
this
.
setResponse
(
"Auto request sending disabled"
.
getBytes
());
}
}
@
Override
public
byte
[]
getResponse
() {
return
this
.
response
;
}
@
Override
public
void
setResponse
(
byte
[]
response
) {
this
.
response
=
response
;
}
@
Override
public
String
getComment
() {
return
this
.
comment
;
}
@
Override
public
void
setComment
(
String
comment
) {
this
.
comment
=
comment
;
}
@
Override
public
String
getHighlight
() {
return
""
;
}
@
Override
public
void
setHighlight
(
String
s
) {
}
@
Override
public
IHttpService
getHttpService
() {
return
this
.
httpService
;
}
@
Override
public
void
setHttpService
(
IHttpService
httpService
) {
this
.
httpService
=
httpService
;
}
}
Back
|
FazBrowse Home
|
New Git URL