Last active
November 9, 2019 14:42
-
-
Save tvldz/39291c00b5a1bad767e8ae8239b85e44 to your computer and use it in GitHub Desktop.
shmooping: Rapidly observes for changes in the HTTP response body of landing.shmoocon.org
This file contains 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
"bytes") | |
const URL = "http://landing.shmoocon.org/" | |
const msDelay = 200 | |
func main() { | |
buf := make([]byte, 4092) | |
comparison := make([]byte, 4092) | |
temp := make([]byte, 4092) | |
for { | |
resp, _ := http.Get(URL) | |
resp.Body.Read(comparison) | |
if ! (bytes.Equal(buf, comparison)) { | |
fmt.Printf("%s\a\n", time.Now()) | |
temp = buf | |
buf = comparison | |
comparison = temp | |
} | |
time.Sleep(msDelay * time.Millisecond) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment