Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
number571 committed Jan 10, 2025
1 parent 3fae83b commit d23d641
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
15 changes: 3 additions & 12 deletions examples/pinger/_request/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ package main

import (
"bytes"
"encoding/base64"
"fmt"
"io"
"net/http"
"time"

hlr_settings "github.com/number571/hidden-lake/internal/applications/remoter/pkg/settings"
)

const (
Expand All @@ -31,19 +28,13 @@ func main() {
}()

receiver := "Bob"
message := fmt.Sprintf("bash%[1]s-c%[1]secho 'hello, world' >> file.txt && cat file.txt", hlr_settings.CExecSeparator)

sendMessage(receiver, []byte(message))
sendMessage(receiver)
}

func sendMessage(pReceiver string, pMessage []byte) {
func sendMessage(pReceiver string) {
httpClient := http.Client{Timeout: time.Hour}

requestData := fmt.Sprintf(
cRequestTemplate,
pReceiver,
base64.StdEncoding.EncodeToString(pMessage),
)
requestData := fmt.Sprintf(cRequestTemplate, pReceiver)
req, err := http.NewRequest(
http.MethodPost,
"http://localhost:7572/api/network/request",
Expand Down
2 changes: 1 addition & 1 deletion test/result/badge_codelines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d23d641

Please sign in to comment.