You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Wconsole Extractor is a library which allows to automatically exploit a flask debug mode server. You just need to write a file leak function, pass it to the class ``WConsoleExtractor`` constructor and you can access to all the elements related to the debug mode.
12
+
> Wconsole Extractor is a library which allows to automatically exploit a flask debug mode server. You just need to write a file leak function, pass it to the class ``WConsoleExtractor`` constructor and you can access to all the elements related to the debug mode. Moreover, you can call the `shell` function to obtain an interactive shell.
**Note**: The target operating system must be a Linux distribution.
37
61
38
-
### Leak function
62
+
### Prerequisites
39
63
40
64
In order to use correctly the library, you need to have an arbitrary file read on the target and implement it in python.
41
65
42
66
You must write a function that takes a filename as parameter and returns the content of the file on the target. If the file is not found, the function should return an **empty string**.
43
67
44
-
### ✨ Demo
68
+
### Available attributes
69
+
70
+
From `WconsoleExtractor` instance, you can access mutiple attributes:
71
+
72
+
```py
73
+
# Target information
74
+
extractor.target # Specified target
75
+
extractor.base_url # Target base url
76
+
extractor.hostname # hostname
77
+
78
+
# Versions
79
+
extractor.python_version # Python version
80
+
extractor.werkzeug_version # Werkzeug version
81
+
82
+
# Probably public bits
83
+
extractor.username # User who launched the application
84
+
extractor.flask_path # Flask installation path
85
+
extractor.modname # Constant "flask.app"
86
+
extractor.class_name # Constant "Flask"
87
+
extractor.probably_public_bits # Probably public bits [username, modname, class_name, flask_path]
88
+
89
+
# Private bits
90
+
extractor.machine_id # Machine id
91
+
extractor.uuidnode # MAC address in decimal
92
+
extractor.private_bits # private bits
93
+
94
+
# Post process information
95
+
extractor.pin_code # Werkzeug PIN CODE
96
+
extractor.token # Werkzeug console token (available in HTML source code)
97
+
98
+
# Functions
99
+
extractor.shell() # Get interactive shell
100
+
```
101
+
102
+
### Example
45
103
46
104
```py
47
105
from wconsole_extractor import WConsoleExtractor, info
Copy file name to clipboardExpand all lines: setup.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
importsetuptools
2
2
3
-
long_description="WConsole Extractor is a python library which automatically exploits a Werkzeug development server in debug mode. You just have to write a python function that leaks a file content and you have your shell :)"
0 commit comments