Author Archives: Ahmed Tawfik

Unknown's avatar

About Ahmed Tawfik

Cybersecurity Professional, Systems Engineer, OSS & Linux Geek

Simple Python Script to Communicate with ChatGPT API

I wrote a simple python script that allows you to communicate with the ChatGPT API, the workflow is as straight-forward as this: You read the prompt from a file Send the prompt to the model of your choice Receive the … Continue reading →

Posted in python | Tagged , , , | Leave a comment

List all files and first level directories arranged by size on Linux

du -sh * | sort -hr Where: du -sh: Shows the sizes of files and directories in a human-readable format sort -hr: Sorts the output by size in human format, with the largest items at the top. Sample: That’s it, … Continue reading →

Posted in Linux | Tagged , | Leave a comment

Mount shared folder inside Kali Linux VM on VMware Workstation

Create a share from your Virtual Machine Settings, let’s call it shared_vm To make it permanent, add it to /etc/fstab as follows: Tested on the following environment: Host: Windows 11 Pro x86-64 Host Guest: Kali 2024.3 x86-64 Hypervisor: VMware Workstation … Continue reading →

Posted in Linux | Tagged , , , | Leave a comment

Script to grab sizes of GCP buckets

Prerequisites: Google Cloud SDK Installed & Configured For a simple script that just does the job and gets the sizes of all your buckets: For a more comprehensive script that picks a specific set of buckets and saves the output … Continue reading →

Posted in Linux | Tagged , , | Leave a comment

How to enable Python to craft packets and listen to ports less than 1024 without sudo

To be able to craft packets with Scapy, you have to either use sudo or allow setcap for your python environment. I don’t prefer to use sudo when working with my Anaconda environments, so I did the following: sudo setcap … Continue reading →

Posted in Linux | Tagged , , | Leave a comment