martes, 6 de junio de 2017

mstsc.exe not responding

Last week I experienced an annoying delay in the startup time of mstsc.exe (terminal server client) of about 10-15 minutes. I 'googled' a lot and I found a bunch links discussing about security certificates, corrupted system files and other logical causes.

A server related problem was discarted because there wasn't any problem connecting to the same server from other client.

Obviously anything I found doesn't work ... My last chance was a open-source terminal server client for windows... (FreeRDP) and it last the same time to startup.... interesting... (and frustrating!).


After a lot of test, I analized my system event viewer:

Any terminal server client can share resources between server and client, so it looks obvious it "wait" until all resources are ready. My cdrom drive was dead, so it was delaying all the startup process of mstsc.exe. After disabling the unit, all worked perfectly.

I'm not saying this is THE SOLUTION, of all problems related to mstsc.exe, it was my solution.


martes, 30 de mayo de 2017

How to find out which hdd is \Device\Harddisk#\DR#


Sometimes we obtain a weird Disk Error (Event 11) on Windows Event Viewer pointing to a "Disk" called something like \Device\Harddisk#\DR#

And the question is: which one is that failling disk? is "C:" unit? Is it my system disk?

In my case that was my error (just before a system's hang):


To translate that obscure representation of a disk we can use WinObj.

WinObj is a must-have tool if you are a system administrator concerned about security, a developer tracking down object-related problems, or just curious about the Object Manager namespace.


  • Download WinObj from Sysinternals
  • Run it as administrator
  • Go to \Device\HarddiskX


  • You will see individual PartitionY symbolic links (to \Device\HarddiskVolumeZ), note these down
  • Go to \GLOBAL??, sort by the 3rd column "SymLink"
  • Find the \Device\HarddiskVolumeZ value you noted down in the 3rd column
  • You will see various names of that volume in the first column, including HarddiskXPartitionY, Volume{GUID} and (what's probably most useful for most people) the DOS-style letter like C:


Finally I can realise that the faulting drive was a external usb-stick and not my system disk.


Found at Microsoft Forums, pictures are my own.

martes, 18 de abril de 2017

How to prevent Punycode Phishing Attacks

What is Punycode Phishing Attacks?

It's a intentionally malformed url to "appears to" a well known url, using special characters that looks like "normal" one but aren't the same.

For example:
https://www.apple.com/
https://www.аррӏе.com/

The second one points to a different domain that it isn't under control of apple, so if we use our user&password to try login we are revealing it to the attacker.

Imagine the same situation with the url of your bank.

The solution

 Use Punycode Alert a Chrome Extension that shows a Warning when you visit a malformed url

Chrome will release a new version of his browser this month





jueves, 16 de marzo de 2017

How to copy a file with I/O errors?


Sometimes we need (yes, really NEEEEEED) access a file from a damaged hard disk without recent backup.

If we try do it manually we can obtain errors and the operation can be aborted. In other cases the damaged disk can block the entire system. This is because the operating system want to give us the entire original file, without errors. If the disk responses with a error in a certain block (1Kb) inside a large file (1 Gb) the operating system won't give us the file. But we want the 99% of the file that is ok. (i.e., If the file requested file is a video, we don't care lose 1 seg.)

Short Answer:

$ dd if=/media/_MYDISK_/file.mp4 of=file.mp4 conv=noerror,sync

if= path to the original file, in the damaged filesystem
of = path to the destination file, in a safe filesystem
conv = noerrors, sync Ignore all errors and continue!!!!!!

That doesn't mean the copied file haven't any errors. After copy it, we will need specific tools to repair it. Sometimes the file format is "fault tolerant" and when we'll open it with his software (i.e. Word, Zip...) it'll be auto-repaired. In other cases we'll loose part of our data, but not all.


Long Answer: Blog of Aeroquartet

lunes, 6 de febrero de 2017

How to share a YouTube video with a specific start and end time

Sometimes we want to clarify an information sending a link to a youtube video, but we are only interested in a certain fragment, and we don't want to bore our receiver with the entire video.

First of all, we have to rewrite the video's URL, from this:
https://www.youtube.com/watch?v=o7a7ZAqWBIs
to this:
https://www.youtube.com/v/o7a7ZAqWBIs

The important part is the ID of the video, in our example: o7a7ZAqWBIs

Then, we can specify extra parameters to set the beginning and the end of the video, in seconds.

start=70, means 70 seconds from the beggining (i.e. 1:10),  and end=90 means 90 seconds from the beginning (i.e. 1:30)

https://www.youtube.com/v/o7a7ZAqWBIs&start=70&end=90

And finally the option to auto play the video:

https://www.youtube.com/v/o7a7ZAqWBIs&start=70&end=90&autoplay=1


martes, 10 de enero de 2017

Composer para tus proyectos

Juanma Cabello se ha currado una introducción a composer.
A la hora de llevar a cabo un proyecto, es más que probable que quiéras usar alguna librería que te simplifique tu labor. Por ejemplo, en lugar de crear una clase para tratamiento avanzado de cadenas puedes echar mano de Stringy o si quieres usar un motor de plantillas, por poner otro ejemplo, puedes hacer uso de Plates en lugar de crear tú uno desde cero. Eso si, tener la versión concreta o al día de tus librerias y tenerla descargada e integrada en tu proyecto es una labor tediosa.
Aquí es donde entran los gestores de dependencias y, en nuestro caso en concreto, composer. Un potente y versátil gestor de librerías para tus proyectos que voy a tratar de disgregar para ti.



lunes, 9 de enero de 2017

Reducir el tamaño en de pdf en Linux


Respuesta corta:


$ sudo apt-get install ghostscript gsfonts 
$ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=DossierReducido.pdf Dossier\ Servihogar-IMPRESION.pdf 

Nota: la opcion -PDFSETTINGS=/screen reduce aún más las imágenes, pero con mucha perdida de calidad.

Respuesta larga: gestiweb