Skip to content

Commit 088c906

Browse files
committed
Adding .gitignore
1 parent 92fa404 commit 088c906

12 files changed

Lines changed: 45 additions & 1 deletion

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.class

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,44 @@
1+
# Python Scripter
2+
3+
## Introduction
4+
5+
This extension allows you to write custom Python to hook into both the request, response pipeline and also the Macro handling support in Burp Suite. This is useful in those times were you want some behaviour but don't want to have to go to the full extent of creating a custom extension.
6+
7+
You can also over time build up a useful collection of utility scripts that can be used across web assessments.
8+
9+
I would highly recommend to build off the already established framework [pyscripter-er](https://github.com/lanmaster53/pyscripter-er) that already has a lot of common functionality built-in to save you some of the leg work.
10+
11+
## Usage
12+
13+
Once the extension is installed you will find a `Python Scripts` tab, this allows you to add, modify or remove scripts:
14+
15+
![Python Scripts with no scripts](images/new.png)
16+
17+
When you add a new script it will be given a name of `New Script X` this can be changed in the same way as in the `Repeater` tabs by double clicking and pressing Enter to confirm or Esc to cancel.
18+
19+
You can then start changing the new script or pasting a script from another location directly into the editor:
20+
21+
![Renaming the script via the tab](images/rename.png)
22+
23+
When your ready to compile the Python code simply click `Compile`, compile time errors these will be displayed in the `Errors` textarea:
24+
25+
![Compile time errors](images/error.png)
26+
27+
To test the script simply enable it and then push through a request, output should be presented in the `Output` textarea:
28+
29+
![Script output](images/output.png)
30+
31+
If there was a runtime exception these will also be captured in the `Errors` textarea to help diagnose the bug.
32+
33+
__Scripts are automatically restored and saved on extension load and unload.__
34+
35+
36+
## FAQs
37+
38+
__Q. Why do I see no output?__
39+
40+
A. As long as the script is enabled this could be that there was a runtime exception raised, firstly check the `Errors` textarea, could be that the scope checking in place is incorrect if your using `callbacks.isInScope` perhaps placing a `print` before and after this is comparesd coud help track down the issue. It may also be the case that the extension has an exception in which case you should check the `Errors` textare from the extensions dialog in Burp Suite.
41+
42+
## Original Work
43+
144
Sourced from gist: https://gist.github.com/mwielgoszewski/7026954

gui$py.class

22.3 KB
Binary file not shown.

images/error.png

40.2 KB
Loading

images/new.png

24 KB
Loading

images/output.png

20.1 KB
Loading

images/rename.png

41.9 KB
Loading

models$py.class

19.1 KB
Binary file not shown.

models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def processHttpMessage(self, toolFlag, messageIsRequest, messageInfo, macroItems
113113

114114
class Script(JavaBean):
115115

116-
def __init__(self, extender, callbacks, helpers, title, enabled=True, content=DEFAULT_SCRIPT):
116+
def __init__(self, extender, callbacks, helpers, title, enabled=False, content=DEFAULT_SCRIPT):
117117
super(Script, self).__init__()
118118
self.title = title
119119
self.enabled = enabled

scriptstore$py.class

5.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)