Created
September 16, 2025 19:34
-
-
Save kyawswarthwin/e6b576b70a6ae9535fff7fdf89302b9c to your computer and use it in GitHub Desktop.
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
| export function randomMyanmarIp(): string { | |
| const prefixes: [number, number][] = [ | |
| [203, 81], // MPT | |
| [103, 84], // Mytel | |
| [45, 248], // Telenor | |
| [202, 93], // Ooredoo | |
| ]; | |
| const prefix = prefixes[Math.floor(Math.random() * prefixes.length)]; | |
| const bytes = new Uint8Array(2); | |
| crypto.getRandomValues(bytes); | |
| return `${prefix[0]}.${prefix[1]}.${bytes[0]}.${bytes[1]}`; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment