Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" """
import json
from urllib2 import urlopen
from lxml.html import document_fromstring
from lxml.cssselect import CSSSelector as cs
@judotens
judotens / ubigram.sh
Last active December 29, 2015 01:49
Find top unigram & bigram using bash
#!/bin/bash
# cat artikel.txt | ./ubigram.sh
# results sorted by frequences
# freq, keyword
cat "$@" |
tr -cs "a-zA-Z0-9" '\012' | tr '[:upper:]' '[:lower:]' |
{
old="aaa."
@judotens
judotens / acak.sh
Last active December 29, 2015 01:49
Randomize the input lines using bash
#!/bin/bash
# randomize the input lines
# cat artikel.txt | ./acak.sh
awk 'BEGIN{srand() }
{ lines[++d]=$0 }
END{
while (1){
if (e==d) {break}
@judotens
judotens / kaskus.py
Last active August 23, 2017 14:36
Kaskus search using official API - just for fun
# PS:
# - Extract your own kaskus oauth consumer_key & consumer_secret frm native app. Ref: http://seriot.ch/abusing_twitter_api.php#3
# - No public doc found, but here i attach an api sample sniffed from mitmproxy
import urllib, urllib2
import time
import oauth.oauth as oauth
import string
import random
import sys, json
@judotens
judotens / generate.py
Last active September 10, 2020 11:21
Twitter Bulk Tokens Generator for PIN-based auth Twitter app
# this tools will help you to generate a twitter tokens for bulk twitter accounts using PIN-based authorization twitter app.
# eg: Twitter for Iphone
# todo: save your bulk twitter accounts to pasukan.txt, line separated each account.
# format: username:password
# - Revealing Twitter for iPhone consumer key & secret - Ref: http://seriot.ch/abusing_twitter_api.php#3
import os
dirname, filename = os.path.split(os.path.abspath(__file__))
@judotens
judotens / cari.c
Last active December 29, 2015 16:29
Find an insensitive string in big text file. faster than cat and grep. supports multiple keywords, separated by space. no regex support.
/* cari string di file, case insensitive
support multiple keyword, tapi bukan regex. diisah by spasi aja
find an insensitive string in big raw text. faster than cat and grep.
supports multiple keywords, separated by space. no regex support.
@judotens
./cari bigfile.txt keyword
@judotens
judotens / tanyasimi.py
Last active December 29, 2015 17:09
SimSimi CLI chat
# url sniffed frm mitmproxy
# ref: http://blog.philippheckel.com/2013/07/01/how-to-use-mitmproxy-to-read-and-modify-https-traffic-of-your-phone/
import sys, urllib, urllib2, json, random
def tanya_simi(teks):
acak = str(int(random.uniform(100000,300000)))
data = {'av': 5.2, 'ft': 1.0, 'lc': 'id', 'os': 'i', 'req': teks, 'tz': "Asia/Jakarta", 'uid': acak}
url = "http://app.simsimi.com/app/aicr/request.p?" + urllib.urlencode(data)
@judotens
judotens / topsy_search.py
Created November 29, 2013 08:11
Topsy search scraper
# scrape tweets from topsy.com
import sys, urllib, urllib2, json, random
def search(query):
data = {'q': query, 'type': 'tweet', 'offset': 1, 'perpage': 1000, 'window': 'a', 'sort_method': "-date", 'apikey': '09C43A9B270A470B8EB8F2946A9369F3'}
url = "http://otter.topsy.com/search.js?" + urllib.urlencode(data)
data = urllib2.urlopen(url)
o = json.loads(data.read())
res = o['response']

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA

@judotens
judotens / bitcoinkey.sh
Last active June 26, 2024 20:49
Scrape BitCoin private keys from directory.io
#!/bin/bash
# scrape all leaked bitcoin private keys into a tab separated text
# <private key>\t<bitcoin_address>
#
# support autoresume. just add these line into your cron : * * * * bash bitcoinkey.sh
# results stored on keys.txt
if [ ! -f last.page ]; then prev=`echo 0`; else prev=`cat last.page`; fi;
if [ -z $1 ]; then akhir=`echo 10`; else akhir=`echo $1`; fi;
abis=$(($prev+$akhir))