Created
April 10, 2012 01:34
-
-
Save yuchan/2347819 to your computer and use it in GitHub Desktop.
Encryption By Hash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
#-*- coding:utf-8 -*- | |
import os | |
import hashlib | |
from datetime import * | |
remote_addr = os.environ["REMOTEHOST"] | |
current_time = datetime.now() | |
ct = current_time.strftime("%y%m%d%H%M%S") | |
h = hashlib.new("md5") | |
h.update(remote_addr) | |
h.update(ct) | |
print h.hexdigest() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment