Sunday, January 3, 2021

AƱadiendo un termostato a la calefaccion por caldera/radiadores

Esta es la mejor guia (ver pg 11 en adelante) aunque tiene mal alguna numeracion

Otra guia super completa aunque los numeros de la explicacion al final tambien estan todos cambiados!?

Y otra foto

Creo que esta es la guia de mi caldera!

Top level, creo que el termostato (en el comedor) simplemente hace que el agua se mueva cuando la temperatura esta por debajo del punto fijado. No he leido como, si abriendo alguna de las llaves (o las dos, entrada y salida) y/o haciendo que el circulador (bomba se encienda) para que el agua circule. Pero bueno, creo que eso tambien hace que se encienda el gas.

Nota: Interesante, me lo estaba preguntando... pero como digo, la caldera tiene una bomba de agua para que circule el agua por los tubos, asi no hay que gastar agua para la operacion y ademas el agua que calientas ya estaba caliente (o no tan fria) como viniendo de la calle... Obvio pero...

Bueno, ahora si quiero anyadir otro termostato en la habitacion (el mio esta en el comedor) como lo hariamos de la forma mas simple?

  1. La forma en la que esta pensado ahora es ajustar el radiador. Si la habitacion esta normalmente mas fria que el comedor, cierra un poco el del comedor y abre el de la habitacion, para compensar. La verdad es que eso funcionaria pero durante el dia no hace falta que la habitacion este caliente...
  2. La otra forma seria poner otro termostato en la habitacion "en paralelo" con el del comedor. Si el termostato es basicamente un interruptor (que creo que lo es y esto parece confirmarlo) que se cierra cuando la temperatura cae por debajo del valor fijado, pues el de la habitacion estaria en paralelo y haria lo mismo. Cualquiera de los dos puede entonces activar la caldera. Vamos a ver si eso existe...
  3. Una tercera forma es cambiar el termostato por otro que tenga funcion de sensing remota...
  4. La ultima/mejor es anyadir un circuito de agua separado controlado por valvulas independientes, cada una controlada por el termostato correspondiente. Evidentemente este es el mas costoso de todos...
Seguramente pruebe #2 

PD.: Por cierto, este link es bueno explicando fallos de caldera.

Saturday, January 2, 2021

Cracking my old Excel file encryption

 I got this very old file and can't remember what was my password! DARN!

So, here I am trying with what is out there (which seems pretty powerful). At the time of starting writing this I am (hopefully) half way. Have not been able to crack it yet. But will write here some of the key links/explanations I have found so far:

  • Very simple intro from The Guardian on encryption jargon.
  • FYI, I am working in Kali Linux.
  • Used: Phython office2john.py file_you_want_to_crack > hash.txt This will extract the hash of the file.
  • Now you could use something that uses a dictionary to try to crack it, like john --wordlist=/usr/share/wordlists/nmap.lst hash.txt
  • But that may not be powerful enough (it wasn't for me) because I wasn't dumb enough to just use words for my password... So, we are now trying brute force attack (try every combination, basically) with hashcat (which is smarter than that). I am having problems using it though but here some interesting stuff as I learn along the way...
  • Really nice example/explanation step by step of the whole encryption process and cracking approach. The Atom post he is referring to (that guy is a beast) is here.
  • Ok, so after searching, I figure that 1/ I had to remove also the back file name in the hash and all the "::::" (I still had that) and 2/ can't run hashcat in VM Kali (basically needs intensive access to the HW which the VM is simply emulating).
  • So, now I got the Hashcat version for Windows 10, but still not running. Issues seem related to the Intel OpenCL driver. You can run Hashcat -I and will give you the devices where it can run the cracking:
hashcat (v6.1.1) starting...

* Device #1: Unstable OpenCL driver detected!

OpenCL Info:
============

OpenCL Platform ID #1
  Vendor..: Intel(R) Corporation
  Name....: Intel(R) OpenCL HD Graphics
  Version.: OpenCL 2.1

  Backend Device ID #1
    Type...........: GPU
    Vendor.ID......: 8
    Vendor.........: Intel(R) Corporation
    Name...........: Intel(R) Iris(R) Plus Graphics
    Version........: OpenCL 2.1 NEO
    Processor(s)...: 64
    Clock..........: 1100
    Memory.Total...: 6450 MB (limited to 3225 MB allocatable in one block)
    Memory.Free....: 6386 MB
    OpenCL.Version.: OpenCL C 2.0
    Driver.Version.: 27.20.100.8280

OpenCL Platform ID #2
  Vendor..: Intel(R) Corporation
  Name....: Intel(R) OpenCL
  Version.: OpenCL 2.1 WINDOWS

  Backend Device ID #2
    Type...........: CPU
    Vendor.ID......: 8
    Vendor.........: Intel(R) Corporation
    Name...........: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
    Version........: OpenCL 2.1 (Build 0)
    Processor(s)...: 8
    Clock..........: 1300
    Memory.Total...: 16126 MB (limited to 4031 MB allocatable in one block)
    Memory.Free....: 16062 MB
    OpenCL.Version.: OpenCL C 2.0
    Driver.Version.: 2020.11.11.0.13_160000

It identifies both, the GPU (device 1) and the CPU (device 2). It doesn't seem to say "unstable driver" for the device #2. So I give it a shot to use that: hashcat -a0 -m9700 -D1 hashtest.txt
Using D1 tells him to use only CPU, not GPU and it started working!
hashcat (v6.1.1) starting...

./OpenCL/m09700_a0-optimized.cl: Pure kernel not found, falling back to optimized kernel
* Device #1: Unstable OpenCL driver detected!

This OpenCL driver has been marked as likely to fail kernel compilation or to produce false negatives.
You can use --force to override this, but do not report related errors.

OpenCL API (OpenCL 2.1 ) - Platform #1 [Intel(R) Corporation]
=============================================================
* Device #1: Intel(R) Iris(R) Plus Graphics, skipped

OpenCL API (OpenCL 2.1 WINDOWS) - Platform #2 [Intel(R) Corporation]
====================================================================
* Device #2: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz, 16062/16126 MB (4031 MB allocatable), 8MCU

./OpenCL/m09700_a0-optimized.cl: Pure kernel not found, falling back to optimized kernel
Minimum password length supported by kernel: 0
Maximum password length supported by kernel: 15

Hashes: 1 digests; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Rules: 1

Applicable optimizers applied:
* Optimized-Kernel
* Zero-Byte
* Precompute-Init
* Not-Iterated
* Single-Hash
* Single-Salt

Watchdog: Hardware monitoring interface not found on your system.
Watchdog: Temperature abort trigger disabled.

Host memory required for this attack: 204 MB

Starting attack in stdin mode...

Session..........: hashcat
Status...........: Running
Hash.Name........: MS Office <= 2003 $0/$1, MD5 + RC4
Hash.Target......: $oldoffice$0*47dddd306ed3c1e272c9e3cd6013906e*5cf05...d7066a
Time.Started.....: Sat Jan 02 10:10:26 2021 (10 secs)
Time.Estimated...: Sat Jan 02 10:10:36 2021 (0 secs)
Guess.Base.......: Pipe
Speed.#2.........:        0 H/s (0.00ms) @ Accel:64 Loops:1 Thr:64 Vec:16
Recovered........: 0/1 (0.00%) Digests
Progress.........: 0
Rejected.........: 0
Restore.Point....: 0
Restore.Sub.#2...: Salt:0 Amplifier:0-0 Iteration:0-1
Candidates.#2....: [Copying]

It keeps going but gives this message:
ATTENTION! Read timeout in stdin mode. The password candidates input is too slow:
* Are you sure that you are using the correct attack mode (--attack-mode or -a)?
* Are you sure that you want to use input from standard input (stdin)?
* If so, are you sure that the input from stdin (the pipe) is working correctly and is fast enough?

I think the issue is that we are trying a dictionary attack (a0) but not sure what list was using. So, I changed to mask_attack (a3) but I had changed to m9710 which was limiting the length to exactly 5 characters (not sure why) and obviously my experimental 1234 password was not getting cracked. Finally I tried: hashcat -a3 -m9700 -D1 -o outfile.txt hashtest.txt ?d?d?d?d
and that cracked it!!

Other notes... I am using now (to crack the real file) the command:
hashcat -a3 -m9800 -D1 -o outfile.txt hashprostatitis.txt --increment ?l?l?l?l?l?l?l?l
and we get:
[...]
Host memory required for this attack: 204 MB

The wordlist or mask that you are using is too small.
This means that hashcat cannot use the full parallel power of your device(s).
Unless you supply more work, your cracking speed will drop.
For tips on supplying more work, see: https://hashcat.net/faq/morework

Approaching final keyspace - workload adjusted.

Session..........: hashcat
Status...........: Exhausted
Hash.Name........: MS Office <= 2003 $3/$4, SHA1 + RC4
Hash.Target......: $oldoffice$4*778b3815ae4fe0c33b38500455d85742*0d3bf...b08f61
Time.Started.....: Sat Jan 02 11:06:06 2021 (0 secs)
Time.Estimated...: Sat Jan 02 11:06:06 2021 (0 secs)
Guess.Mask.......: ?l [1]
Guess.Queue......: 1/8 (12.50%)
Speed.#2.........:   108.0 kH/s (0.04ms) @ Accel:4 Loops:26 Thr:64 Vec:16
Recovered........: 0/1 (0.00%) Digests
Progress.........: 26/26 (100.00%)
Rejected.........: 0/26 (0.00%)
Restore.Point....: 1/1 (100.00%)
Restore.Sub.#2...: Salt:0 Amplifier:0-26 Iteration:0-26
Candidates.#2....: s -> x

The wordlist or mask that you are using is too small.
This means that hashcat cannot use the full parallel power of your device(s).
Unless you supply more work, your cracking speed will drop.
For tips on supplying more work, see: https://hashcat.net/faq/morework

Approaching final keyspace - workload adjusted.

Session..........: hashcat
Status...........: Exhausted
Hash.Name........: MS Office <= 2003 $3/$4, SHA1 + RC4
Hash.Target......: $oldoffice$4*778b3815ae4fe0c33b38500455d85742*0d3bf...b08f61
Time.Started.....: Sat Jan 02 11:06:06 2021 (0 secs)
Time.Estimated...: Sat Jan 02 11:06:06 2021 (0 secs)
Guess.Mask.......: ?l?l [2]
Guess.Queue......: 2/8 (25.00%)
Speed.#2.........:   719.5 kH/s (0.75ms) @ Accel:4 Loops:26 Thr:64 Vec:16
Recovered........: 0/1 (0.00%) Digests
Progress.........: 676/676 (100.00%)
Rejected.........: 0/676 (0.00%)
Restore.Point....: 26/26 (100.00%)
Restore.Sub.#2...: Salt:0 Amplifier:0-26 Iteration:0-26
Candidates.#2....: sa -> xz

The wordlist or mask that you are using is too small.
This means that hashcat cannot use the full parallel power of your device(s).
Unless you supply more work, your cracking speed will drop.
For tips on supplying more work, see: https://hashcat.net/faq/morework

Approaching final keyspace - workload adjusted.

Session..........: hashcat
Status...........: Exhausted
Hash.Name........: MS Office <= 2003 $3/$4, SHA1 + RC4
Hash.Target......: $oldoffice$4*778b3815ae4fe0c33b38500455d85742*0d3bf...b08f61
Time.Started.....: Sat Jan 02 11:06:06 2021 (0 secs)
Time.Estimated...: Sat Jan 02 11:06:06 2021 (0 secs)
Guess.Mask.......: ?l?l?l [3]
Guess.Queue......: 3/8 (37.50%)
Speed.#2.........:  3935.9 kH/s (4.20ms) @ Accel:4 Loops:26 Thr:64 Vec:16
Recovered........: 0/1 (0.00%) Digests
Progress.........: 17576/17576 (100.00%)
Rejected.........: 0/17576 (0.00%)
Restore.Point....: 676/676 (100.00%)
Restore.Sub.#2...: Salt:0 Amplifier:0-26 Iteration:0-26
Candidates.#2....: sna -> xqz

Approaching final keyspace - workload adjusted.

Session..........: hashcat
Status...........: Exhausted
Hash.Name........: MS Office <= 2003 $3/$4, SHA1 + RC4
Hash.Target......: $oldoffice$4*778b3815ae4fe0c33b38500455d85742*0d3bf...b08f61
Time.Started.....: Sat Jan 02 11:06:06 2021 (0 secs)
Time.Estimated...: Sat Jan 02 11:06:06 2021 (0 secs)
Guess.Mask.......: ?l?l?l?l [4]
Guess.Queue......: 4/8 (50.00%)
Speed.#2.........:  5325.5 kH/s (5.44ms) @ Accel:16 Loops:6 Thr:64 Vec:16
Recovered........: 0/1 (0.00%) Digests
Progress.........: 456976/456976 (100.00%)
Rejected.........: 0/456976 (0.00%)
Restore.Point....: 17576/17576 (100.00%)
Restore.Sub.#2...: Salt:0 Amplifier:24-26 Iteration:0-6
Candidates.#2....: uegy -> xqzz

I.e., one can see how the --increment flag is working and it is testing initially just one character, then combinations of 2, then 3.. Each taking longer time, obviously. It tells you how many it tried. For instance, for 4 characters it does 456976 combinations. Pressing "S" gives us the current status. Of course, this may take hours... (The 6 char long took 1 min, the 7 char long took 37 min) so I canceled.

In that sense, notice that it also shows the speed of how many trials per second: 5325.5 kH/s All 8 cores were at 100% at this time :)

Then I tried hashcat -a3 -m9800 -D1 -o outfile.txt hashprostatitis.txt -1 abcdefghijklmnopqrstuvwxyz0123456789 ?1?1?1?1?1?1 but no luck. I think I am going to have to give up on this. Probably too hard to crack...

Other links:

Sunday, December 20, 2020

Creating your Home Design with SweetHome3D

 Just a brief tutorial/tips, under construction, on how to get the best of your SH3D:

  • Break your space on different problems and create separate files to work on them. That way you can have different variations on the same file of the same space about that one problem and compare to each other. Eventually, when done, you can put it all together with the winning combination for every problem.
  • How to find more objects
  • How to go from your design in SHD3 to VR view, say on HTC Vive:
    • SH3D to do the plan
    • Then from there you can export the 3d view to .obj format
    • Use autodesk fbx to convert the obj to fbx
    • Use unity to import the fbx in htc vive scene. Use the unity toolkit as a start to have a simple teleport system.

3D models: formats, libraries, websites, translators

So, I am using SH3D (Sweet Home 3D). Really nice open source software that allows you to import objects. I am new to all these file formats, so, trying to figure what is the best source of objects and how to bring them in... Work in progress...

You can start by the SH3D library page. Remember to unzip the libraries before importing them, or else it will give you a message like everything was fine but actually nothing gets imported.

Working backwards, SH3D accepts (sorted for compatibility with Blender):
  • OBJ - Wavefront << This can be opened by blender
  • 3DS - 3D Studio << This can be opened by blender
  • DAE - DAE Collada << This can be opened by blender
  • LWS - LightWave Scene
  • KMZ: this is the Google Earth file format. Not sure what it is doing here...
  • ZIP
Nevertheless, the typical libraries websites:
Have files like (sorted by how easy is to get them in SH3D, mentioning what opens it that can translate it into one of the SH3D formats):
  • RFA: from Revit
  • DXF: use 3D Transform to transform STL, which Blender accepts.
  • FBX, from Filmbox, is proprietary (folks basically hack their way in, but with a newer version, they lose that...) although the newer versions seem that it can be opened in Blender.
  • DWG
  • STL 
  • SLDPRT: SolidWorks Part file. Proprietary. You can see it with Autodesk Viewer but don't know how to save it/translate it to something (without paying...).
  • SLDASM: SolidWorks too. It typically contains several of the above organized together...
  • MAX: From AutoDesk. Looks like there is no way.
In some cases we lose the texture, which is not cool...

Some of the files are more complex than what we want to use in SH3D, so, we need a way not only to open it but to edit it.

Websites that allow you to change formats for free:
  • http://www.greentoken.de/onlineconv/
    • Input formats: 3d, 3ds, fbx, ac, ac3d, acc, ase, ask, b3d, blend, bvh, cob, csm, dae, dxf, enff, hmp, ifc, irr, irrmesh, lwo, lws, lxo, md2, md3, md5anim, md5camera, md5mesh, mdc, mdl, mesh.xml, mot, ms3d, ndo, nff, obj, off, pk3, ply, prj, q3o, q3s, raw, scn, smd, stl, ter, uc, vta, x, xml, xgl
    • Export formats are: stl, stlb, collada, obj, 3ds, ply, json, x 
  • 3D Transform: takes .igs .iges .stp .step .brep .3ds .ase .dxf .stla .stlb .stl .wrl .iv .obj .swv .gmod .iv and outputs .STL
Editors:
  • Blender:
  • Sketchup: looks like they may have some freebies... Unfortunately does not run in Linux so won't comment further.
Eventually, we will also need textures. Textures are relatively easier as any jpg will work, except for the tileability (how to tile them side by side seamlessly)


Wednesday, December 2, 2020

Covid rapid (24 hrs turnaround) test for travelers in Dallas

 Just a note here to write down what I did:

  1. I found 3 options (there may be more but just stopped there :)):
    1. DevLabBio: $150 next day results. They replied very fast to my email. You book a time online. Fill the form, including the payment, ahead of arriving to the place.
    2. CareNow. $150 on their normal clinics. $250 at the airport.
    3. RealTimeLab: $250 for 24hrs turnaround time
  2. For a list of testing sites in Texas click here  Wherever you decide to go, make sure it is in this list so that it is not a fake place (there are reports of some popping up).
  3. The points guy article.
I did #1 (at 3PM on Thursday for a flight departure at 8PM on Saturday, and arrival at 10AM Sunday). My backup was #2 at the airport if it failed.

===

Nothing to do with Covid testing but other stuff required by immigration:

Tuesday, December 1, 2020

Getting Internet while traveling in Spain

The link that brought me to the solution is this nice one

The solution that I did:

Sunday, November 8, 2020

Great people

Intent of this post is to list a few of maybe not so well known great human beings  (work in progress). Respect:

Rosalind Franklin: should have been one of the novel prize winners for the discovery of DNA. 

Jonas Salk, discover of many vaccines, but very few now him because he credited his team.

James Heselden - Segway and Hesco Owner
"There are people out there who are making money, and when times are good I honestly believe people have a moral obligation to use their wealth to help others," Heselden told the Yorkshire Post earlier this year. "Life turned out pretty well for me, but I still work in the same area where I grew up, and everyday I see people who for whatever reason are down on their luck."

Usman Koroma, wanted to adopt a child who had just lost her mom to Ebola. 

Chinese doctor, Li Wenliang, who was reprimanded by police after warning colleagues about a new respiratory disease emerging in Wuhan, and finally died after falling ill. 

Aaron Feuerstein, from Malden Mills. Keep their employees after the factory burnt down and many competitors were moving overseas. https://en.wikipedia.org/wiki/Malden_Mills

Peter Norman, Awesome human and Australian athlete.

Yevdokia Dashina: hippo care taker

Josep Maria Bertran de Quintana. Judge on the Republican side (one of the Spanish sides during the Civil War) that prosecuted indiscriminated killings of civilians on the Republican controlled regions, against the establishment and social winds (hurricanes) in those regions.