Skip to content

Instantly share code, notes, and snippets.

require 'ffi'
module TEA
extend FFI::Library
ffi_lib 'tea'
attach_function :tea_encode, :TEAencode, [:pointer, :uint, :pointer, :pointer, :pointer], :int
attach_function :tea_decode, :TEAdecode, [:pointer, :uint, :pointer, :pointer, :pointer], :int
def self.encode(data, key)
insize = data.bytesize
require 'net/http'
require 'optparse'
print "\033[2J\033[;H"
$options = {}
$parser = OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options] 000001"
opts.on("-c", "--[no-]color", "Print color") do |v|
$options[:color] = v
@rxbit
rxbit / BaiDuYun_Multi_Offline.js
Created October 8, 2015 14:32
BaiDuYun_Multi_Offline
// ==UserScript==
// @id 9adb84aba536@scriptish
// @name BaiDuYun_Multi_Offline
// @version 2014.6.27.1
// @namespace 9adb84aba536@scriptish
// @include http://pan.baidu.com/disk/*
// @include http://yun.baidu.com/disk/*
// @grant GM_addStyle
// @grant GM_xmlhttpRequest
// @grant GM_log
javascript:for(i=0; i< 190; i++) {if(Math.random() > 0.818) {$('.required')[i].checked=true;}}
javascript:for(i=0; i< 190; i++) {if(Math.random() > 0.818) {$('.required')[i].checked=true;}}