Sin categoría

Firma digital

Posted on Actualizado enn

Firmar digitalmente un archivo:

1.-Crear el certificado
C:\Program Files (x86)\Microsoft Office\root\Office16\selfcert.exe

2.-Validar que se haya importado en IE
En el menú Herramientas, haga clic en Opciones de Internet y después en la pestaña Contenido.

Haga clic en Certificados y después en la pestaña Personal.
https://support.office.com/es-es/article/firmar-digitalmente-un-proyecto-de-macro-956e9cc8-bbf6-4365-8bfa-98505ecd1c01

3.-Firmar
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\

signtool sign /t http://timestamp.digicert.com /a “c:\ruta\al\archivo.exe”

https://www.digicert.com/es/codigo/signcode-signtool-linea-de-comandos.htm

Otra info
Descargar y usar signtool.exe
https://revolution.screenstepslive.com/s/revolution/m/10695/l/112948-installing-signtool-exe
https://msdn.microsoft.com/es-MX/library/ee391745.aspx

Anuncios

Create an instance without name SQLSERVER

Posted on

If you already create an instance with name like sqlserver, you need to run the installer again and select a new instance without name or mssqlserver.

To see the instances you have in cmd:
c:\windows\system32> sqlcmd -L

To see ports:
netstat -ano | findstring “7512”

Java Create a Socket

Posted on Actualizado enn


//server
import java.net.*;
import java.io.*;
/**
* @author Jorge V
*/
public class Conex {
final int PUERTO=5000;
ServerSocket sc;
Socket so;
DataOutputStream salida;
String mensajeRecibido;
//SERVIDOR
public void initServer()
{
BufferedReader entrada;
try
{
sc = new ServerSocket(PUERTO );/* crea socket servidor que escuchara en puerto 5000*/
so=new Socket();
System.out.println("Esperando una conexión:");
so = sc.accept();
//Inicia el socket, ahora esta esperando una conexión por parte del cliente
System.out.println("Un cliente se ha conectado.");
//Canales de entrada y salida de datos
entrada = new BufferedReader(new InputStreamReader(so.getInputStream()));
salida = new DataOutputStream(so.getOutputStream());
System.out.println("Confirmando conexion al cliente....");
salida.writeUTF("Conexión exitosa...n envia un mensaje :D");
//Recepcion de mensaje
mensajeRecibido = entrada.readLine();
System.out.println(mensajeRecibido);
salida.writeUTF("Se recibio tu mensaje.n Terminando conexion...");
salida.writeUTF("Gracias por conectarte, adios!");
System.out.println("Cerrando conexión...");
sc.close();//Aqui se cierra la conexión con el cliente
}catch(Exception e )
{
System.out.println("Error: "+e.getMessage());
}
}
}

///////////////////////////////////////////////////////////////////////
//Client
import java.net.*;
import java.io.*;
/**
* @author Jorge V
*/
public class Conex {
final String HOST = "localhost";
final int PUERTO=5000;
Socket sc;
DataOutputStream mensaje;
DataInputStream entrada;
//Cliente
public void initClient() /*ejecuta este metodo para correr el cliente */
{
try
{
sc = new Socket( HOST , PUERTO ); /*conectar a un servidor en localhost con puerto 5000*/
//creamos el flujo de datos por el que se enviara un mensaje
mensaje = new DataOutputStream(sc.getOutputStream());
//enviamos el mensaje
mensaje.writeUTF("hola que tal!!");
//cerramos la conexión
sc.close();
}catch(Exception e )
{
System.out.println("Error: "+e.getMessage());
}
}
}


///////////////////////////////////////////////////////////////////////

Reference:
http://codigoprogramacion.com/cursos/java/103-sockets-en-java-con-cliente-y-servidor.html#.WvW-g4gvyUk

Modify Mazda infotainment system, screen mirror

Posted on Actualizado enn

Go to hidden menu:

  1. press and hold: music+fav+mute
  2. Press and hold: del until you see “JCI-    test mode”
  3. Write 11 until you see “JCI_TESTID1-Not started”
  4. “Choose a script would like to run”, be careful to avoid pressing “display toggle” or you can get a black screen.
  5. If you get black screen you need to create this script, put it on a usb 32 fat device#! /bin/sh
    echo 1 > /sys/class/gpio/Watchdog\ Disable/value
    mount -o rw,remount //jci/scripts/set_display_config.sh visteon

    reboot

  6. Press next and the press “WIFI AP TOGGLE”, you will get “wifi has been toggled:ON”
  7. Then exit

On a pc, connect to CMU:XX.XX.XX

    1. Using winscp or similar connect to 192.168.53.1 / root / jci
    2. After that you are connect to infotainment
    3. Open a terminal
    4. run this script to modify files:            mount -o rw,remount /
    5. if you want to disable speed restriction to touch screen run this, you will lose the navigation stuff:

/jci/scripts/set_lvds_speed_restriction_config.sh disable
/jci/scripts/set_speed_restriction_config.sh disable

  1. Now unblock the wife
  2. Edit this file:             jci/gui/apps/syssettings/js/syssettingsApp.js
  3. and modify the if stuff to go inside the condition with something like this
  4.  //if((region != (framework.localize.REGIONS[‘NorthAmerica’]) && (region != (framework.localize.REGIONS[‘Japan’]))))
    {//wi-fi is not avaiable in Japan and NorthAmerica region
    items.push({
  5. reboot the system with: mute+nav+back, after that you can see “wifi” on “menu devices”, “settings”

Download this app MMP: https://drive.google.com/file/d/0BzYrm7MuzjGRM0lpYmpfNVVyQkU/view?usp=sharing

  1. Only works on android 5+, enable unkwoun source, debbuging usb, enable share internet, go to your mazda and connect to your phone, watch for the ip of your mazda you will need it soon
  2. In the mazda pair your phone by bluetooth, then in your phone open the MMP app connect it by usb to the mazda  plug, write the ip, leave root, ***, 5000, connect and screen mirror. That is it.

*version 55

You also can enable the speed restriction on the hidden menu pressing

 

 

http://mazdateammexico.com/index.php?topic=17253.0

Seguridad General en BD, Seguridad Específica en MongoDB

Posted on Actualizado enn

La conferencia se divide en:

  • Seguridad general.
  • BD NoSql (documentales, clave valor, columna y de grafos).
  • Seguridad General en BD.
  • Seguridad Específica en BD NoSql (MongoDB)
  • Demo
    • MongoDB
      • Instalación
      • Usar MongoDB la autentificación
      • Crear Usuarios
      • Asignar Roles y Privilegios para usuarios
    • AWS
      • EC2
      • Security group
    • RoboMongo

En mi canal (por si en algún momento borran el oficial)

En el canal de Campus Party

Add channels to Roku

Posted on Actualizado enn

Create an app for Roku
*1. Download the https://sdkdocs.roku.com/display/sdkdoc/Playing+Videos#PlayingVideos-BroadcastVideo “VideoList.zip”
*2. Modify the videocontent.xml
*3. url = “http://xxx.xx.x.x/series/games/thrones.tp2x04.mp4″/>
*4. Create again the zip with the manifest at root
5. In my Roku I did this
To enable development mode, enter the special remote control sequence: Home 3x, Up 2x, Right, Left, Right, Left, Right. The entire sequence must be entered within 10 seconds.
*6. Go to my ip 192.168.0.x  [rokudeve / pass ****] and uploaded the zip file, like developer

https://sdkdocs.roku.com/display/sdkdoc/Loading+and+Running+Your+Application

1. Open a putty console and 192.168.0.x / 8080 / telnet, and wrote that, genkey twice, it generates a password and developerid
https://sdkdocs.roku.com/display/sdkdoc/Roku+Billing+and+In-Channel+Purchasing

2Lxxx344 (Roku T)
>genkey
Command not recognized
>genkey
……………………..+++
……………………………………………………………………………….+++
Password: w7lxxCNw==
DevID: e40axx87b
>

*2. Go to packager at right upper corner, write the password you create before, Download the pkg

https://developer.roku.com/developer-channels/channels/

*1. Sdk / private
*2. Video
*3. Add 504×405 jpg file
*4. Add the pkg you already created
*5. Submit for publishing
*6. Access code add
Another link: http://mkvxstream.blogspot.com/2016/03/how-to-create-roku-channel-part-four.html

*second time

 

SOLID – object oriented design

Posted on Actualizado enn

S.O.L.I.D is an acronym for the first five object-oriented design(OOD) principles by Robert C. Martin. [herencia, composición, abstracción, encapsulamiento o polimorfismo].

  • S – Single-responsiblity principle
  • O – Open-closed principle
  • L – Liskov substitution principle
  • I – Interface segregation principle
  • D – Dependency Inversion Principle

Single-responsibility Principle

Single-responsability: Each object must have only one responsability

As an example, consider a module that compiles and prints a report. Imagine such a module can be changed for two reasons. First, the content of the report could change. Second, the format of the report could change. These two things change for very different causes; one substantive, and one cosmetic. The single responsibility principle says that these two aspects of the problem are really two separate responsibilities, and should therefore be in separate classes or modules. It would be a bad design to couple two things that change for different reasons at different tim

Open/Close: Objects open for extension, closed for modification.
La forma más común de seguir el principio OCP es usar interfaces o clases abstractas de las que dependen implementaciones concretas. De esta forma puede cambiarse la implementación de la clase concreta manteniéndose la interfaz intacta.

https://www.adictosaltrabajo.com/tutoriales/solid-2/

Liskov Substitution: subclass/derived class should be like base/parent class.
Shell

class InterfazVehiculo{
function acelerar();
}

class Camion{
function acelerar() extends InterfazVehiculo{
introducirMasCombustible();
}
}

class CocheElectrico extends InterfazVehiculo{
function acelerar(){
incrementarVoltaje();
}
}

class Conductor{
function conducir(InterfazVehiculo vehiculo){
// otras funcionalidades…
v.acelerar();
}
}

https://www.adictosaltrabajo.com/tutoriales/solid-3/

Interface Segregation: lot of interfaces few methods rather than lots of methods few interfaces.

bad

good

https://www.adictosaltrabajo.com/tutoriales/solid-4/

Dependency Inversion: Components with abstractions, not with a specific implementation (concretions).

https://www.adictosaltrabajo.com/tutoriales/solid-5/

“Estos principios están en un nivel más alto que los patrones de diseño. No son un ejemplo concreto que debáis utilizar para resolver un problema. Son una forma de pensar, ideas que hay que tener en la cabeza mientras se programa para intentar mantener un código limpio y mantenible.”