+------------------+ +----------------------+ | Local host | tcpdump over ssh | Remote Host | | |--------------------| |\ eth0 | +--------------+ |--------------------| |/ | | Wireshark | | | tcpdump -i eth0... |
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
func ip2int(ip net.IP) uint32 { | |
if len(ip) == 16 { | |
return binary.BigEndian.Uint32(ip[12:16]) | |
} | |
return binary.BigEndian.Uint32(ip) | |
} | |
func int2ip(nn uint32) net.IP { | |
ip := make(net.IP, 4) | |
binary.BigEndian.PutUint32(ip, nn) |
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
[ | |
{ | |
"Domain Name": "ACUS.GOV", | |
"Domain Type": "Federal Agency - Executive", | |
"Agency": "Administrative Conference of the United States", | |
"Organization": "ADMINISTRATIVE CONFERENCE OF THE UNITED STATES", | |
"City": "Washington", | |
"State": "DC" | |
}, | |
{ |
Edit: This list is now maintained in the rust-anthology repo.
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 ( | |
"bufio" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"strings" | |
) |
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 ( | |
"bufio" | |
"crypto/tls" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"strings" |
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
#!/bin/sh -eu | |
# A script to mirror a website using wget | |
usage() { | |
cat << EOF | |
Usage: $(basename "$0") [-w website] [-u user_agent] [-b] | |
Where: | |
-w The website to mirror. The website will be like "https://example.com/" | |
-u The User agent to use. If no User agent is specified, | |
a Firefox default one is used. |
В Nvim существует несколько плагинов, которые могут помочь вам форматировать код PHP. Вот некоторые из них:
-
php-cs-fixer
: Этот плагин был описан в предыдущем ответе и позволяет автоматически форматировать код согласно стандартам PHP.Для настройки
php-cs-fixer
в nvim, добавьте следующую строку в файл конфигурации:lua
require('php-cs-fixer').setup()
NewerOlder