2025-03-13: No, CTRL+D in Linux terminal doesn't send EOF signal

Initially I was supposed to write another article on something completely different, but then I randomly found myself digging into what CTRL+D actually does on Linux. And it turned out it does something different than I thought, so I decided to share my surprise in the form of an article posted at hackArcana. Here's the first section:

Linux Terminal: CTRL+D is like pressing ENTER

What I always thought—and I'm pretty sure I'm not alone in this—was that pressing CTRL+D in the terminal closes the standard input for the running process. Alternatively, I've heard that CTRL+D sends an "EOF signal" to the application. But if you actually think about it, it just doesn't make sense. After all, in Bash you can press CTRL+D if the line isn't empty, and nothing happens! Perhaps that's a terminal setting then which Bash changes? Or maybe something more, or—as is in this case—something less is going on. Let's investigate!

Somebody's wrong on the Internet

Apart from the correct answer—to which we'll get shortly—there are two lead answers on "what does CTRL+D in a terminal do" that can be found on the Internet. Both wrong.

  1. It sends an EOF (End-of-File) signal/marker/character to the running program.
  2. It closes the standard input of the running program.

The first answer is somewhat correct (we'll get to that later), but not in the way you think.

Continue at hackArcana...

[ 0 comments ]

2025-04-28: 10 projektów w Pythonie, krok po kroku

Praktyczny Python7 maja zaczyna się moje nowe szkolenie – Praktyczny Python: 10 projektów krok po kroku (jest zniżka -50% do końca kwietnia btw). Szkolenie potrwa do 10 lipca i ma kilka celów:

  • Zademonstrować (10 razy), jak podejść do pisania czegoś troszkę większego, niż "Hello World" czy klasyczny "kalkulator".

  • Poszerzyć horyzonty kursantów jeśli chodzi o to co jest możliwe w Pythonie i w jaki sposób co tego podejść.

  • Pokazać trochę różnych funkcji, bibliotek, czy innych elementów ekosystemu programistycznego.

  • I pomóc przebić się przez tą barierę, która pojawia się jak się już trochę wejdzie w programowanie, ale nie wiadomo co dalej.

Kilka pierwszych projektów:

  1. Ile kodu napisaliśmy? (system plików, pliki tekstowe)
    Prosta aplikacja, która skanuje katalogi z naszymi projektami i w przejrzysty sposób wyświetla informacje o poczynionym progresie.

  2. Agent pomocnik (użycie HTTP API i AI)
    W Internecie nie brakuje bardzo ciekawych API, z których aż chce się skorzystać. Na przykład OpenAI udostępnia interesujące API do swoich chatbotów, takich jak ChatGPT! Zróbmy w Pythonie swojego prostego agenta pomocnika!

  3. Brute-force! (multithreading, multiprocessing)
    Jak łamać hashe w Pythonie? Z pomocą przyjdą wątki (choć nieskutecznie) i multiprocessing!

Pełna lista tematów szkolenia znajduje się na https://python.sekurak.pl

Do zobaczenia w maju!

[ 0 komentarzy ]

Five newest or recently updated notes (these are unfinished posts, code snippets, links or commands I find useful but always forget, and other notes that just don't fit on the blog):

Click here for a list of all notes.

EN Security papers and research notes

Some conference slides are linked at the bottom of this page.

EN Selected vulnerabilities

The full list of vulnerabilities discovered by me (including collaborative work) can be found here (please note that the list might be out of date).

The Google Application Security / Research site might also contain some of my findings.

EN Coding (selected posts)
PL Videotutoriale i podcasty [ 0 views | 0 videos | 0 subscribers ]

Subscribe to me on YouTube W wolnym czasie prowadzę videocasty na żywo o programowaniu, reverse engineeringu oraz hackingu/security:

Livestream | Kanał na YT | Archiwum starszych odcinków

Najnowszy odcinek: Gynvael's Livestream #75: Implementujemy serwer FTP
[ 0 thumbs up | 0 comments | 0 views ]

Dodatkowo: ReverseCraft - starsza seria podcastów o reverse engineeringu i assembly.

PL Edukacyjnie (wybrane posty)

Dla programistów:

Security / hacking:

  • Hacking - jak uczyć się security/hackingu i spać spokojnie.

Dodatkowo, kilka przemyśleń na temat odnajdywania się na rynku pracy w IT:

PL Programowanie (wybrane posty)

← trochę więcej postów jest po angielskojęzycznej stronie.

【 design & art by Xa / Gynvael Coldwind 】 【 logo font (birdman regular) by utopiafonts / Dale Harris 】