Benign go Download

github.com/danp/nspoweroutages v0.0.0-20260719210459-150497b77dc4

Basename is uppercase README.mdReference guide has multiple section headings
SHA-256d4ad55db8b01bd33d1ec38c083f24b77d4ae2038845e024b9a73b5ea952ed561
MaleculeH₂(Cm₃F)

Evidence

curl command names a remote HTTP(S) URL scrape.sh · lines 1–16
⋯6 lines
7go run ./cmd/scrape-outages | jq -S 'sort_by(.id)' > data/outages.json
8
9dir="$(curl --silent --fail https://outagemap.nspower.ca/resources/data/external/interval_generation_data/metadata.json | jq -r .directory)"
10durl="https://outagemap.nspower.ca/resources/data/external/interval_generation_data/$dir"
11
12f="report_servicearea"
13curl --silent --fail --retry 3 --max-time 15 -o - "$durl/$f.json" | jq -S . > "data/$f.json"
14
15# not super useful
16# go run ./cmd/scrape-load | jq -S . > data/load.json
imports encoding/json main.go · lines 1–25
1package main
2
3import (
4 "bytes"
5 "encoding/json"
6 "fmt"
7 "io"
8 "log"
9 "net/http"
10 "os"
11 "sort"
12 "strconv"
13 "strings"
14 "time"
15
16 "github.com/PuerkitoBio/goquery"
17)
18
⋯7 lines
Go http.Get call main.go · lines 42–58
42:11… pdate{}, fmt.Errorf("load location: %w", err)
43 }
44
45 resp, err := http.Get("https://resourcesprd-nspower.aws.silvertech.net/oasis/current_report.shtml")
46 if err != nil {
47 return update{}, fmt.Errorf("get: %w", err)
48 }
49 defer resp.Body.Close()
50
51 b, err := io.ReadAll(resp.Body)
52 if err != nil {
53 return update{}, fmt.Errorf("get: %w", err)
⋯5 lines
Source uses an explicit zero-fill format token main.go · lines 86–93
86:38… t Updated: ")
87 t, err := time.ParseInLocation("02-Jan-06 15:04:05", ts, loc)
88 if err != nil {
89 findErr = fmt.Errorf("bad time %q: %w", ts, err)
⋯4 lines
Go JSON unmarshal call main.go · lines 96–106
96:11… ) == 0 {
97 return of, nil
98 }
99
100 var rof rawOutageFile
101 if err := json.Unmarshal(fd, &rof); err != nil {
102 return of, err
103 }
104
105 of.FileData = make([]outageFileData, 0, len(rof.FileData))
106 for _, rfd := range r …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.