adding data to scan request + Go ARMv7

This commit is contained in:
2026-03-01 03:23:53 -03:00
parent fcb75cb5a4
commit b4344361e4
4 changed files with 53 additions and 20 deletions

View File

@@ -2,6 +2,7 @@
# Define binary names
LINUX_BIN="ScannerGO-linux"
LINUX_ARM_BIN="ScannerGO-linuxARMv7"
WINDOWS_BIN="ScannerGO-windows.exe"
echo "Starting build process..."
@@ -28,4 +29,14 @@ else
exit 1
fi
# Build for Linux ARM (ARMv7)
echo "Building for Linux ARMv7..."
GOOS=linux GOARCH=arm GOARM=7 go build -o "$LINUX_ARM_BIN" main.go
if [ $? -eq 0 ]; then
echo "Successfully built: $LINUX_ARM_BIN"
else
echo "Failed to build Linux ARMv7 binary"
exit 1
fi
echo "Build complete."

View File

@@ -118,6 +118,7 @@ func sendToEndpoint(baseURL, content string) {
client := &http.Client{
Timeout: 5 * time.Second,
}
fullURL := fmt.Sprintf("%s?content=%s", baseURL, url.QueryEscape(content))
resp, err := client.Get(fullURL)
if err != nil {
@@ -125,5 +126,17 @@ func sendToEndpoint(baseURL, content string) {
return
}
defer resp.Body.Close()
// Read the response body
body, err := io.ReadAll(resp.Body)
if err != nil {
fmt.Printf("Error reading response: %v\n", err)
return
}
fmt.Printf("Data: [%s] | Status: %s\n", content, resp.Status)
if len(body) > 0 {
fmt.Printf("Response: %s\n", string(body))
}
fmt.Println(strings.Repeat("-", 30))
}