Comments (1)
@s4ksh1 iocextract.extract_urls()
calls iocextract.extract_unencoded_urls()
and iocextract.extract_encoded_urls()
. In this case you can just use iocextract.extract_unencoded_urls()
directly:
>>> import iocextract
>>> # this extracts all urls, encoded and unencoded
>>> list(iocextract.extract_urls("ioc is hxxps://u7007.scor1[.]com/k265/aHR0cHM6Ly91NzAwNy5zY29y", refang=True))
['https://u7007.scor1.com/k265/aHR0cHM6Ly91NzAwNy5zY29y', 'https://u7007.scor1.com/k265/aHR0cHM6Ly91NzAwNy5zY29y', 'https://u7007.scor']
# this extracts just unencoded urls
>>> list(iocextract.extract_unencoded_urls("ioc is hxxps://u7007.scor1[.]com/k265/aHR0cHM6Ly91NzAwNy5zY29y", refang=True))
['https://u7007.scor1.com/k265/aHR0cHM6Ly91NzAwNy5zY29y', 'https://u7007.scor1.com/k265/aHR0cHM6Ly91NzAwNy5zY29y']
# this extracts just encoded urls
>>> list(iocextract.extract_encoded_urls("ioc is hxxps://u7007.scor1[.]com/k265/aHR0cHM6Ly91NzAwNy5zY29y", refang=True))
['https://u7007.scor']
>>>
from iocextract.
Related Issues (20)
- base64 strings HOT 2
- Binary Extraction HOT 1
- Extracting URLs that have been base64 encoded HOT 2
- 'https' scheme values defanged as HXXPS are refanged as 'http' HOT 3
- PyPi License Mismatch HOT 1
- catastrophic backtracking in BACKSLASH_URL_RE HOT 2
- extract_unencoded_url is too greedy when parsing Windows command lines HOT 4
- Improve documentation
- Improve extraction for non-defanged URLs HOT 6
- Review documentation HOT 1
- URL is not extracted correctly HOT 1
- module 'iocextract' has no attribute 'refang_url' HOT 2
- ModuleNotFoundError: No module named 'iocextract' HOT 6
- Add the function --extract-domains and --extract-subdomains HOT 2
- BUG: --extract-ipv4s does not work HOT 3
- Add a function to import directly from a server and extract IOCs. HOT 2
- how do I add a ioc_type label with the output? HOT 1
- Found IPs being parsed as URLs HOT 1
- Time is detected as an IP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iocextract.