Skip to content

Commit

Permalink
Merge branch 'master' into add-swimlane
Browse files Browse the repository at this point in the history
  • Loading branch information
laerfulaolun committed Apr 8, 2024
2 parents a1affc1 + 60ab679 commit 7c7bd89
Show file tree
Hide file tree
Showing 87 changed files with 517 additions and 344 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python36.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: 3.6 EOL

on:
push:
branches: [ '*' ]
branches: [ 'none' ]
pull_request:
branches: [ '*' ]
branches: [ 'none' ]

env:
# Use docker.io for Docker Hub if empty
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python37.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: 3.7 EOL

on:
push:
branches: [ '*' ]
branches: [ 'none' ]
pull_request:
branches: [ '*' ]
branches: [ 'none' ]

env:
# Use docker.io for Docker Hub if empty
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: 3.8

on:
push:
branches: [ '*' ]
branches: [ 'none' ]
pull_request:
branches: [ '*' ]
branches: [ 'none' ]

env:
# Use docker.io for Docker Hub if empty
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: 3.9

on:
push:
branches: [ '*' ]
branches: [ 'none' ]
pull_request:
branches: [ '*' ]
branches: [ 'none' ]

env:
# Use docker.io for Docker Hub if empty
Expand Down
17 changes: 2 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,30 +45,17 @@ Github issues and feature requests welcomed.
| Data Store | minio<br/>swift |
| Devices | snmp |
| Google Cloud | google auth api<br/>google people api<br/>google sheets api |
| Helpers | os<br/>subprocess<br/>threading<br/>socket<br/>datetime |
| Logging | sentryio |
| MacOS | airport<br/>macchanger |
| Python | logging<br/>requests |
| SOAR | swimlane<br/>splunk soar |
| Recon | nmap |
| Test Automation | selenium |
| Category | Library |
|-------------------|-------------------------------------------------------------|
| API | flask |
| Chat | slack |
| Data Scraping | beautifulsoup<br/>facebook groups<br/>instagram<br/>scrapy |
| Databases | elasticsearch<br/>neo4j<br/>splunk |
| Data Store | minio<br/>swift |
| Devices | snmp |
| Google Cloud | google auth api<br/>google people api<br/>google sheets api |
| Tracing / Logging | openTelemetry<br/>sentryio |
| macOS | airport<br/>macchanger |
| Python | logging<br/>requests |
| Recon | nmap |
| Test Automation | selenium |

#### Requires

- python >= 3.8
- python >= 3.10

_Note: install requirements.txt to use all integrations_

Expand Down
1 change: 1 addition & 0 deletions automon/helpers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .dates import Dates
from .markdown import Chat, Format
from .networking import Networking
from .osWrapper import environ
from .sleeper import Sleeper
from .subprocessWrapper import Run
235 changes: 0 additions & 235 deletions automon/helpers/grok/__init__.py

This file was deleted.

47 changes: 1 addition & 46 deletions automon/helpers/regex.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import re

from automon.helpers import assertions
from automon.helpers.grok import GrokLegacy


def geolocation(string):
"""Parse any kind of geolocation data"""

# TODO: parse any geolocation info (long, lat)

pattern = [
'([Long]{4}:[ ]?[0-9\.]*,[ ]?[Lat]{3}:[ ]?[0-9\.]*)'
r'([Long]{4}:[ ]?[0-9\.]*,[ ]?[Lat]{3}:[ ]?[0-9\.]*)'
]

for p in pattern:
Expand All @@ -19,45 +16,3 @@ def geolocation(string):

if r:
return r


class Magic:

@staticmethod
def magic_box(data: str) -> dict:
"""Do some grok magic on anything given and find everything"""

all_matches = dict()
grok = GrokLegacy.g

for pattern in grok:

try:
compile_regex = re.compile(grok[pattern]) # compiled regex from g dict
result = re.findall(compile_regex, data) # regex search result

if result:
list_results = []

if assertions.assert_list(result):
_list = result
for _item in _list:

if assertions.assert_tuple(_item):
_tuple = _item
for _item2 in _tuple:
if len(_item2) > 0:
list_results.append(_item2)

elif assertions.assert_string(_item):
if len(_item) > 0:
list_results.append(_item)

if len(list_results) > 0:
all_matches[pattern] = list_results

except Exception as err:
# print('[!] Failed pattern: ' + grok_all_string[p] + ' => ' + str(err))
pass

return all_matches
Loading

0 comments on commit 7c7bd89

Please sign in to comment.