file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
WLED/WLED/XmlApiResponseParser.cs
C#
using System; using System.Collections.Generic; using System.Text; using System.Xml.Linq; using Xamarin.Forms; namespace WLED { class XmlApiResponseParser { public static XmlApiResponse ParseApiResponse(string xml) { if (xml == null) return null; XmlApiResponse resp = n...
Aircoookie/WLED-App
364
Mobile app for controlling and discovering WLED lights
C#
Aircoookie
Christian Schwinne
wled-dev
assets/index-BClyw8b9.js
JavaScript
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))i(t);new MutationObserver(t=>{for(const o of t)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="moduleprel...
Aircoookie/WLED-SecureRemoteAccess
2
Research for enabling authenticated WLED API control over an untrusted connection
TypeScript
Aircoookie
Christian Schwinne
wled-dev
assets/index-CTEW24bY.css
CSS
:root{background-color:#222;color:#fff;font-family:Helvetica,Verdana,sans-serif;text-align:center;line-height:150%}button{outline:none;cursor:pointer;padding:8px;margin:10px;width:230px;text-transform:uppercase;font-family:helvetica;font-size:19px;background-color:#333;color:#fff;border:0px solid white;border-radius:25...
Aircoookie/WLED-SecureRemoteAccess
2
Research for enabling authenticated WLED API control over an untrusted connection
TypeScript
Aircoookie
Christian Schwinne
wled-dev
index.html
HTML
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <link rel="icon" type="image/svg+xml" href="/akemi.svg" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>WLED Secure Remote Access</title> <script type="module" crossorigin src="/assets/index-...
Aircoookie/WLED-SecureRemoteAccess
2
Research for enabling authenticated WLED API control over an untrusted connection
TypeScript
Aircoookie
Christian Schwinne
wled-dev
wled-sec/index.html
HTML
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <link rel="icon" type="image/svg+xml" href="/akemi.svg" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>WLED Secure Remote Access</title> </head> <body> <h2>WLED Secure Remote Access</h2> In...
Aircoookie/WLED-SecureRemoteAccess
2
Research for enabling authenticated WLED API control over an untrusted connection
TypeScript
Aircoookie
Christian Schwinne
wled-dev
wled-sec/src/crypto.ts
TypeScript
var derivedKey: CryptoKey; // Connect PBKDF2 to HTML elements export async function hashPassword() { var password = (<HTMLInputElement>document.getElementById('password'))!.value; const passwordBuffer = new TextEncoder().encode(password); const saltBuffer = new TextEncoder().encode('testsalt'); var iterations ...
Aircoookie/WLED-SecureRemoteAccess
2
Research for enabling authenticated WLED API control over an untrusted connection
TypeScript
Aircoookie
Christian Schwinne
wled-dev
wled-sec/src/main.ts
TypeScript
import './style.css' import { hashPassword, signMessage } from './crypto.ts' import { handleMessageEvent } from './messages.ts' let hostInput = document.querySelector<HTMLInputElement>('#hostInput')! async function hashAndConnect() { document.getElementById('connectionInfo')!.textContent = 'Connecting...'; await ...
Aircoookie/WLED-SecureRemoteAccess
2
Research for enabling authenticated WLED API control over an untrusted connection
TypeScript
Aircoookie
Christian Schwinne
wled-dev
wled-sec/src/messages.ts
TypeScript
import { signMessage, nonceCounter, getSessionId, setSessionId } from "./crypto"; export function handleMessageEvent(event : MessageEvent) { console.log(`Received message: ${event.data}`); console.log(`origin: ${event.origin}`); //console.log(`source: ${event.source}`); // TODO: Check if the message is from th...
Aircoookie/WLED-SecureRemoteAccess
2
Research for enabling authenticated WLED API control over an untrusted connection
TypeScript
Aircoookie
Christian Schwinne
wled-dev
wled-sec/src/style.css
CSS
:root { background-color: #222; color: #fff; font-family: Helvetica, Verdana, sans-serif; text-align: center; line-height: 150%; } button { outline: none; cursor: pointer; padding: 8px; margin: 10px; width: 230px; text-transform: uppercase; font-family: helvetica; font-size: 19px; backgroun...
Aircoookie/WLED-SecureRemoteAccess
2
Research for enabling authenticated WLED API control over an untrusted connection
TypeScript
Aircoookie
Christian Schwinne
wled-dev
wled-sec/src/vite-env.d.ts
TypeScript
/// <reference types="vite/client" />
Aircoookie/WLED-SecureRemoteAccess
2
Research for enabling authenticated WLED API control over an untrusted connection
TypeScript
Aircoookie
Christian Schwinne
wled-dev
wled-sec/vite.config.js
JavaScript
import { defineConfig } from "vite"; // https://vitejs.dev/config/ export default defineConfig({ server: { headers: { "X-Content-Type-Options": "nosniff", "Content-Security-Policy": "frame-ancestors 'none'", 'Cross-Origin-Opener-Policy': 'same-origin-allow-popups', 'Cross-Origin-Embedder-...
Aircoookie/WLED-SecureRemoteAccess
2
Research for enabling authenticated WLED API control over an untrusted connection
TypeScript
Aircoookie
Christian Schwinne
wled-dev
wled00/FX2D.cpp
C++
//Matrix effect modes #include "WS2812FX.h" uint16_t w = 64, h = 32; //matrix width and height void WS2812FX::map1Dto2D(uint16_t i, uint8_t r, uint8_t g, uint8_t b) { if (_realtimeMode) { mode2D_spectrum(i,r,g,b); } else { switch (_1Dto2Dmapping) { case P_MODE_FRAME: mode2D_frame(i,r,g,b);...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/NpbWrapper.cpp
C++
//interface WLED with chinese 64x32 multiplex matrix - PRE ALPHA DEMO #include <Ticker.h> //ESP8266 ONLY #include "NpbWrapper.h" #include <PxMatrix.h> #include <NeoPixelBus.h> // The library for controlling the LED Matrix // Needs to be manually downloaded and installed // https://github.com/2dom/PxMatrix // Pins fo...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/NpbWrapper.h
C/C++ Header
//interface WLED with chinese 64x32 multiplex matrix - PRE ALPHA DEMO #ifndef NpbWrapper_h #define NpbWrapper_h //save memory #define PxMATRIX_MAX_HEIGHT 32 #define PxMATRIX_MAX_WIDTH 64 #include <Ticker.h> //ESP8266 ONLY #include <PxMatrix.h> #include <NeoPixelBus.h> // The library for controlling the LED Matrix // ...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/WS2812FX.cpp
C++
/* WS2812FX.cpp - Library for WS2812 LED effects. Harm Aldick - 2016 www.aldick.org FEATURES * A lot of blinken modes and counting * WS2812FX can be used as drop-in replacement for Adafruit NeoPixel Library NOTES * Uses the Adafruit NeoPixel library. Get it here: https://github.com/adafruit/...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/WS2812FX.h
C/C++ Header
//pixelmethod now in NpbWrapper.h /* WS2812FX.h - Library for WS2812 LED effects. Harm Aldick - 2016 www.aldick.org FEATURES * A lot of blinken modes and counting * WS2812FX can be used as drop-in replacement for Adafruit NeoPixel Library NOTES * Uses the Adafruit NeoPixel library. Get it here: ...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/data/edit.htm
HTML
<!DOCTYPE html><html lang="en"><head><title>ESP Editor</title><style type="text/css" media="screen">.cm{z-index:300;position:absolute;left:5px;border:1px solid #444;background-color:#F5F5F5;display:none;box-shadow:0 0 10px rgba(0,0,0,.4);font-size:12px;font-family:sans-serif;font-weight:700}.cm ul{list-style:none;top:0...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/data/index.htm
HTML
<!DOCTYPE html> <html> <head><meta charset="utf-8"><meta name="theme-color" content="#fff"> <link rel='shortcut icon' type='image/x-icon' href='/favicon.ico'/> <title>WLED 0.8.1</title> <script> var d=document; var w=window.getComputedStyle(d.querySelector("html")); resp=""; var nla=false; var nra=false; ...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/data/index_mobile.htm
HTML
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta content='width=device-width' name='viewport'> <link href="images/safari-pinned-tab.svg" rel="mask-icon"> <meta name="theme-color" content="#333333"> <meta content="yes" name="apple-mobile-web-app-capable"> <link rel="shortcut icon" href="data:image/...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/data/msg.htm
HTML
<!DOCTYPE html> <html><head> <title>WLED Message</title> <script> function B() { window.history.back(); } function RS() { window.location = "/settings"; } function RP() { top.location.href="/"; } </script> <style> :root { --aCol: #D9B310; --bCol: #0B3C5D; --cCol: #1D2731; --dCol: #328CC1; ...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/data/settings.htm
HTML
<!DOCTYPE html> <html> <head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>WLED Settings</title> <style> :root { --aCol: #D9B310; --bCol: #0B3C5D; --cCol: #1D2731; --dCol: #328CC1; --sCol: #000; --tCol: #328CC1; --cFn: Verdana; } body { text-align: cen...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/data/welcome.htm
HTML
<!DOCTYPE html> <html> <head> <title>WLED Setup</title> <style> :root { --aCol: #D9B310; --bCol: #0B3C5D; --cCol: #1D2731; --dCol: #328CC1; --sCol: #000; } body { font-family: Verdana, Helvetica, sans-serif; text-align: center; background: linear-gradient(var(--bCol),black); height: 1...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/htmls00.h
C/C++ Header
/* * Mobile UI by StormPie html */ #ifndef WLED_FLASH_512K_MODE const char PAGE_indexM[] PROGMEM = R"=====( <!DOCTYPE html><html><head><meta charset=utf-8><meta content='width=device-width' name=viewport><link href=images/safari-pinned-tab.svg rel=mask-icon><meta name=theme-color content=#333333><meta content=yes name...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/htmls01.h
C/C++ Header
/* * Settings html */ //common CSS of settings pages const char PAGE_settingsCss[] PROGMEM = R"=====( body{font-family:var(--cFn),sans-serif;text-align:center;background:var(--cCol);color:var(--tCol);line-height:200%;margin:0;background-attachment:fixed}hr{border-color:var(--dCol);filter:drop-shadow(-5px -5px 5px v...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/htmls02.h
C/C++ Header
/* * Various pages */ //USER HTML HERE (/u subpage) const char PAGE_usermod[] PROGMEM = R"=====( <html><body>There is no usermod installed or it doesn't specify a custom web page.</body></html> )====="; //server message const char PAGE_msg0[] PROGMEM = R"=====( <!DOCTYPE html> <html><head> <title>WLED Message</tit...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/palettes.h
C/C++ Header
/* * Color palettes for FastLED effects (65-73). */ // From ColorWavesWithPalettes by Mark Kriegsman: https://gist.github.com/kriegsman/8281905786e8b2632aeb // Unfortunaltely, these are stored in RAM! // Gradient palette "ib_jul01_gp", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/ing/xmas/tn/ib_...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkApi.h
C/C++ Header
/** * @file BlynkApi.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Jan 2015 * @brief High-level functions * */ #ifndef BlynkApi_h #define BlynkApi_h #include "BlynkConfig.h"...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkApiArduino.h
C/C++ Header
/** * @file BlynkApiArduino.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Mar 2015 * @brief * */ #ifndef BlynkApiArduino_h #define BlynkApiArduino_h #include "BlynkApi.h" #includ...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkArduinoClient.h
C/C++ Header
/** * @file BlynkParam.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Jan 2015 * @brief * */ #ifndef BlynkArduinoClient_h #define BlynkArduinoClient_h #include "BlynkApiArduino.h"...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkConfig.h
C/C++ Header
/** * @file BlynkConfig.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Jan 2015 * @brief Configuration of different aspects of library * */ #ifndef BlynkConfig_h #define Blynk...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkDateTime.h
C/C++ Header
/** * @file BlynkDateTime.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2016 Volodymyr Shymanskyy * @date Aug 2016 * @brief DateTime implementation * */ #ifndef BlynkDateTime_h #define BlynkDateTime_h typede...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkDebug.cpp
C++
/** * @file BlynkDebug.cpp * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Jan 2015 * @brief Debug utilities for Arduino */ #include "BlynkDebug.h" #if defined(ARDUINO) && defined...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkDebug.h
C/C++ Header
/** * @file BlynkDebug.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Jan 2015 * @brief Debug utilities * */ #ifndef BlynkDebug_h #define BlynkDebug_h #include "BlynkConfig.h...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkDetectDevice.h
C/C++ Header
/** * @file BlynkDetectDevice.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2016 Volodymyr Shymanskyy * @date May 2016 * @brief * */ #ifndef BlynkDetectDevice_h #define BlynkDetectDevice_h // General defines #de...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkEveryN.h
C/C++ Header
#ifndef BLYNKEVERYN_H #define BLYNKEVERYN_H #include "BlynkDebug.h" millis_time_t blynk_count_millis() { const millis_time_t ms = BlynkMillis(); return ms; } uint16_t blynk_count_seconds16() { const millis_time_t ms = BlynkMillis(); return (ms / 1000); } uint16_t blynk_count_minutes16() { const...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkFifo.h
C/C++ Header
/** * @file BlynkFifo.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Feb 2015 * @brief FIFO implementation * */ #ifndef BlynkFifo_h #define BlynkFifo_h #include "BlynkUtility...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkHandlers.cpp
C++
/** * @file BlynkHandlers.cpp * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Jan 2015 * @brief Virtual pin utilities */ #include "BlynkConfig.h" #include "BlynkHandlers.h" #inclu...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkHandlers.h
C/C++ Header
/** * @file BlynkHandlers.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Jan 2015 * @brief Handlers for virtual pin operations * */ #ifndef BlynkHandlers_h #define BlynkHandle...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkParam.h
C/C++ Header
/** * @file BlynkParam.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Jan 2015 * @brief Container for handler parameters * */ #ifndef BlynkParam_h #define BlynkParam_h #inclu...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkProtocol.h
C/C++ Header
/** * @file BlynkProtocol.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Jan 2015 * @brief Blynk protocol implementation * */ #ifndef BlynkProtocol_h #define BlynkProtocol_h ...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkProtocolDefs.h
C/C++ Header
/** * @file BlynkProtocolDefs.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Jan 2015 * @brief Blynk protocol definitions * */ #ifndef BlynkProtocolDefs_h #define BlynkProtoco...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkTemplates.h
C/C++ Header
class BlynkStackOnly { protected: BlynkStackOnly() {} ~BlynkStackOnly() {} private: /// @brief Declared as private to prevent usage of dynamic memory void* operator new(size_t size); /// @brief Declared as private to prevent usage of dynamic memory void operator delete(void *p); }; class BlynkNonCopyable ...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkTimer.cpp
C++
/* * SimpleTimer.cpp * * SimpleTimer - A timer library for Arduino. * Author: mromani@ottotecnica.com * Copyright (c) 2010 OTTOTECNICA Italy * * Callback function parameters added & compiler warnings * removed by Bill Knight <billk@rosw.com> 20March2017 * * This library is free software; you can redistribute ...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkTimer.h
C/C++ Header
/* * SimpleTimer.h * * SimpleTimer - A timer library for Arduino. * Author: mromani@ottotecnica.com * Copyright (c) 2010 OTTOTECNICA Italy * * Modifications by Bill Knight <billk@rosw.com> 18March2017 * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Less...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkUtility.h
C/C++ Header
/** * @file BlynkUtility.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Jun 2015 * @brief Utility functions * */ #ifndef BlynkUtility_h #define BlynkUtility_h template<class ...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkWiFiCommon.h
C/C++ Header
/** * @file BlynkWiFiCommon.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Jan 2015 * @brief * */ #ifndef BlynkWiFiCommon_h #define BlynkWiFiCommon_h #ifndef BLYNK_INFO_CONNECTION...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/BlynkWidgetBase.h
C/C++ Header
/** * @file BlynkWidgetBase.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2016 Volodymyr Shymanskyy * @date Nov 2016 * @brief */ #ifndef BlynkWidgetBase_h #define BlynkWidgetBase_h #include "BlynkApi.h" class Bly...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/Blynk/utility.cpp
C++
#include "BlynkDebug.h" #include "BlynkDateTime.h" #if !defined(BLYNK_NO_FLOAT) && defined(BLYNK_USE_INTERNAL_DTOSTRF) #include <string.h> #include <math.h> #include <stdio.h> char* dtostrf_internal(double number, signed char BLYNK_UNUSED width, unsigned char prec, char *s) { if(isnan(number)) { strcpy(s...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/blynk/BlynkSimpleEsp.h
C/C++ Header
/** * @file BlynkSimpleEsp32.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Oct 2016 * @brief * */ #ifndef BlynkSimpleEsp_h #define BlynkSimpleEsp_h #define BLYNK_SEND_ATOMIC #in...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/e131/E131.cpp
C++
/* * E131.cpp * * Project: E131 - E.131 (sACN) library for Arduino * Copyright (c) 2015 Shelby Merrick * http://www.forkineye.com * * This program is provided free for you to use in any way that you wish, * subject to the laws and regulations where you are using it. Due diligence * is strongly suggested before usin...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/e131/E131.h
C/C++ Header
/* * E131.h * * Project: E131 - E.131 (sACN) library for Arduino * Copyright (c) 2015 Shelby Merrick * http://www.forkineye.com * * This program is provided free for you to use in any way that you wish, * subject to the laws and regulations where you are using it. Due diligence * is strongly suggested before using ...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/pubsubclient/PubSubClient.cpp
C++
/* PubSubClient.cpp - A simple client for MQTT. Nick O'Leary http://knolleary.net */ #include "PubSubClient.h" #include "Arduino.h" PubSubClient::PubSubClient() { this->_state = MQTT_DISCONNECTED; this->_client = NULL; this->stream = NULL; setCallback(NULL); } PubSubClient::PubSubClient(Client&...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/pubsubclient/PubSubClient.h
C/C++ Header
/* PubSubClient.h - A simple client for MQTT. Nick O'Leary http://knolleary.net */ #ifndef PubSubClient_h #define PubSubClient_h #include <Arduino.h> #include "IPAddress.h" #include "Client.h" #include "Stream.h" #define MQTT_VERSION_3_1 3 #define MQTT_VERSION_3_1_1 4 // MQTT_VERSION : Pick the version...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/time/DateStrings.cpp
C++
/* DateStrings.cpp * Definitions for date strings for use with the Time library * * Updated for Arduino 1.5.7 18 July 2014 * * No memory is consumed in the sketch if your code does not call any of the string methods * You can change the text of the strings, make sure the short strings are each exactly 3 character...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/time/Time.cpp
C++
/* time.c - low level time and date functions Copyright (c) Michael Margolis 2009-2014 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at you...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/time/Time.h
C/C++ Header
#include "TimeLib.h"
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/time/TimeLib.h
C/C++ Header
/* time.h - low level time and date functions */ /* July 3 2011 - fixed elapsedSecsThisWeek macro (thanks Vincent Valdy for this) - fixed daysToTime_t macro (thanks maniacbug) */ #ifndef _Time_h #ifdef __cplusplus #define _Time_h #include <inttypes.h> #ifndef __AVR__ #include <sys/types.h> //...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/timezone/Timezone.cpp
C++
/*----------------------------------------------------------------------* * Arduino Timezone Library v1.0 * * Jack Christensen Mar 2012 * * * * This work is licensed...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/timezone/Timezone.h
C/C++ Header
/*----------------------------------------------------------------------* * Arduino Timezone Library v1.0 * * Jack Christensen Mar 2012 * * * * This work is licensed...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/webserver/ESP8266HTTPUpdateServer.cpp
C++
#include <Arduino.h> #include <WiFiClient.h> #include <WiFiServer.h> #ifdef ARDUINO_ARCH_ESP32 #include "WebServer.h" #include <Update.h> #else #include <ESP8266WebServer.h> #endif #include <WiFiUdp.h> #include "ESP8266HTTPUpdateServer.h" const char* ESP8266HTTPUpdateServer::_serverIndex = R"(<html><head><script>func...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/webserver/ESP8266HTTPUpdateServer.h
C/C++ Header
#ifndef __HTTP_UPDATE_SERVER_H #define __HTTP_UPDATE_SERVER_H #ifdef ARDUINO_ARCH_ESP32 class WebServer; class ESP8266HTTPUpdateServer { private: bool _serial_output; WebServer *_server; static const char *_serverIndex; static const char *_failedResponse; static const char *_successResponse; ...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/webserver/ESP8266WebServer.h
C/C++ Header
/* ESP8266WebServer.h - Dead simple web-server. Supports only one simultaneous client, knows how to handle GET and POST. Copyright (c) 2014 Ivan Grokhotkov. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/webserver/Parsing.cpp
C++
/* Parsing.cpp - HTTP request parsing. Copyright (c) 2015 Ivan Grokhotkov. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, ...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/webserver/WebServer.cpp
C++
/* WebServer.cpp - Dead simple web-server. Supports only one simultaneous client, knows how to handle GET and POST. Copyright (c) 2014 Ivan Grokhotkov. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as p...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/webserver/WebServer.h
C/C++ Header
/* WebServer.h - Dead simple web-server. Supports only one simultaneous client, knows how to handle GET and POST. Copyright (c) 2014 Ivan Grokhotkov. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as pub...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/webserver/detail/RequestHandler.h
C/C++ Header
#ifndef REQUESTHANDLER_H #define REQUESTHANDLER_H class RequestHandler { public: virtual ~RequestHandler() { } virtual bool canHandle(HTTPMethod method, String uri) { (void) method; (void) uri; return false; } virtual bool canUpload(String uri) { (void) uri; return false; } virtual bool handle(WebServe...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
wled00/src/dependencies/webserver/detail/RequestHandlersImpl.h
C/C++ Header
#ifndef REQUESTHANDLERSIMPL_H #define REQUESTHANDLERSIMPL_H #include "RequestHandler.h" #ifdef ESP8266 // Table of extension->MIME strings stored in PROGMEM, needs to be global due to GCC section typing rules static const struct {const char endsWith[16]; const char mimeType[32];} mimeTable[] ICACHE_RODATA_ATTR = { #e...
Aircoookie/WLEDsquared
16
Early WLED port for PxMatrix displays
C++
Aircoookie
Christian Schwinne
wled-dev
src/cert.h
C/C++ Header
#ifndef CERT_H_ #define CERT_H_ unsigned char example_crt_DER[] = { 0x30, 0x82, 0x02, 0x24, 0x30, 0x82, 0x01, 0x8d, 0x02, 0x14, 0x08, 0xdf, 0x42, 0x81, 0x84, 0xff, 0xe0, 0x9d, 0x3c, 0x00, 0xf5, 0xaa, 0x24, 0x65, 0x19, 0x0c, 0x41, 0x92, 0xe1, 0x32, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d...
Aircoookie/esp32_https_server_test
1
Ancillary research code for ESP32 TLS webserver performance
C++
Aircoookie
Christian Schwinne
wled-dev
src/private_key.h
C/C++ Header
#ifndef PRIVATE_KEY_H_ #define PRIVATE_KEY_H_ unsigned char example_key_DER[] = { 0x30, 0x82, 0x02, 0x78, 0x02, 0x01, 0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x04, 0x82, 0x02, 0x62, 0x30, 0x82, 0x02, 0x5e, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, 0x00, 0x...
Aircoookie/esp32_https_server_test
1
Ancillary research code for ESP32 TLS webserver performance
C++
Aircoookie
Christian Schwinne
wled-dev
cmd/alclessctl/commands/create/create.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
cmd/alclessctl/commands/create/create_test.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
cmd/alclessctl/commands/delete/delete.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
cmd/alclessctl/commands/list/list.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
cmd/alclessctl/commands/shell/shell.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
cmd/alclessctl/main.go
Go
// Portions from https://github.com/lima-vm/lima/blob/v1.1.0-beta.0/cmd/limactl/main.go // // SPDX-FileCopyrightText: Copyright The Lima Authors // SPDX-License-Identifier: Apache-2.0 package main import ( "errors" "log/slog" "os" "os/exec" "time" "github.com/lmittmann/tint" "github.com/spf13/cobra" "golang....
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
cmd/alclessctl/version/version.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
pkg/brew/brew.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
pkg/cmdutil/cmdutil.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
pkg/envutil/envutil.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
pkg/rsync/rsync.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
pkg/store/store.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
pkg/sudo/sudo.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
pkg/userutil/userutil.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
pkg/userutil/userutil_darwin.go
Go
// Copyright The Alcoholless Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
AkihiroSuda/alcless
135
🍺 Alcoholless: lightweight security sandbox for Homebrew, AI agents, etc. on macOS
Go
AkihiroSuda
Akihiro Suda
NTT
example_test.go
Go
// Copyright The gomoddirectivecomments Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable la...
AkihiroSuda/gomoddirectivecomments
0
parser for `go.mod` directive comments (used by gomodjail)
Go
AkihiroSuda
Akihiro Suda
NTT
gomoddirectivecomments.go
Go
// Copyright The gomoddirectivecomments Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable la...
AkihiroSuda/gomoddirectivecomments
0
parser for `go.mod` directive comments (used by gomodjail)
Go
AkihiroSuda
Akihiro Suda
NTT
gomoddirectivecomments_test.go
Go
// Copyright The gomoddirectivecomments Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable la...
AkihiroSuda/gomoddirectivecomments
0
parser for `go.mod` directive comments (used by gomodjail)
Go
AkihiroSuda
Akihiro Suda
NTT
cmd/gomodjail/commands/analyze/analyze.go
Go
package analyze import ( "context" "fmt" "log/slog" "os" "path/filepath" "github.com/AkihiroSuda/gosocialcheck/cmd/gosocialcheck/flagutil" "github.com/spf13/cobra" "golang.org/x/mod/modfile" "golang.org/x/tools/go/analysis/singlechecker" "github.com/AkihiroSuda/gomodjail/pkg/profile" "github.com/AkihiroSu...
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT
cmd/gomodjail/commands/pack/pack.go
Go
package pack import ( "archive/zip" "errors" "io" "log/slog" "os" "path/filepath" "runtime" "github.com/AkihiroSuda/gomodjail/pkg/dynamic/pack/ziputil" "github.com/AkihiroSuda/gomodjail/pkg/dynamic/tracer" "github.com/spf13/cobra" ) func Example() string { return ` # Pack nerdctl with gomodjail gomodja...
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT
cmd/gomodjail/commands/run/run.go
Go
package run import ( "errors" "fmt" "log/slog" "os" "github.com/AkihiroSuda/gomodjail/pkg/dynamic/child" "github.com/AkihiroSuda/gomodjail/pkg/dynamic/env" "github.com/AkihiroSuda/gomodjail/pkg/dynamic/parent" "github.com/AkihiroSuda/gomodjail/pkg/profile" "github.com/AkihiroSuda/gomodjail/pkg/profile/fromgo...
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT
cmd/gomodjail/main.go
Go
package main import ( "archive/zip" "fmt" "io/fs" "log/slog" "os" "os/exec" "path/filepath" "runtime" "github.com/AkihiroSuda/gomodjail/cmd/gomodjail/commands/analyze" "github.com/AkihiroSuda/gomodjail/cmd/gomodjail/commands/pack" "github.com/AkihiroSuda/gomodjail/cmd/gomodjail/commands/run" "github.com/A...
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT
cmd/gomodjail/version/version.go
Go
package version import ( "runtime/debug" "strconv" ) // Version can be fulfilled on compilation time: -ldflags="-X github.com/AkihiroSuda/gomodjail/cmd/gomodjail/version.Version=v0.1.2" var Version string func GetVersion() string { if Version != "" { return Version } const unknown = "(unknown)" bi, ok := deb...
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT
examples/poisoned/poisoned.go
Go
package poisoned import ( "os" "os/exec" "strings" ) // Add returns x + y . func Add(x, y int) int { const msg = `*** ARBITRARY SHELL CODE EXECUTION *** This 'vi' command was executed by the 'github.com/AkihiroSuda/gomodjail/examples/poisoned' module. This example is harmless, of course, but suppose that this w...
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT
examples/victim/main.go
Go
package main import ( "fmt" p "github.com/AkihiroSuda/gomodjail/examples/poisoned" ) func main() { const x, y = 42, 43 fmt.Printf("%d + %d = %d\n", x, y, p.Add(x, y)) }
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT
libgomodjail_hook_darwin/libgomodjail_hook_darwin.c
C
/* TODO: split to multiple files */ #include <dlfcn.h> #include <errno.h> #include <execinfo.h> #include <fcntl.h> #include <limits.h> #include <mach-o/dyld.h> #include <mach-o/loader.h> #include <mach-o/nlist.h> #include <spawn.h> #include <stdarg.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include...
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT
libgomodjail_hook_darwin/offset.sh
Shell
#!/bin/sh # Usage: # GO111MODULE=off GO="$(go env GOPATH)"/src/go.googlesource.com/go/bin/go ./offset.sh set -eux -o pipefail : "${GO:=go}" GOROOT="$("$GO" env GOROOT)" cat <<EOF >"${GOROOT}"/src/runtime/gomodjail_offset.go package runtime import "unsafe" var ( GOMODJAIL_OFFSET_G_M= unsafe.Offsetof(g{}.m...
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT
pkg/dynamic/child/child_linux.go
Go
package child import ( "fmt" "log/slog" "os" "os/exec" "syscall" "github.com/AkihiroSuda/gomodjail/pkg/dynamic/child/seccompprofile" "github.com/AkihiroSuda/gomodjail/pkg/dynamic/env" seccomp "github.com/elastic/go-seccomp-bpf" "github.com/elastic/go-seccomp-bpf/arch" ) func withoutUnknownSyscalls(ss []stri...
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT
pkg/dynamic/child/child_others.go
Go
//go:build !linux package child import "errors" func Main(_ []string) error { return errors.New("unexpected code path") }
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT
pkg/dynamic/child/seccompprofile/seccompprofile_linux.go
Go
package seccompprofile // AlwaysAllowed is the list of the syscalls that do not need to be traced. // For the performance reason, FD operations like read and write are always allowed. // // https://filippo.io/linux-syscall-table/ var AlwaysAllowed = []string{ // ===== 000 ===== "read", "write", "close", "lstat", ...
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT
pkg/dynamic/pack/cache/cache.go
Go
package cache import ( "crypto/sha256" "fmt" "os" "path/filepath" "github.com/AkihiroSuda/gomodjail/pkg/dynamic/env" ) func ExecutableDir() (string, error) { selfPath, err := os.Executable() if err != nil { return "", err } cacheHome, err := Home() if err != nil { return "", fmt.Errorf("failed to reso...
AkihiroSuda/gomodjail
132
[Experimental] jail for Go modules
Go
AkihiroSuda
Akihiro Suda
NTT