[pyar] ¿Existe una base de datos embebida protegida por contraseña, usable en python?

Cristian Vazquez cristianvazquez4 en gmail.com
Lun Feb 23 00:24:47 ART 2015


Cualquier base de datos que se instale en la misma maquina. Asi hacen sus
consultas a localhost( 127.0.0.1 )

2015-02-23 0:18 GMT-03:00 Marian <mavignau en gmail.com>:

> Porque el soft se distribuiría con los datos a muchos usuarios, los cuales
> después tendrían la posibilidad de imprimir, y/o generar archivos con
> informes basados en estos datos.
> No puedo usar cliente/servidor porque la conectividad no está asegurada,
> es más bien poco estable, o incluso no existente.
> No quiero que los usen desde otros programas, por ejemplo.
>
> 2015-02-04 10:17 GMT-03:00 Pedro Ignacio Guridi <pedro.guridi en gmail.com>:
>
>> Hola,
>>
>> Yo uso sqlite cifrado hace tiempo, lo que hice fue compilar esa
>> sqlitecipher que comenta ralsina, te da como resultado un archivo
>> sqlite3.dll igual que la original (pero con cifrado claro), y luego
>> compilo una version modificada de APSW [1] que este linkeada a la
>> sqlite3.dll hecha com sqlitecipher para agregar el parametro del
>> password en el metodo connect.
>> Parches para apsw 3.7.4-r1:
>>
>> --- apsw-3.7.4-r1/setup.py 2010-12-12 22:54:14.000000000 -0300
>> +++ /home/pguridi/workspace/apsw/setup.py 2014-12-16 22:54:57.169041538
>> -0300
>> @@ -21,7 +21,8 @@
>>  include_dirs=['src']
>>  library_dirs=[]
>>  define_macros=[]
>> -libraries=[]
>> +#libraries=["libeay32", "user32", "advapi32", "Gdi32"]
>> +libraries=["ssl"]
>>
>>  # This includes the functionality marked as experimental in SQLite 3.
>>  # Comment out the line to exclude them
>>
>> --- apsw-3.7.4-r1/src/connection.c 2010-12-12 22:54:14.000000000 -0300
>> +++ /home/pguridi/workspace/apsw/src/connection.c 2014-12-16
>> 22:46:45.792469996 -0300
>> @@ -380,9 +380,10 @@
>>    int flags=SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
>>    char *vfs=0;
>>    int statementcachesize=100;
>> +  PyObject* password;
>>    sqlite3_vfs *vfsused=0;
>>
>> -  if(!PyArg_ParseTupleAndKeywords(args, kwds,
>> "es|izi:Connection(filename,
>> flags=SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, vfs=None,
>> statementcachesize=100)", kwlist, STRENCODING, &filename, &flags,
>> &vfs, &statementcachesize))
>> +  if(!PyArg_ParseTupleAndKeywords(args, kwds,
>> "esO|izi:Connection(filename, password,
>> flags=SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, vfs=None,
>> statementcachesize=100)", kwlist, STRENCODING, &filename, &password,
>> &flags, &vfs, &statementcachesize))
>>      return -1;
>>
>>    if(statementcachesize<0)
>> @@ -392,9 +393,12 @@
>>       could be registered between our find and the open starting.
>>       Don't do that!  We also have to manage the error message thread
>>       safety manually as self->db is null on entry. */
>> +
>>    PYSQLITE_VOID_CALL(
>> -    vfsused=sqlite3_vfs_find(vfs); res=sqlite3_open_v2(filename,
>> &self->db, flags, vfs); if(res!=SQLITE_OK)
>> apsw_set_errmsg(sqlite3_errmsg(self->db));
>> +    vfsused=sqlite3_vfs_find(vfs); res=sqlite3_open_v2(filename,
>> &self->db, flags, vfs);
>> +  if(res!=SQLITE_OK) apsw_set_errmsg(sqlite3_errmsg(self->db));
>>      );
>> +  sqlite3_key(self->db, PyString_AsString(password),
>> (int)strlen(PyString_AsString(password)));
>>    SET_EXC(res, self->db);  /* nb sqlite3_open always allocates the db
>> even on error */
>>
>>    if(res!=SQLITE_OK)
>>
>> slds,
>> Pedro
>>
>> [1] https://github.com/rogerbinns/apsw
>>
>> 2015-02-03 21:19 GMT-03:00 Marian <mavignau en gmail.com>:
>> > sqlite tiene el inconveniente de que no permite ser protegida x
>> contraseñas
>> >
>> > Gracias
>> >
>> > _______________________________________________
>> > pyar mailing list pyar en python.org.ar
>> > http://listas.python.org.ar/listinfo/pyar
>> >
>> > PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
>> >
>> > La lista de PyAr esta Hosteada en USLA - Usuarios de Software Libre de
>> > Argentina - http://www.usla.org.ar
>> _______________________________________________
>> pyar mailing list pyar en python.org.ar
>> http://listas.python.org.ar/listinfo/pyar
>>
>> PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
>>
>> La lista de PyAr esta Hosteada en USLA - Usuarios de Software Libre de
>> Argentina - http://www.usla.org.ar
>>
>
>
>
> --
> Marian
> "The corollary to this is that *appearances matter*. Programmers, in
> particular, often don't like to believe this. *Their love of substance
> over form is almost a point of professional pride.* It's no accident that
> so many programmers exhibit an antipathy for marketing and public relations
> work, " Producing OSS <http://producingoss.com/en/producingoss.html>
> i-Terra <http://www.i-terra.com.ar> - Mi sitio Python
> <https://sites.google.com/site/mavignau/de-visual-basic-a-python-como-y-porque>
> ____________________________
>
> _______________________________________________
> pyar mailing list pyar en python.org.ar
> http://listas.python.org.ar/listinfo/pyar
>
> PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
>
> La lista de PyAr esta Hosteada en USLA - Usuarios de Software Libre de
> Argentina - http://www.usla.org.ar
>



-- 
Saludos.
Cristian
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20150223/c016c391/attachment-0001.html>


More information about the pyar mailing list