This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default { | |
| async fetch(request, env, ctx) { | |
| // Parse the request body as text as it's multiple concatenated JSON documented, ex: | |
| // {"event":{...},"time":"123"}{"event":{...},"time":"456"} | |
| let body = await request.text(); | |
| // Extract some request properties | |
| const requestIP = request.headers.get('CF-Connecting-IP'); | |
| const userAgent = request.headers.get('User-Agent'); | |
| // Convert to valid JSON by wrapping in an array and injecting commas | |
| let bodyJSON = JSON.parse(`[` + body.replace(/}{"/g, `},{"`) + `]`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "id": "7235089324", | |
| "type": "ForkEvent", | |
| "actor": { | |
| "id": 266895321, | |
| "login": "DarkSeek3r", | |
| "display_login": "DarkSeek3r", | |
| "gravatar_id": "", | |
| "url": "https://api.github.com/users/DarkSeek3r", | |
| "avatar_url": "https://avatars.githubusercontent.com/u/266895321?" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "id": "7570712741", | |
| "type": "ReleaseEvent", | |
| "actor": { | |
| "id": 54269356, | |
| "login": "aqua-bot", | |
| "display_login": "aqua-bot", | |
| "gravatar_id": "", | |
| "url": "https://api.github.com/users/aqua-bot", | |
| "avatar_url": "https://avatars.githubusercontent.com/u/54269356?" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| world3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| world2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| world |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # It is faster to cross-compile if the application can be built without CGO | |
| FROM --platform=${BUILDPLATFORM} cgr.dev/chainguard/go:latest as builder | |
| # Building from / or a directory in GOPATH can cause problems | |
| WORKDIR /build | |
| # Fetch the Golang dependencies | |
| RUN --mount=type=cache,target=/go/pkg \ | |
| --mount=type=bind,source=go.sum,target=go.sum \ | |
| --mount=type=bind,source=go.mod,target=go.mod \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| # | |
| # This tool is only used to "decrypt" the github enterprise source code. | |
| # | |
| # Run in the /data directory of the instance. | |
| require "zlib" | |
| KEY = "This obfuscation is intended to discourage GitHub Enterprise customers "+ | |
| "from making modifications to the VM. We know this 'encryption' is easily broken. " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "os" | |
| "fmt" | |
| "strings" | |
| "regexp/syntax" | |
| "unicode/utf8" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "encoding/binary" | |
| "io" | |
| "log" | |
| "net" | |
| "os" | |
| "time" |
NewerOlder