summaryrefslogtreecommitdiff
path: root/impattern/im/cgi-bin/imweb/saveImg
diff options
context:
space:
mode:
authoryo mama <pepper@scannerjammer.com>2015-02-13 02:41:42 -0800
committeryo mama <pepper@scannerjammer.com>2015-02-13 02:41:42 -0800
commit64f41d53728a966f10aef6d7ffbc00853d754300 (patch)
tree082f17db25c61f66aec87dc47fbc208cb17ca168 /impattern/im/cgi-bin/imweb/saveImg
parentfab0563ff31365c2396f7353679c8239aed3ce8b (diff)
fixed some basics
Diffstat (limited to 'impattern/im/cgi-bin/imweb/saveImg')
-rwxr-xr-ximpattern/im/cgi-bin/imweb/saveImg48
1 files changed, 0 insertions, 48 deletions
diff --git a/impattern/im/cgi-bin/imweb/saveImg b/impattern/im/cgi-bin/imweb/saveImg
deleted file mode 100755
index e76c36a..0000000
--- a/impattern/im/cgi-bin/imweb/saveImg
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/python
-
-import hexdirer
-import filenamer
-import cgi
-import fieldstorager
-import base64
-import random
-import sys
-import databaser
-
-print "Content-type: text/plain"
-print ""
-
-nametag = "imWeb"
-#name is the image name
-
-PARAM_LIST = "name username picture"
-form = cgi.FieldStorage()
-newvalues = fieldstorager.fieldstorage(PARAM_LIST, form)
-thekeys = PARAM_LIST.split()
-for key in thekeys:
- globals()[key] = newvalues[key]
-if username == None:
- username = ""
-if name == None:
- name = str(random.randint(0,100))
-############################################################
-#test here
-###########################################################
-try:
- #the picture is first encoded so we have to decode it
- picture = base64.b64decode(picture)
- namepart = filenamer.filename(("/"+name+".png"),username,nametag)
- filepaths = hexdirer.hexdir()
- filepaths = ["",""]
-
- thefile = filepaths[0]+namepart
- f = open(thefile,'w')
- for line in picture:
- f.write(line)
- f.close()
-
-# databaser.database(filepaths[0],namepart,"imweb capture",username)
- print "capture successful"
- print filepaths[1]+namepart
-except:
- print "sorry, there is a problem with image capture"