How to Detect JID Attacks in Go

package mainimport (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {url := "https://api.cloudmersive.com/security/threat-detection/content/insecure-deserialization/json/detect/string"
method := "POST"
payload := strings.NewReader(`"<string>"`)client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Apikey", "YOUR-API-KEY-HERE")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}

--

--

--

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What Lies Below, Day Fifty Six

Poorly Drawn MS Paint image depicting items from the article

More Data Breaches Exposing Your Personal Identity Information

Know more about RDP

Values Statement

Cloudflare, free speech and the rule of law

Thank you @peckshield team for reporting information to Bomb Crypto.

Purchasing COS Tokens in the US

{UPDATE} Baller: Adventure Balls Hack Free Resources Generator

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Cloudmersive

Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

More from Medium

The Shellshock vulnerability — #20

Getting started with Go — Switch Statements

Generate a UPC-A code barcode as PNG file in Python

How to convert a JSON file to CSV file with Golang