Skip to content

Instantly share code, notes, and snippets.

View HayatoDoi's full-sized avatar
💭
🤔

Hayato Doi HayatoDoi

💭
🤔
View GitHub Profile
@HayatoDoi
HayatoDoi / readme.md
Created January 22, 2020 11:51
clonosをfreebsdにインストールする

パッケージを追加

vim /usr/local/etc/pkg/repos/clonos-pkg.ircdriven.net.conf
ClonOS-pkg.ircdriven.net: {
  url: "https://pkg.ircdriven.net/packages/12amd64-clonos/",
  mirror_type: "none",
 enabled: yes
@HayatoDoi
HayatoDoi / strlreplace.c
Last active November 4, 2019 02:10
strlreplace.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/**
* [関数名] strlrep
* [機能] 文字列を置換する
* [引数]
* - src 入力文字列
* - target 置き換え対象となる文字列
import socket
host:str = 'tekeisan-ekusutoriim.chall.beginners.seccon.jp'
port:int = 8690
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect((host, port))
for i in range(0,101):
@HayatoDoi
HayatoDoi / QubicRube.py
Created December 10, 2017 06:03
Qubic Rube (SECCON 2017 online)
#!/bin/python
"""
環境構築メモ
- Python 3.6.3
python -m pip install pyzbar
python -m pip install pillow
python -m pip install opencv-python
python -m pip install scipy
アルゴリズムの説明
@HayatoDoi
HayatoDoi / EnvironmentMemo_ownCloud.md
Last active November 5, 2017 04:01
ownCloud環境構築メモ

ownCloud環境構築メモ

The built environment

  • OS : debian9
  • Middleware : Nginx
  • Application : php7.0-fpm
  • DetaBase : MySQL

Middleware install(Nginx)

apt-get install nginx
@HayatoDoi
HayatoDoi / firewalld_memo_for_virtualbox.md
Last active November 2, 2017 20:50
firewalld_memo_for_virtualbox.md
apt-get install firewalld
systemctl start firewalld
systemctl enable firewalld
firewall-cmd --permanent --new-zone=hostonly
firewall-cmd --permanent --add-port=0-65535/tcp --zone=hostonly
firewall-cmd --permanent --add-port=0-65535/udp --zone=hostonly
firewall-cmd --permanent --zone=hostonly --change-interface=<interface_name>
package main
import (
"fmt"
"net"
)
func main() {
tcpAddr, _ := net.ResolveTCPAddr("tcp", ":9000")
listner, _ := net.ListenTCP("tcp", tcpAddr)
#!/usr/bin/env bash
function fullpath (){
f=$@;
if [ -d "$f" ];then
base="";
dir="$f";
else
base="/$(basename "$f")";
dir=$(dirname "$f");
fi;
#include <stdio.h>
#include <unistd.h> // pid_t, fork
#include <sys/types.h> // pid_t, fork
#include <sys/wait.h> // wait
int main(){
pid_t pid;
int swap = 0;
if( (pid = fork()) == 0 ){
sleep(2);
#!/usr/bin/env node
'use strict';
/**
* CVE-2017-5638のexploit code
*
* File name : CVE-2017-5638.js
*
* $ ./CVE-2017-5638.js
*
* Copyright (c) 2017, Hayato Doi