Skip to content

Instantly share code, notes, and snippets.

@CXXN008
Last active August 26, 2019 03:17
Show Gist options
  • Save CXXN008/e2c513887dd72f9438c4ab99d2798f92 to your computer and use it in GitHub Desktop.
Save CXXN008/e2c513887dd72f9438c4ab99d2798f92 to your computer and use it in GitHub Desktop.
getChannel.ps1
# The game process will write follow val to dnf.cfg when U join or create a raid team. CONFIG_LAST_RAID_CHANNEL_ON_CLIENT_CRASH
# Sample:
# hex
# 32 000000 03 0 00000 5A 0000000 B0 00000 9A 3090
# 32 000000 07 0 00000 5A 0000000 10 00000 94 7090
# 32 000000 10 0 00000 5A 0000000 10 00000 9D 16090
# 32 000000 3E 0 00000 5A 0000000 10 00000 CB 62090
# 32 000000 0E 0 00000 5A 0000000 10 00000 9B 14090
# 32 000000 3A 0 00000 5A 0000000 10 00000 C7 58090
# 32 000000 10 0 00000 51 0000000 10 00000 94 16081
# dec
# 50 000000 03 0 00000 90 0000000 176 00000 154 3090
# 50 000000 07 0 00000 90 0000000 16 00000 148 7090
# 50 000000 16 0 00000 90 0000000 16 00000 157 16090
# 50 000000 62 0 00000 90 0000000 16 00000 203 62090
# 50 000000 14 0 00000 90 0000000 16 00000 155 14090
# 50 000000 58 0 00000 90 0000000 16 00000 199 58090
# 50 000000 16 0 00000 81 0000000 16 00000 148 16081
# bypass
# if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
# { Write-Output 'Running as Administrator!' }
# else
# { Write-Output 'Running Limited!' }
# parse val
$result = "Last channels :`n"
foreach ($i in (Select-String -Path $env:userprofile\appdata\locallow\dnf\DNF.cfg -pattern CONFIG_LAST_RAID_CHANNEL_ON_CLIENT_CRASH)) {
$hs = 0, 8, 16, 25, 32 | ForEach-Object -p { [int] ('0x' + ($i -split '=')[1].substring($_, 2)) }
$ds = $hs | ForEach-Object -p { '{0:d}' -f $_ }
$result += ("频道: {0}0{1} - with 迷の数值 : {2} , {3} , {4} `n" -f $ds[1], $ds[2], $ds[0], $ds[3], $ds[4] )
}
(New-Object -ComObject Wscript.Shell).Popup($result, 0, "Show me the fucking channel !", 0x40)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment