Go library MalShare API

GoDoc Codacy Badge Build Status Go Report Card

MalShare client library

MalShare is a free Malware repository providing researchers access to samples, malicous feeds, and Yara results. Link to Malshare:

Usage example

go get -u github.com/MonaxGT/gomalshare
go test -api APIKEY -url URL

Simple example using library in cmd/gomalshare/main.go

package main

import (
	"flag"
	"fmt"

	"github.com/MonaxGT/gomalshare"
)

func main() {
	apiKeyPtr := flag.String("api", "", "API key MalShare")
	urlPtr := flag.String("url", "", "URL MalShare")
	flag.Parse()
	var err error
	var conf *gomalshare.Client

	// init function
	conf, err = gomalshare.New(*apiKeyPtr, *urlPtr) // Initiate new connection to API
	if err != nil {
		panic(err)
	}

	// example with return list of hashes last 24 hours
	var list24 *[]gomalshare.HashList
	list24, _ = conf.GetListOfHash24()
	fmt.Println(list24)

	// example with return list of types of downloading files last 24 hours
	typeCount, _ := conf.GetListOfTypesFile24()
	fmt.Println(typeCount)

	// example with return current api key limit
	var limitKey *gomalshare.LimitKey
	limitKey, _ = conf.GetLimitKey()
	fmt.Println(limitKey)

	// example with return information of files by using sample
	var search *[]gomalshare.SearchDetails
	search, err = conf.GetSearchResult("emotet")
	if err != nil {
		fmt.Println(err)
	}
	for _, v := range *search {
		fmt.Println(v.Md5)
	}
	// example upload file
	filename := "test.test"
	err = conf.UploadFile(filename)
	if err != nil {
		fmt.Println(err)
	}

	// example for download file by hash request
	file, err := conf.DownloadFileFromHash("95bc3d64f49b03749427fcd6601fa8a7")
	if err != nil {
		fmt.Println(err)
	}
	fmt.Println(string(file))
}
Similar Resources

Abigen by contract address using etherscan api

Abigen for zoomers Just a simple wrapper to fetch abis from etherscan and run abigen on it. Uses the name of a contract if possible. Usage First put y

Mar 24, 2022

e-distribucion (Endesa) API para la lectura remota de contadores inteligentes

e-Distribucion API Go API to read Endesa energy meters info. Ported from Python to Go using https://github.com/trocotronic/edistribucion. You'll need

Dec 4, 2021

Api for getting blockchain block and transaction details in Go.

Getting Blockchain Data Api for getting blockchain block and transaction details Things you need Go: brew install go Install docker Setup go folder in

Dec 14, 2021

A Gomora template for building dApps and web3-powered API and smart contract listeners

Gomora dApp A Gomora template for building dApps and web3-powered API and smart contract listeners Local Development Setup the .env file first cp .env

Feb 15, 2022

REST API to create and interact with decks of playing cards

Cards API REST API to create and interact with decks of playing cards. Tech Stac

Jul 14, 2022

create @auth0 management api tokens

Vault Secrets Plugin - Auth0 Vault secrets plugins to simplying creation, management, and revocation of auth0 management API tokens. Usage Setup Endpo

Jan 2, 2022

XDC.Network Rosetta API Implementation

XDC.Network Rosetta API Implementation

Rosetta XDC.Network ROSETTA XDC.Network IS CONSIDERED ALPHA SOFTWARE. USE AT YOUR OWN RISK! COINBASE ASSUMES NO RESPONSIBILITY OR LIABILITY IF THERE I

Nov 28, 2022

A more elegant Client for huobi API with golang

huobi A more elegant Client for huobi API example package main import ( "context" "log" "os" "github.com/zhenzou/huobi" "github.com/zhenzou/huo

Dec 28, 2021

A tiny Crypto Project with REST API

Goal ⚽ Golang으로 아무 쓸모 없는 블록체인을 한땀 한땀 만들어보면서 BTC나 ETH에 적용된 블록체인 기법 이해해보기! Special Thanks to Nico! Current... 🏗️ Work 🏃 자세한 내용은 issue와 PR을 확인하세요. Now

Dec 30, 2021
This library generate a new tlsconfig usable within go standard library configured with a self-signed certificate generated on the fly

sslcert This library generate a new tlsconfig usable within go standard library configured with a self-signed certificate generated on the fly. Exampl

Dec 17, 2022
This library aims to make it easier to interact with Ethereum through de Go programming language by adding a layer of abstraction through a new client on top of the go-ethereum library.

Simple ethereum client Simple ethereum client aims to make it easier for the developers to interact with Ethereum through a new layer of abstraction t

May 1, 2022
Simple Crypto API for Go

cryptogo Simple cryptography API in Go Hashes: hash.MD5Bytes, hash.MD5Base64, hash.MD5Hex calculates an MD5 chechsum of the input byte array as a byte

Nov 10, 2021
Merchant API reference implementation

mAPI More details available in the BRFC Spec for Merchant API. The old golang (v1.1) implementation is no longer being maintained and has been moved t

Dec 14, 2022
HTTP API for a BitClout node
HTTP API for a BitClout node

BitClout is a blockchain built from the ground up to support a fully-featured social network. Its architecture is similar to Bitcoin, only it supports complex social network data like profiles, posts, follows, creator coin transactions, and more.

Dec 24, 2022
A command line Crypto-currency ticker made using golang and WazirX Api
A command line Crypto-currency ticker made using golang and WazirX Api

░█████╗░██████╗░██╗░░░██╗██████╗░████████╗███████╗██╗░░██╗ ██╔══██╗██╔══██╗╚██╗░██╔╝██╔══██╗╚══██╔══╝██╔════╝╚██╗██╔╝ ██║░░╚═╝██████╔╝░╚████╔╝░██████╔

Feb 6, 2022
Pure Go implementation of the NaCL set of API's

go-nacl This is a pure Go implementation of the API's available in NaCL: https://nacl.cr.yp.to. Compared with the implementation in golang.org/x/crypt

Dec 16, 2022
Ethereum Dapp Go API

Web3 Go Ethereum Dapp Go API, inspired by web3.js. Report Bug · Pull Request Introduction This is the Ethereum Golang API which connects to the Generi

Nov 29, 2022
Example of querying the balance of Crypton and UUSD with Utopia Ecosystem API and utopialib-go

account-balance-go Example of querying the balance of Crypton and UUSD with Utopia Ecosystem API and utopialib-go example of use flags: -host string

Oct 8, 2021
Flashbots utilities in Go: Blocks & Transactions API, and tools to spot bundle and block irregularities

Utilities for Flashbots Go API client for the mev-blocks API for information about Flashbots blocks and transactions Detect bundle errors: (a) out of

Nov 26, 2022