<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Computers on ScienceChronicle</title>
    <link>https://www.ScienceChronicle.org/en/categories/computers/</link>
    <description>Recent content in Computers on ScienceChronicle</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 01 Sep 2024 01:58:40 +0000</lastBuildDate>
    <atom:link href="https://www.ScienceChronicle.org/en/categories/computers/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>A typical Perl project directory structure</title>
      <link>https://www.ScienceChronicle.org/en/article/typical-perl-project-directory-structure/</link>
      <pubDate>Sun, 01 Sep 2024 01:58:40 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/typical-perl-project-directory-structure/</guid>
      <description>&lt;p&gt;A typical Perl project directory structure is designed to separate the main script(s) from modules, configurations, and other resources like tests or documentation. Here’s an example of a standard Perl project directory structure:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;my_perl_project/&#xA;├── bin/&#xA;│   └── main.pl&#xA;├── lib/&#xA;│   ├── MyApp/&#xA;│   │   ├── Module1.pm&#xA;│   │   └── Module2.pm&#xA;├── t/&#xA;│   ├── 01_module1.t&#xA;│   └── 02_module2.t&#xA;├── script/&#xA;│   └── some_utility_script.pl&#xA;├── doc/&#xA;│   └── README.md&#xA;├── Makefile.PL&#xA;└── MANIFEST&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;breakdown-of-the-structure&#34;&gt;Breakdown of the Structure&lt;/h3&gt;&#xA;&lt;h4 id=&#34;1-bin&#34;&gt;1. &lt;strong&gt;&lt;code&gt;bin/&lt;/code&gt; Directory:&lt;/strong&gt;&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; This directory contains the main executable scripts of your application.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt; &lt;code&gt;main.pl&lt;/code&gt; is the main entry point for your application.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Content:&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;main.pl&lt;/code&gt;: The main script that uses the modules from the &lt;code&gt;lib/&lt;/code&gt; directory.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;2-lib&#34;&gt;2. &lt;strong&gt;&lt;code&gt;lib/&lt;/code&gt; Directory:&lt;/strong&gt;&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; This directory is where your Perl modules (libraries) reside.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt; The &lt;code&gt;MyApp/&lt;/code&gt; directory within &lt;code&gt;lib/&lt;/code&gt; contains the modules &lt;code&gt;Module1.pm&lt;/code&gt; and &lt;code&gt;Module2.pm&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Content:&lt;/strong&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;MyApp/Module1.pm&lt;/code&gt;: A Perl module providing specific functionality.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;MyApp/Module2.pm&lt;/code&gt;: Another Perl module.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Typical Module Structure:&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using SQLITE database with Perl on OpenWRT</title>
      <link>https://www.ScienceChronicle.org/en/article/using-sqlite-with-perl-on-openwrt-no-dbd/</link>
      <pubDate>Wed, 21 Aug 2024 03:58:40 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/using-sqlite-with-perl-on-openwrt-no-dbd/</guid>
      <description>&lt;p&gt;This article discusses using an SQLite database with Perl on the OpenWRT &lt;code&gt;openwrt-23.05 branch (git-23.233.52805-dae2684)&lt;/code&gt;. We aim to use an SQLite database with Perl.&lt;/p&gt;&#xA;&lt;p&gt;First, we need to install the &lt;code&gt;DBI&lt;/code&gt; module and then find and install &lt;code&gt;DBD&lt;/code&gt; for SQLite. Let&amp;rsquo;s examine the directory of Perl modules available on OpenWRT: &lt;a href=&#34;https://openwrt.org/packages/index/languages---perl&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Perl Modules on OpenWRT&lt;/a&gt;&#xA;.&lt;/p&gt;&#xA;&lt;p&gt;One can see that the &lt;code&gt;DBI&lt;/code&gt; module is present: &lt;a href=&#34;https://openwrt.org/packages/pkgdata/perl-dbi&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;perl-dbi&lt;/a&gt;&#xA;. After installing it, let&amp;rsquo;s check which &lt;code&gt;DBD&lt;/code&gt; modules are included:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ensuring Safe File Operations in Linux: Handling Simultaneous Reads and Writes</title>
      <link>https://www.ScienceChronicle.org/en/article/ensuring-safe-file-operations-in-linux/</link>
      <pubDate>Sun, 18 Aug 2024 22:58:40 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/ensuring-safe-file-operations-in-linux/</guid>
      <description>&lt;h3 id=&#34;ensuring-safe-file-operations-in-linux-handling-simultaneous-reads-and-writes&#34;&gt;Ensuring Safe File Operations in Linux: Handling Simultaneous Reads and Writes&lt;/h3&gt;&#xA;&lt;p&gt;In Linux, managing file access between multiple processes can be tricky, especially when one script is writing to a file while another is reading from it. Without proper synchronization, you may encounter situations where a reader script accesses a partially written file, leading to incomplete or corrupt data reads. In this blog post, we&amp;rsquo;ll explore how to handle simultaneous file access safely using &lt;code&gt;flock&lt;/code&gt; and atomic operations like &lt;code&gt;mv&lt;/code&gt;. We&amp;rsquo;ll also discuss best practices to ensure that your scripts can read and write files without interference.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Understanding Cronjob Self-Deletion: Behavior and Implications When Restarting Cron Service on OpenWRT</title>
      <link>https://www.ScienceChronicle.org/en/article/openwrt-understanding-cronjob-self-deletion/</link>
      <pubDate>Sun, 18 Aug 2024 01:58:40 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/openwrt-understanding-cronjob-self-deletion/</guid>
      <description>&lt;h3 id=&#34;intro&#34;&gt;Intro&lt;/h3&gt;&#xA;&lt;p&gt;The article addresses the question: Will a cronjob complete its run if it removes itself from the crontab and restarts the cron service? We conducted tests on OpenWRT version 23.05.3 240325 to find out.&lt;/p&gt;&#xA;&lt;h3 id=&#34;test&#34;&gt;Test&lt;/h3&gt;&#xA;&lt;p&gt;To answer this question, we wrote a short Perl script, &lt;code&gt;b.pl&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-perl&#34; data-lang=&#34;perl&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6272a4&#34;&gt;#!/usr/bin/perl&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff79c6&#34;&gt;print&lt;/span&gt; &lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#34;Start\n&amp;#34;&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f1fa8c&#34;&gt;`sed -i /b.pl/d /etc/crontabs/root`&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff79c6&#34;&gt;print&lt;/span&gt; &lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#34;Removed crontab entry\n&amp;#34;&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f1fa8c&#34;&gt;`service cron restart`&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff79c6&#34;&gt;print&lt;/span&gt; &lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#34;Restarted cron service\n&amp;#34;&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8be9fd;font-style:italic&#34;&gt;sleep&lt;/span&gt;(&lt;span style=&#34;color:#bd93f9&#34;&gt;10&lt;/span&gt;);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff79c6&#34;&gt;print&lt;/span&gt; &lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#34;Slept 10 sec and now exiting\n&amp;#34;&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We added the following crontab entry using &lt;code&gt;crontab -e&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>OpenWRT with WireGuard server which is connected through OpenVPN</title>
      <link>https://www.ScienceChronicle.org/en/article/openwrt-wg-server-through-vpn/</link>
      <pubDate>Thu, 18 Jul 2024 01:58:40 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/openwrt-wg-server-through-vpn/</guid>
      <description>&lt;p&gt;We setup a wireguard server on an OpenWRT router. We generate a setup file for the client. The wireguard server itself we connect through a VPN. The VPN itself can be socked through TOR (we don&amp;rsquo;t discuss this in the article).&lt;/p&gt;&#xA;&lt;h2 id=&#34;generate-keys&#34;&gt;Generate keys&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8be9fd;font-style:italic&#34;&gt;umask&lt;/span&gt; &lt;span style=&#34;color:#8be9fd;font-style:italic&#34;&gt;go&lt;/span&gt;&lt;span style=&#34;color:#ff79c6&#34;&gt;=&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wg genkey | tee wgserver.key | wg pubkey &amp;gt; wgserver.pub&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wg genkey | tee wgclient.key | wg pubkey &amp;gt; wgclient.pub&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wg genpsk &amp;gt; wgclient.psk&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;setup-wireguard-server&#34;&gt;Setup wireguard server&lt;/h2&gt;&#xA;&lt;p&gt;Note, wireguard server is actually a kernel module and there is no a special application to be run. The wireguard module exposes interface to &lt;code&gt;ip link&lt;/code&gt; with which one can create a device of type &lt;code&gt;wireguard&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>OpenWRT under hood</title>
      <link>https://www.ScienceChronicle.org/en/article/openwrt-under-the-hood/</link>
      <pubDate>Mon, 08 Jul 2024 01:58:40 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/openwrt-under-the-hood/</guid>
      <description>&lt;h2 id=&#34;wireless-configuration&#34;&gt;Wireless configuration&lt;/h2&gt;&#xA;&lt;p&gt;Behind the scenes, UCI (Unified Configuration Interface) in OpenWRT uses various command-line utilities and services to apply the wireless configurations defined in &lt;code&gt;/etc/config/wireless&lt;/code&gt;. Here are some key components and commands involved in this process:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;netifd&lt;/strong&gt;:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &lt;code&gt;netifd&lt;/code&gt; (network interface daemon) is responsible for managing network interfaces in OpenWRT. It handles the configuration of interfaces based on the UCI configuration files.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;&lt;strong&gt;hostapd&lt;/strong&gt; and &lt;strong&gt;wpa_supplicant&lt;/strong&gt;:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;OpenWRT typically uses &lt;code&gt;hostapd&lt;/code&gt; for managing Access Point (AP) interfaces and &lt;code&gt;wpa_supplicant&lt;/code&gt; for client interfaces. These services are controlled and configured by &lt;code&gt;netifd&lt;/code&gt; based on the UCI settings.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ol start=&#34;3&#34;&gt;&#xA;&lt;li&gt;&lt;strong&gt;iw and ip commands&lt;/strong&gt;:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;netifd&lt;/code&gt; uses &lt;code&gt;iw&lt;/code&gt; to configure wireless devices and interfaces. It also uses &lt;code&gt;ip&lt;/code&gt; to manage network interfaces at a lower level.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;example-workflow&#34;&gt;Example Workflow&lt;/h3&gt;&#xA;&lt;p&gt;When you configure an SSID in &lt;code&gt;/etc/config/wireless&lt;/code&gt; and run &lt;code&gt;wifi reload&lt;/code&gt;, the following steps typically occur:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install NYX on OpenWRT</title>
      <link>https://www.ScienceChronicle.org/en/article/install-nyx-on-openwrt/</link>
      <pubDate>Tue, 04 Jun 2024 02:58:40 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/install-nyx-on-openwrt/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://nyx.torproject.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;NYX&lt;/a&gt;&#xA; is a monitoring utility for TOR. It connects to Tor&amp;rsquo;s control port so to make it work we should define the control port in &lt;code&gt;/etc/tor/torrc&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6272a4&#34;&gt;# File: /etc/tor/torrc&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ControlPort &lt;span style=&#34;color:#bd93f9&#34;&gt;9051&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Install NYX on &lt;a href=&#34;https://openwrt.org/toh/asus/tuf-ax4200&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;OpenWRT&lt;/a&gt;&#xA; version 23.05.3 r23809-234f1a2efa with the following commands:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;opkg update&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;opkg install nyx&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When running, we get into an error:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nyx&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Traceback &lt;span style=&#34;color:#ff79c6&#34;&gt;(&lt;/span&gt;most recent call last&lt;span style=&#34;color:#ff79c6&#34;&gt;)&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  File &lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#34;/usr/bin/nyx&amp;#34;&lt;/span&gt;, line 8, in &amp;lt;module&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    sys.exit&lt;span style=&#34;color:#ff79c6&#34;&gt;(&lt;/span&gt;main&lt;span style=&#34;color:#ff79c6&#34;&gt;())&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             ^^^^^^&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  File &lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#34;/usr/lib/python3.11/site-packages/nyx/__init__.py&amp;#34;&lt;/span&gt;, line 176, in main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  File &lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#34;/usr/lib/python3.11/site-packages/stem/util/conf.py&amp;#34;&lt;/span&gt;, line 288, in wrapped&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;AttributeError: module &lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#39;inspect&amp;#39;&lt;/span&gt; has no attribute &lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#39;getargspec&amp;#39;&lt;/span&gt;. Did you mean: &lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#39;getargs&amp;#39;&lt;/span&gt;?&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To solve that problem, we proceed as follows:&lt;/p&gt;</description>
    </item>
    <item>
      <title>NodeJS / Typescript: module in directory</title>
      <link>https://www.ScienceChronicle.org/en/article/nodejs--typescript-module-in-directory/</link>
      <pubDate>Mon, 27 May 2024 11:52:37 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/nodejs--typescript-module-in-directory/</guid>
      <description>&lt;p&gt;What are the hardest problems in software engineering? The obvious answer is &amp;ldquo;cache invalidation and variable naming.&amp;rdquo; However, on a more serious note, a significant part of software engineering is devoted to the separation of concerns. This is one of the reasons object-oriented programming (OOP) came into existence. In fact, it could be argued that the entire field of software engineering revolves around the separation of concerns—how to effectively factor and modularize software to make it more manageable.&lt;/p&gt;</description>
    </item>
    <item>
      <title>NodeJS nexe resources</title>
      <link>https://www.ScienceChronicle.org/en/article/nodejs-nexe-resources/</link>
      <pubDate>Mon, 27 May 2024 01:58:40 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/nodejs-nexe-resources/</guid>
      <description>&lt;p&gt;For some reason, there is a scare description of how to add and access resources for executables created by nexe-cli. Here we make some clarifications.&lt;/p&gt;&#xA;&lt;h2 id=&#34;whats-nexe-cli&#34;&gt;What&amp;rsquo;s nexe-cli?&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/nexe/nexe&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;nexe-cli&lt;/a&gt;&#xA; is an utility which creates a standalone executable from nodejs code. It compiles nodejs runtime for the target platform and creates a stanalone&#xA;executable which contains the nodejs runtime and program js source code. Note, however, that nexe does not include node_modules folder in the executable so if the source code uses some of npm modules the distributed executable should be distributed along with the modules:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Taking over Zabbix with Hydra</title>
      <link>https://www.ScienceChronicle.org/en/article/taking-over-zabix-with-hydra/</link>
      <pubDate>Wed, 22 May 2024 01:58:40 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/taking-over-zabix-with-hydra/</guid>
      <description>&lt;h2 id=&#34;lab-experiment&#34;&gt;Lab experiment&lt;/h2&gt;&#xA;&lt;p&gt;As usual, we start with an experiment in highly constrolled conditions - in our virtual lab.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s first install hydra:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo apt install hydra -y&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then let&amp;rsquo;s run &lt;a href=&#34;https://hub.docker.com/r/zabbix/zabbix-appliance/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;zabbix appliance&lt;/a&gt;&#xA; to have all zabbix components run in a single command:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run --name some-zabbix-appliance -p 80:80 -p 10051:10051 -d zabbix/zabbix-appliance:tag&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After docker ran, we can see exposed ports:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker ps&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CONTAINER ID   IMAGE                     COMMAND                  CREATED             STATUS             PORTS                                                                                       NAMES&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;3b0230770aa0   zabbix/zabbix-appliance   &lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#34;/sbin/tini -- /usr/…&amp;#34;&lt;/span&gt;   About an hour ago   Up About an hour   0.0.0.0:80-&amp;gt;80/tcp, :::80-&amp;gt;80/tcp, 0.0.0.0:10051-&amp;gt;10051/tcp, :::10051-&amp;gt;10051/tcp, 443/tcp   some-zabbix-appliance&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and we get into the UI by going with browser to &lt;code&gt;http://localhost&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Is CVE-2021-23017 remotely exploitable?</title>
      <link>https://www.ScienceChronicle.org/en/article/cve-2021-23017/</link>
      <pubDate>Mon, 20 May 2024 01:58:40 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/cve-2021-23017/</guid>
      <description>&lt;p&gt;CVE-2021-23017 is a critical vulnerability in the NGINX resolver that can lead to a buffer overflow, allowing for potential remote code execution (RCE). This vulnerability affects NGINX when it is configured to use a resolver with DNS server responses.&lt;/p&gt;&#xA;&lt;h2 id=&#34;conditions-for-cve-2021-23017&#34;&gt;Conditions for CVE-2021-23017&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;NGINX Version&lt;/strong&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The vulnerability affects NGINX versions 0.6.18 through 1.20.0.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;NGINX Configuration&lt;/strong&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;NGINX must be configured to use the &lt;code&gt;resolver&lt;/code&gt; directive. This directive specifies the IP address of the DNS server that NGINX should use to resolve domain names.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;resolver&lt;/code&gt; directive is typically used in configurations for DNS-based service discovery, dynamic upstreams, or when using NGINX with server names that require DNS resolution.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;DNS Response Handling&lt;/strong&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>PoC for CVE-2018-16167</title>
      <link>https://www.ScienceChronicle.org/en/article/cve-2018-16167/</link>
      <pubDate>Mon, 20 May 2024 01:58:40 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/cve-2018-16167/</guid>
      <description>&lt;h2 id=&#34;setup&#34;&gt;Setup&lt;/h2&gt;&#xA;&lt;p&gt;We analyzed &lt;a href=&#34;https://github.com/JPCERTCC/LogonTracer/blob/v1.2.0/docker/Dockerfile&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;https://github.com/JPCERTCC/LogonTracer/blob/v1.2.0/docker/Dockerfile&lt;/a&gt;&#xA; to understand how to properly run the docker. We need Neo4j container&#xA;to be run first, then logontracer container to be linked to. Also, pay attention, without specifying &lt;code&gt;LTHOSTNAME&lt;/code&gt; env var logontracer will not run.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run -d &lt;span style=&#34;color:#f1fa8c&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f1fa8c&#34;&gt;&lt;/span&gt;  --name neo4j &lt;span style=&#34;color:#f1fa8c&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f1fa8c&#34;&gt;&lt;/span&gt;  -p 7474:7474 &lt;span style=&#34;color:#f1fa8c&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f1fa8c&#34;&gt;&lt;/span&gt;  -p 7687:7687 &lt;span style=&#34;color:#f1fa8c&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f1fa8c&#34;&gt;&lt;/span&gt;  -e &lt;span style=&#34;color:#8be9fd;font-style:italic&#34;&gt;NEO4J_AUTH&lt;/span&gt;&lt;span style=&#34;color:#ff79c6&#34;&gt;=&lt;/span&gt;neo4j/password &lt;span style=&#34;color:#f1fa8c&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f1fa8c&#34;&gt;&lt;/span&gt;  neo4j:3.2.3&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run -d &lt;span style=&#34;color:#f1fa8c&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f1fa8c&#34;&gt;&lt;/span&gt;  --name logontracer &lt;span style=&#34;color:#f1fa8c&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f1fa8c&#34;&gt;&lt;/span&gt;  --link neo4j &lt;span style=&#34;color:#f1fa8c&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f1fa8c&#34;&gt;&lt;/span&gt;  -p 8080:8080 &lt;span style=&#34;color:#f1fa8c&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f1fa8c&#34;&gt;&lt;/span&gt;  -e &lt;span style=&#34;color:#8be9fd;font-style:italic&#34;&gt;LTHOSTNAME&lt;/span&gt;&lt;span style=&#34;color:#ff79c6&#34;&gt;=&lt;/span&gt;localhost &lt;span style=&#34;color:#f1fa8c&#34;&gt;\ &lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  jpcertcc/docker-logontracer:v1.2.0&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Check:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to reset Windows password in VirtualBox</title>
      <link>https://www.ScienceChronicle.org/en/article/how-to-reset-windows-password-in-virtual-box/</link>
      <pubDate>Sun, 19 May 2024 02:58:40 +0000</pubDate>
      <guid>https://www.ScienceChronicle.org/en/article/how-to-reset-windows-password-in-virtual-box/</guid>
      <description>&lt;p&gt;If you forgot your password for Windows running inside VirtualBOx, the solution is very simple. Here we desribe the steps to reset the password.&lt;/p&gt;&#xA;&lt;p&gt;We use VirtualBox Version 7.0.8 r156879 (Qt5.12.8) on Linux Mint 20.3 (Una) (Ubunti Codename=focal).&#xA;The Windows running in VirtualBox is &lt;a href=&#34;https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Windows 11&lt;/a&gt;&#xA; with standard user &lt;code&gt;User&lt;/code&gt; for which &lt;code&gt;Passw0rd!&lt;/code&gt; password was expired, then changed to something and this something was forgotten:&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Windows requires password&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;img src=&#34;https://www.ScienceChronicle.org/article/how-to-reset-windows-password-in-virtual-box/forgotten.png&#34; alt=&#34;forgotten_password&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: It seems MS removed passwords for the Vms at the time of writing this post (19 May 2024).&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
