Documentation ¶
Index ¶
- Constants
- Variables
- func ASUtilInitialise()
- func AppendZeroToVersion(version string) string
- func Base64Decode(str string) (string, error)
- func CalculateSha256(file string) string
- func Check(e error)
- func CheckPathExist(path string) bool
- func CreateOutputJsonFile(path string, filename string) (*os.File, string)
- func FindAS(ip string) (string, string)
- func GeoUtilInitialise()
- func GeoUtilShutdown()
- func MakeVersionCanonical(version string) string
- func TimeTrack(start time.Time, name string)
- func Ungzip(source, target string) error
- func Unzip(src, dest string) error
- func WriteBytesToFile(wg *sync.WaitGroup, writeQueue chan []byte, file *os.File)
- func WriteEntries(complete chan bool, writeQueue chan []byte, file *os.File)
- func WriteStringToFile(wg *sync.WaitGroup, writeQueue chan string, file *os.File)
- func WriteSummaryFileAsJson(result map[string]int, path string, filename string)
- type Asc
- type CleanMetaData
- type GeoData
Constants ¶
View Source
const ANALYSIS_OUTPUT_BASE_PATH = "cleanedResults"
View Source
const AS_FOLDER = "asdb"
View Source
const CONCURRENCY = 10000
View Source
const FILE_ACCESS_PERMISSION = 0755
View Source
const GEODB_FOLDER = "geodb"
View Source
const HTTP_ANALYSIS_OUTPUTH_PATH = "http"
View Source
const HTTP_OUTPUT_FILE_NAME = "http_version"
View Source
const MAXMIND_ASIP_URL = "http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum2.zip"
View Source
const MAXMIND_AS_DB_ENTRY_REGEX = `(AS\d*)(?:\s(.*))?`
View Source
const MAXMIND_AS_DB_FILE_NAME = "GeoIPASNum2.csv"
View Source
const MAXMIND_AS_DB_ZIP_FILE_NAME = "GeoIPASNum2.zip"
View Source
const MAXMIND_GEOIP_URL = "http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz"
View Source
const MAXMIND_GEO_DB_FILE_NAME = "GeoLite2-Country.mmdb"
View Source
const MAXMIND_GEO_DB_ZIP_FILE_NAME = "GeoLite2-Country.mmdb.gz"
View Source
const SCAN_CONCURRENCY = 1000
View Source
const SCAN_OUTPUT_BASE_PATH = "scanResults"
View Source
const SSH_ANALYSIS_OUTPUTH_PATH = "ssh"
View Source
const SSH_OUTPUT_FILE_NAME = "ssh_version"
View Source
const TIMESTAMP_FORMAT = "2006-01-02"
View Source
const TIMESTAMP_FORMAT_SECONDS = "2006-01-02T15:04:05-0700"
Variables ¶
View Source
var HttpBaseOutputDir = filepath.Join(ANALYSIS_OUTPUT_BASE_PATH, HTTP_ANALYSIS_OUTPUTH_PATH)
View Source
var SSHBaseOutputDir = filepath.Join(ANALYSIS_OUTPUT_BASE_PATH, SSH_ANALYSIS_OUTPUTH_PATH)
Functions ¶
func ASUtilInitialise ¶
func ASUtilInitialise()
func AppendZeroToVersion ¶
func Base64Decode ¶
func CalculateSha256 ¶
func CheckPathExist ¶
func CreateOutputJsonFile ¶
func GeoUtilInitialise ¶
func GeoUtilInitialise()
func GeoUtilShutdown ¶
func GeoUtilShutdown()
func MakeVersionCanonical ¶
func WriteBytesToFile ¶
func WriteStringToFile ¶
Types ¶
type CleanMetaData ¶
type CleanMetaData struct { ServerHeaderCleaned uint64 `json:"server_headers_cleaned"` ServerHeaderNotCleaned uint64 `json:"server_headers_not_cleaned"` Total uint64 `json:"total_processed"` InputFile string `json:"input_file"` Started time.Time `json:"time_started"` Finished time.Time `json:"time_finished"` Duration string `json:"duration"` Sha256SumOfInputFile string `json:"sha256_sum_of_input_file"` Sha256SumOfOutputFile string `json:"sha256_sum_of_output_file"` OutputFile string `json:"output_file"` }
Click to show internal directories.
Click to hide internal directories.