| 130 | } |
| 131 | |
| 132 | private void parserRequestOld(){ |
| 133 | if(Util.isURL(this.url)){ |
| 134 | service = new HttpService(this.url); |
| 135 | String[] rawsArray = this.raw.split(System.lineSeparator()); |
| 136 | try { |
| 137 | for (int i = 0; i < rawsArray.length; i++) { |
| 138 | if (i == 0) { |
| 139 | this.method = rawsArray[0].split(" ")[0]; |
| 140 | this.path = rawsArray[0].split(" ")[1]; |
| 141 | this.httpversion = rawsArray[0].split(" ")[2]; |
| 142 | } else if (this.method.equals("POST") && i == rawsArray.length - 1) { |
| 143 | this.data = rawsArray[i].trim(); |
| 144 | } else { |
| 145 | if (rawsArray[i].indexOf(": ") > 0) { |
| 146 | String key = rawsArray[i].split(": ")[0]; |
| 147 | String value = rawsArray[i].split(": ")[1]; |
| 148 | this.headers.put(key.trim(), value.trim()); |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | }catch (Exception e){ |
| 153 | BurpExtender.stdout.println(e.getMessage()); |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | |
| 159 | |