30DaysOfGo

command module
v0.0.0-...-01fbd13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2017 License: BSD-3-Clause Imports: 30 Imported by: 0

README

30 Days of Go

A while back, I decided to learn the Go programming language but for me to learn a new language I need a project and a deadline. Early in March of 2017 I had the idea of releasing a new Go script every day of April and I decided to name the project 30 Days of Go.

For the next 30 days, I will be releasing a new Go script to this repo. The first few scripts are designed to teach some basic concepts in Go and the remaining scripts put those concepts into action. Some of the scripts are simple and fun, while others are designed to be the foundation for nice infosec tools.

Please, take these scripts, build on them, and tell me about it. If any of the scripts do not work as expected please open an issue and provide details about the problem you are having. If you want more detailed explanations of what the scripts are doing feel free to DM me on Twitter @averagesecguy or send me an email stephen at averagesecurityguy.info.

  • Day 1 - strings.go
  • Day 2 - flow.go
  • Day 3 - functions.go
  • Day 4 - maps.go
  • Day 5 - struct.go
  • Day 6 - encode.go
  • Day 7 - decode.go
  • Day 8 - hash.go
  • Day 9 - sieve.go
  • Day 10 - isprime.go
  • Day 11 - factor.go (Read this https://thenewstack.io/understanding-golang-packages/ and see if you can make a module to consolidate the code for days 9 - 11.)
  • Day 12 - iterhash.go
  • Day 13 - krypt.go
  • Day 14 - insert_encoder.go (Use the flag package discussed in this script to try to join the encode and decode scripts.)
  • Day 15 - hibp_paste.go
  • Day 16 - gravatar.go
  • Day 17 - nmap_summary.go
  • Day 18 - nessus_plugin.go
  • Day 19 - http_method_check.go
  • Day 20 - routine_channels.go
  • Day 21 - brute_http_basic.go (Use the concepts in this script and the last one to parallelize the nmap and nessus parsers.)
  • Day 22 - mongoscram.go
  • Day 23 - censys.go (You will need API credentials to run this.)
  • Day 24 - cryptopals-1-12.go
  • Day 25 - cryptopals-1-3.go
  • Day 26 - cryptopals-1-4.go
  • Day 27 - cryptopals-1-5.go
  • Day 28 - cryptopals-1-6.go
  • Day 29 - cryptopals-1-7.go
  • Day 30 - cryptopals-1-8.go

Documentation

Overview

Copyright (c) 2017, AverageSecurityGuy # All rights reserved.

View Censys data about an IP address, a domain name or a TLS certificate.

Usage:

$ go run censys.go -d domain $ go run censys.go -i ip $ go run censys.go -c sha256

Copyright (c) 2017, AverageSecurityGuy # All rights reserved.

Insertion shell encoder modeled after the one found here: https://gist.github.com/geyslan/5376542

Usage of ./insert_encoder:

-e string
  	Bytes to signal end of encoding (default "f1f1")
-g string
  	Garbage byte (default "2f")
-p string
  	Insertion pattern x is garbage byte, b is real byte. (default "xb")
-s string
  	Shellcode to be encode. (default "0000")

The following command: go run insert_encoder.go -g 55 -e 3333 -s 0001ff02ffff -p xbb

Results in the following output: [+] Encoded shellcode with decoder: \xeb\x1a\x5e\x8d\x3e\x31\xc9\x8b\x1c\x0e\x41\x66\x81\xfb\x33\x33\x74\x0f\x80 \xfb\x55\x74\xf0\x88\x1f\x47\xeb\xeb\xe8\xe1\xff\xff\xff\x55\x00\x01\x55\xff \x02\x55\xff\xff\x33\x33

Copyright (c) 2017, AverageSecurityGuy # All rights reserved.

Use the Sieve of Eratosthanes to determine if a given number is prime.

Example usage:

$ go run isprime.go number

Let Go know that this file is the starting point for our script. It holds the main function.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL