Skip to content

Instantly share code, notes, and snippets.

rule webshell_b374k_3-2-3 {
meta:
description = "first ground detect b374k 3.2.3 web shell"
author = "thomasbad"
date = "2022-06-22"
hash1 = "53fe44b4753874f079a936325d1fdc9b1691956a29c3aaf8643cdbd49f5984bf"
strings:
$x1 = "var Zepto=function(){function G(a){return a==null?String(a):z[A.call(a)]||\"object\"}function H(a){return G(a)==\"function\"}fun" ascii
$s2 = "$cmd = execute(\"taskkill /F /PID \".$pid);" fullword ascii
$s3 = "$cmd = trim(execute(\"ps -p \".$pid));" fullword ascii
@thomasbad
thomasbad / clamav-macosx.md
Created July 6, 2022 07:10 — forked from DerFichtl/clamav-macosx.md
clamav on mac osx - install and configure the virus scanner on mac osx
layout title published tags
post
clamav - install and configure on mac osx
true
blog
clamav

Install Clamav

Install clamav via homebrew

@thomasbad
thomasbad / auto_admin.bat
Last active July 11, 2022 10:14
Batch script to ask the batch auto run as admin or output error and ask user to run as admin manually
@echo off
:: Ensure admin privileges
fltmc >nul 2>&1 || (
echo Administrator privileges are required.
PowerShell Start -Verb RunAs '%0' 2> nul || (
echo Right-click on the script and select "Run as administrator".
pause & exit 1
)
exit 0
)
@thomasbad
thomasbad / Auto.ps1
Created August 9, 2022 09:06
Given PowerShell script a title and run as admin automatically
# Ask if the script have run as admin, if not, run as admin
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
$arguments = "& '" +$myinvocation.mycommand.definition + "'"
Start-Process powershell -Verb runAs -ArgumentList $arguments
Break
}
# PowerShell Window Title
$host.UI.RawUI.WindowTitle = "PS Title"
@thomasbad
thomasbad / sample.ps1
Created August 16, 2022 01:38
Sanitize input from user in PowerShell
#Sample 1
$str = '< > : " / \ | ? *'
$strFixed = $str.Replace('<','_').Replace('>','_').Replace(':','_').Replace('"','_').Replace('/','_').Replace('\','_').Replace('|','_').Replace('?','_').Replace('*','_')
$strFixed
#Sample 2
$strFixed2 = $str -replace '[<>:"/\\|?*]','_'
@thomasbad
thomasbad / admin2.ps1
Created August 24, 2022 01:34
Ask if run the script in admin with powershell
$ErrorActionPreference = 'SilentlyContinue'
$Button = [System.Windows.MessageBoxButton]::YesNoCancel
$ErrorIco = [System.Windows.MessageBoxImage]::Error
$Ask = 'Do you want to run this as an Administrator?
Select "Yes" to Run as an Administrator
Select "No" to not run this as an Administrator
Select "Cancel" to stop the script.'
If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]'Administrator')) {
@thomasbad
thomasbad / wifipassword.ps1
Created October 11, 2022 12:57
Retrieve all saved Wi-Fi password from PowerShell in Windows 10/11
(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize
pause
@thomasbad
thomasbad / gpu.ipynb
Created February 7, 2023 07:55
GPU.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thomasbad
thomasbad / colab-textgen-gpu.ipynb
Created February 7, 2023 07:58
Colab-TextGen-GPU.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thomasbad
thomasbad / faceswap-trainer-work.ipynb
Created February 7, 2023 08:52
faceswap-trainer-work.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.