Skip to content

Instantly share code, notes, and snippets.

leVirve /
Last active Aug 13, 2019
A Python script to add/remove users for FileZilla Server.
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 / 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 /
Created Aug 23, 2011
Python script that will generate a x.509 certificate
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.