SolarScale Blog

central to intelligence

The non-latin character domain names

May 10th, 2010

This was all over the news a few days ago. Basically Egypt, Saudi Arabia and UAE now have the TLD (top level domain) in their language now. The DNS system basically piggybacks a code (really punycode) representation of the unicode for these domains. It's still in ASCII downbelow, take a look:

countrypunycode equivalent
Egypt.XN--WGBH1C
Saudi Arabia.XN--MGBERP4A5D4AR
United Arab Emirates.XN--MGBAAM7A8H
source: IANA.ORG

So it's not a glitch in the sytem if you see something like domainname.xn--wgbh1c that's just egypt instead of it's previous domainname.eg.


Learning from Hackers

May 7th, 2010

I was once a system administrator. One system I administered was BSD/OS and it had a "gcc" group in /etc/group. The other administrators thought it was a good idea to restrict gcc to a set of people who asked to have gcc access. One guy didn't ask and he exploited the fact that the "ld" and "as" commands were not in the gcc group. He created an assembly file possibly with FreeBSD and then copied that over and assembled and linked the possibly very compatible assembly file. I thought the guy was brilliant and I want to show you rudamentally what he did, watch.

romeo$ uname -a
FreeBSD romeo.solarscale.de 7.2-RELEASE FreeBSD 7.2-RELEASE #1: 
Wed May  5 21:28:23 CEST 2010     pjp@romeo.solarscale.de:/usr/
src/sys/i386/compile/ROMEO  i386
romeo$ cat -n hello.c
     1  #include <stdio.h>
     2
     3  int
     4  main(void)
     5  {
     6          printf("hello, world\n");
     7  }
romeo$ cc -S -o hello.s hello.c
juliet$ uname -a
NetBSD juliet.solarscale.de 5.0.1 NetBSD 5.0.1 (GENERIC) #0: 
Thu Jul 30 01:39:11 UTC 2009  builds@b8.netbsd.org:/home/bui
lds/ab/netbsd-5-0-1-RELEASE/i386/200907292356Z-obj/home/build
s/ab/netbsd-5-0-1-RELEASE/src/sys/arch/i386/compile/GENERIC i386
juliet$ as -o hello.o hello.s
juliet$ ld -static -o hello /usr/lib/crt0.o hello.o -lc
/usr/lib/crt0.o: In function `___start':
: undefined reference to `_fini'
/usr/lib/crt0.o: In function `___start':
: undefined reference to `_init'
juliet$ ld -static -o hello /usr/lib/crt?.o hello.o -lc
juliet$ ./hello
hello, world
juliet$ 

Let that be a lesson to anyone. I sure learned from this guy.


Random Hackepedia

April 30th, 2010

The RH for this week is Traceroute.

BTW if you're interested in contributing to hackepedia it now allows people to edit without logging in.


Educating the me

April 30th, 2010

I've started attending a class for CSS (cascading style sheets). The main purpose is that I have a lot of HTML documents (including this blog) that could use a bit of style. I've already written a style sheet for this blog in a test environment and will be putting it up perhaps next week.


Playing with compression, fail.

April 25th, 2010

I made a small program that can compress a file on less space than gzip. It was fun writing it and under nominal conditions it performs very well. The reason this design didn't make it into our list of programs is because if the conditions aren't favourable and it hits an out of disk space problem then repairing itself is next to impossible. So it isn't used. But you can still study the failings of programs to understand why working programs work well.

Inside the program source code you'll see a typescript clip from the program working better than gzip, but add a bit more space in the sparsefiles in the filesystem it explodes badly.


Random Hackepedia

April 23rd, 2010

The RH for this week is Cryptsetup.


Changed graphics on website

April 18th, 2010

If you frequently come here to read this blog you may have noticed that the graphics changed. I spontaneously did this today and I like it. The main graphic is a triangle with a star (the sun) in its centroid all in the european colours. The star has nine points with three points to every side of the triangle. I made two pictures, one with a black background and one with a white background. The picture is supposed to represent the union between solarscale.de and centroid.eu which have been the same website under the two different names for a while now.


Random Hackepedia

April 16th, 2010

The RH for this week is GPG.


Airport Extreme JetDirect port has changed?

April 16th, 2010

I've been googling a bit now to find out why the port 9100 on my parents airport extreme didn't work for JetDirect printing. I've found this. Apparently the port changed on some firmware updates from 9100 to 9101. I'll give this a shot tomorrow when I visit, as Rendevous printing with an old 10.3.9 Mac Os X doesn't seem to work right on the setup that I got there.

Generally I'd portscan but nmap didn't compile on such an old version of Mac OS X.

Update: it's true it is on port 9101, although Mac OS X 10.3.9 doesn't have an option to configure the port right, I had to go into the cups webmanagement at localhost port 631 to make it work. Mac OS X 10.5.x (my dads macbook) worked with configuring the jetdirect port to 9101 in the apple config system.


Making X11 resolution work right with vmware guests (1920x1080)

April 15th, 2010

Generally I'm easy going. That means that when something is misconfigured, I don't care too much and find workarounds. For a while anyways. So to give you an example I had my new Kubuntu start up with a 800x600 screen under vmware and it didn't change resolution until I went into the system settings and clicked on the Display config, it then resized upon opening the program. Similarily in OpenBSD the resolution was 1024x768 or such so that there was "wings" of blackness on either side of my widescreen monitor.

All this I lived with for several month, but since I use OpenBSD as my main desktop it finally boiled down to me having to fix it. I googled. First hit had my answer. Someone said to use the program "gtf" to generate a Modeline for my monitor and stick it into the screen section. I tried that and it didn't work. They were wrong in that it was the "monitor" section it should have been put. Once I did that and having examined the /var/log/Xorg.0.log I noticed that my horizontal syncrate wasn't accepted. So I bumped it up to 90.0 and it finally worked. I want to share my Kubuntu /etc/X11/xorg.conf file with you, and very similar modifications also worked with OpenBSD, so here is:

Section "Device"
        Identifier      "Configured Video Device"
        Driver          "vmware"
EndSection

Section "Monitor"
        Identifier      "Configured Monitor"

        HorizSync       31.5 - 90.0
        VertRefresh     40 - 150

        # 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
        Modeline "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 
1118  -HSync +Vsync

EndSection

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
        DefaultDepth    24

        Subsection "Display"
                Depth 24
                Modes "1920x1080_60.00"
                Viewport 0 0 
        EndSubsection
EndSection

Hope it can be useful for others. Oh yeah, if you're curious why I run both Kubuntu and OpenBSD as desktops it's this: When I require flash I switch to Kubuntu, otherwise I do everything in OpenBSD. Most of the google tech talks I watch are watched with Linux.


Keyword Search

Older Blog Entries

20092009 201020102011
16 121824
27 131925
38 142026
49 1521index
510 1622
11 1723

Other links

Have feedback?

Send mail to pjp [at] centroid [dot] eu
Do disclose whether you would like this private or else I may post it on this blog.