Skip to content

Instantly share code, notes, and snippets.

View jeremyjenkins5's full-sized avatar

Jeremy Jenkins jeremyjenkins5

View GitHub Profile
@jeremyjenkins5
jeremyjenkins5 / SendMailgunEmail.ps1
Created August 9, 2016 20:22 — forked from ctigeek/SendMailgunEmail.ps1
Send an email using Mailgun in Powershell.
function Send-MailgunEmail($from, $to, $subject, $body, $emaildomain, $apikey) {
$idpass = "api:$($apikey)"
$basicauth = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($idpass))
$headers = @{
Authorization = "Basic $basicauth"
}
$url = "https://api.mailgun.net/v2/$($emaildomain)/messages"
$body = @{
from = $from;
@jeremyjenkins5
jeremyjenkins5 / fortigate_backup.sh
Last active July 25, 2022 08:09
Bash script to backup Fortigate firewalls to FTP server
#!/bin/bash
# FTP Server settings
FTPS="1.2.3.4" # FTP server ip or hostname (must be reachable from the Fortigate)
FTPU="username" # FTP username
FTPP="password" # FTP password
# Individual Fortigate settings
HOST="1.2.3.4" # Fortigate hostname of IP (must be accessible via ssh)
USER="username" # Fortigate username
@jeremyjenkins5
jeremyjenkins5 / sonicwall_backup.sh
Last active February 23, 2016 21:24
Backup Sonicwall to FTP server
#!/bin/bash
# FTP Server settings
FTPS="1.2.3.4" # FTP server hostname or IP (must be reachable from the Sonicwall)
FTPU="username" # FTP username
FTPP="password" # FTP password
#Individual sonicwall settings
HOST="1.2.3.5" # Sonicwall hostname or IP (must be accessible via ssh)
USER="username" # Sonicwall username