This file contains 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
import re | |
from scapy.all import * | |
from scapy.layers.dns import DNS, DNSQR | |
from scapy.layers.inet import IP, UDP | |
def query(n, t="TXT"): | |
return sr1( | |
IP(dst="8.8.8.8") / UDP(dport=53) / DNS(rd=1, qd=DNSQR(qname=n, qtype=t)), | |
verbose=False, | |
)[DNS] |
This file contains 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
import kotlinx.coroutines.currentCoroutineContext | |
import kotlin.coroutines.CoroutineContext | |
interface AttributeContainer : CoroutineContext.Element { | |
@InternalApi | |
data class Key(val fqName: String) : CoroutineContext.Key<AttributeContainer> | |
@InternalApi | |
override val key: CoroutineContext.Key<*> get() = Key(fqName) |
This file contains 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
class GradleSubmodule( | |
private val name: String, | |
private vararg val children: GradleSubmodule, | |
) { | |
operator fun unaryPlus() = load("") | |
private fun load(parent: String) { | |
include("$parent:$name") | |
for (child in children) { |
This file contains 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
class GradleSubmodule( | |
private val name: String, | |
private vararg val children: GradleSubmodule, | |
) { | |
operator fun unaryPlus() = load("") | |
private fun load(parent: String) { | |
include("$parent:$name") | |
for (child in children) { |
This file contains 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
/ip firewall address-list | |
add address=173.245.48.0/20 list=Cloudflare | |
add address=103.21.244.0/22 list=Cloudflare | |
add address=103.22.200.0/22 list=Cloudflare | |
add address=103.31.4.0/22 list=Cloudflare | |
add address=141.101.64.0/18 list=Cloudflare | |
add address=108.162.192.0/18 list=Cloudflare | |
add address=190.93.240.0/20 list=Cloudflare | |
add address=188.114.96.0/20 list=Cloudflare | |
add address=197.234.240.0/22 list=Cloudflare |
This file contains 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
#!/bin/bash | |
sudo apt-get update -y | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common -y |
This file contains 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
$hardwareid = ((gwmi Win32_PnPSignedDriver -Filter "Description = 'Microsoft Hyper-V Network Adapter'").HardwareID[0]).ToUpper(); | |
foreach ($drivername in (gwmi Win32_PnPSignedDriver -Filter "Description = 'Microsoft Hyper-V Network Adapter'").DeviceID) { | |
$driverid = $drivername.Replace($hardwareid, "").Replace("\", "").ToLower(); | |
$registryPath = "HKLM:\SYSTEM\ControlSet001\Enum\VMBUS\" + $hardwareid.Replace("VMBUS\", "").ToLower() + "\" + $driverid; | |
Set-ItemProperty -Path $registryPath -Name "FriendlyName" -Value "NIC Name Goes Here" | |
} |
This file contains 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
param( [String]$VMName="", | |
[String]$Address="", | |
[String]$Gateway="", | |
[String]$SubnetMask="", | |
[String]$DNS1="", | |
[String]$DNS2="") | |
$Msvm_VirtualSystemManagementService = Get-WmiObject -Namespace root\virtualization\v2 -Class Msvm_VirtualSystemManagementService | |
$Msvm_ComputerSystem = Get-WmiObject -Namespace root\virtualization\v2 -Class Msvm_ComputerSystem -Filter "ElementName='$VMName'" | |
$Msvm_VirtualSystemSettingData = ($Msvm_ComputerSystem.GetRelated("Msvm_VirtualSystemSettingData", "Msvm_SettingsDefineState", $null, $null, "SettingData", "ManagedElement", $false, $null) | % {$_}) | |
$Msvm_SyntheticEthernetPortSettingData = $Msvm_VirtualSystemSettingData.GetRelated("Msvm_SyntheticEthernetPortSettingData") |
This file contains 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
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } | |
$features = Get-ChildItem $env:systemroot"\servicing\Packages\" -Filter "Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum" | |
$features += Get-ChildItem $env:systemroot"\servicing\Packages\" -Filter "Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum" | |
Foreach($feature in $features) { | |
dism /online /norestart /add-package:$env:systemroot"\servicing\Packages\"$feature | |
} | |
echo "" | |
echo "" | |
echo "" | |
echo "잠시 기다려 주십시오." |