diff options
| author | yo mama <pepper@scannerjammer.com> | 2015-02-14 00:35:52 -0800 |
|---|---|---|
| committer | yo mama <pepper@scannerjammer.com> | 2015-02-14 00:35:52 -0800 |
| commit | 281a99716a5ba179dd4aef3e9897c6325362225a (patch) | |
| tree | dc252c237c81176fc1b24e453d2e777e0f48d485 /im/cgi-bin/imweb/hexdirer.py | |
| parent | ab5a98355b76267d3a1f01052bf3d072bed77281 (diff) | |
added sketch
Diffstat (limited to 'im/cgi-bin/imweb/hexdirer.py')
| -rwxr-xr-x | im/cgi-bin/imweb/hexdirer.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/im/cgi-bin/imweb/hexdirer.py b/im/cgi-bin/imweb/hexdirer.py deleted file mode 100755 index af6f60e..0000000 --- a/im/cgi-bin/imweb/hexdirer.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/python - -import sys -import os -import time -import string -import sha -BASE_DIR = "/var/www/asdf.us/httpdocs/im/" -OTHER_BASE = "http://asdf.us/im/" - -#THIS MODULE RETURNS A COMPLETE PATH! ALL YOU HAVE TO DO IS -#SPECIFY THE BASE DIRECTORY -#the hash works like this: -#0 is private path -#1 is the public path - - - -def hash_dir (s): - return sha.new(s).hexdigest()[:2] - -def now (): - return int(time.mktime(time.localtime())) - -def hexdir(): - time = now() - time = str(time) - ending = hash_dir(time) - dirs = [] - dirs.append(BASE_DIR+ending+'/') - dirs.append(OTHER_BASE+ending+'/') - print str(dirs) - return dirs - sys.exit() - -if __name__ == "__main__": - hexdir() - |
