Twisted Zebras

Discussion of challenges you have already solved
MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Twisted Zebras

Post by MerickOWA »

I would like to thank fridolin for the barcode challenge. It wasn't until i searched on what kind of barcode his challenge was that i noticed QR code and recognized the 3 squares.

I thought this was some kinda odd folding of bits with xoring challenge ;)
fridolin
Posts: 16
Joined: Sun Nov 30, 2008 9:15 am

Post by fridolin »

I'm glad my challenge pleased you :-)

Unfortunately it's easily solvable by using some online-decoder. Decoding it manually or writing some decoding application is really more sophisticated, especially finding out how to converse the 4-17-modules to integer.
gfoot
Posts: 269
Joined: Wed Sep 05, 2007 11:34 pm
Location: Brighton, UK

Post by gfoot »

I had trouble finding any libraries to decode them that weren't written for mobile phones, and didn't find anything online either. I found a library that did seem portable, installed its Python version, ran it, and got gobbledegook out. So I guess that library just doesn't work!

I actually solved it by getting a friend with an iPhone to take a photo of my monitor and decode it on that.
MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post by MerickOWA »

Doh. You probably found the zxing decoder on google code. Theres a link to the "experimental online decoder" and you just have to give it the url of hacker.org's image.

Normally I like to reverse engineer these kinda projects and figure out the algorithm they're using, but after seeing the code for PDF419's barcode reader (I got lost in the error correction and code word conversion) I didn't even bother with this one ;)
fridolin
Posts: 16
Joined: Sun Nov 30, 2008 9:15 am

Post by fridolin »

This one works very well for example, linked via the German Wikipedia article about PDF417: http://turbulence.org/Works/swipe/barcode.html

Error correction doesn't really matter for this challenge - you can see it just as a kind of padding at the end of the code. But maybe this would be another interestion one - restoring a barcode from partially destroyed data :twisted:

As i already wrote the most difficult part for me during my experimentations with PDF417 was finding out the conversion of the 4-17-modules to the integers. Maybe you will find the used tables interesting availabile as a zip file here: http://grandzebu.net/informatique/codba ... tables.zip
MichaBln
Posts: 18
Joined: Tue Nov 11, 2008 1:55 pm
Location: Berlin, GER

Post by MichaBln »

@ fridolin

You got the wrong topic you just posted pretty much the solution for "Barcode" in under "Twisted Zebras" topic ... its not that crucial since the solution is pretty much the same: Wikipedia/Google.

Anyways ... Schwamm drüber ;)
fridolin
Posts: 16
Joined: Sun Nov 30, 2008 9:15 am

Post by fridolin »

Damn - you are right ;-) Maybe someone could remove it...
MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post by MerickOWA »

Probably my fault, I posted about the barcode challenge helping me solve this (the twisted zebra) challenge, since I figured that it was obvious that the barcode challenge was well ... a barcode, and I didn't want to give away the twisted zebra challenge to anyone who didn't know.

I had no idea that twisted zebra challenge was also a barcode until I googled barcodes and saw a picture of one and noticed the 3 alignment squares.
MichaBln
Posts: 18
Joined: Tue Nov 11, 2008 1:55 pm
Location: Berlin, GER

Post by MichaBln »

Well ... since its really just googeling and finding an online-decoder its not relly that spoiling ! The challenges are pretty much the same in difficulty and approach. Another interesting question is why barcode is a MISC-Challenge while Twisted Zebras is not ... maybe its becaus one needs to figure out what that Twisted-Zebra-Barcode is.
moose
Posts: 67
Joined: Fri Jul 16, 2010 7:32 pm

Post by moose »

I've done it with Python:

Code: Select all

#!/usr/bin/python
from sys import argv
import zbar
import Image

if len(argv) < 2: exit(1)

# create a reader
scanner = zbar.ImageScanner()

# configure the reader
scanner.parse_config('enable')

# obtain image data
pil = Image.open('/home/moose/bar.png').convert('L')
width, height = pil.size
raw = pil.tostring()

# wrap image data
image = zbar.Image(width, height, 'Y800', raw)

# scan the image for barcodes
scanner.scan(image)

# extract results
for symbol in image:
    # do something useful with results
    print 'decoded', symbol.type, 'symbol', '"%s"' % symbol.data

# clean up
del(image)
AMindForeverVoyaging
Forum Admin
Posts: 496
Joined: Sat May 28, 2011 9:14 am
Location: Germany

Post by AMindForeverVoyaging »

All this time I thought, "Why is there no QR code challenge?"
...Whoomp, there it is! :D
aurora
Posts: 54
Joined: Thu Feb 05, 2009 12:31 pm
Location: Bavaria, Germany

Post by aurora »

This one was a little bit too easy with "qrafter" on my iphone ;) ...
AMindForeverVoyaging
Forum Admin
Posts: 496
Joined: Sat May 28, 2011 9:14 am
Location: Germany

Post by AMindForeverVoyaging »

Agree about the easiness part. This challenge should open up way earlier.
michuber
Posts: 57
Joined: Sun Oct 26, 2008 3:30 pm

Post by michuber »

aurora wrote:This one was a little bit too easy with "qrafter" on my iphone ;) ...
In 2008 QR codes were not that popular, so then it was harder...

Anyway, in 5 years Siri will solve the "Say It" challenge in seconds ;-)
aurora
Posts: 54
Joined: Thu Feb 05, 2009 12:31 pm
Location: Bavaria, Germany

Post by aurora »

michuber wrote:
aurora wrote:This one was a little bit too easy with "qrafter" on my iphone ;) ...
In 2008 QR codes were not that popular, so then it was harder...

Anyway, in 5 years Siri will solve the "Say It" challenge in seconds ;-)
yes, it's fascinating to see where we get with all this technology over time and i am almost sure you are right regarding "say it" and siri ... (damn, why is time-traveling not possible, yet? ;-)
Post Reply