Skip to content

Commit

Permalink
Merge branch 'Shuffle:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nusantara-self authored Jun 7, 2024
2 parents dd77c80 + 0ddf2fa commit 8f3df26
Show file tree
Hide file tree
Showing 17 changed files with 728 additions and 189 deletions.
2 changes: 1 addition & 1 deletion email/1.1.0/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def send_email_shuffle(self, apikey, recipients, subject, body):
elif "," in recipients:
targets = recipients.split(",")

data = {"targets": targets, "body": body, "subject": subject, "type": "alert"}
data = {"targets": targets, "body": body, "subject": subject, "type": "alert", "email_app": True}

url = "https://shuffler.io/functions/sendmail"
headers = {"Authorization": "Bearer %s" % apikey}
Expand Down
2 changes: 1 addition & 1 deletion email/1.2.0/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
requests==2.25.1
glom==20.11.0
eml-parser==1.17.0
eml-parser==1.17.5
msg-parser==1.2.0
mail-parser==3.15.0
extract-msg==0.30.9
Expand Down
5 changes: 2 additions & 3 deletions email/1.2.0/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def send_email_shuffle(self, apikey, recipients, subject, body):
elif "," in recipients:
targets = recipients.split(",")

data = {"targets": targets, "body": body, "subject": subject, "type": "alert"}
data = {"targets": targets, "body": body, "subject": subject, "type": "alert", "email_app": True}

url = "https://shuffler.io/functions/sendmail"
headers = {"Authorization": "Bearer %s" % apikey}
Expand Down Expand Up @@ -391,10 +391,9 @@ def parse_email_file(self, file_id, file_extension):
"reason": "Couldn't get file with ID %s" % file_id
}

print("File: %s" % file_path)
if file_extension.lower() == 'eml':
print('working with .eml file')
ep = eml_parser.EmlParser(include_attachment_data=True, include_raw_body=True, parse_attachment=True)
ep = eml_parser.EmlParser(include_attachment_data=True, include_raw_body=True, parse_attachments=True)
try:
parsed_eml = ep.decode_email_bytes(file_path['data'])
if str(parsed_eml["header"]["date"]) == "1970-01-01 00:00:00+00:00":
Expand Down
53 changes: 53 additions & 0 deletions email/1.3.0/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ actions:
required: true
schema:
type: string
- name: cc_emails
description: cc_emails
multiline: false
example: "[email protected],[email protected]"
required: false
schema:
type: string
- name: subject
description: The subject of the email
multiline: false
Expand Down Expand Up @@ -233,6 +240,25 @@ actions:
required: false
schema:
type: bool
- name: parse_eml
description: Takes an eml string and parses it to JSON
parameters:
- name: filedata
description: The EML string data
required: true
multiline: true
example: 'EML string data'
schema:
type: string
- name: extract_attachments
description: Whether to extract the attachments straight into files
required: true
options:
- true
- false
example: 'true'
schema:
type: string
- name: parse_email_file
description: Takes a file from shuffle and analyzes it if it's a valid .eml or .msg
parameters:
Expand Down Expand Up @@ -277,4 +303,31 @@ actions:
returns:
schema:
type: string
- name: send_sms_shuffle
description: Send an SMS from Shuffle
parameters:
- name: apikey
description: Your https://shuffler.io organization apikey
multiline: false
example: "https://shuffler.io apikey"
required: true
schema:
type: string
- name: phone_numbers
description: The receivers of the SMS
multiline: false
example: "+4741323535,+8151023022"
required: true
schema:
type: string
- name: body
description: The SMS to add to the numbers
multiline: true
example: "This is an alert from Shuffle :)"
required: true
schema:
type: string
returns:
schema:
type: string
large_image: data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/hAytodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi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 7 deletions email/1.3.0/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ def send_email_shuffle(self, apikey, recipients, subject, body):
elif "," in recipients:
targets = recipients.split(",")

data = {"targets": targets, "body": body, "subject": subject, "type": "alert"}
data = {"targets": targets, "body": body, "subject": subject, "type": "alert", "email_app": True}

url = "https://shuffler.io/functions/sendmail"
headers = {"Authorization": "Bearer %s" % apikey}
return requests.post(url, headers=headers, json=data).text

def send_email_smtp(
self, smtp_host, recipient, subject, body, smtp_port, attachments="", username="", password="", ssl_verify="True", body_type="html"
self, smtp_host, recipient, subject, body, smtp_port, attachments="", username="", password="", ssl_verify="True", body_type="html", cc_emails=""
):
if type(smtp_port) == str:
try:
Expand Down Expand Up @@ -112,6 +112,10 @@ def send_email_smtp(
msg["From"] = username
msg["To"] = recipient
msg["Subject"] = subject

if cc_emails != None and len(cc_emails) > 0:
msg["Cc"] = cc_emails

msg.attach(MIMEText(body, body_type))

# Read the attachments
Expand Down Expand Up @@ -161,7 +165,7 @@ def send_email_smtp(
self.logger.info("Successfully sent email with subject %s to %s" % (subject, recipient))
return {
"success": True,
"reason": "Email sent to %s!" % recipient,
"reason": "Email sent to %s, %s!" %(recipient,cc_emails) if cc_emails else "Email sent to %s!" % recipient,
"attachments": attachment_count
}

Expand Down Expand Up @@ -384,14 +388,46 @@ def merge(d1, d2):
"messages": json.dumps(emails, default=default),
}

def parse_eml(self, filedata, extract_attachments=False):
parsedfile = {
"success": True,
"filename": "email.eml",
"data": filedata,
}

# Encode the data as utf-8 if it's not base64
if not str(parsedfile["data"]).endswith("="):
parsedfile["data"] = parsedfile["data"].encode("utf-8")

return self.parse_email_file(parsedfile, extract_attachments)

def parse_email_file(self, file_id, extract_attachments=False):
file_path = self.get_file(file_id)
file_path = {
"success": False,
}

if isinstance(file_id, dict) and "data" in file_id:
file_path = file_id
else:
file_path = self.get_file(file_id)

if file_path["success"] == False:
return {
"success": False,
"reason": "Couldn't get file with ID %s" % file_id
}

# Check if data is in base64 and decode it
# If it ends with = then it may be bas64

if str(file_path["data"]).endswith("="):
try:
file_path["data"] = base64.b64decode(file_path["data"])
except Exception as e:
print(f"Failed to decode base64: {e}")

#print("POST: ", file_path)

#print("File: %s" % file_path)
print('working with .eml file? %s' % file_path["filename"])

Expand All @@ -400,6 +436,16 @@ def parse_email_file(self, file_id, extract_attachments=False):
else:
extract_attachments = False

# Replace raw newlines \\r\\n with actual newlines
# The data is a byte string, so we need to decode it to utf-8
try:
print("Pre size: %d" % len(file_path["data"]))
file_path["data"] = file_path["data"].decode("utf-8").replace("\\r\\n", "\n").encode("utf-8")
print("Post size: %d" % len(file_path["data"]))
except Exception as e:
print(f"Failed to decode file: {e}")
pass

# Makes msg into eml
if ".msg" in file_path["filename"] or "." not in file_path["filename"]:
print(f"[DEBUG] Working with .msg file {file_path['filename']}. Filesize: {len(file_path['data'])}")
Expand All @@ -414,6 +460,7 @@ def parse_email_file(self, file_id, extract_attachments=False):
if ".msg" in file_path["filename"]:
return {"success":False, "reason":f"Exception occured during msg parsing: {e}"}


ep = eml_parser.EmlParser(
include_attachment_data=True,
include_raw_body=True
Expand All @@ -422,8 +469,8 @@ def parse_email_file(self, file_id, extract_attachments=False):
try:
print("Pre email")
parsed_eml = ep.decode_email_bytes(file_path['data'])
if str(parsed_eml["header"]["date"]) == "1970-01-01 00:00:00+00:00" and len(parsed_eml["header"]["subject"]) == 0:
return {"success":False,"reason":"Not a valid EML/MSG file, or the file have a timestamp or subject defined (required).", "date": str(parsed_eml["header"]["date"]), "subject": str(parsed_eml["header"]["subject"])}
#if str(parsed_eml["header"]["date"]) == "1970-01-01 00:00:00+00:00" and len(parsed_eml["header"]["subject"]) == 0:
# return {"success":False,"reason":"Not a valid EML/MSG file, or the file have a timestamp or subject defined (required).", "date": str(parsed_eml["header"]["date"]), "subject": str(parsed_eml["header"]["subject"])}

# Put attachments in the shuffle file system
print("Pre attachment")
Expand Down Expand Up @@ -471,6 +518,8 @@ def parse_email_headers(self, email_headers):
# Basic function to check headers in an email
# Can be dumped in in pretty much any format
def analyze_headers(self, headers):
self.logger.info("Input headers: %s" % headers)

# Raw
if isinstance(headers, str):
headers = self.parse_email_headers(headers)
Expand All @@ -484,6 +533,11 @@ def analyze_headers(self, headers):
headers = headers["header"]
if "header" in headers:
headers = headers["header"]

if "headers" in headers:
headers = headers["headers"]
if "headers" in headers:
headers = headers["headers"]

if not isinstance(headers, list):
newheaders = []
Expand All @@ -501,6 +555,7 @@ def analyze_headers(self, headers):

headers = newheaders

#self.logger.info("Parsed headers: %s" % headers)

spf = False
dkim = False
Expand All @@ -509,19 +564,36 @@ def analyze_headers(self, headers):

analyzed_headers = {
"success": True,
"sender": "",
"receiver": "",
"subject": "",
"date": "",
"details": {
"spf": "",
"dkim": "",
"dmarc": "",
"spoofed": "",
}
},
}

for item in headers:
if "name" in item:
item["key"] = item["name"]

item["key"] = item["key"].lower()

# Handle sender/receiver
if item["key"] == "from" or item["key"] == "sender" or item["key"] == "delivered-to":
analyzed_headers["sender"] = item["value"]

if item["key"] == "to" or item["key"] == "receiver" or item["key"] == "delivered-to":
analyzed_headers["receiver"] = item["value"]

if item["key"] == "subject" or item["key"] == "title":
analyzed_headers["subject"] = item["value"]

if item["key"] == "date":
analyzed_headers["date"] = item["value"]

if "spf" in item["key"]:
analyzed_headers["details"]["spf"] = spf
Expand Down Expand Up @@ -599,6 +671,17 @@ def analyze_headers(self, headers):
# Should be a dictionary
return analyzed_headers

# This is an SMS function of Shuffle
def send_sms_shuffle(self, apikey, phone_numbers, body):
phone_numbers = phone_numbers.replace(" ", "")
targets = phone_numbers.split(",")

data = {"numbers": targets, "body": body}

url = "https://shuffler.io/api/v1/functions/sendsms"
headers = {"Authorization": "Bearer %s" % apikey}
return requests.post(url, headers=headers, json=data, verify=False).text


# Run the actual thing after we've checked params
def run(request):
Expand Down
5 changes: 5 additions & 0 deletions http/1.4.0/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,11 @@ def PATCH(self, url, headers="", body="", username="", password="", verify=True,
else:
auth = requests.auth.HTTPBasicAuth(username, password)

if not timeout:
timeout = 5
if timeout:
timeout = int(timeout)

if to_file == "true":
to_file = True
else:
Expand Down
Loading

0 comments on commit 8f3df26

Please sign in to comment.