MCPcopy Create free account
hub / github.com/c0ny1/captcha-killer / parserRequest

Method parserRequest

src/main/java/utils/HttpClient.java:102–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100 }
101
102 private void parserRequest(){
103 if(Util.isURL(this.url)){
104 service = new HttpService(this.url);
105 try {
106 IRequestInfo requestInfo = BurpExtender.helpers.analyzeRequest(service, this.raw.getBytes());
107 requestInfo.getBodyOffset();
108 this.method = requestInfo.getMethod();
109 for (String header : requestInfo.getHeaders()) {
110 if (header.indexOf(this.method) >= 0 && header.indexOf("HTTP/") >= 0) {
111 this.path = header.split(" ")[1];
112 this.httpversion = header.split(" ")[2];
113 continue;
114 }
115
116 if (header.indexOf(":") > 0) {
117 String key = header.substring(0, header.indexOf(":"));
118 String value = Util.trimStart(header.substring(header.indexOf(":")+1, header.length()));
119 this.headers.put(key, value);
120 }
121 }
122
123 if (this.method.equals("POST")) {
124 this.data = this.raw.substring(requestInfo.getBodyOffset(), this.raw.length());
125 }
126 }catch (Exception e){
127 BurpExtender.stderr.println(e.getMessage());
128 }
129 }
130 }
131
132 private void parserRequestOld(){
133 if(Util.isURL(this.url)){

Callers 1

HttpClientMethod · 0.95

Calls 2

isURLMethod · 0.95
trimStartMethod · 0.95

Tested by

no test coverage detected