Skip to content

Instantly share code, notes, and snippets.

@leVirve
leVirve / ddd_ftpuser.py
Last active Aug 13, 2019
A Python script to add/remove users for FileZilla Server.
View ddd_ftpuser.py
import hashlib
import os
import subprocess
import xml.etree.ElementTree
import click
user_xml_fmt = '''
<User Name="ddd_{username}">
<Option Name="Pass">{md5_pwd}</Option>
@lavinj87
lavinj87 / gist:238ccb229ac594a50b0a
Created Nov 25, 2014
SMTPHandler with support to attachments
View gist:238ccb229ac594a50b0a
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.Utils import formatdate
from logging.handlers import SMTPHandler
import logging
import os.path
import smtplib
@ril3y
ril3y / create_x.509_cert.py
Created Aug 23, 2011
Python script that will generate a x.509 certificate
View create_x.509_cert.py
#!/usr/bin/python
from OpenSSL import crypto, SSL
from socket import gethostname
from pprint import pprint
from time import gmtime, mktime
from os.path import exists, join
CERT_FILE = "myapp.crt"
KEY_FILE = "myapp.key"
You can’t perform that action at this time.