You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(10) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
|
Mar
(3) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(23) |
Oct
(3) |
Nov
(2) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(3) |
Jun
(6) |
Jul
|
Aug
|
Sep
(20) |
Oct
|
Nov
(3) |
Dec
(9) |
2011 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(5) |
Oct
(2) |
Nov
(1) |
Dec
|
From: <Z3...@us...> - 2010-09-04 21:52:50
|
Revision: 298 http://spd.svn.sourceforge.net/spd/?rev=298&view=rev Author: Z3po Date: 2010-09-04 21:52:44 +0000 (Sat, 04 Sep 2010) Log Message: ----------- fixed bugs in --add functionality Modified Paths: -------------- trunk/src/spd-cli trunk/src/spdCLI.py trunk/src/spdCore.py Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2010-06-28 11:33:34 UTC (rev 297) +++ trunk/src/spd-cli 2010-09-04 21:52:44 UTC (rev 298) @@ -43,7 +43,7 @@ parser.add_option( "-e", "--edit", metavar="ID", dest ="edit", - help ="Entry to edit") + help ="ID to edit") parser.add_option( "-i", "--delete-id", metavar="ID", @@ -52,9 +52,8 @@ parser.add_option( "--id", dest ="id", - help ="Search Password by ID") + help ="Show Password by ID") - parser.add_option( "-a", "--add", action="store_true", dest = "add", @@ -102,7 +101,7 @@ pc.addEntry(interface.newEntry(pc.getCollumns())) pc.exportPasswordsPlain() -if options.edit: +elif options.edit: updates = interface.editEntry(pc.findPassword(options.edit,id=True)) pc.updateEntry(updates) pc.exportPasswordsPlain() Modified: trunk/src/spdCLI.py =================================================================== --- trunk/src/spdCLI.py 2010-06-28 11:33:34 UTC (rev 297) +++ trunk/src/spdCLI.py 2010-09-04 21:52:44 UTC (rev 298) @@ -161,7 +161,6 @@ return table # }}} - def setConfig(self,var,value): # {{{ self.config[var] = value # }}} @@ -174,7 +173,6 @@ entry = {} for i in collumns: entry[i] = raw_input(i + ': ') - return entry # }}} Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2010-06-28 11:33:34 UTC (rev 297) +++ trunk/src/spdCore.py 2010-09-04 21:52:44 UTC (rev 298) @@ -209,7 +209,7 @@ count=0 for collumns in self.__table: # now we are writing the data count += 1 - if not self.__table[collumns][1]: + if not self.__table[collumns][i]: fobj.write('') # <- here else: fobj.write(self.__table[collumns][i]) # <- and here @@ -289,7 +289,6 @@ result = { "ID" : []} else: - result = {} if (output != "noID" ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Z3...@us...> - 2010-06-28 11:33:40
|
Revision: 297 http://spd.svn.sourceforge.net/spd/?rev=297&view=rev Author: Z3po Date: 2010-06-28 11:33:34 +0000 (Mon, 28 Jun 2010) Log Message: ----------- changed --add-key to --add-collumn because of missunderstandings Modified Paths: -------------- trunk/src/spd-cli Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2010-06-27 13:04:31 UTC (rev 296) +++ trunk/src/spd-cli 2010-06-28 11:33:34 UTC (rev 297) @@ -61,11 +61,11 @@ default=False, help = "Add an Entry") -parser.add_option( "--add-key", - metavar="Keyword", - dest = "addkey", +parser.add_option( "--add-collumn", + metavar="Collumn", + dest = "addcollumn", default=False, - help = "Add a Keyword") + help = "Add a Collumn to Passfile") parser.add_option( "-p", "--password-only", action="store_true", @@ -107,8 +107,8 @@ pc.updateEntry(updates) pc.exportPasswordsPlain() -elif options.addkey: - pc.addCollumn(options.addkey) +elif options.addcollumn: + pc.addCollumn(options.addcollumn) pc.exportPasswordsPlain() elif options.delete: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Z3...@us...> - 2010-06-27 13:04:37
|
Revision: 296 http://spd.svn.sourceforge.net/spd/?rev=296&view=rev Author: Z3po Date: 2010-06-27 13:04:31 +0000 (Sun, 27 Jun 2010) Log Message: ----------- added "edit Entry" functionality Modified Paths: -------------- trunk/src/spd-cli trunk/src/spdCLI.py trunk/src/spdCore.py Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2010-06-27 11:51:48 UTC (rev 295) +++ trunk/src/spd-cli 2010-06-27 13:04:31 UTC (rev 296) @@ -36,16 +36,25 @@ epilog = "With no parameters it will print out everything!") parser.add_option( "-d", "--delete", - metavar="Keyword", + metavar="Keywords", dest ="delete", - help ="Entry to delete") + help ="Entries to delete") +parser.add_option( "-e", "--edit", + metavar="ID", + dest ="edit", + help ="Entry to edit") + parser.add_option( "-i", "--delete-id", metavar="ID", dest ="deleteID", help ="ID to delete") +parser.add_option( "--id", + dest ="id", + help ="Search Password by ID") + parser.add_option( "-a", "--add", action="store_true", dest = "add", @@ -58,7 +67,6 @@ default=False, help = "Add a Keyword") - parser.add_option( "-p", "--password-only", action="store_true", dest = "pwonly", @@ -94,14 +102,17 @@ pc.addEntry(interface.newEntry(pc.getCollumns())) pc.exportPasswordsPlain() +if options.edit: + updates = interface.editEntry(pc.findPassword(options.edit,id=True)) + pc.updateEntry(updates) + pc.exportPasswordsPlain() + elif options.addkey: pc.addCollumn(options.addkey) pc.exportPasswordsPlain() elif options.delete: searchPatterns = args - del searchPatterns[0] - del searchPatterns[0] pc.delEntry(searchPatterns) pc.exportPasswordsPlain() @@ -113,26 +124,28 @@ elif options.pwonly: searchPatterns = args try: - print pc.findPassword(searchPatterns)[pc.passwordField][0] + if options.id: + print pc.findPassword(options.id,id=True)[pc.passwordField][0] + else: + print pc.findPassword(searchPatterns)[pc.passwordField][0] except: pass elif options.widemode: searchPatterns = args - interface.tableOutput(pc.findPassword(searchPatterns)) + if options.id: + interface.tableOutput(pc.findPassword(options.id,id=True)) + else: + interface.tableOutput(pc.findPassword(searchPatterns)) else: # regular search searchPatterns = args - if options.localStore: - try: - del searchPatterns[searchPatterns.index('-l')] - except: - del searchPatterns[searchPatterns.index('--local')] - + if options.id: + interface.listOutput(pc.findPassword(options.id,id=True)) + else: + interface.listOutput(pc.findPassword(searchPatterns)) - interface.listOutput(pc.findPassword(searchPatterns)) - # EOF # vim:foldmethod=marker:tabstop=3:autoindent:shiftwidth=3 Modified: trunk/src/spdCLI.py =================================================================== --- trunk/src/spdCLI.py 2010-06-27 11:51:48 UTC (rev 295) +++ trunk/src/spdCLI.py 2010-06-27 13:04:31 UTC (rev 296) @@ -143,6 +143,25 @@ # }}} + def editEntry(self,table): # {{{ + + hits = len(table.values()[0]) + + if hits > 1: + print "AN ERROR OCCURED...ID MUST BE UNIQUE" + sys.exit(2) + + print "Change value of Keys. Nothing for unchanged" + for collumn in table: + if collumn != "__ID": + value = raw_input(collumn + " (" + table[collumn][0] + ")" + ": ") + if value: + table[collumn][0] = value + + return table + # }}} + + def setConfig(self,var,value): # {{{ self.config[var] = value # }}} Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2010-06-27 11:51:48 UTC (rev 295) +++ trunk/src/spdCore.py 2010-06-27 13:04:31 UTC (rev 296) @@ -270,10 +270,10 @@ self.__table[str(row[1])] = [] # quite easy, eh? :-) - self.__table = self.findPassword("%",output='noID') + self.__table = self.findPassword("%",id=False,output='noID') #}}} - def findPassword(self,patterns,output='table'): #{{{ + def findPassword(self,patterns,id=False,output='table'): #{{{ """Function helps you to find a password in SQLite Database patterns: list of strings (filter)""" cursor = self.__sql.cursor() @@ -301,7 +301,10 @@ searchCollumns = re.sub(r',$','',searchCollumns) - query = "select " + searchCollumns + " from passwords where " + self.__buildWhere(patterns) + if id: + query = "select " + searchCollumns + " from passwords where __ID = " + patterns + else: + query = "select " + searchCollumns + " from passwords where " + self.__buildWhere(patterns) cursor.execute(query) # convert the result in a Dictionary @@ -358,6 +361,31 @@ cursor.execute(query) #}}} + def updateEntry(self,table): #{{{ + """Updates an Entry + patterns: list of strings""" + setStatement = "" + cursor = self.__sql.cursor() + + for collumn in table: + if collumn != "__ID": + if setStatement: + if not table[collumn][0]: + setStatement = setStatement + ", '" + collumn + "' = ''" + else: + setStatement = setStatement + ", '" + collumn + "' = '" + str(table[collumn][0]) + "'" + else: + if not table[collumn][0]: + setStatement = "SET '" + collumn + "' = ''" + else: + setStatement = "SET '" + collumn + "' = '" + str(table[collumn][0]) + "'" + + query = "UPDATE passwords " + setStatement + " where __ID = " + str(table["__ID"][0]) + + cursor.execute(query) + #}}} + + def __buildWhere(self,patterns): # {{{ """internal function to build the SQL WHERE Statement""" count = 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Z3...@us...> - 2010-06-27 11:51:54
|
Revision: 295 http://spd.svn.sourceforge.net/spd/?rev=295&view=rev Author: Z3po Date: 2010-06-27 11:51:48 +0000 (Sun, 27 Jun 2010) Log Message: ----------- added functionality to add key (collumn) to passfile Modified Paths: -------------- trunk/src/spd-cli trunk/src/spdCore.py Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2010-06-27 10:17:05 UTC (rev 294) +++ trunk/src/spd-cli 2010-06-27 11:51:48 UTC (rev 295) @@ -52,6 +52,13 @@ default=False, help = "Add an Entry") +parser.add_option( "--add-key", + metavar="Keyword", + dest = "addkey", + default=False, + help = "Add a Keyword") + + parser.add_option( "-p", "--password-only", action="store_true", dest = "pwonly", @@ -74,9 +81,6 @@ dest = "passfile", help = "do not use the confgured passfile but the one given here") - - - (options, args) = parser.parse_args() # }}} @@ -90,6 +94,10 @@ pc.addEntry(interface.newEntry(pc.getCollumns())) pc.exportPasswordsPlain() +elif options.addkey: + pc.addCollumn(options.addkey) + pc.exportPasswordsPlain() + elif options.delete: searchPatterns = args del searchPatterns[0] @@ -116,7 +124,6 @@ else: # regular search searchPatterns = args - print str(searchPatterns) + "\n\n" if options.localStore: try: del searchPatterns[searchPatterns.index('-l')] Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2010-06-27 10:17:05 UTC (rev 294) +++ trunk/src/spdCore.py 2010-06-27 11:51:48 UTC (rev 295) @@ -209,7 +209,10 @@ count=0 for collumns in self.__table: # now we are writing the data count += 1 - fobj.write(self.__table[collumns][i]) # <- here + if not self.__table[collumns][1]: + fobj.write('') # <- here + else: + fobj.write(self.__table[collumns][i]) # <- and here if (count == len(self.__table)): # write \n if last collumn fobj.write('\n') else: # otherwise write the separator @@ -259,9 +262,15 @@ def dumpSQLite(self): #{{{ """dump SQLite in self.__table""" + # First get Collumns of SQL Database...maybe they are changed + cursor = self.__sql.cursor() + cursor.execute("PRAGMA TABLE_INFO(passwords)") + for row in cursor: + if row[1] != "__ID": + self.__table[str(row[1])] = [] + # quite easy, eh? :-) self.__table = self.findPassword("%",output='noID') - #}}} def findPassword(self,patterns,output='table'): #{{{ @@ -374,7 +383,7 @@ """add a collumn to passfile name: name of new collumn""" cursor = self.__sql.cursor() - + query = "ALTER TABLE passwords ADD `" + name + "` TEXT" cursor.execute(query) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Z3...@us...> - 2010-06-27 10:17:11
|
Revision: 294 http://spd.svn.sourceforge.net/spd/?rev=294&view=rev Author: Z3po Date: 2010-06-27 10:17:05 +0000 (Sun, 27 Jun 2010) Log Message: ----------- fixed some bugs in spd-cli and added --passfile functionality to use any file as passwordfile (maybe to use in conjunction with --local if a Store is configured?) Modified Paths: -------------- trunk/src/spd-cli trunk/src/spdCore.py Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2010-06-23 14:41:34 UTC (rev 293) +++ trunk/src/spd-cli 2010-06-27 10:17:05 UTC (rev 294) @@ -70,12 +70,17 @@ default=False, help = "do not operate on the configured RCS, only use the local password container") +parser.add_option( "--passfile", + dest = "passfile", + help = "do not use the confgured passfile but the one given here") + + (options, args) = parser.parse_args() # }}} -pc = spdCore.PasswordContainer(ConfigFile,options.localStore) +pc = spdCore.PasswordContainer(ConfigFile,options.localStore,options.passfile) interface = spdCLI.cli(ConfigFile) @@ -86,19 +91,17 @@ pc.exportPasswordsPlain() elif options.delete: - searchPatterns = sys.argv + searchPatterns = args del searchPatterns[0] del searchPatterns[0] pc.delEntry(searchPatterns) pc.exportPasswordsPlain() elif options.deleteID: - id = int(sys.argv[2]) + id = options.deleteID pc.delEntry('nix', id=id) pc.exportPasswordsPlain() - - elif options.pwonly: searchPatterns = args try: @@ -107,15 +110,13 @@ pass elif options.widemode: - searchPatterns = sys.argv - del searchPatterns[0] - del searchPatterns[0] + searchPatterns = args interface.tableOutput(pc.findPassword(searchPatterns)) else: # regular search - searchPatterns = sys.argv - del searchPatterns[0] + searchPatterns = args + print str(searchPatterns) + "\n\n" if options.localStore: try: del searchPatterns[searchPatterns.index('-l')] Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2010-06-23 14:41:34 UTC (rev 293) +++ trunk/src/spdCore.py 2010-06-27 10:17:05 UTC (rev 294) @@ -50,7 +50,7 @@ debug: if set to true, the database is /tmp/spd_debug.db autoload: if set to False, the data is not loaded automatically""" - def __init__(self,file,localStore=False,debug=False,autoload=True): #{{{ + def __init__(self,file,localStore=False,passfile=False,debug=False,autoload=True): #{{{ if not debug: self.__sql = sqlite3.connect(":memory:") @@ -84,7 +84,10 @@ # }}} # set the configuration variables - self.file = os.path.expanduser(c.get('Main','file')) + if not passfile: + self.file = os.path.expanduser(c.get('Main','file')) + else: + self.file = passfile self.encryption = c.get('Main','encryption') self.passwordField = c.get('Main', 'passwordField') self.separator = '\t' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2010-06-23 14:41:40
|
Revision: 293 http://spd.svn.sourceforge.net/spd/?rev=293&view=rev Author: treibholz Date: 2010-06-23 14:41:34 +0000 (Wed, 23 Jun 2010) Log Message: ----------- * --local|-l works now. * removed old INSTALL Modified Paths: -------------- trunk/src/spd-cli Removed Paths: ------------- trunk/INSTALL Deleted: trunk/INSTALL =================================================================== --- trunk/INSTALL 2010-06-23 14:22:29 UTC (rev 292) +++ trunk/INSTALL 2010-06-23 14:41:34 UTC (rev 293) @@ -1,48 +0,0 @@ -Basic Installation -================== - - These are generic installation instructions. - -just change to directory and do - -./configure - -then everything should be set and you can install the application with - -make && make install - - -PERL Modules -================== - -you need the following perl modules installed: - --Getopt::Long --GnuPG::Interface --IO::Handle --IO::File --Switch --File::Temp --File::Copy --Term::ANSIColor --Digest::MD5::File - - -Mac OSX -================== - -you need to have macGPG and perl installed. -once you have spd installed you can install the missing libraries entering the following commands: - -sudo cpan - force install GnuPG::Interface - # you need to force this installation because of some security checks not making any sence to me - install Digest::MD5::file - -now everything should be set up and running - -WINDOWS Installation -================== - -you need to have strawberry perl and GnuPG installed. -Now you can install spd executing the related make.bat file. Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2010-06-23 14:22:29 UTC (rev 292) +++ trunk/src/spd-cli 2010-06-23 14:41:34 UTC (rev 293) @@ -116,6 +116,13 @@ else: # regular search searchPatterns = sys.argv del searchPatterns[0] + if options.localStore: + try: + del searchPatterns[searchPatterns.index('-l')] + except: + del searchPatterns[searchPatterns.index('--local')] + + interface.listOutput(pc.findPassword(searchPatterns)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2010-06-23 14:22:35
|
Revision: 292 http://spd.svn.sourceforge.net/spd/?rev=292&view=rev Author: treibholz Date: 2010-06-23 14:22:29 +0000 (Wed, 23 Jun 2010) Log Message: ----------- added --local option Modified Paths: -------------- trunk/src/spd-cli trunk/src/spdCore.py Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2010-05-27 16:20:14 UTC (rev 291) +++ trunk/src/spd-cli 2010-06-23 14:22:29 UTC (rev 292) @@ -64,12 +64,18 @@ default=False, help = "print output in wide mode (means as a table)") +parser.add_option( "-l", "--local", + action="store_true", + dest = "localStore", + default=False, + help = "do not operate on the configured RCS, only use the local password container") + (options, args) = parser.parse_args() # }}} -pc = spdCore.PasswordContainer(ConfigFile) +pc = spdCore.PasswordContainer(ConfigFile,options.localStore) interface = spdCLI.cli(ConfigFile) Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2010-05-27 16:20:14 UTC (rev 291) +++ trunk/src/spdCore.py 2010-06-23 14:22:29 UTC (rev 292) @@ -50,7 +50,7 @@ debug: if set to true, the database is /tmp/spd_debug.db autoload: if set to False, the data is not loaded automatically""" - def __init__(self,file,debug=False,autoload=True): #{{{ + def __init__(self,file,localStore=False,debug=False,autoload=True): #{{{ if not debug: self.__sql = sqlite3.connect(":memory:") @@ -92,7 +92,10 @@ self.passwordFG = c.get('Colors', 'passwordFG') self.passwordBG = c.get('Colors', 'passwordBG') - self.vcs = c.get('Main','vcs') + if localStore: + self.vcs = 'none' + else: + self.vcs = c.get('Main','vcs') self.users=[] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2010-05-27 16:20:22
|
Revision: 291 http://spd.svn.sourceforge.net/spd/?rev=291&view=rev Author: treibholz Date: 2010-05-27 16:20:14 +0000 (Thu, 27 May 2010) Log Message: ----------- Hotfix * Bug with double decrypt * removed embarassing FooBar Modified Paths: -------------- trunk/src/spd-cli trunk/src/spdCLI.py Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2010-05-26 12:01:43 UTC (rev 290) +++ trunk/src/spd-cli 2010-05-27 16:20:14 UTC (rev 291) @@ -25,6 +25,7 @@ from optparse import OptionParser version = "0.3-alpha" +ConfigFile = '~/.spd/config' pp = spdCore.name(sys.argv[0]) @@ -68,9 +69,9 @@ (options, args) = parser.parse_args() # }}} -pc = spdCore.PasswordContainer('~/.spd/config') +pc = spdCore.PasswordContainer(ConfigFile) -interface = spdCLI.cli() +interface = spdCLI.cli(ConfigFile) # check if it is a search or not. Modified: trunk/src/spdCLI.py =================================================================== --- trunk/src/spdCLI.py 2010-05-26 12:01:43 UTC (rev 290) +++ trunk/src/spdCLI.py 2010-05-27 16:20:14 UTC (rev 291) @@ -1,7 +1,8 @@ # -*- coding: UTF-8 -*- import sys +import os import platform -import spdCore +from ConfigParser import RawConfigParser class cli(object): @@ -17,11 +18,18 @@ # print k.keys() return k - def __init__(self): # {{{ - FooBar = spdCore.PasswordContainer('.spd/config') - self.config = { "passwordField" : FooBar.passwordField, - "passwordFG" : FooBar.passwordFG, - "passwordBG" : FooBar.passwordBG, + def __init__(self,ConfigFile): # {{{ + ConfigFile = os.path.expanduser(ConfigFile) + + Config = RawConfigParser() + if os.access(ConfigFile,os.F_OK): + Config.read(ConfigFile) + else: + print "HELP" + + self.config = { "passwordField" : Config.get('Main','passwordField'), + "passwordFG" : Config.get('Colors','passwordFG'), + "passwordBG" : Config.get('Colors','passwordBG'), "listSeparator" : ":", } @@ -35,6 +43,7 @@ } self.colorReset = '\033[0m' + # }}} def tableOutput(self,table): # {{{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2010-05-26 12:01:49
|
Revision: 290 http://spd.svn.sourceforge.net/spd/?rev=290&view=rev Author: treibholz Date: 2010-05-26 12:01:43 +0000 (Wed, 26 May 2010) Log Message: ----------- Quick&Dirty fix to use colors from the config Modified Paths: -------------- trunk/src/spdCLI.py trunk/src/spdCore.py Modified: trunk/src/spdCLI.py =================================================================== --- trunk/src/spdCLI.py 2010-05-25 17:01:30 UTC (rev 289) +++ trunk/src/spdCLI.py 2010-05-26 12:01:43 UTC (rev 290) @@ -1,6 +1,7 @@ # -*- coding: UTF-8 -*- import sys import platform +import spdCore class cli(object): @@ -17,12 +18,14 @@ return k def __init__(self): # {{{ - self.config = { "passwordField" : "Password", - "passwordFG" : "brightblue", - "passwordBG" : "blue", + FooBar = spdCore.PasswordContainer('.spd/config') + self.config = { "passwordField" : FooBar.passwordField, + "passwordFG" : FooBar.passwordFG, + "passwordBG" : FooBar.passwordBG, "listSeparator" : ":", } + # This has to be somehow simpler... self.colorFG = { "red" : '\033[31m', "blue": '\033[34m', "brightblue": '\033[1;34m' Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2010-05-25 17:01:30 UTC (rev 289) +++ trunk/src/spdCore.py 2010-05-26 12:01:43 UTC (rev 290) @@ -89,6 +89,9 @@ self.passwordField = c.get('Main', 'passwordField') self.separator = '\t' + self.passwordFG = c.get('Colors', 'passwordFG') + self.passwordBG = c.get('Colors', 'passwordBG') + self.vcs = c.get('Main','vcs') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2010-05-25 17:01:36
|
Revision: 289 http://spd.svn.sourceforge.net/spd/?rev=289&view=rev Author: treibholz Date: 2010-05-25 17:01:30 +0000 (Tue, 25 May 2010) Log Message: ----------- fixed broken MultiUser-Support.... DOH!!! Modified Paths: -------------- trunk/src/spdCore.py Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2010-04-11 14:53:16 UTC (rev 288) +++ trunk/src/spdCore.py 2010-05-25 17:01:30 UTC (rev 289) @@ -407,10 +407,15 @@ c = core.Context() c.set_armor(1) + # Get the first keys, it finds + RecipientKeys = [] for i in self.recipients: c.op_keylist_start(i,0) + RecipientKeys.append(c.op_keylist_next()) - c.op_encrypt([c.op_keylist_next()], 1, plain, cipher) + # encrypt with RecipientKeys + + c.op_encrypt(RecipientKeys, 1, plain, cipher) cipher.seek(0,0) f.write(cipher.read()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Z3...@us...> - 2010-04-11 14:53:22
|
Revision: 288 http://spd.svn.sourceforge.net/spd/?rev=288&view=rev Author: Z3po Date: 2010-04-11 14:53:16 +0000 (Sun, 11 Apr 2010) Log Message: ----------- beautified source a bit :). Added addColumn functionality Modified Paths: -------------- trunk/src/spdCore.py Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2009-11-28 16:25:35 UTC (rev 287) +++ trunk/src/spdCore.py 2010-04-11 14:53:16 UTC (rev 288) @@ -22,13 +22,13 @@ import sqlite3 import re -import ConfigParser +from ConfigParser import RawConfigParser import os try: from pyme import core, callbacks from pyme.constants.sig import mode -except: +except ImportError: print "You have to install the pyme Python interface to the GPGME GnuPG encryption library." print "in Debian/Ubuntu: sudo aptitude install python-pyme" print "See also: http://pyme.sourceforge.net/" @@ -36,20 +36,20 @@ try: import pysvn -except: +except ImportError: print "You have to install the Python interface to Subversion." print "in Debian/Ubuntu: sudo aptitude install python-svn" print "See also: http://pysvn.tigris.org/" exit(-1) class PasswordContainer(object): # {{{ - - '''The Constructor + """The Constructor creates an internal memory-based SQLite database and declares a a the self.__table dictionary file: string, the config-file - debug: if set to true, the database /tmp/spd_debug.db - autoload: if set to False, the data is not loaded automatically''' + debug: if set to true, the database is /tmp/spd_debug.db + autoload: if set to False, the data is not loaded automatically""" + def __init__(self,file,debug=False,autoload=True): #{{{ if not debug: @@ -61,7 +61,7 @@ # read the config file = os.path.expanduser(file) - c = ConfigParser.RawConfigParser() + c = RawConfigParser() if os.access(file,os.F_OK): c.read(file) @@ -105,8 +105,8 @@ #}}} - # read passwordfile def importPasswordsPlain(self): #{{{ + """This function reads the password file""" vcs = self.vcs encryption = self.encryption file = self.file @@ -168,8 +168,8 @@ return True #}}} - # write passwordfile def exportPasswordsPlain(self,autoload=True): #{{{ + """Writes the password file""" if autoload: self.dumpSQLite() @@ -210,15 +210,14 @@ if (vcs == "svn"): svn = pysvn.Client() - svn.checkin([file],'lalala') + svn.checkin([file],'SPD Passfile Update') else: pass # }}} - # write self.__table in SQLite def fillSQLite(self): #{{{ - + """writes self.__table into SQLite Database""" cursor = self.__sql.cursor() count = 0 @@ -249,16 +248,16 @@ self.__sql.commit() # }}} - # dump SQLite in self.__table def dumpSQLite(self): #{{{ + """dump SQLite in self.__table""" # quite easy, eh? :-) self.__table = self.findPassword("%",output='noID') #}}} - # find a password in SQLite - # patterns: list of strings (filter) def findPassword(self,patterns,output='table'): #{{{ + """Function helps you to find a password in SQLite Database + patterns: list of strings (filter)""" cursor = self.__sql.cursor() if not patterns: @@ -298,25 +297,24 @@ return result #}}} - # clear the data in the self.__table Dictionary def flushPasswordsPlain(self): #{{{ + """Clears the data in the self.__table Dictionary""" for collumns in self.__table: self.__table[collumns] = [] #}}} - # add a new entry - # entry: dictionary like self.__table def addEntry(self, entry, commit=True): # {{{ + """adds a new entry to passfile + entry: new entry dictionary""" cursor = self.__sql.cursor() insertValues = '' for collumns in self.__table: entry[collumns] = re.sub(r'\'','\'\'', entry[collumns]) insertValues += "'" + entry[collumns] + "'," - insertValues = re.sub(r',$',r'', insertValues) - try: + try: cursor.execute(self.__insertStatement + insertValues + ')') except sqlite3.OperationalError: #DEBUG print "addEntry" @@ -329,9 +327,9 @@ # }}} - # delete an entry - # patterns: list of strings def delEntry(self,patterns=0,id=-1): #{{{ + """Deletes an Entry + patterns: list of strings""" cursor = self.__sql.cursor() if (id < 0 ): @@ -342,8 +340,8 @@ cursor.execute(query) #}}} - # internal to build the WHERE def __buildWhere(self,patterns): # {{{ + """internal function to build the SQL WHERE Statement""" count = 0 query = '(' for filter in patterns: @@ -358,26 +356,34 @@ return query #}}} - # return a list of used collumns def getCollumns(self): # {{{ + """return a list of collumns in passfile""" return self.__table.keys() # }}} - # add a collumn FIXME def addCollumn(self,name): # {{{ - pass + """add a collumn to passfile + name: name of new collumn""" + cursor = self.__sql.cursor() + + query = "ALTER TABLE passwords ADD `" + name + "` TEXT" + + cursor.execute(query) + + self.__sql.commit() + # }}} - # delete a collumn FIXME def delCollumn(self,name): # {{{ + """deletes a collumn + name: name of the collumn to delete""" pass # }}} - # rename a collumn FIXME def renameCollumn(self,oldname,newname): # {{{ pass + # }}} - # }}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Z3...@us...> - 2009-11-28 16:25:45
|
Revision: 287 http://spd.svn.sourceforge.net/spd/?rev=287&view=rev Author: Z3po Date: 2009-11-28 16:25:35 +0000 (Sat, 28 Nov 2009) Log Message: ----------- added some experimental Stuff with sorting dicts Modified Paths: -------------- trunk/src/spdCLI.py Modified: trunk/src/spdCLI.py =================================================================== --- trunk/src/spdCLI.py 2009-11-28 11:03:52 UTC (rev 286) +++ trunk/src/spdCLI.py 2009-11-28 16:25:35 UTC (rev 287) @@ -4,6 +4,18 @@ class cli(object): + def sortTable(self, d): + """ returns a dictionary sorted by keys """ + our_list = d.items() + our_list.sort() + k = {} +# print our_list + for item in our_list: +# print item[0] + k[item[0]] = item[1] +# print k.keys() + return k + def __init__(self): # {{{ self.config = { "passwordField" : "Password", "passwordFG" : "brightblue", @@ -23,12 +35,13 @@ # }}} def tableOutput(self,table): # {{{ +# table = self.sortTable(table) collumns = len(table) entries = len(table.values()[0]) maxlength = {} header = "|" - # Ride through all columns and find the maximal length a line can have + # Ride through all columns and find the maximal length a line can have. Maybe there is a better way doing this? for i in range(0,collumns): maxlength[i] = 0 # First for the keys @@ -44,7 +57,7 @@ except Exception, e: print e - # Now Print the Entries in WIDE mode :) + # Now Print the Entries in WIDE mode. Pretty Crazy hack as it was in perl, maybe anyone can do this better :) output = "| " + table.keys()[0].ljust(maxlength[0]) for i in range(1,collumns): output = output + " | " + table.keys()[i].ljust(maxlength[i]) @@ -87,8 +100,10 @@ output += self.colorReset + " | " else: output += table.values()[i][j].ljust(maxlength[i]) + " | " + print output + # }}} def listOutput(self,table): # {{{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Z3...@us...> - 2009-11-28 11:04:04
|
Revision: 286 http://spd.svn.sourceforge.net/spd/?rev=286&view=rev Author: Z3po Date: 2009-11-28 11:03:52 +0000 (Sat, 28 Nov 2009) Log Message: ----------- added widemode output and changed some of help information Modified Paths: -------------- trunk/src/spd-cli trunk/src/spdCLI.py Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2009-10-04 07:23:59 UTC (rev 285) +++ trunk/src/spd-cli 2009-11-28 11:03:52 UTC (rev 286) @@ -24,13 +24,15 @@ import spdCLI from optparse import OptionParser +version = "0.3-alpha" + pp = spdCore.name(sys.argv[0]) # {{{ OptionParser stuff parser = OptionParser( "%prog [Options] Search", description = pp.acronym + ' - ' + pp.name, - version = "0.3-alpha", - epilog = "With no parameters it will print out nothing!") + version = version, + epilog = "With no parameters it will print out everything!") parser.add_option( "-d", "--delete", metavar="Keyword", @@ -55,11 +57,11 @@ default=False, help = "print Password only of first match, usefull for piping (e.g. in rdesktop)") -#parser.add_option( "-w", "--wide", -# action="store_true", -# dest = "widemode", -# default=False, -# help = "print output in wide mode (means as a table)") +parser.add_option( "-w", "--wide", + action="store_true", + dest = "widemode", + default=False, + help = "print output in wide mode (means as a table)") @@ -97,10 +99,11 @@ except: pass -#elif options.widemode: -# searchPatterns = sys.argv -# del searchPatterns[0] -# interface.tableOutput(pc.findPassword(searchPatterns)) +elif options.widemode: + searchPatterns = sys.argv + del searchPatterns[0] + del searchPatterns[0] + interface.tableOutput(pc.findPassword(searchPatterns)) else: # regular search Modified: trunk/src/spdCLI.py =================================================================== --- trunk/src/spdCLI.py 2009-10-04 07:23:59 UTC (rev 285) +++ trunk/src/spdCLI.py 2009-11-28 11:03:52 UTC (rev 286) @@ -23,28 +23,73 @@ # }}} def tableOutput(self,table): # {{{ - hits = len(table['Password']) # Password always exists :-) - length = {} + collumns = len(table) + entries = len(table.values()[0]) + maxlength = {} header = "|" - for i in table: - if (len(max(table[i])) > len(i)): - length[i] = len(max(table[i])) - else: - length[i] = len(i) - - header += i.ljust(length[i]) + "|" + # Ride through all columns and find the maximal length a line can have + for i in range(0,collumns): + maxlength[i] = 0 + # First for the keys + if ( maxlength[i] < len(table.keys()[i]) ): + maxlength[i] = len(table.keys()[i]) + # Secondary for the values + for j in table.values()[i]: + if ( table.keys()[i] == "__ID" ): + j = str(j) + try: + if ( maxlength[i] < len(j)): + maxlength[i] = len(j) + except Exception, e: + print e - print header + # Now Print the Entries in WIDE mode :) + output = "| " + table.keys()[0].ljust(maxlength[0]) + for i in range(1,collumns): + output = output + " | " + table.keys()[i].ljust(maxlength[i]) - for i in range(0,hits): - result = "|" - for j in table: - result += table[j][i].ljust(length[j]) + "|" - print result + print output - # }}} + if ( table.keys()[0] == self.config['passwordField'] ): + output = "| " + self.colorFG[self.config["passwordFG"]] + self.colorBG[self.config["passwordBG"]] + output = table.values()[0][0].ljust(maxlength[0]) + output = self.colorReset + " | " + else: + output = "| " + table.values()[0][0].ljust(maxlength[0]) + " | " + for i in range(1,collumns): + if ( table.keys()[i] == "__ID" ): + table.values()[i][0] = str(table.values()[i][0]) + if ( table.keys()[i] == self.config['passwordField'] ): + output += self.colorFG[self.config["passwordFG"]] + self.colorBG[self.config["passwordBG"]] + output += table.values()[i][0].ljust(maxlength[i]) + output += self.colorReset + " | " + else: + output += table.values()[i][0].ljust(maxlength[i]) + " | " + + print output + + for j in range(1,entries): + if ( table.keys()[0] == self.config['passwordField'] ): + output = "| " + self.colorFG[self.config["passwordFG"]] + self.colorBG[self.config["passwordBG"]] + output = table.values()[0][j].ljust(maxlength[0]) + output = self.colorReset + " | " + else: + output = "| " + table.values()[0][j].ljust(maxlength[0]) + " | " + + for i in range(1,collumns): + if ( table.keys()[i] == "__ID" ): + table.values()[i][j] = str(table.values()[i][j]) + if ( table.keys()[i] == self.config['passwordField'] ): + output += self.colorFG[self.config["passwordFG"]] + self.colorBG[self.config["passwordBG"]] + output += table.values()[i][j].ljust(maxlength[i]) + output += self.colorReset + " | " + else: + output += table.values()[i][j].ljust(maxlength[i]) + " | " + print output + + def listOutput(self,table): # {{{ hits = len(table.values()[0]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Z3...@us...> - 2009-10-04 07:24:10
|
Revision: 285 http://spd.svn.sourceforge.net/spd/?rev=285&view=rev Author: Z3po Date: 2009-10-04 07:23:59 +0000 (Sun, 04 Oct 2009) Log Message: ----------- fixed Mixed Collumns bug. there have been nearly everytime a "for collumns in self.__table" but one time a "for collumns in entry" which can be sorted in another way and that broke everythinga. Do we even need the entry object when having the table object all times available? Modified Paths: -------------- trunk/src/spdCore.py Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2009-10-03 14:16:10 UTC (rev 284) +++ trunk/src/spdCore.py 2009-10-04 07:23:59 UTC (rev 285) @@ -164,7 +164,7 @@ del fobj else: fobj.close() - + return True #}}} @@ -235,7 +235,7 @@ else: # otherwise write a , query += ", " self.__insertStatement += ", " - + cursor.execute(query) self.__insertStatement += ' VALUES (' @@ -245,7 +245,7 @@ for j in self.__table: entry.update( { j : self.__table[j][i] } ) self.addEntry(entry,commit=False) - + self.__sql.commit() # }}} @@ -309,7 +309,7 @@ def addEntry(self, entry, commit=True): # {{{ cursor = self.__sql.cursor() insertValues = '' - for collumns in entry: + for collumns in self.__table: entry[collumns] = re.sub(r'\'','\'\'', entry[collumns]) insertValues += "'" + entry[collumns] + "'," This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Z3...@us...> - 2009-10-03 14:16:21
|
Revision: 284 http://spd.svn.sourceforge.net/spd/?rev=284&view=rev Author: Z3po Date: 2009-10-03 14:16:10 +0000 (Sat, 03 Oct 2009) Log Message: ----------- Added other metavar string than the used variable for help output Modified Paths: -------------- trunk/src/spd-cli Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2009-10-02 23:47:09 UTC (rev 283) +++ trunk/src/spd-cli 2009-10-03 14:16:10 UTC (rev 284) @@ -33,10 +33,12 @@ epilog = "With no parameters it will print out nothing!") parser.add_option( "-d", "--delete", + metavar="Keyword", dest ="delete", help ="Entry to delete") parser.add_option( "-i", "--delete-id", + metavar="ID", dest ="deleteID", help ="ID to delete") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Z3...@us...> - 2009-10-02 23:47:19
|
Revision: 283 http://spd.svn.sourceforge.net/spd/?rev=283&view=rev Author: Z3po Date: 2009-10-02 23:47:09 +0000 (Fri, 02 Oct 2009) Log Message: ----------- Fixed bug with single quotes inside of a value while inserting it in sqlite. The Clue is to have another single quote in front of it (to escape it) Modified Paths: -------------- trunk/src/spdCore.py Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2009-09-13 17:27:49 UTC (rev 282) +++ trunk/src/spdCore.py 2009-10-02 23:47:09 UTC (rev 283) @@ -310,8 +310,10 @@ cursor = self.__sql.cursor() insertValues = '' for collumns in entry: + entry[collumns] = re.sub(r'\'','\'\'', entry[collumns]) insertValues += "'" + entry[collumns] + "'," + insertValues = re.sub(r',$',r'', insertValues) try: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2009-09-13 17:27:58
|
Revision: 282 http://spd.svn.sourceforge.net/spd/?rev=282&view=rev Author: treibholz Date: 2009-09-13 17:27:49 +0000 (Sun, 13 Sep 2009) Log Message: ----------- implemented the feature, to change the symlink to the political party you like, and SPD changes it's names. Not all parties are implemented yet... Modified Paths: -------------- trunk/src/spd-cli trunk/src/spdCore.py Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2009-09-09 13:10:16 UTC (rev 281) +++ trunk/src/spd-cli 2009-09-13 17:27:49 UTC (rev 282) @@ -24,9 +24,11 @@ import spdCLI from optparse import OptionParser +pp = spdCore.name(sys.argv[0]) + # {{{ OptionParser stuff -parser = OptionParser( "%prog [Optionen] Search", - description = "SPD - Simple Password Displayer", +parser = OptionParser( "%prog [Options] Search", + description = pp.acronym + ' - ' + pp.name, version = "0.3-alpha", epilog = "With no parameters it will print out nothing!") Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2009-09-09 13:10:16 UTC (rev 281) +++ trunk/src/spdCore.py 2009-09-13 17:27:49 UTC (rev 282) @@ -414,5 +414,30 @@ # }}} +class name(object): # {{{ + def __init__(self,acronym): + list = { 'spd' : 'Simple Password Displayer', + 'npd' : 'No Password Displayer', + 'piraten' : 'Professional Inspired Random Accessory To Ensure Nobodycanseeyourpasswords', + 'cdu' : 'Cryptical Data Unit', + 'fdp' : 'Fast Display Password', + 'pbc' : 'Passwords Brotected by Cheesus', + 'mlpd' : 'Mean, Lean Password Displayer', + 'rep' : 'Racists Encrypt their Passwords', + 'dvu' : 'Digital Viewing Unit', + 'grüne' : 'Generic Reasonable ÜberNext Encryption', + 'linke' : 'no idea...', + } + + acronym = re.split('/',acronym)[len(re.split('/',acronym))-1] + + # default to spd + if acronym not in list: + acronym = "spd" + + self.acronym = acronym.upper() + self.name = list[acronym] +# }}} + # EOF # vim:foldmethod=marker:tabstop=3:autoindent:shiftwidth=3 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2009-09-09 13:14:49
|
Revision: 278 http://spd.svn.sourceforge.net/spd/?rev=278&view=rev Author: treibholz Date: 2009-09-09 12:13:21 +0000 (Wed, 09 Sep 2009) Log Message: ----------- grrr, ci in the wrong directory.... It's now possible to have spaces in the collumns Modified Paths: -------------- trunk/src/spdCore.py Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2009-09-09 12:12:41 UTC (rev 277) +++ trunk/src/spdCore.py 2009-09-09 12:13:21 UTC (rev 278) @@ -224,37 +224,40 @@ count = 0 query = "CREATE TABLE passwords ( __ID INTEGER PRIMARY KEY," self.__insertStatement = "INSERT into passwords ( " - insertValues = "" + #insertValues = "" for collumns in self.__table: # first create the table count += 1 - query += collumns + " TEXT" - insertValues += ":" + collumns - self.__insertStatement += collumns + query += '`' + collumns + "` TEXT" + #insertValues += ":" + collumns + self.__insertStatement += '`' + collumns + '`' if (count == len(self.__table)): # write ) if last collumn query += ")" self.__insertStatement += ")" - insertValues += ")" + #insertValues += ")" else: # otherwise write a , query += ", " self.__insertStatement += ", " - insertValues += ", " + #insertValues += ", " cursor.execute(query) - self.__insertStatement += ' VALUES (' + insertValues + self.__insertStatement += ' VALUES (' for i in range(0,len(self.__table[collumns])): - values = {} + insertValues = '' for collumns in self.__table: - values[collumns] = self.__table[collumns][i] + #values[collumns] = self.__table[collumns][i] + insertValues += "'" + self.__table[collumns][i] + "'," + insertValues = re.sub(r',$',r'', insertValues) try: - cursor.execute(self.__insertStatement, values) + cursor.execute(self.__insertStatement + insertValues + ')') except sqlite3.OperationalError: #DEBUG - print values + print "fillSQLite" + print insertValues - del values + self.__sql.commit() # }}} @@ -290,7 +293,7 @@ result.update(self.__table) for i in result: - searchCollumns += i + ',' + searchCollumns += '`' + i + '`,' searchCollumns = re.sub(r',$','',searchCollumns) @@ -316,11 +319,22 @@ # add a new entry # entry: dictionary like self.__table - def addEntry(self, entry): # {{{ + def addEntry(self, entry, commit=True): # {{{ cursor = self.__sql.cursor() - count = 0 - cursor.execute(self.__insertStatement, entry) - self.__sql.commit() + insertValues = '' + for collumns in entry: + insertValues += "'" + entry[collumns] + "'," + + insertValues = re.sub(r',$',r'', insertValues) + + try: + cursor.execute(self.__insertStatement + insertValues + ')') + except sqlite3.OperationalError: #DEBUG + print "fillSQLite" + print insertValues + + if commit: + self.__sql.commit() del entry # }}} @@ -343,7 +357,7 @@ for filter in patterns: for collumns in self.__table: if (collumns != self.passwordField): - query += collumns + " like '%" + filter + "%' or " + query += '`' + collumns + "` like '%" + filter + "%' or " count += 1 query = re.sub(r'or $',') and (',query) # delete the last This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2009-09-09 13:14:47
|
Revision: 277 http://spd.svn.sourceforge.net/spd/?rev=277&view=rev Author: treibholz Date: 2009-09-09 12:12:41 +0000 (Wed, 09 Sep 2009) Log Message: ----------- Spaces in collumns is now possible Modified Paths: -------------- trunk/extras/passwords.txt Modified: trunk/extras/passwords.txt =================================================================== --- trunk/extras/passwords.txt 2009-09-09 07:36:46 UTC (rev 276) +++ trunk/extras/passwords.txt 2009-09-09 12:12:41 UTC (rev 277) @@ -1,4 +1,4 @@ -Host IP Username Password FQDN Accesslink +Host IP Username Password FQDN Access Link localhost 127.0.0.1 test pppp localhost.localdomain - remotehost 192.168.1.10 root oooo remotehost.de http://www.remotehost.de/setup firewall 192.168.1.1 admin iiii gw.intra.net https://192.168.1.1:4444 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2009-09-09 13:10:26
|
Revision: 281 http://spd.svn.sourceforge.net/spd/?rev=281&view=rev Author: treibholz Date: 2009-09-09 13:10:16 +0000 (Wed, 09 Sep 2009) Log Message: ----------- no output, when nothing was found with -p Modified Paths: -------------- trunk/src/spd-cli Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2009-09-09 13:02:10 UTC (rev 280) +++ trunk/src/spd-cli 2009-09-09 13:10:16 UTC (rev 281) @@ -87,10 +87,11 @@ elif options.pwonly: - searchPatterns = sys.argv - del searchPatterns[0] - del searchPatterns[0] - print pc.findPassword(searchPatterns)[pc.passwordField][0] + searchPatterns = args + try: + print pc.findPassword(searchPatterns)[pc.passwordField][0] + except: + pass #elif options.widemode: # searchPatterns = sys.argv This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2009-09-09 13:02:17
|
Revision: 280 http://spd.svn.sourceforge.net/spd/?rev=280&view=rev Author: treibholz Date: 2009-09-09 13:02:10 +0000 (Wed, 09 Sep 2009) Log Message: ----------- delete by ID Modified Paths: -------------- trunk/src/spd-cli Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2009-09-09 12:58:06 UTC (rev 279) +++ trunk/src/spd-cli 2009-09-09 13:02:10 UTC (rev 280) @@ -34,6 +34,11 @@ dest ="delete", help ="Entry to delete") +parser.add_option( "-i", "--delete-id", + dest ="deleteID", + help ="ID to delete") + + parser.add_option( "-a", "--add", action="store_true", dest = "add", @@ -74,6 +79,13 @@ pc.delEntry(searchPatterns) pc.exportPasswordsPlain() +elif options.deleteID: + id = int(sys.argv[2]) + pc.delEntry('nix', id=id) + pc.exportPasswordsPlain() + + + elif options.pwonly: searchPatterns = sys.argv del searchPatterns[0] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2009-09-09 12:58:13
|
Revision: 279 http://spd.svn.sourceforge.net/spd/?rev=279&view=rev Author: treibholz Date: 2009-09-09 12:58:06 +0000 (Wed, 09 Sep 2009) Log Message: ----------- Code cleanup Modified Paths: -------------- trunk/src/spdCore.py Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2009-09-09 12:13:21 UTC (rev 278) +++ trunk/src/spdCore.py 2009-09-09 12:58:06 UTC (rev 279) @@ -224,40 +224,27 @@ count = 0 query = "CREATE TABLE passwords ( __ID INTEGER PRIMARY KEY," self.__insertStatement = "INSERT into passwords ( " - #insertValues = "" for collumns in self.__table: # first create the table count += 1 query += '`' + collumns + "` TEXT" - #insertValues += ":" + collumns self.__insertStatement += '`' + collumns + '`' if (count == len(self.__table)): # write ) if last collumn query += ")" self.__insertStatement += ")" - #insertValues += ")" else: # otherwise write a , query += ", " self.__insertStatement += ", " - #insertValues += ", " cursor.execute(query) self.__insertStatement += ' VALUES (' for i in range(0,len(self.__table[collumns])): - insertValues = '' - for collumns in self.__table: - #values[collumns] = self.__table[collumns][i] - insertValues += "'" + self.__table[collumns][i] + "'," - - insertValues = re.sub(r',$',r'', insertValues) - try: - cursor.execute(self.__insertStatement + insertValues + ')') - except sqlite3.OperationalError: #DEBUG - print "fillSQLite" - print insertValues - - + entry = {} + for j in self.__table: + entry.update( { j : self.__table[j][i] } ) + self.addEntry(entry,commit=False) self.__sql.commit() # }}} @@ -330,7 +317,8 @@ try: cursor.execute(self.__insertStatement + insertValues + ')') except sqlite3.OperationalError: #DEBUG - print "fillSQLite" + print "addEntry" + print entry print insertValues if commit: @@ -341,12 +329,14 @@ # delete an entry # patterns: list of strings - def delEntry(self,patterns): #{{{ + def delEntry(self,patterns=0,id=-1): #{{{ cursor = self.__sql.cursor() + + if (id < 0 ): + query = "delete from passwords where " + self.__buildWhere(patterns) + else: + query = "delete from passwords where __ID = " + unicode(id) - # create the query - query = "delete from passwords where " + self.__buildWhere(patterns) - cursor.execute(query) #}}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2009-09-09 07:37:06
|
Revision: 276 http://spd.svn.sourceforge.net/spd/?rev=276&view=rev Author: treibholz Date: 2009-09-09 07:36:46 +0000 (Wed, 09 Sep 2009) Log Message: ----------- reorganized some files. Modified Paths: -------------- trunk/doc/upload.txt Added Paths: ----------- trunk/doc/coding_guidelines.txt trunk/doc/project_rewrite.txt trunk/extras/ trunk/extras/passwords.txt Removed Paths: ------------- trunk/project_rewrite.txt trunk/src/coding_guidelines.txt trunk/src/passwords.txt Copied: trunk/doc/coding_guidelines.txt (from rev 275, trunk/src/coding_guidelines.txt) =================================================================== --- trunk/doc/coding_guidelines.txt (rev 0) +++ trunk/doc/coding_guidelines.txt 2009-09-09 07:36:46 UTC (rev 276) @@ -0,0 +1,2 @@ +indenting: + we use a real tab ('\t') for indenting. Property changes on: trunk/doc/coding_guidelines.txt ___________________________________________________________________ Added: svn:mergeinfo + Copied: trunk/doc/project_rewrite.txt (from rev 273, trunk/project_rewrite.txt) =================================================================== --- trunk/doc/project_rewrite.txt (rev 0) +++ trunk/doc/project_rewrite.txt 2009-09-09 07:36:46 UTC (rev 276) @@ -0,0 +1,11 @@ +Collection of ideas for a rewrite. This is a loose collection, like a text-based brainstorming. + +### Modular + the core-functionality is in spd-core, which has a defined API to support multiple frontends, like + spd-gui + spd-ncurses + spd-cli + + Maybe also different storage-backends (e.g. csv and SQLite) or encryption-backends (GnuPG and S/MIME) + + Property changes on: trunk/doc/project_rewrite.txt ___________________________________________________________________ Added: svn:mergeinfo + Added: svn:eol-style + native Modified: trunk/doc/upload.txt =================================================================== --- trunk/doc/upload.txt 2009-09-09 07:26:17 UTC (rev 275) +++ trunk/doc/upload.txt 2009-09-09 07:36:46 UTC (rev 276) @@ -1,2 +1,4 @@ -lftp sftp://$SOURCEFORGEUSERNAME$,sp...@we... -> mirror -R html htdocs +Upload to sourceforge: + +lftp sftp://$user,sp...@we... +> mirror -R Copied: trunk/extras/passwords.txt (from rev 275, trunk/src/passwords.txt) =================================================================== --- trunk/extras/passwords.txt (rev 0) +++ trunk/extras/passwords.txt 2009-09-09 07:36:46 UTC (rev 276) @@ -0,0 +1,5 @@ +Host IP Username Password FQDN Accesslink +localhost 127.0.0.1 test pppp localhost.localdomain - +remotehost 192.168.1.10 root oooo remotehost.de http://www.remotehost.de/setup +firewall 192.168.1.1 admin iiii gw.intra.net https://192.168.1.1:4444 +Accesspoint 192.168.1.254 nimda uuuu ap.intra.net http://192.168.1.254 Deleted: trunk/project_rewrite.txt =================================================================== --- trunk/project_rewrite.txt 2009-09-09 07:26:17 UTC (rev 275) +++ trunk/project_rewrite.txt 2009-09-09 07:36:46 UTC (rev 276) @@ -1,11 +0,0 @@ -Collection of ideas for a rewrite. This is a loose collection, like a text-based brainstorming. - -### Modular - the core-functionality is in spd-core, which has a defined API to support multiple frontends, like - spd-gui - spd-ncurses - spd-cli - - Maybe also different storage-backends (e.g. csv and SQLite) or encryption-backends (GnuPG and S/MIME) - - Deleted: trunk/src/coding_guidelines.txt =================================================================== --- trunk/src/coding_guidelines.txt 2009-09-09 07:26:17 UTC (rev 275) +++ trunk/src/coding_guidelines.txt 2009-09-09 07:36:46 UTC (rev 276) @@ -1,2 +0,0 @@ -indenting: - we use a real tab ('\t') for indenting. Deleted: trunk/src/passwords.txt =================================================================== --- trunk/src/passwords.txt 2009-09-09 07:26:17 UTC (rev 275) +++ trunk/src/passwords.txt 2009-09-09 07:36:46 UTC (rev 276) @@ -1,5 +0,0 @@ -Host IP Username Password FQDN Accesslink -localhost 127.0.0.1 test pppp localhost.localdomain - -remotehost 192.168.1.10 root oooo remotehost.de http://www.remotehost.de/setup -firewall 192.168.1.1 admin iiii gw.intra.net https://192.168.1.1:4444 -Accesspoint 192.168.1.254 nimda uuuu ap.intra.net http://192.168.1.254 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2009-09-09 07:26:25
|
Revision: 275 http://spd.svn.sourceforge.net/spd/?rev=275&view=rev Author: treibholz Date: 2009-09-09 07:26:17 +0000 (Wed, 09 Sep 2009) Log Message: ----------- forgot the utf-8 here... Modified Paths: -------------- trunk/src/spd-cli Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2009-09-09 07:23:13 UTC (rev 274) +++ trunk/src/spd-cli 2009-09-09 07:26:17 UTC (rev 275) @@ -1,4 +1,6 @@ #!/usr/bin/python +# -*- coding: UTF-8 -*- + # Copyright (C) 2009 Klaus Umbach {{{ # <tre...@us...> # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tre...@us...> - 2009-09-09 07:23:26
|
Revision: 274 http://spd.svn.sourceforge.net/spd/?rev=274&view=rev Author: treibholz Date: 2009-09-09 07:23:13 +0000 (Wed, 09 Sep 2009) Log Message: ----------- fixed a unicode-bug Modified Paths: -------------- trunk/src/spdCLI.py trunk/src/spdCore.py Modified: trunk/src/spdCLI.py =================================================================== --- trunk/src/spdCLI.py 2009-09-08 20:42:34 UTC (rev 273) +++ trunk/src/spdCLI.py 2009-09-09 07:23:13 UTC (rev 274) @@ -1,3 +1,4 @@ +# -*- coding: UTF-8 -*- import sys import platform @@ -62,8 +63,8 @@ output += self.colorFG[self.config["passwordFG"]] + self.colorBG[self.config["passwordBG"]] output += table[j][i] output += self.colorReset - else: - output += str(table[j][i]) + else: + output += unicode(table[j][i]) print output print "" Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2009-09-08 20:42:34 UTC (rev 273) +++ trunk/src/spdCore.py 2009-09-09 07:23:13 UTC (rev 274) @@ -1,3 +1,4 @@ +# -*- coding: UTF-8 -*- ''' Copyright (C) 2009 Klaus Umbach {{{ <tre...@us...> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |