Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Soroush Dalili
committed
Feb 4, 2014
0 parents
commit 165371b
Showing
59 changed files
with
8,971 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
*.sln merge=union | ||
*.csproj merge=union | ||
*.vbproj merge=union | ||
*.fsproj merge=union | ||
*.dbproj merge=union | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,215 @@ | ||
################# | ||
## Eclipse | ||
################# | ||
|
||
*.pydevproject | ||
.project | ||
.metadata | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.classpath | ||
.settings/ | ||
.loadpath | ||
|
||
# External tool builders | ||
.externalToolBuilders/ | ||
|
||
# Locally stored "Eclipse launch configurations" | ||
*.launch | ||
|
||
# CDT-specific | ||
.cproject | ||
|
||
# PDT-specific | ||
.buildpath | ||
|
||
|
||
################# | ||
## Visual Studio | ||
################# | ||
|
||
## Ignore Visual Studio temporary files, build results, and | ||
## files generated by popular Visual Studio add-ons. | ||
|
||
# User-specific files | ||
*.suo | ||
*.user | ||
*.sln.docstates | ||
|
||
# Build results | ||
|
||
[Dd]ebug/ | ||
[Rr]elease/ | ||
x64/ | ||
build/ | ||
[Bb]in/ | ||
[Oo]bj/ | ||
|
||
# MSTest test Results | ||
[Tt]est[Rr]esult*/ | ||
[Bb]uild[Ll]og.* | ||
|
||
*_i.c | ||
*_p.c | ||
*.ilk | ||
*.meta | ||
*.obj | ||
*.pch | ||
*.pdb | ||
*.pgc | ||
*.pgd | ||
*.rsp | ||
*.sbr | ||
*.tlb | ||
*.tli | ||
*.tlh | ||
*.tmp | ||
*.tmp_proj | ||
*.log | ||
*.vspscc | ||
*.vssscc | ||
.builds | ||
*.pidb | ||
*.log | ||
*.scc | ||
|
||
# Visual C++ cache files | ||
ipch/ | ||
*.aps | ||
*.ncb | ||
*.opensdf | ||
*.sdf | ||
*.cachefile | ||
|
||
# Visual Studio profiler | ||
*.psess | ||
*.vsp | ||
*.vspx | ||
|
||
# Guidance Automation Toolkit | ||
*.gpState | ||
|
||
# ReSharper is a .NET coding add-in | ||
_ReSharper*/ | ||
*.[Rr]e[Ss]harper | ||
|
||
# TeamCity is a build add-in | ||
_TeamCity* | ||
|
||
# DotCover is a Code Coverage Tool | ||
*.dotCover | ||
|
||
# NCrunch | ||
*.ncrunch* | ||
.*crunch*.local.xml | ||
|
||
# Installshield output folder | ||
[Ee]xpress/ | ||
|
||
# DocProject is a documentation generator add-in | ||
DocProject/buildhelp/ | ||
DocProject/Help/*.HxT | ||
DocProject/Help/*.HxC | ||
DocProject/Help/*.hhc | ||
DocProject/Help/*.hhk | ||
DocProject/Help/*.hhp | ||
DocProject/Help/Html2 | ||
DocProject/Help/html | ||
|
||
# Click-Once directory | ||
publish/ | ||
|
||
# Publish Web Output | ||
*.Publish.xml | ||
*.pubxml | ||
|
||
# NuGet Packages Directory | ||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line | ||
#packages/ | ||
|
||
# Windows Azure Build Output | ||
csx | ||
*.build.csdef | ||
|
||
# Windows Store app package directory | ||
AppPackages/ | ||
|
||
# Others | ||
sql/ | ||
*.Cache | ||
ClientBin/ | ||
[Ss]tyle[Cc]op.* | ||
~$* | ||
*~ | ||
*.dbmdl | ||
*.[Pp]ublish.xml | ||
*.pfx | ||
*.publishsettings | ||
|
||
# RIA/Silverlight projects | ||
Generated_Code/ | ||
|
||
# Backup & report files from converting an old project file to a newer | ||
# Visual Studio version. Backup files are not needed, because we have git ;-) | ||
_UpgradeReport_Files/ | ||
Backup*/ | ||
UpgradeLog*.XML | ||
UpgradeLog*.htm | ||
|
||
# SQL Server files | ||
App_Data/*.mdf | ||
App_Data/*.ldf | ||
|
||
############# | ||
## Windows detritus | ||
############# | ||
|
||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Mac crap | ||
.DS_Store | ||
|
||
|
||
############# | ||
## Python | ||
############# | ||
|
||
*.py[co] | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist/ | ||
build/ | ||
eggs/ | ||
parts/ | ||
var/ | ||
sdist/ | ||
develop-eggs/ | ||
.installed.cfg | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
|
||
#Translations | ||
*.mo | ||
|
||
#Mr Developer | ||
.mr.developer.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
v 1.0 | ||
========================================================================= | ||
- Works with the latest version of Burp Suite (tested on 1.5.21) | ||
- Automatic beautifying responses in all tabs | ||
- Ability of beautifying the headers | ||
- JSBeautifier Settings tab | ||
- Multiple bugs were fixed | ||
- Rhino library has been updated | ||
- Syntax highlighter library has been updated | ||
- Moved to GitHub | ||
- License changed to MIT | ||
|
||
v 0.1a | ||
========================================================================= | ||
- First version of extension with Java in GoogleCode | ||
- Automatic beautifying the responses in proxy | ||
- Manual beautifying the requests/responses | ||
- Supporting Burp suite scope | ||
- Mimicking exact behaviour of JSBeautifier.org website by using Rhino library | ||
- Supporting multiple file types (JS, CSS, HTML, and so on) | ||
- Detecting packers and obfuscators (based on JSBeautifier.org) | ||
- Syntax highlighter in the read-only editor by using Fifesoft RSyntaxTextArea library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" ?> | ||
<!-- Configuration of the Ant build system to generate a Jar file --> | ||
<project name="jsbeautifier" default="CreateJar"> | ||
<property name="projectHome" location="." /> | ||
<target name="CreateJar" description="Create Jar file"> | ||
<jar destfile="${projectHome}/jsbeautifier.jar" basedir="${projectHome}/bin" /> | ||
</target> | ||
</project> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package burp; | ||
|
||
import java.net.URL; | ||
import java.io.PrintWriter; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import javax.swing.JMenuItem; | ||
|
||
|
||
public class BurpExtender implements IBurpExtender, IHttpListener, | ||
IExtensionStateListener, IContextMenuFactory | ||
{ | ||
public burp.IBurpExtenderCallbacks mCallbacks; // I will use this to keep the callbacks | ||
private PrintWriter stdout; | ||
private IExtensionHelpers helpers; | ||
|
||
@Override | ||
public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) | ||
{ | ||
// keep a reference to our callbacks object | ||
this.mCallbacks = callbacks; | ||
this.helpers = callbacks.getHelpers(); | ||
mCallbacks.setExtensionName("JSBeautifier"); | ||
|
||
// obtain our output stream | ||
stdout = new PrintWriter(mCallbacks.getStdout(), true); | ||
|
||
// register ourselves as an HTTP listener | ||
mCallbacks.registerHttpListener(this); | ||
|
||
// register ourselves as an extension state listener | ||
mCallbacks.registerExtensionStateListener(this); | ||
|
||
// add Beautifier to right-click menu | ||
callbacks.registerContextMenuFactory(this); | ||
|
||
// add JSBeautifier settings tab | ||
mCallbacks.addSuiteTab(new burp.customGUI.PreferencesEditor()); | ||
|
||
stdout.println("Loading... "+burp.JSBeautifier.BeautifierPreferences.getAppInfo()); | ||
} | ||
|
||
|
||
@Override | ||
public void processHttpMessage(int toolFlag, boolean messageIsRequest, | ||
IHttpRequestResponse messageInfo) { | ||
// Loading automatic beautifier | ||
String toolName = mCallbacks.getToolName(toolFlag); | ||
toolName = toolName.toLowerCase(); | ||
if (!messageIsRequest && ((toolName.indexOf("proxy") > -1 && burp.JSBeautifier.BeautifierPreferences.isAutomaticInProxy()) || burp.JSBeautifier.BeautifierPreferences.isAutomaticInAll())){ | ||
try | ||
{ | ||
URL uUrl = helpers.analyzeRequest(messageInfo).getUrl(); | ||
|
||
if(burp.JSBeautifier.BeautifierPreferences.isDebugMode()) | ||
stdout.println("Incoming URL: "+uUrl.toString()); | ||
|
||
// Check for the scope if it is restricted to scope | ||
if (!burp.JSBeautifier.BeautifierPreferences.isRestrictedToScope() || mCallbacks.isInScope(uUrl)) | ||
{ | ||
|
||
IHttpRequestResponse[] newMessageInfo = new IHttpRequestResponse[1]; | ||
newMessageInfo[0] = messageInfo; | ||
// Loading the beautifier functions | ||
burp.JSBeautifier.JSBeautifierFunctions jsBeautifierFunctions = new burp.JSBeautifier.JSBeautifierFunctions(mCallbacks); | ||
|
||
if(burp.JSBeautifier.BeautifierPreferences.isDebugMode()) | ||
stdout.println("Begin beautifying [In Scope]: "+uUrl.toString()); | ||
|
||
jsBeautifierFunctions.beautifyIt(newMessageInfo,true,2); // Automatic mode | ||
|
||
if(burp.JSBeautifier.BeautifierPreferences.isDebugMode()) | ||
stdout.println("End beautifying [In Scope]: "+uUrl.toString()); | ||
} | ||
} | ||
catch (Exception e) | ||
{ | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
} | ||
|
||
|
||
@Override | ||
public void extensionUnloaded() | ||
{ | ||
stdout.println("Unloading... "+burp.JSBeautifier.BeautifierPreferences.getAppInfo()); | ||
} | ||
|
||
|
||
@Override | ||
public List<JMenuItem> createMenuItems(IContextMenuInvocation invocation) { | ||
List<JMenuItem> menuItems = new ArrayList<JMenuItem>(); | ||
JMenuItem item = new JMenuItem(new burp.JSBeautifier.JSBeautifierManualMenu(mCallbacks, invocation, stdout)); | ||
menuItems.add(item); | ||
return menuItems; | ||
} | ||
|
||
public static void main(String [] args){ | ||
System.out.println("Build Me"); | ||
} | ||
} | ||
|
Oops, something went wrong.