view · edit · sidebar · attach · print · history

2024

20.3.2024

  • Show last Windows Boot time
 (Get-WmiObject -Class Win32_OperatingSystem).LastBootUpTime

12.3.2024

  • Windows failed Login attempt
 Get-WinEvent -FilterHashTable @{LogName="Security"; ID=4625} | Select-Object TimeCreated, Message | Format-Table -Wrap
 Get-EventLog -LogName Security | Where-Object { $_.EventID -eq 4625 }

8.3.2024

  • Java Path
 PATH="/opt/jdk-14.0.2/bin:$PATH"

22.2.2024

  • List all Java certificates
 keytool -list -keystore "$JAVA_HOME/lib/security/cacerts"

8.2.2024

  • Block by User-Agent
 RewriteEngine On
 RewriteCond %{HTTP_USER_AGENT} (Bytespider|AhrefsBot) [NC]
 RewriteRule .* - [R=403,L]

7.2.2024

  • check access log for spiders
 awk -F\" '{print $6}' other_vhosts_access.log | sort | uniq -c | sort -fr

31.1.2024

  • Make vim paste in Windows
 :edit $MYVIMRC

Then, copy+paste the following into the file:

 source $VIMRUNTIME/mswin.vim

 behave mswin

24.1.2024

  • check Apache version on Debian
 apt policy apache2
  • Simulate Update
 apt install -s apache2

17.1.2024

  • recursively find jpg names
 # Set the folder path
 $folderPath = "C:\Users\zdava\Downloads\ul\ul\Convert"

 # Use Get-ChildItem to find all JPG files recursively
 $jpgFiles = Get-ChildItem -Path $folderPath -Recurse -Filter *.jpg

 # Output the list of JPG files
 foreach ($jpgFile in $jpgFiles) {
    Write-Output $jpgFile.FullName
 }

15.1.2024

  • delete all Mails for a User
 : > /var/mail/$USER

Verzeichnis nach Jahren

view · edit · sidebar · attach · print · history
Page last modified on March 20, 2024, at 10:27 AM