Skip to content

Instantly share code, notes, and snippets.

View kimitoboku's full-sized avatar

Kento KAWAKAMi kimitoboku

View GitHub Profile
#!/bin/bash
i=0;
tail -f path | awk '{if(list[$1]=="done"){}else if(list[$1] == $4){print $1;list[$1]="done"}else{list[$1] = $4}}' | while read line
do
i=$(( i + 1 ))
echo "$i:$line"
done
while true
do
D=`data -d '5 seconds ago' +"%d/%b/%Y:%k:%M:%S"`
sleep 1
cat /etc/httpd/logs/access_log | grep "$D" | cut -d " " -f 1 | sort | uniq -c |sort -nr | awk '$1 > 2{print $2}'
done
@kimitoboku
kimitoboku / 05-155821.s
Created June 5, 2015 07:22
音楽を出力するやつ
LD ACC,FFh
ST ACC,(image)
LD ACC,dptr1
ST ACC,(dptr)
L0: LD ACC,(dp
LD IX,ACC
ADD ACC,03h
ST ACC,(dptr)
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
int count_string(char *str,char *s);
int string_length(char *str);
void makeSkipDistArray(int array[],char str[]);
int countStrinInStrings(int sda[],char str[],char word[]);

Web班第一回勉強会

Linuxのインストール

VirtualBoxopenSUSEのインストールを行いました.

手順

VirtualBoxで新たに仮想イメージを作成し,openSUSEと指定し,可変サイズのHDDを選択する.
ネットワークの設定でNICの1つをNATに2つめを有効化しブリッジを指定する.
仮想マシンを起動し,インストールドライブにopenSUSEのディスクイメージを選択し起動する
あとは,インストーラに従いopenSUSEのインストールを完了させる.

@kimitoboku
kimitoboku / maxmin.rb
Created December 7, 2014 10:43
seccon prog100
require 'socket'
host = "number.quals.seccon.jp"
port = 31337
sock = TCPSocket.new(host,port)
num = []
while n = sock.gets
Maximum = 274804002340875032441111945052338695066094639885538684207460638041831698138955791698008614030188794770670069893083077967804847453153803913408967500061296200418900142271531614777955446068446204189307344556282931652007165895647159270759724719458999987023557759985864121720952524398668099944856546881643463344130813178818329115380925361069508175229673203329864722281434091346673846589279120639393608946606868480928665119788421018752526935591376318255983360064942316712662252720319794061896534167471099387193016865598401961156702468197444641386411165189311347579504275345204222193866744578970674150816094959832295040376035530574075749512285081995821974547800947632153199768886456788132857157024027864915005786361480030403445284238027416149181792694921376274094182902765731101623622484015768953283827445869903898943052715247454036708674657968898707604225280491045987363644477821843453024764776063777088165859601674561067270763858366520185803597748574877548144841739436380116366463252769510659993065713240566676673053099
require 'uri'
require 'net/http'
def http_request(method, uri, query_hash={})
query = query_hash.map{|k, v| "#{k}=#{v}"}.join('&')
query_escaped = URI.escape(query)
uri_parsed = URI.parse(uri)
http = Net::HTTP.new(uri_parsed.host,10080)
return http.post(uri_parsed.path, query_escaped).body
end
cat onion.txt| base64 -D | base64 -D | base64 -D | base64 -D | base64 -D |base64 -D | base64 -D | base64 -D | base64 -D | base64 -D | base64 -D | base64 -D | base64 -D |base64 -D | base64 -D |base64 -D | uudecode
$ perl -e 'print scalar reverse"==AVoVGImxWYnBSazByUzMkUzQ1XLNTW"' | base64 -D | perl -e 'while(<>){print scalar reverse $_}'