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
| import pandas as pd | |
| # 读取Excel文件 | |
| df = pd.read_excel('ok.xlsx') | |
| # 打印数据框的基本信息 | |
| print(df.info()) | |
| print("\n前几行数据:") | |
| print(df.head()) |
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
| ; https://nmap.org/book/inst-windows.html | |
| REGEDIT4 | |
| [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters] | |
| "MaxUserPort"=dword:0000fffe | |
| "TcpTimedWaitDelay"=dword:0000001e | |
| "StrictTimeWaitSeqCheck"=dword:00000001 |
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
| // https://github.com/tailscale/tailscale/blob/e7b5e8c8cd9f88bb39442e099a237a2fcd75b180/net/netmon/state.go#L56 | |
| package main | |
| import ( | |
| "fmt" | |
| "net" | |
| "runtime" | |
| "strings" | |
| ) |
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
| netsh int ipv4 set dynamicport tcp start=49152 num=16384 | |
| netsh int ipv4 set dynamicport udp start=49152 num=16384 | |
| netsh int ipv6 set dynamicport tcp start=49152 num=16384 | |
| netsh int ipv6 set dynamicport udp start=49152 num=16384 |
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
| Get-CimInstance -ClassName 'Win32_NetworkAdapterConfiguration' | Where-Object -Property 'TcpipNetbiosOptions' -ne $null | Select-Object -Property @('ServiceName', 'Description', 'TcpipNetbiosOptions'); | |
| Get-CimInstance -ClassName 'Win32_NetworkAdapterConfiguration' | Where-Object -Property 'TcpipNetbiosOptions' -ne $null | Invoke-CimMethod -MethodName 'SetTcpipNetbios' -Arguments @{ 'TcpipNetbiosOptions' = [UInt32](2) } -Confirm; |
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
| #include <iostream> | |
| int main() { | |
| int* ptr = new int; | |
| *ptr = 10; | |
| delete ptr; | |
| std::cout << *ptr << std::endl; // UAF | |
| return 0; | |
| } |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters] | |
| "DisableInterfaceMetricConflicts"=dword:00000001 |
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
| # Self-elevate the script if required | |
| if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { | |
| if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) { | |
| $CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments | |
| Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine | |
| Exit | |
| } | |
| } | |
| Set-NetIPInterface -Forwarding Disabled | |
| netsh int ipv4 set interface "Z1" forwarding=enabled |
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
| Enable-NetAdapter -InterfaceDescription "Realtek PCIe GbE Family Controller" | |
| Enable-NetAdapter -Name "WLAN" | |
| Enable-NetAdapter -Name "VMware Network Adapter VMnet1" | |
| Enable-NetAdapter -Name "VMware Network Adapter VMnet8" |
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
| class Person: | |
| def __init__(self, **kwargs): | |
| for key, value in kwargs.items(): | |
| setattr(self, key, value) | |
| person = Person(name="Alice", age=30, job="Engineer") | |
| print(f"Name: {person.name}, Age: {person.age}, Job: {person.job}") |
NewerOlder