Sometimes you just need a little microservice to check that a port is up before you try and send some data to it. This does just that… https://github.com/krypted/NestMonitor/blob/main/socket%20check.py
-
-
Small Go Script To Send Some JSON To An Endpoint
The following was written to act as a Google Cloud Function or Lambda, and sends a simple POST to a standard rest endpoint at https://krypted.com/api/v1/sites with the json defined in jsonObject. The endpoint can easily be changed in http.NewRequest or converted to a variable. The response to the POST is then returned as stdout. package main import ( "fmt" "net/http" "encoding/json" ) func main() { // Create a new HTTP client. client := &http.Client{} // Create a new JSON object. jsonObject := map[string]string{ "name": "Krypted", "site": "www.krypted.com", } // Marshal the JSON object to a string. jsonString, err := json.Marshal(jsonObject) if err != nil { fmt.Println(err) return } // Create…
-
Lambda to Sign Configuration Profiles
Recently needed the ability to sign .mobileconfig files and didn’t want to rely on a private key being on a client device. This java project is meant to sign .mobileconfig files for distribution to iOS, tvOS, iPadOS and macOS devices. Built to be hosted in a Lambda so you don’t need to have keys in a client-side app (wouldn’t be too challenging to move to a Google Cloud Function). Download it at https://github.com/krypted/mobileconfigsigner Lambda Input parameters, if you call if from a web or swift app: bucketName – this is the name of the S3 bucket that will hold the pem files + file to sign signerFile (e.g. ca.key in…