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
| #!/opt/local/bin/php56 | |
| <?php | |
| # Solution to "Bring the noise" challenge of Insomni'hack 2016 teaser. | |
| # | |
| # Time to run: few seconds, almost exclusively for reversing the hash. | |
| # Second part to verify equations is extremely fast. | |
| const REMOTE_HOST = 'bringthenoise.insomnihack.ch'; | |
| const REMOTE_PORT = 1111; |
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
| #!/opt/local/bin/php71 | |
| <?php | |
| // Usage: | |
| // ./itunes_genre_ids_scraper.php > itunes_genre_ids.pl | |
| // Ref: http://www.apple.com/itunes/affiliates/resources/documentation/genre-mapping.html | |
| const GENRES_METADATA_URL = | |
| 'http://itunes.apple.com/WebObjects/MZStoreServices.woa/ws/genres'; |
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
| #!/opt/local/bin/php71 | |
| <?php | |
| // Usage: | |
| // ./itunes_storefront_ids_scraper.php > itunes_storefront_ids.pl | |
| // Maybe we'll need to update those for future iTunes versions. With the user | |
| // agent and store front HTTP headers, we trick the server into thinking that | |
| // our requests come from iTunes. | |
| const ITUNES_USER_AGENT = |