linux

problem about importing a module into python

problem about importing a module into python Question: I am working on packets in my linux iptable , so i need to work over them in python. To get the packets in my iptable into python , i decided to use netfilterqueue.However , i run into error when i want to use it. The error …

Total answers: 1

raise packaging.version.InvalidVersion linux pip

raise packaging.version.InvalidVersion linux pip Question: after updating pip and setuptools==66.0, pip stopped working and responds to all attempts to call it like this: Traceback (most recent call last): File "/usr/bin/pip", line 6, in <module> from pkg_resources import load_entry_point File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 3249, in <module> def _initialize_master_working_set(): File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 3223, in _call_aside f(*args, **kwargs) File …

Total answers: 1

Paramiko does not return segmentation fault error

Paramiko does not return segmentation fault error Question: I am trying to make a simple fuzzer for segmentation faults. from pwn import * import paramiko import base64 #Setting Vars #C Program nameOfFileToExploit = "vuln" hostname = ‘10.0.2.15’ port = 22 username = ‘kali’ password = ‘kali’ command = ‘ls’ context.update(arch=’i386′, os=’linux’) # Connect to the …

Total answers: 1

AES encryptions/decryptions differs between Python and C#?

AES encryptions/decryptions differs between Python and C#? Question: i am using AES encryption/decryption in Python3 using the pip pycryptodome package on Linux (Debian, ubuntu). now i needed to implement the same program for Windows by using C#. but the encryption results differs between the two platforms (slightly). AES encryptions from Python (Linux) cannot decrypted on …

Total answers: 2

How can i install fdb in linux?

How can i install fdb in linux? Question: I want to install fdb in python. I am using Linux. I tried pip3 install fdb it didn’t work. I am new at Linux, how can I install it in Linux? Asked By: sunShine || Source Answers: After sudo apt install python3-pip pip3 install fdb the problem …

Total answers: 1

Getting rid of extra printing in subprocess Python

Getting rid of extra printing in subprocess Python Question: I am trying to print my ip address using subprocess.run() in Linux. So , i wrote the following code: ip=subprocess.run(["ifconfig | grep -w ‘inet’ | awk ‘{print $2}’ | head -n 1"],shell=True,) It gives me my Ip address "192.168.1.103" in terminal , but i wrote it …

Total answers: 1

Pyttsx3 Ubuntu aplay:main:831 Error audio open error

Pyttsx3 Ubuntu aplay:main:831 Error audio open error Question: I’ve been trying forever to get my pyttsx code working. I am working in a Github codespace based on Linux Ubuntu. Since it is not my own I can’t access any of its settings. enter image description here I’ve ran a number of different commands to try …

Total answers: 1

Translate multi-command pipeline bash to python

Translate multi-command pipeline bash to python Question: This is what I have in my bash script: example=$(echo $var | cut -c 40- | sed "/[a-zA-Z0-9]$/!d"). I am trying to translate it to python. In Python, echo $var | cut -c 40- would give print(var[40]). And I know that [a-zA-Z0-9] means any character in the range …

Total answers: 1

How to extract a single word from an os.system command?

How to extract a single word from an os.system command? Question: I’m writing a python program where I do some os.system(cmd). I would need to extract one single word from the terminal output. The output contains a seire of informations. Inside this information, I only need the parameter address, as a simple string. How could …

Total answers: 2