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 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): |
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
<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; |
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
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)); |
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 | |
DEFAULT_KEY = 'abcdefgh'; | |
// $string 明文 或 密文 | |
// $operation: decode =》 解密,其他是加密 | |
// $key: 秘钥 | |
// $expiry: 有效期 | |
function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) { | |
// 动态密钥长度,相同的明文会生成不同密文就是艺考动态密钥 (初始化向量 IV) |
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
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, |
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
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 |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
// 字典編碼 | |
class DictionaryEncoding { | |
private: | |
// 记录字典的大小 | |
int size; | |
// 字典内容 |
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
#include <stdio.h> | |
// 字符集的最大大小 | |
#define MAX_SIZE 256 | |
class ArithmeitcCoding { | |
private: | |
// 记录字符集合总大小 | |
int size; | |
// 区间下限 |
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
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): |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct { | |
char string[1024]; | |
} String; | |
typedef struct { | |
int size; |