- convert input image to grayscale using imagemagik
convert input.png -colorspace Gray output.tif
- decode with tesseract
tesseract output.tif result; cat result.txt
skip to main |
skip to sidebar
Monday, February 22, 2010
Decode captcha in bash
Bash wordlist/dictionary generator for brute-forcing
This example code will generate passwords of 4 characters only. To generate bigger passwords, there has to be more loops (pretty obvious in the code below). Happy Brute-forcing !!
1 #!/bin/bash
2
3 list=`echo {0..9} {a..z} {A..Z}`
4
5 for c1 in $list
6 do
7 for c2 in $list
8 do
9 for c3 in $list
10 do
11 for c4 in $list
12 do
13 echo $c1$c2$c3$c4
14 done
15 done
16 done
17 done
18
Friday, February 19, 2010
Cutting MKV files with 'mkvmerge'
mkvmerge --split timecodes:00:28:00,00:34:42 'input.mkv' -o 'output.mkv'
Thursday, February 18, 2010
Saturday, February 13, 2010
Getting Broadcom CrystalHD into AppleTV [[ A 2 Z ;-) ]]
If you don't happen to know much about "crystalHD" yet, you will find the gist of the story here: http://xbmc.org/davilla/2009/12/29/broadcom-crystal-hd-its-magic/. In short, it's a mini pci-e card which lets you decode "H264" in hardware.
Can't wait to see the proper driver and XBMC version which will leave everyone with the possibility to have a kick-ass media center for the living room:
Which card to buy: BCM970012 or BCM970015 ?
Answer: BCM970015.
Why: http://www.logicsupply.com/blog/2010/08/09/next-gen-broadcom-hardware-decoder-one-chip-many-advantages/
cd Downloads
wget http://mirrors.xbmc.org/nightlies/osx/latest.dmg
or, curl http://mirrors.xbmc.org/nightlies/osx/latest.dmg
sudo hdutil mount latest.dmg
cp -r /Volumes/XBMC/XBMC.app /Users/frontrow/Applications/
sudo reboot
------------------------------------------------------------------------------
(automatic process)
Installing XBMC and CrystalHD drivers by "Launcher":
Checking Crystal-HD:
CrystalHD-UBUNTU:This is a live ubuntu with crystalHD driver and xbmc, bootable from USB stick.
There is a very nicely written wiki located here:
Related Threads on XBMC Forum:
Can't wait to see the proper driver and XBMC version which will leave everyone with the possibility to have a kick-ass media center for the living room:
Which card to buy: BCM970012 or BCM970015 ?
Answer: BCM970015.
Why: http://www.logicsupply.com/blog/2010/08/09/next-gen-broadcom-hardware-decoder-one-chip-many-advantages/
- Installing hardware
http://rufn.it/aTV/
http://patchstick.wikispaces.com/Broadcom+Installation - Installing driver
http://todayguesswhat.blogspot.com/2010/01/thanks-davilla-and-xbmc-team-apple-tv.html - Installing XBMC
(manual process)
replace "latest.dmg" with the version you want. You can get a list of version on this website: http://mirrors.xbmc.org/
cd Downloads
wget http://mirrors.xbmc.org/nightlies/osx/latest.dmg
or, curl http://mirrors.xbmc.org/nightlies/osx/latest.dmg
sudo hdutil mount latest.dmg
cp -r /Volumes/XBMC/XBMC.app /Users/frontrow/Applications/
sudo reboot
------------------------------------------------------------------------------
(automatic process)
Installing XBMC and CrystalHD drivers by "Launcher":
- DON'T RUN THE "DEFAULTS" COMMANDS WITH SUDO.
- defaults write com.teamxbmc.xbmclauncher XBMCAdditionalDownloadPlistURLs -array-add http://mirrors.xbmc.org/nightlies/osx/update_urls.plist
- defaults write com.teamxbmc.xbmclauncher XBMCAdditionalDownloadPlistURLs -array-add http://crystalhd.sartori.at/files/crystalhd.plist
- defaults write com.teamxbmc.xbmclauncher XBMCAdditionalDownloadPlistURLs -array-add http://www.sshcs.com/xbmc/Info.asp
- REBOOT. THERE SHOULD BE TWO NEW ENTRIES UNDER "LAUNCHER" MENU NAMELY - NIGHTLIES, CRYSTAL-HD.
Checking Crystal-HD:
- grep -i crystal /Users/frontrow/Library/Logs/xbmc.log
- dmesg | grep -i crystal
- xbmc.log: /Users/frontorw/Library/Logs/xbmc.log
- Console log: /Library/Logs/Console/501/console.log
- Crashreporter log: /Users/frontrow/Library/Logs/CrashReporter/CrashReporter.log
CrystalHD-UBUNTU:This is a live ubuntu with crystalHD driver and xbmc, bootable from USB stick.
- Source: http://forum.xbmc.org/showthread.php?t=74992
- Download:
There is a very nicely written wiki located here:
Related Threads on XBMC Forum:
- http://forum.xbmc.org/showthread.php?t=81209
Quotes:
atv(osx) has a quirk that limits display to 720p, it's been discussed about a million times and here's a trac ticket for it.
atv(linux) has no such limit, xorg controls display resolutions that are available.
--
davilla
Team-XBMC Developer
2010-09-20, 10:21
Tuesday, February 9, 2010
Debian/Ubuntu: highlight and publish source codes
The tool is called - "highlight"
apt-get install highlightPerfect for publishing, integrating source-codes in tex and on websites. I like the following for my codes:
man highlight
highlight --pretty-symbols --inline-css -I -l _FILE_NAME_ --style $ide -V > tmp; firefox tmp &In firefox, one can do "View Page Source" and copy&paste.
Automate downloading from hotfile.com
1 #!/bin/bash
2
3 RED='\e[1;31m'
4 CYAN='\e[1;36m'
5 NC='\e[0m' # No Color
6
7 if [ -z "$1" ]
8 then
9 echo
10 echo -e "${RED}[+] usage: ${CYAN}`basename $0` http://hotfile.com/...
11 /filename.rar.html${NC}"
12 echo
13 exit
14 fi
15
16 url="$1"
17
18 echo
19 echo -e "[+] Input URL : ${RED}$url${NC}"
20
21 tm_='1245072880'
22 tmhash_='e5b845119f0055c5d8554ee5f2ffc7b2d5ef86d7'
23 wait_='30'
24 waithash_='3bf07c5d83f2e652ff22eeaee00a6f08d4d2409a'
25 action_='capt'
26
27 line_with_url='http://hotfile.com/get/'
28
29 url2=`wget -q "$url" --post-data "tm=${tm_}&tmhash=${tmhash_}&wait=${wait_}
30 &waithash=${waithash_}&action=${action_}" -O - | grep "$line_with_url" |
31 sed -s 's/.*<a href="\([^"]*\)".*$/\1/g'`
32
33 echo -e "[+] Real URL : ${RED}$url2 ${NC}"
34 echo
35
36 if [ ! -z "$url2" ]
37 then
38 wget "$url2"
39 fi
40
Debian/Ubuntu: stopping a package from upgrade
- Find package name
dpkg -l | grep "partial-name"
- Set package to hold
echo "full-package-name hold" | dpkg --set-selections
- Set package to un-hold
echo "full-package-name install" | dpkg --set-selections
Blog Archive
-
▼
2010
(44)
-
▼
February
(8)
- Decode captcha in bash
- Bash wordlist/dictionary generator for brute-forcing
- Cutting MKV files with 'mkvmerge'
- Ubuntu/Debian :: watching trailers from Apple
- Getting Broadcom CrystalHD into AppleTV [[ A 2 Z ;...
- Debian/Ubuntu: highlight and publish source codes
- Automate downloading from hotfile.com
- Debian/Ubuntu: stopping a package from upgrade
-
▼
February
(8)
Labels
- amarok (2)
- android (4)
- antitaint (1)
- apache (1)
- apple trailers (1)
- apple tv (5)
- ati (2)
- avimerge (1)
- awk (8)
- bash (29)
- batch (1)
- bios (1)
- bittorrent (2)
- blah (1)
- bug (2)
- c (3)
- c++ (1)
- captcha (3)
- chromium (1)
- cityrail (3)
- clipboard (1)
- compiz (3)
- console (1)
- crystal hd (1)
- dccp (2)
- debian (18)
- dhcp (1)
- dictionary (2)
- dns (2)
- dokuwiki (1)
- dpkg (4)
- elitebook (1)
- epoch-time (1)
- epstopdf (1)
- evince (1)
- extract (1)
- fat32 (1)
- ffmpeg (2)
- fileserve (1)
- firefox (9)
- flurry (1)
- font (2)
- foxtel (1)
- funny (1)
- gdb (2)
- gmail (1)
- gnome (1)
- gnuplot (4)
- google-chrome (1)
- greasemonkey (1)
- grep (1)
- gtk (1)
- h264 (2)
- highlight (2)
- hotfile (1)
- hotkey (1)
- hotmail (1)
- hotspotter (1)
- hp (1)
- image-manipulation (3)
- initrd (1)
- iso (1)
- java (3)
- jelly bean (1)
- kernel (1)
- keyboard (1)
- klog (1)
- konqueror (1)
- ktorrent (1)
- laptop (1)
- latex (7)
- lcd (1)
- lightdm (1)
- linux (39)
- lubuntu (3)
- lxde (1)
- lyrics (4)
- lyx (2)
- mac (1)
- mangafox (1)
- miktex (2)
- mkv (2)
- monitor (1)
- mplayer (3)
- netgear (1)
- ns2 (2)
- onemanga (1)
- open-office (1)
- partition (1)
- pastebin (1)
- pdroid (1)
- pennytel (2)
- perl (1)
- php (1)
- pop (1)
- popup (1)
- premiumforfree (1)
- printk (2)
- programming (3)
- prothom-alo (2)
- python (3)
- rapidshare (1)
- real-audio (1)
- reverse-engineering (3)
- screensaver (1)
- sed (6)
- skype (2)
- sms (1)
- ssh (1)
- strace (1)
- swap (1)
- synergy (1)
- taint (1)
- taintdroid (1)
- tcl (1)
- tcpdump (1)
- teleport (1)
- theme (1)
- tshark (3)
- tvshark (1)
- ubuntu (35)
- uuid (1)
- vim (5)
- virtual-box (2)
- vnc (1)
- webmail (2)
- windows (7)
- windows8 (2)
- wine (4)
- wireshark (1)
- word-list (1)
- x11 (3)
- yahoo (1)