Skip to content

Commit

Permalink
Merge branch 'master' of github.com:NetSPI/burp-plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
egru committed Jun 1, 2015
2 parents 8c57add + b0744e5 commit ad21406
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions ContentTypeConverter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,101 @@ Content-Type Converter
=========

Burp extension to convert XML to JSON, JSON to XML, x-www-form-urlencoded to XML, and x-www-form-urlencoded to JSON.

Requirements: Java 8 (Due to issues with one of the libraries it only works on Java 8. I have not had any problems with Burp using Java 8.)

Right-click request and send to repeater.

![alt tag](https://blog.netspi.com/wp-content/uploads/2015/04/SNAG-0165.jpg)

###Body Parameter###

```
POST /test HTTP/1.1
Host: www.example.com
Proxy-Connection: keep-alive
Content-Length: 32
parameter1=1&parameters2="test"
```

#####To XML#####
```
POST /test HTTP/1.1
Host: www.example.com
Proxy-Connection: keep-alive
Content-Length: 136
Content-Type: application/xml;charset=UTF-8
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<root>
<parameters2>"test"</parameters2>
<parameter1>1</parameter1>
</root>
```
#####To JSON#####
```
POST /test HTTP/1.1
Host: www.example.com
Proxy-Connection: keep-alive
Content-Length: 43
Content-Type: application/json;charset=UTF-8
{"parameter1":"1","parameters2":"\"test\""}
```

###JSON to XML###

```
POST /test HTTP/1.1
Host: www.example.com
Proxy-Connection: keep-alive
Content-Length: 43
Content-Type: application/json;charset=UTF-8
{"parameter1":"1","parameters2":"\"test\""}
```
#####To XML#####
```
POST /test HTTP/1.1
Host: www.example.com
Proxy-Connection: keep-alive
Content-Length: 136
Content-Type: application/xml;charset=UTF-8
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<root>
<parameters2>"test"</parameters2>
<parameter1>1</parameter1>
</root>
```

###XML to JSON###

```
POST /test HTTP/1.1
Host: www.example.com
Proxy-Connection: keep-alive
Content-Length: 136
Content-Type: application/xml;charset=UTF-8
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<root>
<parameters2>"test"</parameters2>
<parameter1>1</parameter1>
</root>
```
#####To JSON#####
```
POST /text HTTP/1.1
Host: www.example.com
Proxy-Connection: keep-alive
Content-Length: 60
Content-Type: application/json;charset=UTF-8
{"root": {
"parameters2": "\"test\"",
"parameter1": 1
}}
```

0 comments on commit ad21406

Please sign in to comment.