Skip to content

Instantly share code, notes, and snippets.

@githubfoam
githubfoam / Investigation Path - a spoofing attack or its sender has a wrong SPF configuration
Last active July 13, 2023 11:10
Investigation Path - a spoofing attack or its sender has a wrong SPF configuration
==========================================================================================================
SPF Record Lookup
DMARC Lookup
https://mxtoolbox.com
https://www.dnsinspect.com
==========================================================================================================
#testing verification
PHPMailer
https://emkei.cz/
@githubfoam
githubfoam / Investigation Path - DNS Amplification Attack
Last active July 7, 2023 06:09
Investigation Path - DNS Amplification Attack
==========================================================================================================
#Allow Recursive Queries ?
https://www.dnsinspect.com
==========================================================================================================
#ChatGPT
Here's an example of how you can perform manual tests using nslookup from a client machine to verify that the DNS server denies recursive queries after disabling recursion and forwarders:
Disable recursion and forwarders on the Windows Server 2016 Datacenter DNS server as mentioned previously.
@githubfoam
githubfoam / vagrant.pkr.hcl
Last active March 12, 2023 11:15
vagrant.pkr.hcl
variable "version" {
type = string
default = ""
}
locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }
source "vagrant" "autogenerated_1" {
add_force = true
communicator = "ssh"
@githubfoam
githubfoam / fortianalyzer cheat sheet
Last active November 21, 2025 20:00
fortianalyzer cheat sheet
#=====================================================================#=====================================================================
get sys status
Get general information: firmware version, serial number, ADOMs enabled or not, time and time zone, general license status (Valid or not).
get sys performance
Detailed performance statistics: CPU load, memory usage, hard disk/flash disk used space and input/output (iostat) statistics.
@githubfoam
githubfoam / wordpress scan cheat sheet
Last active December 21, 2023 13:11
wordpress scan cheat sheet
#=====================================================================
#!/bin/bash
#wpscan.sh scan wordpress websites in subdomains/URLs
while read url; do
echo "Scanning URL: $url"
if curl --output /dev/null --silent --head --fail "$url"; then
wpscan_output=$(wpscan --url "$url" | grep "WordPress version")
if [ -z "$wpscan_output" ]; then
echo "This $url does not run WordPress"
@githubfoam
githubfoam / dell switch N1548P cheat sheet
Last active September 11, 2025 07:43
dell switch N1548P cheat sheet
#=====================================================================
show version
show os-version
show system
#=====================================================================
#ChatGPT
The output of the show version command on the Dell Networking Switch N1548P provides information about the machine description, system model, serial number, hardware version, and software versions. Here's an explanation of each field in the given output:
Machine Description: Indicates that it is a Dell Networking Switch.
@githubfoam
githubfoam / fortigate cheat sheet
Last active February 4, 2026 03:18
fortigate cheat sheet
#=====================================================================
#CIS benchmark
https://www.cisecurity.org/benchmark/fortinet
#=====================================================================
Packet flow ingress and egress: FortiGates without network processor offloading
https://docs.fortinet.com/document/fortigate/6.4.0/parallel-path-processing-life-of-a-packet/86811/packet-flow-ingress-and-egress-fortigates-without-network-processor-offloading
#=====================================================================
CLI
the control key sequences shown in the following table:
@githubfoam
githubfoam / huawei switch cheat sheet
Last active October 16, 2026 16:56
huawei switch cheat sheet
------------------------------------------------------------------------------------------------------------------------------
>display snmp-agent ?
community Display the SNMPv1 or SNMPv2c community name
extend SNMP extend configuration
group Display the information of groups based on USM
heartbeat Heartbeat
inform Display config parameters of the inform alarm
local-engineid Display the engine ID of local SNMP entity
mib-view Display the SNMP MIB view
notification-log Notification log
@githubfoam
githubfoam / python windows experience
Last active August 27, 2025 06:04
python windows experience
============================================================================
>where python (cmd)
============================================================================
#add interpreter
File-Settings-Project:PycharmProjects-Python Interpreter
============================================================================
py --help
modules
python -help
@githubfoam
githubfoam / chocolatey cheat sheet
Last active September 27, 2026 00:52
chocolatey cheat sheet
==========================================================================================================
# powershell (black)
#Install chocolatey windows 11
Set-ExecutionPolicy Bypass -Scope Process -Force
 
[System.Net.ServicePointManager]::SecurityProtocol = `
[System.Net.ServicePointManager]::SecurityProtocol -bor 3072