Skip to content

Instantly share code, notes, and snippets.

View shonenada's full-sized avatar
🤷‍♂️
Focusing

Yaoda Liu shonenada

🤷‍♂️
Focusing
View GitHub Profile
# -*- coding: utf-8 -*-
import socket
web_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
web_socket.bind(("127.0.0.1", 8888))
web_socket.listen(5)
while(True):
<html>
<head>
<title>Gmail Click Jacking with drag and drop Attack Demoooo</title>
<style>
.iframe_hidden {
height: 50px;
width: 50px;
top: 360px;
left: 365px;
overflow: hidden;
if (top != self);
if (top.location != self.location);
if (top.location != location);
if (parent.frames.length > 0);
if (window != top);
if (window.top != window.self);
if (window.self != window.top);
if (parent && parent != window);
if (parent && parent.frames && parent.frames.length > 0);
if ((self.parent && !(self.parent === self)) && (self.parent.frames.length != 0));
<?php
DEFAULT_KEY = 'abcdefgh';
// $string 明文 或 密文
// $operation: decode =》 解密,其他是加密
// $key: 秘钥
// $expiry: 有效期
function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {
// 动态密钥长度,相同的明文会生成不同密文就是艺考动态密钥 (初始化向量 IV)
class RequestLimit:
def addRequest(self, ipp_addr, bcookie):
blkip = memcache.get('RequestLimitList')
if blkip is None:
blkip = [{
'ip_addr': ip_addr,
'bcookie': bcookie,
'count': 1,
@shonenada
shonenada / .vimrc
Created August 21, 2014 04:10
.vimrc
syntax on
filetype off
" format and user interface
set nocompatible
set number
set softtabstop=4 tabstop=4 shiftwidth=4
set expandtab
set autoindent
set hlsearch
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// 字典編碼
class DictionaryEncoding {
private:
// 记录字典的大小
int size;
// 字典内容
#include <stdio.h>
// 字符集的最大大小
#define MAX_SIZE 256
class ArithmeitcCoding {
private:
// 记录字符集合总大小
int size;
// 区间下限
class LZ(object):
def __init__(self):
self.char_dict = list()
def clean(self):
self.char_dict = []
self.char_dict.append('')
def init_dict(self, string):
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char string[1024];
} String;
typedef struct {
int size;