owtf.proxy package¶
Submodules¶
owtf.proxy.cache_handler module¶
owtf.proxy.cache_handler¶
Inbound Proxy Module developed by Bharadwaj Machiraju (blog.tunnelshade.in) as a part of Google Summer of Code 2013
-
class
owtf.proxy.cache_handler.
CacheHandler
(cache_dir, request, cookie_regex, blacklist)[source]¶ Bases:
object
This class will be used by the request handler to either load or dump to cache. Main things that are done here :- * The request_hash is generated here * The file locks are managed here * .rd files are created here
-
calculate_hash
(callback=None)[source]¶ Based on blacklist boolean the cookie regex is used for filtering of cookies in request_hash generation. However the original request is not tampered.
Parameters: callback – Callback function Returns: Return type:
-
create_response_object
()[source]¶ Create a proxy response object from cache file
Returns: Return type:
-
-
class
owtf.proxy.cache_handler.
DummyObject
[source]¶ Bases:
object
This class is just used to create a fake response object
owtf.proxy.gen_cert module¶
owtf.proxy.gen_cert¶
Inbound Proxy Module developed by Bharadwaj Machiraju (blog.tunnelshade.in) as a part of Google Summer of Code 2013
-
owtf.proxy.gen_cert.
gen_signed_cert
(domain, ca_crt, ca_key, ca_pass, certs_folder)[source]¶ This function takes a domain name as a parameter and then creates a certificate and key with the domain name(replacing dots by underscores), finally signing the certificate using specified CA and returns the path of key and cert files. If you are yet to generate a CA then check the top comments
Parameters: - domain (str) – domain for the cert
- ca_crt (str) – ca.crt file path
- ca_key (str) – ca.key file path
- ca_pass (str) – Password for the certificate
- certs_folder (str) –
Returns: Key and cert path
Return type: str
owtf.proxy.main module¶
owtf.proxy.proxy module¶
owtf.proxy.socket_wrapper module¶
owtf.proxy.socket_wrapper¶
Inbound Proxy Module developed by Bharadwaj Machiraju (blog.tunnelshade.in) as a part of Google Summer of Code 2013
-
owtf.proxy.socket_wrapper.
wrap_socket
(socket, domain, ca_crt, ca_key, ca_pass, certs_folder, success=None, failure=None, io=None, **options)[source]¶ Wrap an active socket in an SSL socket.
Parameters: - socket –
- domain –
- ca_crt –
- ca_key –
- ca_pass –
- certs_folder –
- success –
- failure –
- io –
- options –
Returns: Return type:
owtf.proxy.tor_manager module¶
owtf.proxy.tor_manager¶
TOR manager module developed by Marios Kourtesis <name.surname@gmail.com>
-
class
owtf.proxy.tor_manager.
TOR_manager
(args)[source]¶ Bases:
object
-
authenticate
()[source]¶ This function is handling the authentication process to TOR control connection.
Returns: Return type:
-
static
is_tor_running
()[source]¶ Check if tor is running
Returns: True if running, else False Return type: bool
-
renew_ip
()[source]¶ Sends an NEWNYM message to TOR control in order to renew the IP address
Returns: True if IP is renewed, else False Return type: bool
-