Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lrwxrwxrwx 1 root root 12 Jul 22 21:04 /dev/random -> /dev/urandom
- package main
- import (
- "fmt"
- "os"
- )
- func main() {
- f, err := os.Open("/dev/random")
- if err != nil {
- panic(err)
- }
- chunk := make([]byte, 1024)
- index := 0
- for {
- index = index + 1
- _, err := f.Read(chunk)
- if err != nil {
- panic(err)
- }
- fmt.Println("iteration ", index)
- }
- }
- docker run -it --rm -v /dev/random:/dev/random bla
Add Comment
Please, Sign In to add comment