For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| /etc/ppp/ppp.conf | |
| default: | |
| set device PPPoE:<interface connected to modem>:<profile name>: | |
| <profile name>: | |
| set authname <pppoe username> | |
| set authkey <pppoe password> | |
| add default HISADDR |
| id | name | age | |
|---|---|---|---|
| 0 | aaron | 34 | |
| 1 | tina | 36 | |
| 2 | noah | © |
| function encrypt(text){ | |
| var cipher = crypto.createCipher('aes-256-cbc','d6F3Efeq') | |
| var crypted = cipher.update(text,'utf8','hex') | |
| crypted += cipher.final('hex'); | |
| return crypted; | |
| } | |
| function decrypt(text){ | |
| var decipher = crypto.createDecipher('aes-256-cbc','d6F3Efeq') | |
| var dec = decipher.update(text,'hex','utf8') |
| #!/usr/bin/env python | |
| import dpkt, pcap, socket | |
| from ipaddr import IPv4Address, IPv6Address | |
| import syslog | |
| class HTTPRequest(): | |
| def __init__(self, host, uri, ip = None, user_agent = None): | |
| self.uri = uri | |
| self.user_agent = user_agent | |
| self.host = host |
| """ | |
| Uncipher Cisco type 7 ciphered passwords | |
| Usage: python uncipher.py <pass> where <pass> is the text of the type 7 password | |
| Example: | |
| $ python uncipher.py 094F4F1D1A0403 | |
| catcat | |
| """ | |
| import fileinput | |
| import sys |
| # | |
| # NB : this is not secure | |
| # from http://code.activestate.com/recipes/266586-simple-xor-keyword-encryption/ | |
| # added base64 encoding for simple querystring :) | |
| # | |
| def xor_crypt_string(data, key='awesomepassword', encode=False, decode=False): | |
| from itertools import izip, cycle | |
| import base64 | |
| if decode: |
| import sys | |
| import webbrowser as wb | |
| import simplejson as json | |
| from restkit import Resource, BasicAuth, request | |
| def createTask(server_base_url, user, password, project, task_summary): | |
| auth = BasicAuth(user, password) | |
| # Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
| # Make sure you have IMAP enabled in your gmail settings. | |
| # Right now it won't download same file name twice even if their contents are different. | |
| import email | |
| import getpass, imaplib | |
| import os | |
| import sys | |
| detach_dir = '.' |