This file contains 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
/* Compile with: | |
* ./staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/bin/mips-openwrt-linux-gcc -g -fpie -fpic -o /tmp/bug /tmp/bug.c | |
*/ | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <stdlib.h> |
This file contains 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/ucode | |
'use strict'; | |
import * as fs from 'fs'; | |
import * as sys from 'u1905.core'; | |
import * as wlnl from 'nl80211'; | |
import * as socket from 'socket'; | |
import * as libuci from 'uci'; | |
import * as struct from 'struct'; |
This file contains 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
#!/bin/sh | |
make_tar_member() { | |
local name=$1 | |
local content=$2 | |
local mode=644 | |
local uid=1000 | |
local gid=1000 | |
local size=${#content} | |
local mtime=$(date +%s) |
This file contains 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/env bash | |
set -e | |
get_all_tags() { | |
curl -s "https://git.openwrt.org/?p=openwrt/openwrt.git;a=tags" | \ | |
sed -rne 's#^.+<a class="list name" href="[^"]+;h=([[:xdigit:]]+)">v([0-9.rc-]+)</a>.+$#\2-\1#p' | \ | |
sort --version-sort | |
} |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>OpenWrt Devices</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css" /> | |
<script src="./toh.js"></script> |
This file contains 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/env perl | |
use strict; | |
use JSON; | |
sub filter_empty { | |
my ($val) = @_; | |
return undef if $val eq '¿' || $val eq 'http://¿' || $val eq 'https://¿'; |
This file contains 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/env bash | |
MAKEFILE=$1 | |
COMMIT=${2:-HEAD} | |
TOPDIR=$3 | |
MAKE=$(which gmake) || MAKE=$(which make) | |
FIND=$(which gfind) || FIND=$(which find) | |
[ -x "$MAKE" ] || { |
This file contains 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
#include <inttypes.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <libubox/uloop.h> | |
static void timer_cb(struct uloop_timer *utm) | |
{ |
This file contains 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
"depends": { | |
/* fs: filesystem dependencies | |
* Either an array of dictionaries (each item being an ORed alternative) | |
* or single dictionary. | |
*/ | |
"fs": [ | |
/* Satisfied if either a non-empty directory /sys/class/ieee80211 exists... */ | |
{ "directory": "/sys/class/ieee80211" }, | |
/* ... or an executable file /usr/bin/whatever... */ |
This file contains 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
$ sudo ./ubus.uc | |
[ "<ubus.connection 0x55f34c2b28e0>", "function publish(...) { [native code] }" ] | |
Subscription status change! Have subscribers? yes | |
Got data callback: [ 2, { "foo": true } ] | |
Got status callback: [ 1, 3 ] | |
Got complete callback: [ 0, 0 ] | |
Got data callback: [ 2, { "foo": true } ] | |
Got status callback: [ 1, 3 ] | |
Got complete callback: [ 0, 0 ] | |
Got data callback: [ 2, { "foo": true } ] |
NewerOlder