Skip to content

Instantly share code, notes, and snippets.

View psuedoelastic's full-sized avatar

pseudo<>psuedo psuedoelastic

View GitHub Profile
@psuedoelastic
psuedoelastic / Get-AVStatus.ps1
Created July 31, 2016 17:58 — forked from jdhitsolutions/Get-AVStatus.ps1
This PowerShell function uses WMI via the Get-CimInstance command to query the state of installed anti-virus products.
#requires -version 4.0
Function Get-AVStatus {
<#
.Synopsis
Get anti-virus product information
.Description
This command uses WMI via the Get-CimInstance command to query the state of installed anti-virus products. The default behavior is to only display enabled products, unless you use -All. You can query by computername or existing CIMSessions.
.Example
@psuedoelastic
psuedoelastic / dump-imap.py
Created July 6, 2016 13:33 — forked from FiloSottile/dump-imap.py
Simple script to dump an IMAP folder into eml files
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import imaplib
import getpass
import argparse
argparser = argparse.ArgumentParser(description="Dump a IMAP folder into .eml files")
argparser.add_argument('-s', dest='host', help="IMAP host, like imap.gmail.com", required=True)
argparser.add_argument('-u', dest='username', help="IMAP username", required=True)
@psuedoelastic
psuedoelastic / gmail_imap_dump_eml.py
Created July 6, 2016 13:32 — forked from robulouski/gmail_imap_dump_eml.py
Very simple Python script to dump all emails in an IMAP folder to files.
#!/usr/bin/env python
#
# Very simple Python script to dump all emails in an IMAP folder to files.
# This code is released into the public domain.
#
# RKI Nov 2013
#
import sys
import imaplib
import getpass
@psuedoelastic
psuedoelastic / gmail.py
Created July 6, 2016 13:09 — forked from jasonrdsouza/gmail.py
Python script to access a gmail account and download particular emails
import email, getpass, imaplib, os
detach_dir = '.' # directory where to save attachments (default: current)
user = raw_input("Enter your GMail username:")
pwd = getpass.getpass("Enter your password: ")
# connecting to the gmail imap server
m = imaplib.IMAP4_SSL("imap.gmail.com")
m.login(user,pwd)
m.select("cs2043") # here you a can choose a mail box like INBOX instead