2015년 10월 12일 월요일

Need for Nexus Devices

Recently, I developed a multivision platform with Android devices for Samsung Unpacked 2015 shows.

최근에 저는 삼성 언팩 2015 행사를 위해, 안드로이드 디바이스를 이용한 멀티비전 플랫폼을 개발했습니다.





By the request, we paired each Arduino MEGA ADKs to Android devices and controlled with a server application on PC.

요청을 그렇게 받았기에, 우리는 Arduino MEGA ADK와 안드로이드 디바이스를 각각 쌍으로 연결했고, PC에서 구동되는 서버로 제어했습니다.



There was a unsolved bug which causes dangling connection between Arduino and Android device until today.

오늘까지 해결되지 않았던 버그가 하나 있는데, Arduino와 안드로이드 디바이스간의 연결이 복구 불가능한 상태에 빠지는 문제 였습니다.

Connecton between PC and Arduino could be disconnected for some reasons and server reconnects them.

PC와 Arudino간의 연결은 몇몇 이유로 끊어질 수 있는데, 그러면 서버는 다시 연결을 합니다.

But sometimes, during re-connection, Arduino says USB device is detached but Galaxy Note 3 says it's still connected and this phenomenon leads to dangling connections.

하지만 때때로, 재연결 도중에 Arduino는 USB 장치가 분리되었다고 말하지만 갤럭시 노트 3는 아직 연결되어 있다고 말하는 증상이 있는데, 이게 연결을 복구 불가능한 상태에 빠트립니다.

Max3421e (USB Host) chip's vbus state became SE0 but Galaxy Note 3 doesn't aware detachment so AndroidAccessory::isConnected never returns true.

Max3421e (USB 호스트) 칩의 vbus 상태는 SE0 인데 갤럭시 노트 3는 분리되는 것을 인지하지 못해서 AndroidAccessory::isConnected 가 절대 true를 반환하지 못합니다.



I tried to every programatically possible ways to reset USB Host chip on Arduino or Arduino itself but dangling connections holds.

프로그램적으로 접근할 수 있는 모든 방법으로 USB 호스트 칩 또는 Arduino 자체를 초기화 해봤지만 복구 불가능한 연결은 계속 남아 있었습니다.

There's nothing left to do with Arduino so I assumed Galaxy Note 3 might cause this problem and  tested with my Nexus 4.

Arduino에서 해볼 수 있는 것이 더 이상 없으므로 갤럭시 노트 3가 문제를 일으킬지 모른다고 생각해서, 제 소유의 넥서스 4로 테스트르 해봤습니다.

Guess what? There was no such problem with Nexus.

어떻게 됐을까요? 넥서스에서는 아무런 문제도 없었습니다.

< vbus is recovered from SE0 (disconnected) to FSHOST (full speed host) >

If you're developing an Android app, this is why you should have a reference device.

만약 안드로이드 앱을 개발하고 있다면, 이게 바로 레퍼런스 폰을 가지고 있어야 하는 이유입니다.

2015년 6월 8일 월요일

OAuth abusing may cause identity theft.

Nowadays, OAuth is used as a convenient way for sign-up.

요즘 OAuth가 회원가입을 위한 편리한 수단이 되고 있습니다.




But, you know what? OAuth is never been designed for that purpose and it's actually an abusing.

하지만, 그거 아세요? OAuth는 절대 이런 용도로 설계되지 않았으므로 사실은 남용이라는거.


OAuth just gives the right to post a message to facebook or google plus.

OAuth는 단지 구글 플러스나 페이스북에 대신 글을 쓸 권한을 줄 뿐입니다.

It never authenticate your facebook or google account as a unique identity.

절대로 당신의 계정이 유일무이하다는 것을 인증해주지 않습니다.


Here's an example.

예를 하나 들겠습니다.

(I'm not accusing feedly.com for anything. And I'm not saying feedly.com has this error. It's jut for an example.)

(저는 절대로 feedly.com을 고발하는 것이 아닙니다. Feedly.com이 이런 오류를 가지고 있다고 말하는 것도 아니며 단지 예를 들 뿐입니다)


One day, I found feedly is useful and want to sign-up. I'm using facebook so 'continue with Facebook' seems nice and convenient.

어느날, 제가 feedly가 쓸만하다고 느껴서 회원가입을 하고 싶게 됩니다. 저는 페이스북을 상요하고 있으므로 '페이스북 계정으로 로그인'은 참 편하고 좋아 보이죠.

By clicking facebook logo, feedly.com redirects me to Facebook's OAuth page.

페이스북 로고를 클릭함으로써 feedly.com은 저를 페이스북의 OAuth 페이지로 보냅니다.

Some pop-up like this will show up and I would click okay.

다음과 같은 형태의 팝업이 나오면 저는 okay를 클릭하겠죠.


By clicking okay, I grant feedly.com to write facebook message for me or as myself.

Okay를 클릭함으로써 저는 feedly.com이 저를 위해서 또는 저를 대신해서 페이스북에 글을 쓸 수있도록 허가하게 됩니다.



But, some day, I have to delete gmail.com account. I may dislike google or I definitely will be deceased. Then 'lempel@gmail.com' will be inactive and could be vacant.

하지만 어느날, 저는 gmail.com 계정을 삭제해야 합니다. 구글이 싫어질 수도 있지만 분며히 저도 죽을테니까요. 그러면 lempel@gmail.com 계정은 비활성화되고 비어있는 계정이 될 수 있죠.


Probably many people would want to use 'lempel@gmail.com' address. So, someone like 'Abraham Lempel' might acquire it.

분명히 lempel@gmail.com 이란 주소를 쓰고 싶어하는 분들이 많을 겁니다. 그러니 Abraham Lempel 같은 사람이 주소를 획득할 수 있죠.


It's not impossible for Abraham Lempel to be attracted to feedly.com and he might use OAuth authorization. But, I may not delete my feedly.com account so feedly.com knows the owner of 'lempel@gmail.com' is still me.

Abraham Lempel이 feedly.com에 매력을 느끼게 되는 것이 불가능한 일은 아니고, 그도 OAuth 인증을 사용할 수 있죠. 하지만 제가 feedly.com 계정을 삭제하지 않았을 수 있으니 lempel@gmail.com 의 사용자를 아직도 저로 알고 있을 수 있습니다.


As a result, Abraham Lempel will be able to access all my personal data from feedly.

결국 Abraham Lempel은 feedly의 제 모든 개인 정보에 접근할 수 있게 됩니다.

How horrifying!

끔찍하죠!




This kind of accident will happen because of OAuth is never been designed for Authentication.

이런 종류의 사고가 일어날 수 있는 이유는 OAuth는 결코 인증을 위해 설계되지 않았기 때문입니다.

By clicking 'continue with xxxxxx' or 'sign-in with xxxxxxx' you could create this security hole.

'XXXXX로 계속하기' 또는 'XXXXXX로 로그인 하기'를 클릭하는 순간, 당신은 이런 보안의 사각지대를 만들 수 있습니다.






2015년 6월 5일 금요일

2015년 5월 26일 화요일

Paradox of Hit Counter

I'm test driving my HTML content detection engine.

It's still a work in progress.

My goal is to write a web crawler with tracking ability.

Today, I found a crucial paradox with view counters.




If my engine crawls a page with view counter, it also changes the contents of that page by increasing visit counter by 1.

So, it's always recognized as changed page.

Another roadblock...

2015년 5월 21일 목요일

HTML Content Extraction

Recently, I'm writing an HTML content extraction engine for VanillaBrain.com project.

요즘 저는 바닐라브레인 프로젝트에서 사용할 HTML 본문 추출 엔진을 작성하고 있습니다.

I can't tell what VanillaBrain project is yet due to it's premature state.

아직 조숙한 상태여서 바닐라브레인 프로젝트가 무엇인지는 말씀드릴 수 없지만,

But I can share some useful or inspirational links about HTML content extraction.

HTML 본문 추출에 관한 쓸만하거나 영감을 주는 링크는 공유드릴 수 있지요.

Related products:


  • Apache Tika (content analysis toolkit) : http://tika.apache.org/

None of above products are JavaScript enabled and I was unable to find one.

위에 열거한 제품들은 JavaScript는 지원하지 않고, 지원하는 제품은 찾지 못했습니다.

I'm trying out some headless web browsers to crawl JavaScript dependent pages but can't find satisfiable one yet.

JavaScript에 의존하는 페이지들을 긁어오기 위해 headless web browser들을 시도해 보고 있지만, 아직 만족스러운 것을 찾지는 못했습니다.

Related articles:


  • https://trello.com/c/Xdy1qU1o/5--


I was inspired by above articles and write a graph based algorithm now but it's not working properly yet.

위의 글들에서 영감을 얻어서 그래프 기반의 알고리즘을 작성하고 있습니다만, 아직은 잘 동작하지는 않습니다.

It's a crucial function for VanillaBrain's MVP so I'm quite anxious now cause out fund is bleeding.

요게 바닐라브레인의 MVP에서 꽤 중요한 기능인제, 저희의 활동 자금은 계속 줄어들고 있어서 요즘 불안한 상태입니다.

But what can I say? Just keep doing my best :)

뭐 어쩌겠나요. 그저 최선을 다 할 수밖에 ^^

예전 Egloos.com의 블로그 링크

수년간 이용한 egloos.com에 대한 실망

Egloos의 운영업체가 수년간 이곳 저곳 바뀌면서 제 계정 정보가 엉망이 되어 있더군요.

실명 확인이 대체 왜 필요한지는 모르겠지만, 무슨 연유에선가 실명 정보가 사라져 있어서, 제 blog인데도 제어 권한을 제대로 가지지 못하고 있습니다.
여러 차례 문의를 했지만, 한국인들은 쉽게 예상할 수 있는, 특유의 관료주의에 상처만 받고 제대로 된 복구도 이루어지지 않았습니다.

Egloos의 글들을 마땅히 import 해 올 방법도 없고 참 난감한 상황이 되어 버렸는데...

지난 글들은 어쩔 수 없지만, 이제부터라도 다른 서비스를 이용하는 것을 고려해야 겠습니다.