This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Imports | |
from scapy.all import * | |
from pprint import pprint | |
import operator | |
# Parameters | |
interface = "eth0" # Interface you want to use | |
dns_source = "local-ip" # IP of that interface | |
dns_destination = ["ip1","ip2","ip3"] # List of DNS Server IPs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$uri = "https://httpstat.us/404" # Replace '404' by any status code you want to test | |
try { | |
$r = Invoke-WebRequest -URI $uri -SkipCertificateCheck -MaximumRedirection 0 | |
$a = [int]$r.StatusCode | |
} | |
catch { | |
$a = [int]$_.Exception.Response.StatusCode | |
} | |
write-output $a |