There is a new ObfuscaTOR wordpress plugin available! I’ve added RSS feed support. Don’t know if that will ever take off, but it seemed like a good way to provide bridge info from sources other then bridges.torproject. I also threw in some more config options for the widgets. You still have to configure the shortcode from the main Settings page though.
I also have had a chance to work on some embedded stuff at work. I needed a way to display hex as ascii readable characters, and the libraries I’m using obviously don’t have sprintf(), so I came up with this:
| C | | copy code | | ? |
| 01 | int convert(char *dst, char *src, int len) { |
| 02 | char *ptr; |
| 03 | int i; |
| 04 | |
| 05 | ptr = dst; |
| 06 | for(i=0;i<len;i++) { |
| 07 | *ptr = ((src[i] >> 4) & 0x0f); |
| 08 | if( *ptr <= 9 ) *ptr += 48; |
| 09 | else *ptr += 55; |
| 10 | ptr++; |
| 11 | *ptr = src[i] & 0x0f; |
| 12 | if( *ptr <= 9 ) *ptr += 48; |
| 13 | else *ptr += 55; |
| 14 | ptr++; |
| 15 | } |
| 16 | *ptr = 0x0; |
| 17 | } |
This function would convert a string, say, “\xde\xad\xbe\xef” to “DEADBEEF”. Its been a loooooong time since I’ve gotten to use C, so I’m happy I still remember how(at least I think I do). Obviously I’m not doing any error checking at all there, but as I remember thats pretty standard. You have to make sure all your buffers are big enough before you ever call something.
