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
<?php | |
$file = "http://localhost:8888/sample/user.json"; | |
$data= file_get_contents($file); | |
$user_data = array( | |
'name' => $user['name'], | |
'age' => $user['age'], | |
'language' => $user['language'] | |
); |
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
{ | |
"id": "user1", | |
"index": 0, | |
"profileImage": "http://localhost:8888/sample/profile.png", | |
"guid": "9ca6cdad-fe76-45e2-bf46-7744799cbd87", | |
"isActive": true, | |
"age": 29, | |
"name": { | |
"first": "Mccullough", | |
"last": "Craft" |
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 python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import cv2 | |
from PIL import Image | |
import pytesseract | |
import sys | |
import math |
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 python | |
# -*-coding: utf-8-*- | |
import requests | |
url = "http://ctfq.sweetduet.info:10080/~q12/index.php" | |
headers = { # Set the appropriate headers for the response | |
'Host': "ctfq.sweetduet.info:10080", | |
'User-Agent': 'Mozilla', | |
'Connection': 'keep-alive' |
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
>> img = imread('bear.png'); %% load image file :) | |
>> imtool(img); |
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
# -*- coding: utf-8 -*- | |
cipher = "0F 37 37 2C 20 32 37 2A 74 20 41 37 3D 20 3B 37 34 3E 2D 2C 20 37 36 2D 20 35 37 3A 2D 20 2B 30 29 34 34 2D 36 2F 2D 20 31 36 20 41 37 3D 3A 20 32 37 3D 3A 36 2D 41 76 20 1C 30 31 3B 20 37 36 2D 20 3F 29 3B 20 2E 29 31 3A 34 41 20 2D 29 3B 41 20 3C 37 20 2B 3A 29 2B 33 76 20 1F 29 3B 36 6F 3C 20 31 3C 07 20 79 7A 00 20 33 2D 41 3B 20 31 3B 20 29 20 39 3D 31 3C 2D 20 3B 35 29 34 34 20 33 2D 41 3B 38 29 2B 2D 74 20 3B 37 20 31 3C 20 3B 30 37 3D 34 2C 36 6F 3C 20 30 29 3E 2D 20 3C 29 33 2D 36 20 41 37 3D 20 3C 37 37 20 34 37 36 2F 20 3C 37 20 2C 2D 2B 3A 41 38 3C 20 3C 30 31 3B 20 35 2D 3B 3B 29 2F 2D 76 20 1F 2D 34 34 20 2C 37 36 2D 74 20 41 37 3D 3A 20 3B 37 34 3D 3C 31 37 36 20 31 3B 20 2E 2E 3B 2D 34 2B 38 36 2D 30 31 37 76" | |
cipher_no_space = cipher.split(" ") | |
hextTodecimal = [] | |
for w in cipher_no_space: | |
# 16 -> 10 |
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
curl -b cookie.txt -c cookie.txt -X POST -d 'username=mimaun' -d 'password=pass' https://www.wechall.net/login | |
curl -b cookie.txt -X POST http://www.wechall.net/challenge/wannabe7331/limited_access/protected/protected.php | |
curl -b cookie.txt --request PATCH http://www.wechall.net/challenge/wannabe7331/limited_access_too/protected/protected.php |
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
import java.lang.annotation.*; | |
/* annotationを作成 */ | |
// Retention: 新たにアノテーションNewAnnotationを作るとき、このアノテーション情報はソースコードのみにしか保存されないことを意味する. | |
@Retention(RetentionPolicy.RUNTIME) | |
// Target: このアノテーションをどの型に使うことができるかを指定している. | |
@Target(ElementType.METHOD) |
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
# -*- coding: utf-8 -*- | |
import mechanize | |
br = mechanize.Browser() | |
br.set_handle_robots(False) | |
# 仮想ブラウザが開いてログインページを読み込む. | |
br.open("http://www.wechall.net/login") |
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
import UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
// ViewControllerのインスタンス生成. |