DEBIAN PRO

DEBIAN PRO
DEBIAN

viernes, 30 de octubre de 2015

OSX en Virtualbox


Uno de los cambios a realizar es "sugerirle" al equipo virtual que el hardware que tiene es distinto.

La línea le dice a tu maquina VBOX "VMosx" que el CPU es el mismo que una Mac antigua.

VBoxManage modifyvm VMosx --cpuidset 00000001 000306a9 00020800 80000201 178bfbff

Keypass vulnerable


Parece que ya existe un "obtenedor" de claves de Keepass 2
https://github.com/denandz/KeeFarce

Mejorando SSL TLS


Hablamos de mejorar la seguridad de SSL pasandonos a TLS, pero ahora también tenemos que mejorar la seguridad aumentando la longitud de las claves.
https://weakdh.org/

Gambas 3 comparativa


Comparativas entre VBasic y Gambas
http://gambaswiki.org/wiki/doc/diffvb?nh

miércoles, 28 de octubre de 2015

martes, 27 de octubre de 2015

Ubuntu Printers


Como permitir que todos los procesos puedan enviar contenido a las impresoras.

gedit /lib/udev/rules.d/50-udev-default.rules
KERNEL=="lp[0-9]*", GROUP="lp", MODE="0777"

ls -ail /dev/usb

Oracle isnumber()


Una función útil para saber si un campo texto es numérico o no.

create or replace function IsNumber(
a_Text varchar2
) return char is
t_Test number;
begin
begin
t_Test := to_number(a_Text);
return 'Y';
exception when value_error then
return 'N';
end;
end;

Picat languaje


Estoy probando un "nuevo" lenguaje de Programación.

picat.
cl(p1)
main.
Sum of all the multiples of 3 or 5 below 1000 is 233168

Ejemplos aqui
http://www.hakank.org/picat/



FICHERO p1.pi
/*********************************************************
http://projecteuler.net/problem=1

If we list all the natural numbers below 10 that are
multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these
multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.
*********************************************************/

main =>
S = sum([I : I in 1..999, (I mod 3 = 0; I mod 5 = 0)]),
writef("Sum of all the multiples of 3 or 5 below 1000 is %w%n",S).


/* here is another implementation
main =>
S = 0,
foreach (I in 1..999)
if (I mod 3 = 0; I mod 5 = 0) then
S:=S+I
end
end,
writef("Sum of all the multiples of 3 or 5 below 1000 is %w%n",S).
*/

OpenBSD 5.8


Como instalar OpenBsd 5.8 con XFCE 4
http://ribalinux.blogspot.in/2015/05/how-to-install-openbsd-57-plus-xfce.html

lunes, 26 de octubre de 2015

Editor Hexa


Un editor Hexa que estoy usando estos dias.
http://www.wxhexeditor.org/

SqlDeveloper en Ubuntu 15.10


Para gestionar servidores Oracle desde Ubuntu 15.10

mkdir /opt/java

Bajar

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
jdk-8u65-linux-x64.tar.gz

http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
sqldeveloper-4.1.2.20.64-no-jre.zip


tar -zxf jdk-8u65-linux-x64.tar.gz

ln -sf /opt/java/jdk1.8.0_65 /opt/java/jdk

apt-get -y install alien

alien -ic sqldeveloper-4.1.2.20.64-1.noarch.rpm


/opt/sqldeveloper # ./sqldeveloper.sh

Oracle SQL Developer
Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.

Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /root/.sqldeveloper/4.1.0/product.conf
/opt/java/jdk1.8.0_65



Ahora tengo otro problema, agregué esta línea pero no funciona.

/opt/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf
AddVMOption -Duser.timezone=SAST-2

sábado, 24 de octubre de 2015

Asus tp300 Kernel 4 Wifi


La secuencia para que funcione la placa WIFI MT7630e en un Asus Transformer TP300la (I5), con Xubuntu 15.10 y Kernel 4.2.

Despues de muchas pruebas, lo que ME FUNCIONÓ fue.

Descargar el paquete de Benjarobin
git clone https://github.com/benjarobin/MT7630E.git

make

copiar los BIN de "firmware"
cp -v firmware/*/* /lib/firmware/



De la carpeta rt2x00 copiar el KO
-rw-r--r-- 1 root root 230128 oct 24 19:07 mt7630e.ko

Copiarlo y darle permisos
cp *.ko /lib/modules/4.2.0-16-generic/kernel/drivers/net/wireless/
chmod 777 /lib/modules/4.2.0-16-generic/kernel/drivers/net/wireless/mt76*

modprobe mt7630e

vi /etc/modules
agregar linea
mt7630e

miércoles, 21 de octubre de 2015

Xubuntu 15.10


Ahora mismo estoy probando Xubuntu 15.10, viene con el Kernel 4.2

Linux ubu1510 4.2.0-11-generic #13-Ubuntu SMP Mon Sep 21 21:33:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

además de tener un nuevo Kernel, XFCE 4.12 no veo cambios estéticos. Que es lo "usualmente" esperado.

Juegos de Mesa sostenibles


Con ideas similares a lo que vivíamos en los 80 con el Club del Yetem y otros sitios similares, un artesano que fabrica juegos sostenibles.
http://www.reimwood.com/

Todos son muy buenos, madera, resistentes, ecológicos.

Vale la pena verlos.

martes, 20 de octubre de 2015

jueves, 15 de octubre de 2015

HTTPS SSL TLS versiones


Desde hace muchos años que existe el protocolo HTTPS (443) o HTTP + SSL. Ver Wikipedia para datos exactos, historia etc...
https://en.wikipedia.org/wiki/OpenSSL
https://www.feistyduck.com/library/openssl-cookbook/online/ch-openssl.html
https://www.openssl.org/docs/faq.html




En los últimos años y gracias a E.Snowden, J.Assange, Google y otros tantos que "destaparon la olla", "tiraron de la manta", "contaron la verdad de la milanesa" descubrimos que la seguridad de las comunicaciones por internet estaban siendo monitorizadas, auditadas y analizadas.

Recuerdo cerca del 2000 cuando en ISP (proveed. de Internet) de argentina comenzaban a poner "Racks con Cajas negras dentro", y nadie sabía exactamente que era. Podría ser la SIDE? CIA? NSA? Nunca lo aclararon, pero ya estaban.

Por el 2005 aparecieron demasiados "huecos" de seguridad en demasiados productos, creo que ahi comenzó la carrera entre seguridad/parches/desarrollo/negocios/0dayz y hackers buenos, malos y grises (como todos).

Recuerdo cuando hace unos años atras Google implementó https en todos los servicios, mientras se decía "Google apuesta por servicios seguros", la realidad es que estaba poniendo privacidad en el uso de sus servicios (desde https://www.google.com).

¿PORQUE?
Porque extraoficialmente se pensaba que si "alguien" miraba el tráfico contra Google.com, por ejemplos las búsquedas de textos en su buscador podrían utilizar esos datos para campañas de marketing (bueno o malo) y además Google perdía el valor de tener "guardadas las búsquedas de todos".
¿Si muchos sabemos que busca la gente en internet usando Google, porque pagarle a google por sus servicios?

En los últimos 3 años se evolucionó/detectó/arregló muchos de los bugs en muchos productos, sea Windows, Linux, Unix, Bash, SSL, SMB, LDAP y un largo etc. Comenzaron las campañas de "Retribución" al que informe de Bugs, para las compañias es mejor que un "hacker gris claro" les informe a ellos y les de 90 dias para arreglarlo a que "venda" ese bug por internet y otros "hackers gris oscuro" lo usen para negocios ilegales.

Se formaron muchas Fundaciones para "Mejorar la calidad del software" recolectando y gestionando Bugs de productos. Algo así como un tribunal de la Haya pero para "Bugs"


Ahora llegamos a OCT-2015, en los últimos 3 años se mejoró mucho el protocolo HTTPS, pasando por versiones SSL v1, 2 y 3. Y recientemente generando TLS V1.1, 1.2 y en breve 2.0.

¿Que hace ese protocolo?
Asegura las comunicaciones WEB en el mundo, pero también sirve para otros servicios relacionados con privacidad y seguridad.
(ver un detalle completo en Wikipedia y en openssl.org)

Al mismo tiempo que los servidores web con SSL/TLS mejoran el lado "servidor", los navegadores Firefox/Midori/Safari/otros también deben mejorar su parte cliente para poder usar nuevas versiones del protocolo.

Actualmente "se dice" que TLS 1.2 es "seguro" (o bastante seguro) y que "NO SE DEBE" usar mas SSL en ninguna de sus versiones porque tiene fallos muy peligrosos para el lado Servidor. (principalmente)

Algunas empresas están operando UNICAMENTE en TLS, mientras que otras siguen en SSL V2 o V3.

¿ Que debemos hacer ?
a. Actualizar el navegador a las últimas versiones.
b. Actualizar openssl del lado del servidor (si tenemos un servidor con HTTPS)


¿ Como saber que versión tengo?
openssl version
OpenSSL 1.0.1p 9 Jul 2015
En este equipo la 1.0.1P, la última oficial liberada estable.

¿ y que versión tiene un sitio en internet ?
sslscan www.SITIOENINTERNET.de | grep Accep

_
___ ___| |___ ___ __ _ _ __
/ __/ __| / __|/ __/ _` | '_ \
\__ \__ \ \__ \ (_| (_| | | | |
|___/___/_|___/\___\__,_|_| |_|

Version 1.8.2
http://www.titania.co.uk
Copyright Ian Ventura-Whiting 2009

Testing SSL server www.SITEONINTERNET.de on port 443

Supported Server Cipher(s):
Failed SSLv3 256 bits ECDHE-RSA-AES256-GCM-SHA384
Failed SSLv3 256 bits ECDHE-ECDSA-AES256-GCM-SHA384
Failed SSLv3 256 bits ECDHE-RSA-AES256-SHA384
Failed SSLv3 256 bits ECDHE-ECDSA-AES256-SHA384
Failed SSLv3 256 bits ECDHE-RSA-AES256-SHA
Failed SSLv3 256 bits ECDHE-ECDSA-AES256-SHA
Failed SSLv3 256 bits SRP-DSS-AES-256-CBC-SHA
Failed SSLv3 256 bits SRP-RSA-AES-256-CBC-SHA
Failed SSLv3 256 bits SRP-AES-256-CBC-SHA
Failed SSLv3 256 bits DHE-DSS-AES256-GCM-SHA384
Failed SSLv3 256 bits DHE-RSA-AES256-GCM-SHA384

Accepted TLSv1 256 bits ECDHE-RSA-AES256-SHA
Accepted TLSv1 128 bits ECDHE-RSA-AES128-SHA

Prefered Server Cipher(s):
TLSv1 256 bits ECDHE-RSA-AES256-SHA

SSL Certificate:
Version: 2
Serial Number: -18446744073709551615
Signature Algorithm: sha256WithRSAEncryption





Leyendo eso veo que SOLO acepta TLS V1 128/256 bits.
hay servicios donde todavía aceptan SSL v3


Con este comando se puede saber que ocurre durante la negociación entre mi cliente y el servidor. (Curl también usa SSL)
curl https://www.SITIOENINTERNET.DE -1 -v | more

* Establish HTTP proxy tunnel to www.XXXXXXXXX.de:443
> CONNECT www.XXXXXXXXX.de:443 HTTP/1.1
> Host: www.XXXXXXXXX.de:443
> User-Agent: curl/7.38.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.0 200 Connection established
< * Proxy replied OK to CONNECT request * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): } [data not shown] * SSLv3, TLS handshake, Server hello (2): { [data not shown] * SSLv3, TLS handshake, CERT (11): { [data not shown] * SSLv3, TLS handshake, Server key exchange (12): { [data not shown] * SSLv3, TLS handshake, Server finished (14): { [data not shown] * SSLv3, TLS handshake, Client key exchange (16): } [data not shown] * SSLv3, TLS change cipher, Client hello (1): } [data not shown] * SSLv3, TLS handshake, Finished (20): } [data not shown] * SSLv3, TLS change cipher, Client hello (1): { [data not shown] * SSLv3, TLS handshake, Finished (20): { [data not shown] * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-SHA384 * Server certificate: * subject: OU=Domain Control Validated; OU=PositiveSSL Wildcard; CN=* * start date: 2015-06-16 00:00:00 GMT * expire date: 2018-09-13 23:59:59 GMT * issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN=COMODO RSA Domain Validation Secure Server CA * SSL certificate verify ok. >
< HTTP/1.1 200 OK < Cache-Control: private < Content-Type: application/json; charset=utf-8 * Server Microsoft-IIS/8.5 is not blacklisted < Server: Microsoft-IIS/8.5 < X-AspNetMvc-Version: 5.2 < Access-Control-Allow-Origin: * < X-AspNet-Version: 4.0.30319 < X-Powered-By: ASP.NET < Access-Control-Allow-Origin: * < Date: Thu, 15 Oct 2015 08:44:43 GMT < Content-Length: 6187 < [data not shown]


Si el servidor utiliza TLS 1.2 256 bits "UNICAMENTE" y tu cliente no lo tiene, no te vas a poder conectar.
Aparecen errores diversos, pero no se puede establecer la comunicación entre el cliente y el servidor.

¿El servidor podría utilizar versiones viejas SSL V2 o V3 ?
SI, pero sería inseguro para el servidor. Y por eso "el mundo" se está pasando a TLS v1.1 o 1.2 rápidamente.


Entonces, ¿tienes dudas ? PREGUNTA/MIRA/INVESTIGA.


miércoles, 14 de octubre de 2015

Gambas 3 imprimir ticket


ticket = "/tmp/ticket"

TRY OPEN ticket FOR WRITE AS #fichero

PRINT #fichero, "******************************************"
PRINT #fichero, " Texto que quieras escribir "
PRINT #fichero, "******************************************"
PRINT #fichero, " "
CLOSE #fichero

'envio el fichero directamente por el puerto
SHELL "cat /tmp/ticket > /dev/usb/lp0" WAIT



Un link muy bueno.
https://es.wikibooks.org/wiki/Gambas/Referencia_R%C3%A1pida

martes, 13 de octubre de 2015

Pixels película


"Pixels" me pareció una muy buena película, con algo de nostalgia de los 80, cuando nos escapábamos de la secundaria (Prisión 35) para ir a jugar a las máquinas electrónicas... luego ya con nuestras PCs (Commodore 64, 128, Amiga, PC, etc) jugábamos al Gyrus en casa.

http://www.what-song.com/Movies/Soundtrack/1806/Pixels

1. Invasion (Invaders)
2. The Arcaders
3. To The White House
4. Conspiracy Theory
5. Level 2
6. Hand-Eye Coordination
7. Centipede
8. Pest Control
9. Call In The Cavalry
10. Unconditional Love
11. Power Up
12. Gobble Or Be Gobbled
13. Trophy For The Victors
14. Sweet Spot
15. Q Bert
16. Shoot ‘Em Up
17. A Dream Come True
18. Mothership
19. Roll Out The Barrels
20. High Score
21. Arcaders ’82 (Bonus Track)

Este es el verdadero Toru, aparece en la película arreglando una maquinita.

TPV en Gambas


Gracias a varias personas (creo que Españolas) que prepararon documentación sobre Gambas, estoy acabando un TPV (Terminal de punto de ventas) hecho desde cero, sin tener conocimientos en V.Basic ni en Gambas.
Como desafío personal fue muy interesante, porque tuve que aprender desde cero como manejar la IDE, conceptos de desarrollos distintos, conectividad con SQLite y otros tantos problemas que me fuí encontrando.

Algunos de los puntos complicados fueron la conexión con SQLite, la impresión en bajo nivel, el acceso a disco, grabar logs en ficheros...
cat t3.asc > /dev/usb/lp0

Algunos links

http://gambas.sourceforge.net/en/main.html

http://gambaswiki.org/wiki/doc/shellexec

http://cursogambas.blogspot.com.es/2014/04/hacer-front-end-comandos-de-gnulinux.html

http://www.lulu.com/shop/julio-sanchez-berro/curso-de-gambas3/ebook/product-21598841.html

miércoles, 7 de octubre de 2015

Gambas3 VisualBasic clon


Hace años había visto Gambas 2, una especie de "clon" de Visual Basic, de las viejas versiones.
Recientemente para una beta/lab/proyecto teníamos que hacer algo muy rápido y simple que corra en entorno gráfico en Linux, tomé el riezgo de probarlo como herramienta IDE.

No es algo "perfecto" ni "a prueba de balas", pero tiene la simplicidad del Basic, la facilidad de armar pantallas y componentes gráficos, todo muy rápido y fácil, sabiendo 5 cosas mínimas sobre como "trabajar" con Basic, hicimos una beta de un TPV en 10 horas, con acceso a logs en Texto, con acceso a datos mediante SQLite, que funcione perfectamente para pantallas táctiles.

He bajado todos los PDFs y documentos que pude y realmente es algo para recomendar, como prototipo/beta de un nuevo producto.

Dim A As New Integer[20, 20]






Private myCon As New Connection
Private myRes As Result
'-------------------------------------------------
Public Sub Form_Open()
Dim rowCount, iCount As Integer
Dim sql As String
Dim resField As ResultField
Dim myTable As Table
Dim databaseName As String = "bookmarksdb.sqlite"
Dim dbDir As String = Application.Path



'DB connection values
With myCon
.Type = "sqlite3"
.host = dbDir
.name = ""
End With

'Setting up some dummydata
If Not Exist(dbDir &/ databaseName) Then
myCon.Databases.Add(databaseName)
myCon.name = databaseName

myTable = myCon.Tables.Add("bookmarks")
myTable.Fields.Add("bookmarkID", db.Integer)
myTable.PrimaryKey = ["bookmarkID"]
myTable.Fields.Add("title", db.String)
myTable.Fields.Add("category", db.Integer)
myTable.Update

'fill the table with generated data
myCon.Begin
myRes = myCon.Create("bookmarks")
For iCount = 1 To 10
myRes!bookmarkID = iCount
myRes!title = "Bookmark #" & iCount
myRes!category = 1
myRes.Update
Next
myCon.Commit

myTable = myCon.Tables.Add("categories")
myTable.Fields.Add("categoryID", db.Integer)
myTable.Fields.Add("title", db.String)
myTable.PrimaryKey = ["categoryID"]
myTable.Update

myCon.Begin
myRes = myCon.Create("categories")
myRes!categoryID = 1
myRes!title = "Sample category"
myRes.Update
myCon.Commit
Else
myCon.name = databaseName
Try myCon.Open()
If Error Then
Message.Error(Error.Text)
Endif
Endif

'read the database
sql = "SELECT * FROM bookmarks"
myRes = myCon.Exec(sql)

If myRes.Count = 0 Then
Message("Fant ingen verdier i databasen!")
Else If myRes.Available
trvBookmarks.Add("C1", "Sample Category")
For rowCount = 0 To myRes.Count - 1
myRes.MoveTo(rowCount)
trvBookmarks.Add(Str(myRes[0]), myRes[1] & " #ID" & myRes[0],, "C1")
Next
Endif
myCon.Close()


Algunos links

FORO ESPAÑOL: http://www.gambas-es.org/viewforum.php?f=4



http://gambas-data-grid-codes-database.blogspot.com.es/2012_02_01_archive.html

https://kalaharix.wordpress.com/gambas/gridview-and-the-data-handling-event/


http://wiki.gambas-es.org/index.php?title=Trabajar_con_Bases_de_Datos

http://gambaswiki.org/wiki/howto/database

http://www.gambas-es.org/viewtopic.php?f=3&t=54

http://cursogambas.blogspot.com.es/2012/08/funciones-de-conversion-tipos-de.html

viernes, 2 de octubre de 2015

Kindle Fire 7


Hoy recibimos nuestra Kindle Fire 7"

Ya estoy viendo que trae un Android modificado para Kindle. Ya estoy viendo de ponerle un 4.1 o un 5.0


https://www.youtube.com/watch?v=PVuvR-hHOLE


https://www.youtube.com/watch?v=n-PJn2Mx6Qs

OS X El Capital en Virtual Box


Sitio donde bajar los archivos necesarios para instalar OSX El Capitán en Virtual Box.
https://drive.google.com/folderview?id=0B1BKp8yjdplZMG9TY2pxQnBzak0&usp=sharing

Video Explicativo de "COMO"
https://www.youtube.com/watch?v=t7X07U63lwg

Para ajustar la resolucion de video

vboxmanage setextradata "VMosx11" "CustomVideoMode1" "1366x768x32"
vboxmanage setextradata "VMosx11" "GUI/CustomVideoMode1" "1366x768x32"