pangeacyber / pangea-python Goto Github PK
View Code? Open in Web Editor NEWOfficial Pangea Python Monorepo
Home Page: https://pangea.cloud
License: MIT License
Official Pangea Python Monorepo
Home Page: https://pangea.cloud
License: MIT License
Using: pangea-sdk 2.2.1
It appears the Python SDK may not be properly validating results for URLs that are not malicious.
from pangea.config import PangeaConfig
from pangea.services import UrlIntel
from pangea.tools import logger_set_pangea_config
config = PangeaConfig(domain='aws.us.pangea.cloud')
intel = UrlIntel("redacted", config=config, logger_name="intel")
## tftp://harry/vpn/ECTW/beta837-vpn-confg
params= dict(url="tftp://harry/vpn/ECTW/beta837-vpn-confg", provider='crowdstrike', verbose=True, raw=True)
>>> response = intel.reputation(**params)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/pangea/lib/python3.10/site-packages/pangea/services/intel.py", line 685, in reputation
return self.request.post("v1/reputation", URLReputationResult, data=input.dict(exclude_none=True))
File "/opt/pangea/lib/python3.10/site-packages/pangea/request.py", line 114, in post
pangea_response = PangeaResponse(requests_response, result_class=result_class)
File "/opt/pangea/lib/python3.10/site-packages/pangea/response.py", line 122, in __init__
self.result_class(**self.raw_result)
File "/opt/pangea/lib/python3.10/site-packages/pydantic/main.py", line 341, in __init__
raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for URLReputationResult
data -> category
none is not an allowed value (type=type_error.none.not_allowed)
>>> params= dict(url="http://113.235.101.11", provider='crowdstrike', verbose=True, raw=True)
>>> response = intel.reputation(**params)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/pangea/lib/python3.10/site-packages/pangea/services/intel.py", line 685, in reputation
return self.request.post("v1/reputation", URLReputationResult, data=input.dict(exclude_none=True))
File "/opt/pangea/lib/python3.10/site-packages/pangea/request.py", line 114, in post
pangea_response = PangeaResponse(requests_response, result_class=result_class)
File "/opt/pangea/lib/python3.10/site-packages/pangea/response.py", line 122, in __init__
self.result_class(**self.raw_result)
File "/opt/pangea/lib/python3.10/site-packages/pydantic/main.py", line 341, in __init__
raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for URLReputationResult
data -> category
none is not an allowed value (type=type_error.none.not_allowed)
>>> params= dict(url="http://113.235.101.11:54384", provider='crowdstrike', verbose=True, raw=True)
>>> response = intel.reputation(**params)
>>> response.summary
'URL was found: malicious with score 100'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.