stoobly-agent 0.34.7__py3-none-any.whl → 0.34.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
stoobly_agent/__init__.py CHANGED
@@ -1,2 +1,2 @@
1
1
  COMMAND = 'stoobly-agent'
2
- VERSION = '0.34.7'
2
+ VERSION = '0.34.8'
@@ -45,8 +45,18 @@ def __request_excluded(request: MitmproxyRequest, exclude_rules: List[FirewallRu
45
45
  return False
46
46
 
47
47
  def __request_included(request: MitmproxyRequest, include_rules: List[FirewallRule]):
48
+ if not include_rules:
49
+ return True
50
+
48
51
  method = request.method.upper()
49
52
  rules = list(filter(lambda rule: method in rule.methods, include_rules))
53
+
54
+ # If there are include rules, but none that match the request's method,
55
+ # then we know that none of the include rules will match the request
56
+ if len(include_rules) > 0 and len(rules) == 0:
57
+ Logger.instance().info(f"{bcolors.OKBLUE}{request.method} {request.url} not included by firewall rule{bcolors.ENDC}")
58
+ return False
59
+
50
60
  patterns = list(map(lambda rule: rule.pattern, rules))
51
61
  if not __include(request, patterns):
52
62
  Logger.instance().info(f"{bcolors.OKBLUE}{request.method} {request.url} not included by firewall rule{bcolors.ENDC}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stoobly-agent
3
- Version: 0.34.7
3
+ Version: 0.34.8
4
4
  Summary: Record, mock, and test HTTP(s) requests. CLI agent for Stoobly
5
5
  License: Apache-2.0
6
6
  Author: Matt Le
@@ -1,4 +1,4 @@
1
- stoobly_agent/__init__.py,sha256=YRhtJ34t0WtULrjMrEGKhizGdQGPnijkWflQA-KjphE,45
1
+ stoobly_agent/__init__.py,sha256=haYJIpJXhWyDYIlFWNCDQZA8Ar_XjC18wcdUH3BgDUw,45
2
2
  stoobly_agent/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  stoobly_agent/app/api/__init__.py,sha256=FFSlVoTgjPfUNlYPr_7u6-P5Y4WOKyaUfAHtUcB-Xio,810
4
4
  stoobly_agent/app/api/application_http_request_handler.py,sha256=jf4fkqjOiCeI2IM5Ro7ie0v_C6y0-7-5TIE_IKMPOfg,5513
@@ -240,7 +240,7 @@ stoobly_agent/app/proxy/test/matchers/fuzzy.py,sha256=tTnsPDaK0HFJ5ST5ThZIlHkZNz
240
240
  stoobly_agent/app/proxy/test/matchers/handlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
241
241
  stoobly_agent/app/proxy/test/test_service.py,sha256=EWDdrcoewgCzsuWmbra-dDEZLfuWBiX6X9LF_xwqglw,4314
242
242
  stoobly_agent/app/proxy/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
243
- stoobly_agent/app/proxy/utils/allowed_request_service.py,sha256=l_0HBNXWQNvox5_wFXtCnhBond63p5mGvrhwrEOkmcE,3218
243
+ stoobly_agent/app/proxy/utils/allowed_request_service.py,sha256=oQv1JZZATNL3dCCl0Qhk_lr7Vq08FXJLj1FU5FS9d7o,3614
244
244
  stoobly_agent/app/proxy/utils/publish_change_service.py,sha256=vSpFt0Ox9fceJlalHji61N6StdkEZwAvVXhHXO6fwEI,1259
245
245
  stoobly_agent/app/proxy/utils/request_handler.py,sha256=-CU0b49hGaRmPxBPbFpEtUugrj6GIB6n6AekxDc6v9w,845
246
246
  stoobly_agent/app/proxy/utils/response_handler.py,sha256=78e--VPBNcgb3CRY-WgjxP3g2bx1ONAR8a6mFdyTaOA,1447
@@ -588,8 +588,8 @@ stoobly_agent/test/mock_data/petstore.yaml,sha256=CCdliJky04Az4FIOkFA883uunwFDHL
588
588
  stoobly_agent/test/mock_data/request_show_response.py,sha256=K_a0fP0QT58T8sX9PaM6hqtX1A1depZsqg_GsNPf--k,707
589
589
  stoobly_agent/test/mock_data/uspto.yaml,sha256=6U5se7C3o-86J4m9xpOk9Npias399f5CbfWzR87WKwE,7835
590
590
  stoobly_agent/test/test_helper.py,sha256=m_oAI7tmRYCNZdKfNqISWhMv3e44tjeYViQ3nTUfnos,1007
591
- stoobly_agent-0.34.7.dist-info/LICENSE,sha256=8QKGyy45eN76Zk52h8gu1DKX2B_gbWgZ3nzDLofEbaE,548
592
- stoobly_agent-0.34.7.dist-info/METADATA,sha256=pWqiDODcIgUwr_58gRyWrBY3BIHa3nxGIHi4cDpiC8Y,3304
593
- stoobly_agent-0.34.7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
594
- stoobly_agent-0.34.7.dist-info/entry_points.txt,sha256=aq5wix5oC8MDQtmyPGU0xaFrsjJg7WH28NmXh2sc3Z8,56
595
- stoobly_agent-0.34.7.dist-info/RECORD,,
591
+ stoobly_agent-0.34.8.dist-info/LICENSE,sha256=8QKGyy45eN76Zk52h8gu1DKX2B_gbWgZ3nzDLofEbaE,548
592
+ stoobly_agent-0.34.8.dist-info/METADATA,sha256=2A9caPqI-PKyX-G18_H5UGvpehjFiZw9DWuwPHenqQs,3304
593
+ stoobly_agent-0.34.8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
594
+ stoobly_agent-0.34.8.dist-info/entry_points.txt,sha256=aq5wix5oC8MDQtmyPGU0xaFrsjJg7WH28NmXh2sc3Z8,56
595
+ stoobly_agent-0.34.8.dist-info/RECORD,,