Archive for the ‘*nix’ Category
Posted by jpluimers on 2023/09/22
Since mail mostly “works” I use these below commands only very little and tend to forget them.
Luckily they were documented at [Wayback/Archive] Viewing email in Linux using postfix’s mailq and postcat | Jeff Geerling
Here are the most common commands I use when either developing or troubleshooting email in production:
mailq – print a list of all queued mail
postcat -vq [message-id] – print a particular message, by ID (you can see the ID along in mailq‘s output)
postqueue -f – process the queued mail immediately
postsuper -d ALL – delete ALL queued mail (use with caution—but handy if you have a mail send going awry!)
Via [Wayback/Archive] postfix process queue – Google Search two interesting answers (thanks [Wayback/A] Nicolas for asking):
Read the rest of this entry »
Posted in *nix, *nix-tools, postfix, Power User | Leave a Comment »
Posted by jpluimers on 2023/09/14
For my link archive so I can better automate archiving Tweet threads using bookmarklets written in JavaScript:
The base will likely be this:
javascript:void(open(`https://archive.is/?run=1&url=${encodeURIComponent(document.location)}`))
which for now I have modified into this:
javascript:void(open(`https://threadreaderapp.com/search?q=${document.location}`))
It works perfectly fine without URL encoding and demonstrates the JavaScript backtick feature for template literals for which you can find documentation at [WayBack/Archive] Template literals – JavaScript | MDN.
Read the rest of this entry »
Posted in *nix, *nix-tools, bash, bash, Bookmarklet, Communications Development, cURL, Development, HTTP, https, Internet protocol suite, Power User, Scripting, Security, Software Development, TCP, Web Browsers | Leave a Comment »
Posted by jpluimers on 2023/08/29
Often the power is in the combinations of tools.
Read until the epilogue…
Prologue
In this case, I needed to be able to query the JSON results of calls to REST services from the command-line so I could process them in Batch files.
Since I could not find anything readily available, I originally Originally I opted for the PowerShell command-line scripting tool, as that ships with recent Windows versions and can re-use anything that .NET brings. But though [Wayback/Archive] .NET has built in JSON serialization support, there is [Wayback/Archive] no querying support in it.
Then I thought about Delphi, as it [Wayback/Archive] too has a built-in JSON parser, but even the well known [Wayback/Archive] JSON SuperObject library has no query support.
Back to .NET, which – like Delphi – has a well known and respected third party JSON library as well: [Wayback/Archive] NewtonSoft JSON aka JSON.net and that one [Wayback/Archive] does have support for querying JSON with the SelectToken function.
That’s the fundament of the rest of this article, with the potential to be used in a cross-platform as well.
So no need for a plan B.
Read the rest of this entry »
Posted in *nix, *nix-tools, .NET, Batch-Files, Conference Topics, Conferences, Development, Event, JavaScript/ECMAScript, jq, JSON, Power User, Scripting, Software Development, Windows, Windows Development | Leave a Comment »
Posted by jpluimers on 2023/08/17
A while ago I wrote about Figuring out the open network connections for processes ran by python, which explained the TL;DR:
pidof python | tr " " "\n" | xargs -r -n 1 lsof -i -a -e /run/user/1001/gvfs -p
Now I needed thread information as well, so below two examples using ps and pstree. I won’t explain the pidof and xargs stuff here as that was already covered in the above blog-post and I found out that ps already has a built-in way to filter on process name.
The ps solution uses the H, -L or -T argument to show the threads:
Read the rest of this entry »
Posted in *nix, *nix-tools, bash, Development, lsof, Power User, ps, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2023/07/26
TL;DR is at the bottom (;
5 days ago this exploit development got published: [Wayback/Archive] snowcra5h/CVE-2023-38408: CVE-2023-38408 Remote Code Execution in OpenSSH’s forwarded ssh-agent.
It is about [Wayback/Archive] NVD – CVE-2023-38408 which there at NIST isn’t rated (yet?), neither at [Wayback/Archive] CVE-2023-38408 : The PKCS#11 feature in ssh-agent in OpenSSH before 9.3p2 has an insufficiently trustworthy search path, leading to remot.
However at [Wayback/Archive] CVE-2023-38408- Red Hat Customer Portal it scores 7.3 and [Wayback/Archive] CVE-2023-38408 | SUSE it did get a rating of 7.5, so since I mainly use OpenSuSE I wondered what to do as the CVE is formulated densely at [Wayback/Archive] www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt: it mentions Alice, but no Bob or Mallory (see Alice and Bob – Wikipedia).
Luckily, others readly already did the fine reading and emphasised the important bits, especially at [Wayback/Archive] RCE Vulnerability in OpenSSH’s SSH-Agent Forwarding: CVE-2023-38408 (note that instead of Alex, they actually mean Alice)
“A system administrator (Alice) runs SSH-agent on her local workstation, connects to a remote server with ssh, and enables SSH-agent forwarding with the -A or ForwardAgent option, thus making her SSH-agent (which is running on her local workstation) reachable from the remote server.”
According to researchers from Qualys, a remote attacker who has control of the host, which Alex has connected to, can load (dlopen()) and immediately unload (dlclose()) any shared library in /usr/lib* on Alice’s workstation (via her forwarded SSH-agent if it is compiled with ENABLE_PKCS11, which is the default).
The vulnerability lies in how SSH-agent handles forwarded shared libraries. When SSH-agent is compiled with ENABLE_PKCS11 (the default configuration), it forwards shared libraries from the user’s local workstation to the remote server. These libraries are loaded (dlopen()) and immediately unloaded (dlclose()) on the user’s workstation. The problem arises because certain shared libraries have side effects when loaded and unloaded, which can be exploited by an attacker who gains access to the remote server where SSH-agent is forwarded to.
Mitigations for the SSH-Agent Forwarding RCE Vulnerability
Read the rest of this entry »
Posted in *nix, *nix-tools, bash, bash, Communications Development, Development, Internet protocol suite, OpenSSH, Power User, PowerShell, Scripting, Security, Software Development, SSH | Leave a Comment »
Posted by jpluimers on 2023/07/11
TL;DR:
pidof python | tr " " "\n" | xargs -r -n 1 lsof -i -a -e /run/user/1001/gvfs -p
Breakdown:
Via:
–jeroen
Posted in *nix, *nix-tools, bash, bash, Development, lsof, Power User, Scripting, Software Development, xargs | Leave a Comment »
Posted by jpluimers on 2023/06/15
For my link archive some ISO links via [Wayback/Archive] openSUSE Leap 15.5 – Get openSUSE as I am steadily working my way back into IT and Software Development so I was anxious to see what has changed on this front. In the past I usually ran OpenSuSE Tumbleweed, but now I am going for OpenSuSE Leap versions that are stable for a longer period of time as per [Wayback/Archive] Lifetime – openSUSE Wiki
Leap Major Release (15.x) extends maintenance and support until a successor. At present, a successor has not been declared; Leap 15’s lifecycle fully aligns with SUSE Linux Enterprise. There is a projection as of March 2021 that Leap 15 will extend to Leap 15.5. The previous major version of Leap, 42, was supported for more than 36 months, while the current major version of Leap, 15, would then have up to 72 months of support (12×6).
Full DVD download for off-line installation:
Read the rest of this entry »
Posted in *nix, LEAP, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »