/relevation/branches/0.3/CHANGELOG |
---|
1,10 → 1,4 |
0.3.0 (2011-06-27) (unreleased) |
- Tarball preparation code |
- Configuration file support |
- Manpage SGML cleanup |
- Document configuration file |
0.2.0 (2011-06-27) (internal) |
0.2.0 (2011-06-27) (unreleased) |
- Allow multiple queries in one run |
- Consider positional arguments as queries |
- Feedback enhancements |
/relevation/branches/0.3/relevation.1 |
---|
3,28 → 3,31 |
relevation \(em command-line searcher for \fBRevelation\fP files |
.SH "SYNOPSIS" |
.PP |
\fBrelevation\fR |
.PP |
\fBrelevation\fR [\fB \-f \fI/path/to/file.\fR\fP] [\fB \-p \fIpassword\fR\fP] [\fB\fIsearch string\fR\fP] |
.PP |
\fBrelevation\fR [\fB\fIsearch string\fR\fP] |
\fBrelevation\fR\fB \-f \fI/path/to/file.\fR\fP\fB \-p \fIpassword\fR\fP [\fBsearch string\fP] |
.SH "DESCRIPTION" |
.PP |
Access and print or search passwords in a \fBRevelation\fP password file. |
Access and print or search passwords in a \fBRevelation\fP password |
file. |
.PP |
Only read access is provided, to edit the files \fBRevelation\fP must be used. |
Only read access is provided, to edit the files \fBRevelation\fP must be used. |
.PP |
With a search string, only entries that match the search string in any of its fields will be printed. |
With a search string, only entries that match the search string in any |
of its fields will be printed. |
.PP |
When no search string is provided the whole, unencrypted, XML file will be printed. |
When no search string is provided the whole, unencrypted, XML file will be |
printed. |
.SH "OPTIONS" |
.PP |
This program follows the usual GNU command line syntax, with long options starting with two dashes (`\-'). A summary of options is included below. |
This program follows the usual command line syntax, |
with long options starting with two dashes (`\-'). A summary of |
options is included below. For a complete description, see the |
\fBInfo\fP files. |
.IP "\fB-f \fIfile.revelation\fR\fP, \fB\-\-file=\fIfile.revelation\fR\fP " 10 |
File name of the \fBrevelation\fR file (the file containing the list of stored credentials). |
File name of the \fBrevelation\fR file (the file |
containing the list of stored credentials). |
.IP "\fB-p \fIpassword\fR\fP, \fB\-\-password=\fIpassword\fR\fP " 10 |
Decryption password. |
.IP "\fB-a\fP, \fB\-\-ask\fP, \fB-0\fP, \fB\-\-stdin\fP " 10 |
.IP "\fB-a\fP, \fB\-\-ask, \fB-0\fP, \fB\-\-stdin\fP\fP " 10 |
Ask interactively for password. |
.IP "" 10 |
When \fB-a\fP or \fB\-\-ask\fP is used a prompt will be printed. |
35,7 → 38,8 |
.IP "" 10 |
This is the default behaviour. |
.IP "" 10 |
If the search string contains special/non-English characters this is likely to fail. |
If the search string contains special/non-English characters this is |
likely to fail. |
.IP "\fB-c\fP, \fB\-\-case-sensitive\fP " 10 |
When searching for text, obey case. |
.IP "\fB-s \fIsearch string\fR\fP, \fB\-\-search=\fIsearch string\fR\fP, \fB\fIsearch string\fR\fP " 10 |
44,28 → 48,14 |
Show summary of options. |
.IP "\fB\-\-version\fP " 10 |
Show version of program. |
.SH "CONFIGURATION FILE" |
.PP |
A configuration file `.relevation.conf' located at the user's home directory can be used to avoid having to provide the filename and/or password on each run. |
.PP |
Example `~/.relevation.conf': |
.PP |
.nf |
\ [relevation] |
\ file=~/passwords.revelation |
\ password=my secret password |
.fi |
.PP |
.PP |
Both file and password are optional, so you can store the filename without storing the password. |
.PP |
Please understand your password is stored in this file in clear text, modify the file permissions appropriately so that only your user can read it, otherwise your master password might be compromised and hence all your stored password will be too. |
.SH "SEE ALSO" |
.PP |
revelation (1) |
.SH "AUTHOR" |
.PP |
This manual page was written by Toni Corvera <outlyer@gmail.com>. |
Permission is granted to copy, distribute and/or modify this document under the terms of a BSD 3-clause license. |
This manual page was written by Toni Corvera outlyer@gmail.com. |
Permission is |
granted to copy, distribute and/or modify this document under |
the terms of a BSD 3-clause license. |
.\" created by instant / docbook-to-man, Mon 27 Jun 2011, 19:32 |
.\" created by instant / docbook-to-man, Mon 27 Jun 2011, 04:51 |
/relevation/branches/0.3/manpage.sgml |
---|
12,16 → 12,18 |
docbook-to-man $< > $@ |
--> |
<!-- Fill in your name for FIRSTNAME and SURNAME. --> |
<!ENTITY dhfirstname "<firstname>Toni</firstname>"> |
<!ENTITY dhsurname "<surname>Corvera</surname>"> |
<!-- Please adjust the date whenever revising the manpage. --> |
<!ENTITY dhdate "<date>June 27, 2011</date>"> |
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are |
allowed: see man(7), man(1). --> |
<!ENTITY dhsection "<manvolnum>1</manvolnum>"> |
<!ENTITY dhemail "<email>outlyer@gmail.com</email>"> |
<!ENTITY dhusername "Toni Corvera"> |
<!ENTITY dhucpackage "<refentrytitle>RELEVATION</refentrytitle>"> |
<!ENTITY dhpackage "relevation"> |
<!ENTITY gnu "<acronym>GNU</acronym>"> |
]> |
<refentry> |
34,7 → 36,7 |
&dhsurname; |
</author> |
<copyright> |
<year>2011</year> |
<year>2003</year> |
<holder>&dhusername;</holder> |
</copyright> |
&dhdate; |
51,37 → 53,37 |
</refnamediv> |
<refsynopsisdiv> |
<cmdsynopsis> |
<command>&dhpackage;</command> |
</cmdsynopsis> |
<cmdsynopsis> |
<command>&dhpackage;</command> |
<group><option> -f <replaceable>/path/to/file.</replaceable></option></group> |
<option> -f <replaceable>/path/to/file.</replaceable></option> |
<group><option> -p <replaceable>password</replaceable></option></group> |
<option> -p <replaceable>password</replaceable></option> |
<arg><option><replaceable>search string</replaceable></option></arg> |
<arg><option>search string</option></arg> |
</cmdsynopsis> |
<cmdsynopsis> |
<command>&dhpackage;</command> |
<arg><option><replaceable>search string</replaceable></option></arg> |
</cmdsynopsis> |
</refsynopsisdiv> |
<refsect1> |
<title>DESCRIPTION</title> |
<para>Access and print or search passwords in a <application>Revelation</application> password file.</para> |
<para>Access and print or search passwords in a <application>Revelation</application> password |
file.</para> |
<para>Only read access is provided, to edit the files <application>Revelation</application> must be used.</para> |
<para>Only read access is provided, to edit the files <application>Revelation</application> |
must be used.</para> |
<para>With a search string, only entries that match the search string in any of its fields will be printed.</para> |
<para>With a search string, only entries that match the search string in any |
of its fields will be printed.</para> |
<para>When no search string is provided the whole, unencrypted, XML file will be printed.</para> |
<para>When no search string is provided the whole, unencrypted, XML file will be |
printed.</para> |
</refsect1> |
<refsect1> |
<title>OPTIONS</title> |
<para>This program follows the usual &gnu; command line syntax, with long options starting with two dashes (`-'). A summary of options is included below.</para> |
<para>This program follows the usual &gnu; command line syntax, |
with long options starting with two dashes (`-'). A summary of |
options is included below. For a complete description, see the |
<application>Info</application> files.</para> |
<variablelist> |
<varlistentry> |
88,10 → 90,11 |
<term><option>-f <replaceable>file.revelation</replaceable></option>, <option>--file=<replaceable>file.revelation</replaceable></option> |
</term> |
<listitem> |
<para>File name of the <command>revelation</command> file (the file containing the list of stored credentials).</para> |
<para>File name of the <command>revelation</command> file (the file |
containing the list of stored credentials).</para> |
</listitem> |
</varlistentry> |
<varlistentry> |
<varlistentry> |
<term><option>-p <replaceable>password</replaceable></option>, <option>--password=<replaceable>password</replaceable></option> |
</term> |
<listitem> |
99,7 → 102,7 |
</listitem> |
</varlistentry> |
<varlistentry> |
<term><option>-a</option>, <option>--ask</option>, <option>-0</option>, <option>--stdin</option> |
<term><option>-a</option>, <option>--ask, <option>-0</option>, <option>--stdin</option></option> |
</term> |
<listitem> |
<para>Ask interactively for password.</para> |
113,7 → 116,8 |
<listitem> |
<para>When searching for text, disregard case.</para> |
<para>This is the default behaviour.</para> |
<para>If the search string contains special/non-English characters this is likely to fail.</para> |
<para>If the search string contains special/non-English characters this is |
likely to fail.</para> |
</listitem> |
</varlistentry> |
<varlistentry> |
148,17 → 152,6 |
</variablelist> |
</refsect1> |
<refsect1> |
<title>CONFIGURATION FILE</title> |
<para>A configuration file `.relevation.conf' located at the user's home directory can be used to avoid having to provide the filename and/or password on each run.</para> |
<para>Example `~/.relevation.conf':</para> |
<programlisting> [relevation] |
file=~/passwords.revelation |
password=my secret password</programlisting> |
<para>Both file and password are optional, so you can store the filename without storing the password.</para> |
<para>Please understand your password is stored in this file in clear text, modify the file permissions appropriately so that only your user can read it, otherwise your master password might be compromised and hence all your stored password will be too.</para> |
</refsect1> |
<refsect1> |
<title>SEE ALSO</title> |
<para>revelation (1)</para> |
166,9 → 159,27 |
<refsect1> |
<title>AUTHOR</title> |
<para>This manual page was written by &dhusername; <&dhemail;>. |
Permission is granted to copy, distribute and/or modify this document under the terms of a BSD 3-clause license. |
<para>This manual page was written by &dhusername; &dhemail;. |
Permission is |
granted to copy, distribute and/or modify this document under |
the terms of a BSD 3-clause license. |
</para> |
</refsect1> |
</refentry> |
<!-- vim: set et: --> |
<!-- Keep this comment at the end of the file |
Local variables: |
mode: sgml |
sgml-omittag:t |
sgml-shorttag:t |
sgml-minimize-attributes:nil |
sgml-always-quote-attributes:t |
sgml-indent-step:2 |
sgml-indent-data:t |
sgml-parent-document:nil |
sgml-default-dtd-file:nil |
sgml-exposed-tags:nil |
sgml-local-catalogs:nil |
sgml-local-ecat-files:nil |
End: |
--> |
/relevation/branches/0.3/Makefile |
---|
9,9 → 9,6 |
all: $(PKG).1 |
testman: |
docbook-to-man manpage.sgml | nroff -man | less |
clean: |
-$(RM) $(PKG).pyc |
/relevation/branches/0.3/relevation.py |
---|
16,19 → 16,18 |
-> http://web.archive.org/http://oss.wired-networks.net/bugzilla/show_bug.cgi?id=111 |
(ref3) http://docs.python.org/library/zlib.html |
""" |
from Crypto.Cipher import AES |
import ConfigParser |
import getopt |
import libxml2 |
import os |
import stat |
import sys |
import zlib |
from Crypto.Cipher import AES |
__author__ = 'Toni Corvera' |
__date__ = '$Date$' |
__revision__ = '$Rev$' |
__version_info__ = ( 0, 3, 0 ) |
__version_info__ = ( 0, 2, 0 ) |
__version__ = '.'.join(map(str, __version_info__)) |
RELEASE=True |
102,39 → 101,6 |
doc.freeDoc() |
ctxt.xpathFreeContext() |
def world_readable(path): |
assert os.path.exists(path) |
if sys.platform == 'win32': |
return True |
st = os.stat(path) |
return bool(st.st_mode & stat.S_IROTH) |
def load_config(): |
""" |
load_config() -> ( str file, str pass ) |
Load configuration file is one is found |
""" |
cfg = os.path.join(os.path.expanduser('~'), '.relevation.conf') |
pw = None |
fl = None |
if os.path.isfile(cfg): |
if os.access(cfg, os.R_OK): |
wr = world_readable(cfg) |
if wr: |
sys.stderr.write('Configuration (~/.relevation.conf) is world-readable!!!\n') |
parser = ConfigParser.ConfigParser() |
parser.read(cfg) |
ops = parser.options('relevation') |
if 'file' in ops: |
fl = os.path.expanduser(parser.get('relevation', 'file')) |
if 'password' in ops: |
if wr and sys.platform != 'win32': # TODO: how to check in windows? |
sys.stderr.write('Your password can be read by anyone!!!\n') |
pw = parser.get('relevation', 'password') |
else: # exists but not readable |
sys.stderr.write('Configuration file (~/.relevation.conf) is not readable!\n') |
return ( fl, pw ) |
def main(): |
datafile = None |
password = None |
142,9 → 108,6 |
caseInsensitive = True |
sys.stderr.write('Relevation v%s, (c) 2011 Toni Corvera\n\n' % __version__) |
( datafile, password ) = load_config() |
try: |
# gnu_getopt requires py >= 2.3 |
ops, args = getopt.gnu_getopt(sys.argv[1:], 'f:p:s:0ciah', |
/relevation/branches/0.3/upstream.debian/control |
---|
2,7 → 2,7 |
Section: contrib/utils |
Priority: extra |
Maintainer: Toni Corvera <outlyer@gmail.com> |
Build-Depends: debhelper (>= 7.0.50~), python (>= 2.3) |
Build-Depends: debhelper (>= 7.0.50~) |
Standards-Version: 3.9.1 |
Homepage: http://p.outlyer.net/relevation/ |
#Vcs-Git: git://git.debian.org/collab-maint/relevation.git |
/relevation/branches/0.3/upstream.debian/changelog |
---|
1,5 → 1,5 |
relevation (0.3-upstream.1) unstable; urgency=low |
relevation (0.2-upstream.1) unstable; urgency=low |
* Initial release |
-- Toni Corvera <outlyer@gmail.com> Mon, 27 Jun 2011 19:34:41 +0200 |
-- Toni Corvera <outlyer@gmail.com> Mon, 27 Jun 2011 01:44:10 +0200 |