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 urllib2 as ul | |
import time | |
import re | |
pattern = re.compile(r'<input type="hidden" name="(.*?)" id="\1" value="(.*?)"/>') | |
pwdstr = "&bpssUSERNAME=18354210483&bpssBUSPWD=891227" | |
flagstr = "&flag=true" | |
loginurl = "https://211.137.185.106:8443//mobilelogin.do" | |
tried = False |
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/python2 | |
data = open("pack01.pak", "rb").read() | |
occurances = [] | |
next = 0 | |
while True: | |
next = data.find("Xiph.Org libVorbis", next+1) | |
if next == -1: break |
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
;MASMPlus 代码模板 - 控制台程序 | |
;link: /SUBSYSTEM:CONSOLE /nologo /SECTION:.text,RWE /MERGE:.rdata=.text /MERGE:.data=.text | |
.686 | |
.model flat, stdcall | |
option casemap :none | |
include windows.inc | |
include kernel32.inc | |
include masm32.inc |
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 <math.h> | |
#include <stdlib.h> | |
int SolveLEG(double **CoefMatrix, int ElmtCount, double **Solve) | |
{ | |
// | |
// 解多元线性方程组函数 Solve Linear Equation Group. | |
// |
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/python2 | |
class vec(object): | |
def __init__(self, val): | |
self.val = list(val) | |
def __add__(self, other): | |
return vec(a+b for a, b in zip(self.val, other.val)) | |
def __sub__(self, other): |
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> | |
void vec_add_times(float *vec, float *other, float times, int n) | |
{ | |
while(n--) { | |
vec[n] += other[n] * times; | |
} | |
} |
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/python2 | |
# -*- coding: utf-8 -*- | |
import urllib | |
import urllib2 | |
import time | |
mapping = { | |
u'全国中心': u'zx', | |
u'全国': u'china', |
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
tbl1 = 'dBtEGkliy0aLvj61Ph2TIzQSfnY9ArmUFK4Rgs8uWxM7ObwoN3JcCq5VHDeXZp' | |
tbl2 = 'N04A83D7qTIoBMsyQdVLHPGWwiv59YhFX61RbCxftcmSkJlaEeuOg2pZUKzrnj' | |
def decode(s): | |
s = ''.join([tbl2[tbl1.index(i)] for i in s]) | |
s1 = s[0::2] | |
s2 = s[1::2] | |
ss1 = [s1[i:i+2] for i in range(0, len(s1), 2)] | |
ss2 = [s2[i:i+2] for i in range(0, len(s2), 2)] | |
rst = '' |
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 | |
$str = ''; | |
foreach($_POST as $k => $v) { | |
if(is_array($v)) { | |
$v = implode(', ', $v); | |
} | |
$str .= "$k: $v\n"; | |
} |
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 re | |
import struct | |
import zlib | |
import os | |
def ensure_dir(f): | |
d = os.path.dirname(f) | |
if not os.path.exists(d): | |
os.makedirs(d) |
OlderNewer