Created
February 27, 2022 07:22
-
-
Save av1d/53c88746267c9fdfeef22bd1b9464095 to your computer and use it in GitHub Desktop.
Protel Box / green box (phreaking)
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 time | |
| import numpy as np | |
| import simpleaudio as sa | |
| # Protel Box by CyberThief | |
| # | |
| # This was the second to last actual phreaking box, | |
| # the last being the Orange Box. | |
| # | |
| # If memory serves, this was some type of default outgoing message on a | |
| # Panasonic answering machine. It was discovered by CyberThief that | |
| # it returned the coin like a traditional green box but only on | |
| # Protel payphones. The original .wav file is probably long gone | |
| # but someone *ahem* decoded the tones and posted them to USENET. | |
| # Also, the original Usenet post on alt.phreaking is gone because | |
| # iirc CyberThief used to use 'x-no-archive: yes' headers. Here's what's | |
| # left of the conversation: | |
| # | |
| # https://groups.google.com/g/alt.phreaking/c/6sS9GMkN72Y/m/INcPL0yr16UJ | |
| # https://groups.google.com/g/alt.phreaking/c/yUB8x9yfMho/m/Ril3I2T6bAEJ?hl=en | |
| # | |
| # I've made this code longer than necessary, instead of putting the | |
| # frequencies into some fancy list or array it's just spelled out for legibility. | |
| # Also, I'm pretty sure only the last tone or two or three mattered. | |
| def generate(f, seconds): | |
| frequency = int(f) | |
| t = np.linspace(0, seconds, seconds * 44100, False) | |
| note = np.sin(frequency * t * 2 * np.pi) | |
| audio = note * (2**15 - 1) / np.max(np.abs(note)) | |
| audio = audio.astype(np.int16) | |
| play_obj = sa.play_buffer(audio, 1, 2, 44100) | |
| play_obj.wait_done() | |
| generate(1181.5, 0.287) | |
| generate(1, 0.127) | |
| generate(884.8, 0.287) | |
| generate(1484, 0.287) | |
| generate(1116.5, 0.414) | |
| generate(884.8, 0.414) | |
| generate(741.5, 0.287) | |
| generate(785, 0.287) | |
| generate(1, 0.127) | |
| generate(884.8, 0.414) | |
| generate(1181.5, 0.287) | |
| generate(1116.5, 0.414) | |
| generate(1181.5, 0.287) | |
| generate(589, 0.287) | |
| generate(660, 0.414) | |
| generate(742, 0.414) | |
| generate(785, 0.287) | |
| generate(993, 0.414) | |
| generate(785, 0.287) | |
| generate(660, 0.287) | |
| generate(742, 0.287) | |
| generate(1, 0.095) | |
| generate(785, 0.414) | |
| generate(884.8, 0.287) | |
| generate(1116.5, 0.414) | |
| generate(884.8, 0.287) | |
| generate(742, 0.414) | |
| generate(785, 0.287) | |
| generate(1, 0.139) | |
| generate(884.8, 0.414) | |
| generate(993, 0.287) | |
| generate(1327, 0.414) | |
| generate(993, 0.287) | |
| generate(785, 0.287) | |
| generate(742, 0.414) | |
| generate(1181.5, 0.568) | |
| generate(1, 0.249) | |
| generate(1407.5, 0.727) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment