Skip to content

Commit

Permalink
增加add X-Forwarded-Host功能
Browse files Browse the repository at this point in the history
  • Loading branch information
c0ny1 committed Oct 10, 2018
1 parent 45d4416 commit de5f509
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
|id|head|description|
|:---:|:---|:---|
|1|X-Forwarded-For||
|2|X-Remote-IP||
|3|X-Remote-Addr||
|4|X-Originating-IP||
|5|True-Client-IP||
|6|Client-IP||
|7|X-Client-IP||
|8|X-Real-IP||
|2|X-Forwarded-Host||
|3|X-Remote-IP||
|4|X-Remote-Addr||
|5|X-Originating-IP||
|6|True-Client-IP||
|7|Client-IP||
|8|X-Client-IP||
|9|X-Real-IP||

#### 2.切换User-Agent
作用:快速切换各大浏览器在不同平台下的User-Agetn。
Expand Down
8 changes: 8 additions & 0 deletions src/burp/Menu.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class Menu implements IContextMenuFactory {
private JMenu httpHeadModiferMenu;
//IPÏà¹ØÍ·
private JMenuItem addXFF;
private JMenuItem addXForwardedHost;
private JMenuItem addXRI;
private JMenuItem addXOI;
private JMenuItem addXRA;
Expand Down Expand Up @@ -102,6 +103,7 @@ public List<JMenuItem> createMenuItems(final IContextMenuInvocation invocation)

httpHeadModiferMenu = new JMenu("HTTPHeadModifer");
addXFF = new JMenuItem("add X-Forwarded-For");
addXForwardedHost = new JMenuItem("add X-Forwarded-Host");
addXRI = new JMenuItem("add X-remote-IP");
addXOI = new JMenuItem("add X-Originating-IP");
addXRA = new JMenuItem("add X-remote-addr");
Expand Down Expand Up @@ -221,6 +223,7 @@ public List<JMenuItem> createMenuItems(final IContextMenuInvocation invocation)
spiderUA.add(slurpSpiderUA);

httpHeadModiferMenu.add(addXFF);
httpHeadModiferMenu.add(addXForwardedHost);
httpHeadModiferMenu.add(addXRI);
httpHeadModiferMenu.add(addXOI);
httpHeadModiferMenu.add(addXRA);
Expand All @@ -245,6 +248,7 @@ public List<JMenuItem> createMenuItems(final IContextMenuInvocation invocation)
httpHeadModiferMenu.add(updateCookie);

addXFF.addActionListener(new MenuActionManger(invocation));
addXForwardedHost.addActionListener(new MenuActionManger(invocation));
addXRI.addActionListener(new MenuActionManger(invocation));
addXOI.addActionListener(new MenuActionManger(invocation));
addXRA.addActionListener(new MenuActionManger(invocation));
Expand Down Expand Up @@ -323,6 +327,10 @@ public void actionPerformed(ActionEvent e) {
request = Utilities.addIPHead(m_helpers, iReqResp,"X-Forwarded-For");
}

if(e.getSource() == addXForwardedHost){
request = Utilities.addIPHead(m_helpers, iReqResp,"X-Forwarded-Host");
}

if(e.getSource() == addXRI){
request = Utilities.addIPHead(m_helpers, iReqResp,"X-remote-IP");
}
Expand Down
1 change: 1 addition & 0 deletions src/burp/Utilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class Utilities {
public static byte[] addIPHead(IExtensionHelpers helpers, IHttpRequestResponse requestResponse,String key) {
Map<String,String> map = new HashMap<String,String>();
map.put("X-Forwarded-For","X-Forwarded-For: 127.0.0.1");
map.put("X-Forwarded-Host","X-Forwarded-Host: 127.0.0.1");
map.put("X-remote-IP","X-remote-IP: 127.0.0.1");
map.put("X-Originating-IP","X-Originating-IP: 127.0.0.1");
map.put("X-remote-addr","X-remote-addr: 127.0.0.1");
Expand Down

0 comments on commit de5f509

Please sign in to comment.