Skip to content

Commit

Permalink
Merge branch 'master' into build/go-formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
phillip-stephens authored Jun 7, 2024
2 parents c40d895 + 9dc4b8a commit e0a67ea
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,25 @@ ZGrab is a fast, modular application-layer network scanner designed for completi

ZGrab 2.0 contains a new, modular ZGrab framework, which fully supersedes https://github.com/zmap/zgrab.

## Installation

## Building
### With Docker

You can run ZGrab 2.0 with our official Docker image. For example, to scan a single website using the HTTP module, you can use:

```shell
echo 'example.com' | docker run --rm -i ghcr.io/zmap/zgrab2 http
```

For more complex scanning scenarios, such as using multiple modules or custom configurations, you can create a configuration file and pass it to the container:

```shell
docker run --rm -i -v /path/to/your/config.ini:/config.ini ghcr.io/zmap/zgrab2 multiple -c /config.ini
```

Replace `/path/to/your/config.ini` with the path to your configuration file on the host machine. See [Multiple Module Usage](#multiple-module-usage) for more details on configurations.

### Building from Source

For Go 1.17 and later you must build from source:

Expand Down
4 changes: 2 additions & 2 deletions integration_tests/amqp091/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# Keep cleaning up even if something fails
set +e

# Stop all MySQL containers.
# Stop all AMQP containers.

VERSIONS="3.12.14 3.13.2"

for version in $MYSQL_VERSIONS; do
for version in $VERSIONS; do
CONTAINER_NAME="zgrab_amqp091-$version"
echo "amqp091/cleanup: Stopping $CONTAINER_NAME..."
docker stop $CONTAINER_NAME
Expand Down
16 changes: 8 additions & 8 deletions lib/ssh/messages_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,18 @@ func TestMarshalMultiTag(t *testing.T) {

func TestHaSSH(t *testing.T) {
ki := &KexInitMsg{}
rand := rand.New(rand.NewSource(0))
randomBytes(ki.Cookie[:], rand)
randSource := rand.New(rand.NewSource(0))
randomBytes(ki.Cookie[:], randSource)
ki.KexAlgos = []string{"[email protected]", "diffie-hellman-group-exchange-sha256", "ecdh-sha2-nistp521", "ecdh-sha2-nistp384", "ecdh-sha2-nistp256", "diffie-hellman-group-exchange-sha1", "diffie-hellman-group1-sha1", "diffie-hellman-group14-sha1", "diffie-hellman-group14-sha256", "diffie-hellman-group15-sha512", "diffie-hellman-group16-sha512", "diffie-hellman-group17-sha512", "diffie-hellman-group18-sha512", "[email protected]", "diffie-hellman-group15-sha256", "[email protected]", "[email protected]", "diffie-hellman-group16-sha256", "[email protected]", "[email protected]", "[email protected]"}
ki.ServerHostKeyAlgos = randomNameList(rand)
ki.CiphersClientServer = randomNameList(rand)
ki.ServerHostKeyAlgos = randomNameList(randSource)
ki.CiphersClientServer = randomNameList(randSource)
ki.CiphersServerClient = []string{"aes128-cbc", "aes128-ctr", "aes192-cbc", "aes192-ctr", "aes256-cbc", "aes256-ctr", "blowfish-cbc", "blowfish-ctr", "cast128-cbc", "cast128-ctr", "idea-cbc", "idea-ctr", "serpent128-cbc", "serpent128-ctr", "serpent192-cbc", "serpent192-ctr", "serpent256-cbc", "serpent256-ctr", "3des-cbc", "3des-ctr", "twofish128-cbc", "twofish128-ctr", "twofish192-cbc", "twofish192-ctr", "twofish256-cbc", "twofish256-ctr", "twofish-cbc", "arcfour", "arcfour128", "arcfour256"}
ki.MACsClientServer = randomNameList(rand)
ki.MACsClientServer = randomNameList(randSource)
ki.MACsServerClient = []string{"hmac-sha1", "hmac-sha1-96", "hmac-md5", "hmac-md5-96", "hmac-sha2-256", "hmac-sha2-512"}
ki.CompressionClientServer = randomNameList(rand)
ki.CompressionClientServer = randomNameList(randSource)
ki.CompressionServerClient = []string{"[email protected]", "zlib", "none"}
ki.LanguagesClientServer = randomNameList(rand)
ki.LanguagesServerClient = randomNameList(rand)
ki.LanguagesClientServer = randomNameList(randSource)
ki.LanguagesServerClient = randomNameList(randSource)
ki.FirstKexFollows = true

hassh := ki.GenerateServerHaSSH()
Expand Down

0 comments on commit e0a67ea

Please sign in to comment.