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
// cobbler-migrate.go | |
// Migrate Cobbler metadata from a 2.x server to 3.2 using XML-RPC. | |
// Also provides a read-only settings compatibility report. | |
// | |
// Usage (settings-only; safe, no writes): | |
// go run cobbler-migrate.go \ | |
// -src-url http://old.example/cobbler_api -src-user admin -src-pass 'old' \ | |
// -dst-url http://new.example/cobbler_api -dst-user admin -dst-pass 'new' \ | |
// -settings-check -report-format table | |
// |
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
--- | |
- name: Lock down egress using firewalld policy + custom zone | |
hosts: all | |
become: true | |
vars: | |
# Toggle application vs rollback | |
egress_lockdown_enabled: true | |
# Interface(s) to restrict (edit to your NIC names) | |
egress_interfaces: ["ens192"] # e.g., ["eth0", "ens192"] |
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
// go mod init mcast-tester && go get golang.org/x/net/ipv4 && go build -o mcast-tester mcast-tester.go | |
// On machine A: go run mcast-tester.go -mode=recv -group=239.255.100.10 -port=5050 -iface=ens192 -expect=100 -timeout=30s | |
// On machine B: go run mcast-tester.go -mode=send -group=239.255.100.10 -port=5050 -iface=ens224 -ttl=16 -count=100 -interval=100ms -size=512 | |
package main | |
import ( | |
cryptoRand "crypto/rand" | |
"encoding/binary" | |
"flag" | |
"fmt" |
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 ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"os/exec" | |
"sync" |
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 ( | |
"encoding/json" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"os" |
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 ( | |
"bufio" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"math" |
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 ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"github.com/diskfs/go-diskfs/backend/file" |
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 ( | |
"bytes" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net/http" |
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 ( | |
"crypto/rsa" | |
"crypto/tls" | |
"crypto/x509" | |
"encoding/pem" | |
"flag" | |
"fmt" | |
"io" |