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
| ''' | |
| Acknowledgement: https://github.com/iss4cf0ng/ | |
| ''' | |
| import collections | |
| def decoder(packet): | |
| # Frequency Analysis | |
| payload = packet[8:] | |
| chunks = [] | |
| for i in range(0, len(payload) - 3, 4): |
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
| packate main | |
| import "fmt" | |
| func main() { | |
| x := []int{1, 2, 3, 4} | |
| d := [4]int{5, 6, 7, 8} | |
| y := make([]int, 2) | |
| copy(y, d[:]) | |
| fmt.Println(y) |
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
| package main | |
| import "fmt" | |
| func main() { | |
| x := []int{1, 2, 3, 4} | |
| y := x[:2] | |
| fmt.Println(cap(x), cap(y)) | |
| y = append(y, 30) |