Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"automationAccountName": {
"type": "string",
"metadata": {
"description": "Specify the name of your Automation Account"
}
},
# /etc/salt/cloud.providers.d/azure.conf
azure:
driver: azurearm
master: salt
subscription_id: my_sub_id
client_id: my_client_id
secret: my_client_secret
tenant: my_tenant_id
location: westus
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
},
"variables": {},
"resources": [
{
"type": "Microsoft.Network/networkSecurityGroups",
"name": "app2-nsg-uiq76ih4woyp4",
func httpReq(authToken string, method string, URL string, postData []byte, isJson bool) (*http.Response, error) {
client := &http.Client{
Timeout: 20 * time.Second,
}
req, err := http.NewRequest(method, URL, bytes.NewBuffer(postData))
if err != nil {
log.Println("Error with building request for "+URL+": ", err)
return &http.Response{}, err
}
if authToken != "" {
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
package main
import (
"bufio"
"flag"
"fmt"
"io/ioutil"
"net/http"
"os"
"time"
At this point, it is probably easier to just use something like this: https://github.com/reznok/Spring4Shell-POC
- clone https://spring.io/guides/gs/handling-form-submission/
- you can skip right to gs-handling-form-submission/complete, no need to follow the tutorial
- modify it so that you can build a war file (https://www.baeldung.com/spring-boot-war-tomcat-deploy)
- install tomcat9 + java 11 (i did it on ubuntu 20.04)
- deploy the war file
- update the PoC (https://share.vx-underground.org/) to write the tomcatwar.jsp file to webapps/handling-form-submission instead of webapps/ROOT