Posts

Showing posts from June, 2024

From Directory to month number folder and vice versa

  Below is a Python script that will analyze the creation date of images in a specified directory, create a folder for each month (using the month number), and move the images to the corresponding month folder. import os import shutil from datetime import datetime from PIL import Image from PIL.ExifTags import TAGS def get_image_month(image_path):     try:         image = Image.open(image_path)         exif_data = image._getexif()         if exif_data:             for tag, value in exif_data.items():                 if TAGS.get(tag) == 'DateTimeOriginal':                     date_taken = datetime.strptime(value, '%Y:%m:%d %H:%M:%S')                     return date_taken.month     except Exception as e:         print(f"Error getting EXIF data for {image_path}: {e}")     return None def organize_images_by_month(source_folder):     if not os.path.exists(source_folder):         print(f"Source folder '{source_folder}' does not exist.")         ret

CMD - how to open file explorer in that current directory of cmd or powershell

 cmd type start . Powershell type ii .

CSV - Comma Separated Values

Windows echo Name, Age, City > data.csv echo John Doe, 30, New York >> data.csv echo Jane Smith, 25, Los Angeles >> data.csv You can manipulate CSV files using Bash and various command-line tools like `awk`, `sed`, and `echo`. Below is a tutorial on how to create, write, add to, and delete from a CSV file using Bash. ### 1. Creating a CSV File You can create a CSV file using `echo` and redirection. ```bash #!/bin/bash # Create a CSV file with headers echo "Name,Age,Occupation" > data.csv ``` ### 2. Writing to a CSV File You can write to a CSV file by appending lines to it. ```bash #!/bin/bash # Append data to the CSV file echo "John Doe,30,Engineer" >> data.csv echo "Jane Smith,25,Doctor" >> data.csv ``` ### 3. Adding Entries to a CSV File Adding more entries is similar to writing. You continue appending lines. ```bash #!/bin/bash # Add more entries echo "Alice Johnson,28,Artist" >> data.csv echo "Bob Brow

How to Encrypt Files in kali linux.

Encrypting Softwares gpg : Suitable for strong encryption using asymmetric or symmetric keys. Install sudo apt-get install gnupg Encrypt gpg -c filename Decrypt gpg filename.gpg OpenSSL : Offers flexible encryption options with various algorithms. zip/unzip : Simple and widely supported, useful for compressing and encrypting. 7z (7-Zip) : Efficient compression and encryption with a user-friendly interface. ccrypt : Specifically designed for file encryption. Install ccrypt sudo apt-get install ccrypt Encrypt Ccrypt ccrypt filename Decrypt File ccrypt -d filename.cpt Vim : Convenient for encrypting text files directly within the editor. Open a file in Vim with encryption: vim -x filename Decrypt the file: vim filename

How to Download Microsoft Office 2021 for free | Softwares - Ms Word, Excel, PowerPoint on Windows 10

 Step 1: Download Office Deployment Tool https://www.microsoft.com/en-us/download/details.aspx?id=49117 Step:2 Download Configuration File Office Customazation Tool: https://config.office.com/deploymentsettings Options:- 64bit Office Suites Office LTSC Proffessional Plus 2021 - Volume License Then Default Then direct go to Apps and choose apps Language Next Next Next Next Next Finish Export OK - dont change the name from configuration Go to C:/ Drive Create Office 2021 Folder Then copy to officedeploymenttool and configuration file and execute officedeployment tool as an administrator then save all file in Office  2021 folder. Then Open CMD:- cd c:\Offiice 2021 setup.exe /configure configuration.xml and boom office 2021  Installed.

10 Http Server

  1. Python HTTP Server Python comes with a built-in HTTP server module. Python 3: bash Copy code python3 -m http.server 8080 Python 2: bash Copy code python -m SimpleHTTPServer 8080 2. Apache HTTP Server Apache is a widely used web server. Start Apache: bash Copy code sudo service apache2 start 3. Nginx Nginx is another popular web server. Start Nginx: bash Copy code sudo service nginx start 4. PHP Built-in Server PHP has a built-in server for development purposes. Start PHP Server: bash Copy code php -S 0.0.0.0:8080 5. Ruby WEBrick Ruby has a built-in web server called WEBrick. Start WEBrick: bash Copy code ruby -run -e httpd . -p 8080 6. BusyBox HTTP Daemon BusyBox includes a lightweight HTTP server. Start BusyBox HTTP Daemon: bash Copy code busybox httpd -f -p 8080 7. Node.js HTTP Server You can quickly set up a server using Node.js. Install HTTP-Server: bash Copy code npm install -g http-server Start HTTP-Server: bash Copy code http-server -p 8080 8. SimpleHTTPServer in Perl Perl

Copy Files from pc2 to pc1 using scp in ssh

 To transfer files from PC2 to PC1 using SSH, you can use the scp (secure copy) command. Here’s how you can do it: For Files From PC1 (where you are logged in via SSH) Open a Terminal: If you're on Windows, you might be using an SSH client like PuTTY or Windows Terminal. If you're on Linux or macOS, open your terminal application. Use scp Command: The basic syntax of scp is: scp [options] [source] [destination] . In your case, since you are on PC1 and want to copy files from PC2 to PC1, the command will run from PC1. Copy from PC2 to PC1: Replace [username] , [pc2_ip_address] , and [file_path_on_pc2] with the appropriate values. [username]@[pc2_ip_address]:[file_path_on_pc2] specifies the file on PC2. [destination_path_on_pc1] specifies where to save the file on PC1. bash Copy code scp [username]@[pc2_ip_address]:[file_path_on_pc2] [destination_path_on_pc1] Example: bash Copy code scp user@192.168.1.2:/home/user/file.txt /home/localuser/ This command will copy file.txt f

Ncat

ncat - HOW TO SEND MESSAGE TO MY ANDROID PHONE BY KALI LINUX IN SAME NETWORK

 To send a message to your Android phone from Kali Linux within the same network, you can use various methods depending on your specific needs and setup. Here’s a general approach using some common tools and techniques: Method 1: Using Netcat (nc) Netcat is a versatile networking utility that can be used for sending messages between devices in a network. On the Android Phone : Install a netcat-like tool from the Play Store. Termux is a good choice, as it provides a Linux-like environment on Android. On Kali Linux : Open a terminal window. Find the IP Address of Your Android Phone : On your Android device, go to Settings > About Phone > Status and note down the IP address. Alternatively, you can use a network scanning tool like nmap from Kali Linux to scan your network ( nmap -sn <network> ). Send a Message : On Kali Linux, use Netcat to send a message to your Android device: bash echo "Your message here" | nc <android_ip_address> <port_number> Repla

Kali linux changing boot time in direct boot as well as virtually and change boot menu picture #customization

1.Boot Go to dir cd /etc/default/ nano grub - change 5 to 2 (or how much sec you want to boot your machine) then update-grup and you can change your boot menu no. to. /usr/share/grub/themes/kali - change the boot menu picture. 2.Virtually

How to adb use in windows wirelessly

 To start scrcpy wirelessly via Command Prompt (CMD) on Windows, follow these steps: Prerequisites: Android Device: Ensure your Android device is connected to the same Wi-Fi network as your Windows PC. ADB (Android Debug Bridge): Make sure ADB is installed and configured on your PC. Steps to Start scrcpy Wirelessly: Connect Android Device via USB (First Time Setup) Connect your Android device to your PC via USB. Open Command Prompt (CMD) on your PC. Verify ADB Connection Run the following command in CMD to verify your device is recognized adb devices You should see your device listed. If not, troubleshoot your ADB setup. Start ADB over TCP/IP Run the following command to start ADB in TCP/IP mode (default port is 5555): yaml Copy code adb tcpip 5555 Disconnect USB and Get Device IP Address Disconnect your Android device from the USB. Find out the IP address of your Android device. You can usually find this in Settings > About phone > Status or Wi-Fi settings. Start scrcpy W

Speech tools - espeak and festival etc.

 Using speech tools in Kali Linux involves installing and utilizing various software packages designed for speech processing, synthesis, and recognition. Here are the steps to get you started: 1. Install Required Packages Kali Linux is based on Debian, so you can use apt to install the necessary packages. Some popular speech tools include espeak , festival , and pocketsphinx . Install espeak espeak is a compact open-source software speech synthesizer for English and other languages. sudo apt update sudo apt install espeak You can test espeak by running: espeak "Hello, this is a test of the espeak system." Install festival festival is a general-purpose, multi-lingual speech synthesis system. sudo apt install festival You can test festival by running: echo "Hello, this is a test of the festival system." | festival --tts Install pocketsphinx pocketsphinx is a lightweight speech recognition engine from CMU Sphinx. sudo apt install pocketsphinx pocketsphinx-en-us Yo

Windows Firewall Commands CMD #2

 Windows Firewall can be managed using the Command Prompt with the netsh utility. Here is a comprehensive list of commands to configure and manage Windows Firewall: Basic Commands 1. View the status of Windows Firewall: netsh advfirewall show allprofiles 2. Enable Windows Firewall: netsh advfirewall set allprofiles state on 3.Disable Windows Firewall: netsh advfirewall set allprofiles state off Profile-Specific Commands 1. Enable Firewall for a specific profile (domain/private/public): netsh advfirewall set domainprofile state on netsh advfirewall set privateprofile state on netsh advfirewall set publicprofile state on 2.Disable Firewall for a specific profile (domain/private/public): netsh advfirewall set domainprofile state off netsh advfirewall set privateprofile state off netsh advfirewall set publicprofile state off Configuring Inbound and Outbound Rules 1. Add a new inbound rule: netsh advfirewall firewall add rule name="RuleName" dir=in action=allow protocol=TCP local

Openssh windows from start to end

  1. Install OpenSSH Server Using PowerShell: # Install OpenSSH Server Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 Using Command Prompt as Administrator: # Install OpenSSH Server powershell -Command "Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0" 2. Start and Enable OpenSSH Server Using PowerShell: # Start OpenSSH Server Start-Service sshd # Set OpenSSH Server to start automatically Set-Service -Name sshd -StartupType 'Automatic' Using Command Prompt as Administrator: # Start OpenSSH Server net start sshd # Set OpenSSH Server to start automatically sc config sshd start= auto 3. Check the Status of the OpenSSH Server Using PowerShell: # Check status Get-Service -Name sshd Using Command Prompt: # Check status sc query sshd 4. Configure Firewall Rules Using PowerShell: # Add a firewall rule to allow SSH traffic New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Acti

How to enable and disable firewall profiles using cmd #cmd commands

 Windows terminal commands netsh advfirewall set allprofiles state off netsh advfirewall set allprofiles state on

How to Reset a Forgotten Password in Ubuntu WSL

Step:1 Close WSL : wsl --shutdown Step:2 Open PowerShell as Administrator : Step:3 Find your WSL instance name : wsl -l -v Step:4 Launch WSL into root : wsl -d <YourDistroName> -u root Step:5 Reset the password : passwd <YourUsername> Step:6 Exit and restart WSL : wsl --shutdown Step:7 Log in with the new password : #tags "Forgot Your Ubuntu WSL Password? Here's How to Reset It" "Step-by-Step Guide: Resetting a Forgotten Password in Ubuntu WSL" "Recovering Access: How to Reset a Lost Password in Ubuntu WSL" "Quick Fix: Resetting Your Forgotten Ubuntu WSL Password" "Regain Access to Ubuntu WSL: Resetting a Forgotten Password" "How to Easily Reset a Forgotten Password in Ubuntu WSL" "Ubuntu WSL Password Recovery: A Simple Guide" "Locked Out of Ubuntu WSL? Steps to Reset Your Password" "Troubleshooting Ubuntu WSL: Resetting a Forgotten Password" "Unlocking Your Ubuntu WSL: How to

How to change private ip in kali linux

 Clone the repo of ip changer from github

Linux Distro

https://www.howtogeek.com/pc-wont-run-windows-great-linux-operating-systems-to-try/

A linux distribution for OSINT, Forensics and cyber crime investigators

CSI Linux - Almost 10 Gib file...

xclip - clipboard copy paster config etc... xclip , xsel wl-clipboard and pbcopy etc.

 sudo apt update -y  sudo apt upgrade -y sudo apt install -y xclip File to clipboard #xclip -sel/-selection clip < Catlogue.txt #To copy the output of a command to the clipboard: #echo "Hello, World!" | xclip -sel clip Pasting from clipboard xclip -sel clip -o Clipboard history nano clipboard_history.sh #!/bin/bash # File to store clipboard history history_file="$HOME/.clipboard_history.txt" # Ensure history file exists touch "$history_file" # Function to trim history file to 1000 lines trim_history() {     if [ $(wc -l < "$history_file") -gt 1000 ]; then         tail -n 1000 "$history_file" > "$history_file.tmp"         mv "$history_file.tmp" "$history_file"     fi } # Function to add current clipboard contents to history add_to_history() {     timestamp=$(date +"%Y-%m-%d %T")     echo "[$timestamp] $(xclip -o -selection clipboard)" >> "$history_file" } # Functi

edex ui customization for linux , mac and windows

Image
 https://github.com/GitSquared/edex-ui?tab=readme-ov-file windows customization linux customization

To access your Kali machine from outside your local network using SSH, you need to ensure that your network and the machine are configured correctly. Here are the steps:

 sudo apt update sudo apt install openssh-server sudo systemctl enable ssh sudo systemctl start ssh curl ifconfig.me sudo nano /etc/dhcpcd.conf interface eth0 static ip_address=192.168.1.100/24 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 sudo systemctl restart dhcpcd ssh maverick@your_public_ip -p external_port Ex:- ssh maverick@203.0.113.10 -p 2222

sshpass

 If you're looking to create a Bash script that connects to an SSH server and allows you to specify a password, you can use the sshpass utility. Here's how to do it: sudo apt-get install sshpass #!/bin/bash # Assign the password PASSWORD="1" # Assign the username and host USER="maverick" HOST="10.71.77.14" # Use sshpass to connect to the SSH server sshpass -p "$PASSWORD" ssh "$USER@$HOST" chmod +x connect_to_kali.sh ./connect_to_kali.sh #ssh

Python script that gonna view private Instagram account without password.

'' 'Library required pip install instagram-web-clone ' ''  import requests from instagram_web_clone import InstagramWebClone # Replace these with your own values username = "private_account_username" # Initialize the Instagram web clone instagram = InstagramWebClone() # Login to the Instagram account instagram.login(username, password="your_password") # Get the user's ID user_id = instagram.get_user_id(username) # Get the user's posts posts = instagram.get_user_feed(user_id) # Print the posts for post in posts:     print(post['caption'])

Control your pc remotely by using software litemanager

 Control your pc remotely by using software litemanager Remote connection remotepc  screensharing

Bash Script that sends email from bash to someone....

Step:1 Install ssmtp Step:2 configure ssmtp /etc/ssmtp/ssmtp.conf root= testin.mav@gmail.com mailhub= smtp.gmail.com:587 AuthUser= testin.mav@gmail.com AuthPass=HENRY UseTLS=YES UseSTARTTLS=YES AuthMethod=LOGIN FromLineOverride=YES Step:3 Script #!/bin/bash # Email details TO_ADDRESS=" akshaw@aol.com " FROM_ADDRESS=" testin.mav@gmail.com " SUBJECT="Test email from Bash script" BODY="This is a test email sent from a Bash script using ssmtp." # Create the email content EMAIL_CONTENT="To: ${TO_ADDRESS} From: ${FROM_ADDRESS} Subject: ${SUBJECT} ${BODY}" # Send the email echo "${EMAIL_CONTENT}" | ssmtp ${TO_ADDRESS} Step:4 chmod  +x Email_Scripts.sh ./Email_Scripts.sh From here related authentication Storing passwords in plaintext in scripts or configuration files is insecure because it exposes sensitive information to potential unauthorized access. Instead, consider using more secure methods such as environment variables, secure v