Tuesday, April 23, 2024

2024-04-23 Prezentacja

Dziś głównie prezentacja na JUG.

Mam gotowy wstęp: opis ogólny wirtualizacji, kubernetesa.

Muszę przygotować system: klaster k8s i z 2 laptopy workery. Kiedyś wiedziałem jak to zainstalować ale teraz dużo się zmieniło. Mam problem jak na swoim komputerze uruchomić węzeł roboczy.

Muszę też się przygotować na rozmowę rekrutacyjną - wstępną póki co.

Podczas mycia naczyń potłukłem miseczkę. A przy okazji rozciąłem sobie palec na długości około 2cm :/



Monday, April 22, 2024

2024-04-22 k8s

Mam troszkę wolnego czasu - jeszcze ponad miesiąc na urlopie (zaległy z zeszłego roku i z tego roku). Na co go wykorzystać? Prezentacja na JUG (a jednocześnie nauka). Temat? Bezpieczeństwo kubernetes i zaawansowane elementy zarządzania bezpieczeństwem kuberentesa.

Ale zanim to zrobię to najpierw przygotowanie:

  • W czym prezentacja? Oczywiście reveal.js bo go uwielbiam. office i powerpoint nadaje sie na prezentację na szybko ale przygotowanie prezentacji, które sprawia przyjemność to reveal.js
  • Jaki OS? Linux. Mam na komputerze różne windowsy (aktywowane oraz nie, długa historia). Linux a dokładnie Pop!OS (ale nie używam wielu jego opcji).
  • Monitor... muszę chyba przerzucić swój monitor do pracy bo FullHD to troszkę mało :(
  • Jaki kubernetes? Jest multum opcji. Jeśli ja mam problem z wyborem to jak inni? Prezentacja musi niestety to wymienić. Zainstaluję lokalnie pełnego kubernetesa ale odpalę go też na innej maszynie aby mieć przynajmniej 2 node'y.
  • Musiałem sobie zgrać klucze aby mieć dostęp do swojego githuba... okazuje sie, że mam 4 i każdy działa.
  • Najpierw w markup będę pisać. Odpalanie niestety jest problematyczne: reveal nie ma dostępu do plików lokalnych - przeglądarki bardzo mocno ograniczają dostęp. A do tego ja mam chyba syndrom bezpiecznika i mam poblokowane wszelkie skrypty - troszkę klikania.

 Równolegle rozmowy rekrutacyjne.

  • Jedna pewnie jakoś w tym tygodniu - czekam na odpowiedź bo fajni ludzie i bym z chęcią z nimi pracował (ale nie pasuje mi częste jeżdżenia na miejsce).
  • Druga ciekawa bo też super ludzie ale niezupełnie moja działka.
  • Trzecia w środę wstępnie.

A najlepsze że jeszcze nie zacząłem szukać. No i prośbę dostałem o wysłanie CV of "stefana"... czego nie zrobiłem jeszcze. Jakoś mi sie nie pali - ostatnie lata to praca ponad miarę, mało urlopu, łapanie zbyt wielu tematów na raz (co się przekłąda na niższą wydajność), często praca z legacy (z gówna bata nie ukręcisz).

 Przyziemnie tematy:

  • Ile był bym w stanie bez pracy się utrzymać? W tym roku mam zwrot podatku (nie wypełniłem PIT-2 i tak oto tracę na inflacji ale mam zwrot... wolałem tak). Do tego oszczędności (nie ma tego wiele ale coś jest). I pensje (co najmniej 4 jeszcze będą). Na jakiś rok starczy pewnie - może nawet 4 jak byśmy zacisnęli pasa. Ale przecież nie o to chodzi aby wydać wszystko - dzieciaki powinny dostać po mieszkaniu od rodziców i już jest git na start. Więc nie czuję presji jakoś i mogę się skupić na robieniu tego co mi sprawia przyjemność.
  • Mycie naczyń... zaległości mam.
  • Dzisiaj muszę syna odebrać wcześniej ze szkoły i z nim coś porobić. Ale przed tym ogarnąć mu pokój troszkę i wynieść część rzeczy.

TODO: 

  • Do prezentacji muszę dorzucić pluginy
  • Muszę ustawić socket.io aby prezentacja mogła otrzymywać pytania i komentarze w trakcie
     

Thursday, March 28, 2024

Ikea fyrtur vs kadrilj electronics

Summary
Fyrtur and Kadrilj are generally compatible and you could exchange blinds material or even parts. If you got one - it can be easily upgraded to the more expensive one.

Price paid
I got some kadrilj which were sold by Ikea second hand (returned items) that someone returned in a bulk. It costed 350 PLN each, width 140cm.
My wife recently bought fyrtur (again from returned items) and paid around 200 PLN, same width.

During summer it is too bright so I wanted to use thicker material but I found some (false) information on the internet that those models cannot be simply swapped.
It might be that there are incompatible versions as IKEA often upgrades their products and design without sharing this to the customers (because devices are not meant to be disassembled).

This time my wife bought a device that is faulty. I am not yet sure whether it is a faulty motor or electronics or something else but it is simply broken. The rule in general with IKEA is that you should not return 2nd hand goods (but it probably depends on many factors).
I started with internet search for the device teardowns and did not found many information. Some of them presented how to disassemble major parts.
Then I compared mechanisms of both devices. To my surprise the motor was exactly the same. So was the shape and size.

Next steps for me:
- exchange motors with the electronics and check if this is motor or electronics which is faulty
- disassemble faulty element (which would be challenging for sure) and find why it is faulty

Wednesday, March 20, 2024

Cannot save / Brak zapisu gry: XBox 360, XBox One, XBox Series

PL (EN bellow)

Problem: Uruchamiając grę XBox 360 (np. Star Wars: The Complete Saga) na nowszej konsoli (np. XBox One lub XBox Series) stan gry nie zapisuje się. Po ponownym uruchomieniu gry wszystko trzeba zaczynać od początku.

Objawy (na przykłądzie gdy Star Wars: The Complete Saga):

  • Po uruchomieniu gry opcja "XBox Live" nie jest dostępna
  • Po rozpoczęciu nowej gry pojawia się komunikat o braku zapisu osiągnięć
  • Może się też pojawiś komunikat o braku profilu gracza lub konta Live
  • Jeśli korzystamy z konta dziecka to dodatkowo możemy ujrzeć mylące komunikaty o braku dostępu do jakichś opcji lub o ograniczeniach konta dziecka
Przyczyna: Microsoft nie dopracował współpracy nowszych konsol ze starszymi systemami.

Rozwiązanie:
  • Po uruchomieniu gry XBox 360 należy jednocześnie włączyć przyciski kontrolera "po lewej" i "po prawej" od środka, tzn. "prostokąty" oraz "hamburger" - spowoduje to wyświetlenie menu XBox 360
  • Zapewne nie mamy pobranego konta "XBox Live" na konsolę więc należy się "zalogować" w wyświetlonym menu
  • Gdy zostaniemy zapytanie o nazwę konta i hasło - musimy się zalogować tą formą uwierzytelniania (możliwe, że trzeba będzie włączyć stosowną opcję uwierzytelniania dla starszych aplikacji na stronie web microsoftu - u mnie nie było to potrzebne)
  • Zostanie pobrany nasz profil gracza - być może zostaniemy zapytanie o miejsce zapisu profilu (u mnie był to "online storage" z limitem 2GB)
  • Zostawiamy komentarz pod tym wpisem abym wiedział że komuś pomogłęm (a inni oraz microsoft wiedzieli jak często ten problem denerwuje użytkowników)

Saturday, September 30, 2023

Co mnie dzisiaj śmieszy na joemonsterku

 https://joemonster.org/art/69163/Wielopak_Weekendowy_Przyszly_wyniki_testow

Syn rolnika poszedł do wojska. Po jakimś czasie napisał do ojca list:
– Tato tu jest wspaniale! Można się wylegiwać do 6 rano!

W dzieciństwie rodzice zmuszali Jasia do klęczenia za karę na grochu, a Jaś jadł ten groch i po cichu się mścił.  

Tuesday, November 8, 2022

Lexmark MB2236ADW 88.40K error story

I'd like to share what I have learned so far about lexmark (dell) printers. If you have anything interesting to add - please, add a comment :)

Introduction, how I got the printer and the error

I bought the printer in 2020 paying about €100 for it on a sale. This is a decent device for the money: a large monochrome laser printer with a scanner and duplex printing. New (or re-filled by lexmark) toner costs around €50 and should last up to 1200 pages printed.

Printer itself is far from being good: it often prints garbage, paper gets stuck, scanner quality is poor. It comes with drivers that connect to the internet to download and install updates. Potentially could also take control over your computer and printer connected to a network could be used to penetrate your home/office network. So caller "driver" is consuming your resources (because it is always running and connects to the internet) but you should be able to install only the core driver, not the full driver suite.

After 1 year of rare printing I started to see a notification about toner to end soon so I should replace it. This can be ignored (still it is not a nice thing).

After another year I have received error 88.40K saying literally "you have printed too much on this toner - pay a bribe to lexmark to use your printer - printer gets blocked until you pay the bribe".

Why printer manufacturers are doing that planned aging of a product

Companies live Volkswagen noticed that after releasing a great and durable car they are selling only 1 car to an owner for the entire life and not earning any more money. Less durable product forces user to buy more and let them earn more (with production of much more garbage in the process - old product must be utilized or thrown away).

Printer manufacturers started to sell printers that are cheaper than average market price. The secret is in selling very expensive refill (either ink or toner or other materials) - customer overpays (materials are sold for over 1000% of their price, often much over that).

Manufacturers and corporations are not here to make good products or to create good things. Their only goal is to make money (preferably by gaining dominance over the market and abusing monopoly situation to rise prices even more).

What are print limit/counter, chip, toner refill

At some point printer manufacturers started print pages counting and created limits after which printer gets blocked. You must pay a bribe to them so they let you use it more. This is often done in several layers:
  • printer counts how many pages have been printed - after reaching the limit you must service it (servicing cost is higher than getting a new printer)
  • printer counts how many pages were printed with a single ink package or toner - you are forced to replace, not refill, after some number of prints
  • your computer could be sending whatever data to the internet (and manufacturer) so they could even block your printer remotely

The print counting could be made within the printer or the materials. lexmark is inserting a simple small PCB with a chip that is used to verify that:

  • you have ordered materials (ex. ink, toner) from this manufacturer and not some 3rd party
  • you have not messed with the device
If you are lucky then there might be an universal hacked chip that allows you unlimited printing (and likely some expert invested a lot of effort into getting it working). Some printers could allow a counter reset.
 
The cheap approach is to refill toner/ink. Only some manufacturers and devices would allow this (likely those more expensive ones). Then cost of a single print is very low.
If neither works for you then you need to either buy an original overpriced refill or buy a new device.

Possible path to print cheap

Every manufacturer is different. Usually printer firmware is based on some unix and lack any documentation available for you.

lexmark however is using Linux inside its devices. This is both a good and a bad news: Linux is much more secure than other less known systems. But it is much more popular and oftern targeted for attacks so it is more likely that you find an existing known published and exploited security hole. Obviously manufacturers force you to update firmware frequently to fix security holes - that is why I have not updated my firmware and it is currently using version mxlsg.071.016. If firmware can be hacked then we could probably just disable printer counters.

The chips can be probably hacked as well. But the printers are likely to remember every chip used and also modify the chip when used (possibly even binding a chip to a printer so it cannot be reused and writing current print counters to the chip).

Challenges with lexmark device hacking

If there is an UART port - then likely tx line is disabled (you cannot execute any commands).
The best option might be to de-solder flash memory, read it and modify. Unless encrypted (so far it is not yet). If encrypted then you should be still able to decrypt it with some complex techniques.
There is no documentation for the device inner structure or software.
Companies hired skilled people to create such DRM against users.

Challenges with lexmark chip hacking

Encryption and signatures. Probably strong ones. This makes it much more challenging to tamper the chip.
Lack of parts of the documentation.
Many types of devices on the market thus not that many people focused at attacking single device model.

Best but not possible path

Best solution would be to have aware conscious customers who are not buying such crap and instead buying only an open, reusable, durable and good products.

Thursday, March 31, 2022

[SOLVED] Unable to start kibana 5.x: "No endpoint or operation is available at [_xpack]" and too many redirects

First of all - if this post helps you, write a comment, let me know that it is useful :)

Preface

I tried to run some legacy stuff with docker-compose, elasticsearch 5.x and kibana. It worked at first. But then I did some changes and it wasn't working. Problem wasn't obvious. Since this is a legacy thing and I wanted to see how it works... kibana is a useful thing for me.
At first I tried newest ElasticSearch and Kibana but then realized that it is better to use versions used during original app development. New kibana is not backward compatible with old ElasticSearch thus I had to use Kibana 5.x with ElasticSearch 5.x.

Problem observed

Whenever starting ElasticSearch 5.5.2 with Kibana 5.5.2 I can see "too many redirects" on the localhost:5601 and logs showing
..."tags":["license","warning","xpack"],"pid":1,"message":"License information could not be obtained from Elasticsearch. [illegal_argument_exception] No endpoint or operation is available at [_xpack]...

followed by an error 

Unhandled rejection [illegal_argument_exception] No endpoint or operation is available at [_xpack] :: {"path":"\_xpack","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"No endpoint or operation is available at [_xpack]\"}],\"type\":\"illegal_argument_exception\",\"reason\":\"No endpoint or operation is available at [_xpack]\"},\"status\":400}"}

 Failed attempts to resolve the issue

At first I tried disabling the xpack.
And installing it in the ElasticSearch as kibana was still showing that it is missing xpack on ElasticSearch.

Then I played with some other environment variables.... this all was a bad path.

To make it more difficult I had to files:
  • docker-compose.yml with ElasticSearch service defined
  • docker-compose.overrideyml with Kibana service defined (so normally it wouldn't run)

Solution

After a while I noticed that I am using wrong image of ElasticSearch...
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:5.5.2
    ...
  kibana:
    image: docker.elastic.co/kibana/kibana:5.5.2
    ....

is not the same thing as

 services:
  elasticsearch:
    image: elasticsearch:5.5.2
    ...
  kibana:
    image: docker.elastic.co/kibana/kibana:5.5.2
    ....

So just change the image to proper one and write a comment that I helped you :)