Last active
March 9, 2020 07:07
-
-
Save ahmadrosid/543268dccb0facaf5df03e213d3247de to your computer and use it in GitHub Desktop.
Bruteforce google map static api to get exceed limit
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
| hit_endpoint(1); | |
| function hit_endpoint(index) { | |
| const https = require('https'); | |
| var options = { | |
| 'method': 'GET', | |
| 'hostname': 'maps.googleapis.com', | |
| 'path': '/maps/api/staticmap?key=AIzaSyCpIsvxgwckHapA49RLMMY4J6PGywEVNcA&size=700x260¢er=29.482335113697%2C-95.502632805762&zoom=12&path=fillcolor%3A0x53b3c7%7Ccolor%3A0xFFcbFF23%7C29.486787995753%2C-95.498544893472%7C29.485864356482%2C-95.49813576139%7C29.484417707098%2C-95.498327444127%7C29.482719808979%2C-95.498796640291%7C29.481565456884%2C-95.50016418606%7C29.480186020647%2C-95.501230943591%7C29.47873184675%2C-95.502898515942%7C29.477547675077%2C-95.505792255051%7C29.477863357552%2C-95.506395942493%7C29.479291420875%2C-95.505882394674%7C29.480868898862%2C-95.505540508232%7C29.481950418416%2C-95.50580087292%7C29.482733063019%2C-95.506232898986%7C29.483569862094%2C-95.507440273871%7C29.484406654258%2C-95.50899097151%7C29.485295723128%2C-95.511448636624%7C29.486110070753%2C-95.512189687969%7C29.486935586265%2C-95.500432406961%7C29.487085929543%2C-95.499359904184%7C29.486787995753%2C-95.498544893472&null=null' | |
| }; | |
| var req = https.request(options, function (res) { | |
| console.log('Index:', index, 'code:', res.statusCode); | |
| if (index < 25100) { | |
| hit_endpoint(index + 1); | |
| } | |
| }); | |
| req.on('error', (e) => { | |
| console.error(e); | |
| if (index < 25000) { | |
| hit_endpoint(index + 1); | |
| } | |
| }); | |
| req.end(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment