<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
#!/usr/bin/python | |
from impacket import smb | |
from struct import pack | |
import os | |
import sys | |
import socket | |
''' | |
EternalBlue exploit for Windows 8 and 2012 by sleepya | |
The exploit might FAIL and CRASH a target system (depended on what is overwritten) |
{"lastUpload":"2021-04-09T01:54:44.644Z","extensionVersion":"v3.4.3"} |
... | |
c := colly.NewCollector() | |
c.OnHTML(GoldtradersTableElement, func(e *colly.HTMLElement) { | |
barSell = e.ChildText("tr:nth-child(2) > td:nth-child(2)") | |
barBuy = e.ChildText("tr:nth-child(2) > td:nth-child(3)") | |
ornamentSell = e.ChildText("tr:nth-child(3) > td:nth-child(2)") | |
ornamentBuy = e.ChildText("tr:nth-child(3) > td:nth-child(3)") | |
statusChange = e.ChildAttr("tr:nth-child(4) > td.span > .imgp", "alt") | |
todayChange = strings.Split(e.ChildText("tr:nth-child(4) > td:nth-child(1)"), " ")[1] |
FROM golang:1.14-alpine AS build | |
COPY ./ /app/ | |
WORKDIR /app/ | |
RUN CGO_ENABLED=0 GOOS=linux go build -o /bin/goldnoti | |
FROM alpine:3.12 | |
RUN apk add --no-cache tzdata | |
COPY --from=build /bin/goldnoti / | |
COPY ./config /config | |
ENV ENV=dev |
version: "3" | |
services: | |
goldnoti: | |
container_name: goldnoti | |
image: goldnoti:latest | |
ports: | |
- 10999:10999 |
# Note: we don't have `run` section because Heroku uses the `CMD` specified in the `Dockerfile` instead | |
build: | |
docker: | |
web: Dockerfile | |
config: | |
ENV: dev |
// GetTodayPriceForLINEBot : Get today gold price with webhook | |
func GetTodayPriceForLINEBot(w http.ResponseWriter, r *http.Request) { | |
log.Println("------- API: GetTodayPriceForLINEBot -------") | |
defer r.Body.Close() | |
w.Header().Set(contentTypeKey, contentTypeValue) | |
if !isPOST(r) { | |
ResponseMethodNotAllowed(w) | |
return | |
} |
// HandleLINEEventMessage : Handle LINE Event Message for LINE Bot Client | |
func HandleLINEEventMessage(event *linebot.Event) { | |
switch message := event.Message.(type) { | |
case *linebot.TextMessage: | |
textIncoming := message.Text | |
log.Println("[INFO]: Text Incoming |", textIncoming) | |
uid := event.Source.UserID | |
log.Println("[INFO]: User ID |", uid) | |
profile := repository.Bot.GetProfile(uid) |
var ( | |
// Bot : For LINE Bot Client Configuration | |
Bot *linebot.Client | |
channelSecret string | |
channelToken string | |
) | |
// SetupLINEConfig : Setup Channel Secret and Channel Token for using in LINE Bot | |
func SetupLINEConfig() { | |
channelSecret = os.Getenv("CHANNEL_SECRET") |