Thursday, May 31, 2007

Finally got the Genbook & other related stuff up again. smeggin provider
Smeg

About the fuck time

Wednesday, May 30, 2007

Linux getIP script (external IP from behind a NAT, that is)

I already knew that in linux it all comes down to resourcefulness.. Once again its been proven. You can do anything you want with the proper combination of basic commands!

I was tired of depending on dyndns, especially since I have an own URL. Problem was, how to get my external IP adress. The first commands I thought about were traceroute / ifconfig / ping / .. but, I soon realized this wouldnt work. A lot of data but just not what I needed :) So I googled it & it came up with a 'lynx -dump "http://checkip.dyndns.org"' style command. This sounded a bit bloated to me, but I gave it a try. didnt turn up too much. Another person used "html2text" & .. I didnt even try that one. Those just arent the standard commands.. Well, they are, but they do A LOT MORE!

So whats the solution? "wget"! :) So far so good.. "wget url".. but thats still relying on dyndns. And I Didnt want that. Now, I use a standard D-Link router. This router has a device info page which contains the external address. This is accurate.

So we 've got the data, but A LOT of data. Too much :)
& we 've got grep for that. So lets craft ourselves a grep command!

The external IP is on a line on its own. 3 lines above it, there 's the word "Address" so we'll do a "grep Address FILE -A 5" (-A 5 to get the 5 trailing lines)

Now we have 4 of those occurrences. We only need the IP addresses, so we ll pipe that output to "grep -E [0-9]+\.[0-9]+\.[0-9]+\.[0-9]\+ "

This gives us 2 addresses, an internal one for the router himself (yeah, its a bitch) and the valuable external one! Now lets separate these :) We dont know anything about the later, but we obviously know the first.. So another quick grep here.. "grep -v 192.168.0." so we dont see any internal addresses.

All this put together gives us the following

wget -q --user username --password password http://192.168.0.1/st_device.html
grep Address st_device.html -A 5 | grep -oE [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+ | grep -v 192.168.0.
rm -f st_device.html*

This outputs the external IP to the command line, ready to upload with ftp or do whatever the fuck with it :)

I'll probably "grep ... > file" and "ncftpput -u User -p Password -r2 -t600 -DD -m Server URL SourceFile" & maybe even throw in a "diff" to determine if the ip address is different than the former. We might keep it in a file or download it from the place we re uploading it to.
And No worries about uploading a wrong one since we re uploading over the same router we re asking the info to. If he cant provide it, he cant upload either. :)

Now throw this in a cron & no more need for dyndns :) Provided the space we re uploading it to stays up, ofcource..

You might also want to throw in some checks, for example, if the file isnt downloaded or empty, dont bother running the rest. Dont squander the processing time (if only by principle) & most of all, dont risk uploading an empty file over your ip adress in the file :) (if for example the router reboots during wget but is up & running again by the time the ftp kicks in)

Something to consider here tough, is security. We re doing rm -f, downloading pages, executing crap, .. putting this in a cron, uploading over cleartext, whatnot. This, however, is beyond the scope of my blog post :) Go read a book or whatever!


Interesting process to observe while solving problems like this.. its quite simple actually
1. Ask yourself.. what information do you you Want?
2. Locate that information. independent of where it is or how to get to it. Thats for later
3. Determine how the information is served (this is a crucial step, it sounds dumb, but it is!)
4. now locate a linux commandline client for that protocol. There are more than you can imagine. pdf2txt, wget, ftp, .......
5. script it together. once you ve got the data, its simple to reformat it. Only a matter of time :)

This DOES obviously sound cheap.. but did YOU immediatly think about the smegging wget to the DLink? I know I didnt. Because I immediately thought that information was not easy to come by. I thought of telnet client stuff or whatever.. but.. forgot that its simply there in the web interface!
Follow the steps & carefully consider before writing off a source in the second step. :)


Edit.. for those too lazy to write the necesary code.. all you have to do here is edit the variables!

# Variables
## Location & filename for temporary files
map="/tmp/"
file="IpFile"

## Remote Webserver settings
server=foo.bar
serverU=foo
serverP=bar
serverMAP=/public_html/foo/bar/

## Webpage with IP info page
IPpage=http://acme/ip.html
IPu=foo
IPp=bar

## IP base to ignore - to filter out local IPs
IPbase=10.0.0.


## Do not edit beyond this point ;)

if [[ $map == "" || $map == "/" || $file == "" ]]
then
echo "Thank god I didnt trust you to fill these in wisely."
echo " (dont get over confident tough, this is an EXTREMELY basic test!!)"
echo "At least One of the following errors was found!"
echo
echo "* the map and file variable can NOT be empty!"
echo "* the map can NOT be / (the root)."
echo "Since we re doing rm -f, these settings might cost you your OS!"
echo " ;)"
echo
echo $map$file
exit 1
fi


# make sure there s no files that could screw the process ;)
rm $map$file* -f

# Get IP
wget -q --user $IPu --password $IPp $IPpage -O $map$file.router

# check for file existance
if [[ -e $map$file.router ]]
then
grep Address $map$file.router -A 5 | grep -oE [0-9]+\.[0-9]+\.[0-9]+\.[0-9]\+ | grep -v $IPbase > $map$file

# Get curent file
ncftpget -cV -u $serverU -p $serverP $server $serverMAP$file > $map$file.O

if [[ ! -z $( diff -q $map$file $map$file.O ) ]]
then
# Upload file
ncftpput -V -u $serverU -p $serverP -r2 -t600 -DD -m $server $serverMAP $map$file
fi

fi

# remove residual files
rm $map$file* -f


asfor WHY I took the time to do this? because I needed this script myself :)

I just realised.. ncftp is a great ftp program but not really standard. You can replace this by vanilla ftp tough you ll have to figure out those commands on yer own..
The rest is pure vanilla linux soft (grep & wget)

Amazing

This piece of shit windows screwed up my media player by installing the mediaplayer update. Now I get some nonsense error. Crap Software! aaaaaaaargh

Im installing linux tomorrow! Actually probably not tomorrow, but one of these days, alice.. one of these days! Pow! Right in the kisser!! Bang, zoom, straight to the moon!

edit: uninstalling worked. At least they seem to be able to REMOVE their crap decently. although I'll never know what amounts of crap this left behind. At least I can use mediaplayer agan!

Tuesday, May 29, 2007

The 27th really was

a lousy day

Even sopranos skipped a beat

CLYNELISH 14 Year Old



Amazing whiksy!
Sweet & chocolatey! (amazing!)
Its Amazing :)


MY Other BDay gift from mini :) She s just sweet

Donnie Brasco

Im finally getting to watching it.. 7.6 on imdb.. I'm Curious
26min.. So far so good :)

I was supposed to work al week.. most of it got canceled (5 out of 6 days) I'm not entirely happy about that. Tough I do like the fact that this buys me more time to work for school..

The whole mob thing.. Amazing :)
Im looking forward to GTA IV. Rusian Mob.. Yeah :) A pitty, the amount of upgrades this ll ask of my PC. Another pitty.. Ill have to wait for it to come out on PC & those sony bastards.. it ll take a while to happen :( Im still wondering if we ll ever get to play the ".. stories" games (VC stories, SA stories, ..) altough I dont really care about those. PSP quality.. Still loving the whole Vice City game :)

Lefty .. what an amazingly Rich character.. damn. only Pachino :)
& Sonny Black.. Michael Madsen is Amazing! Incredible
& Donnie himself ofcourse. Depp is a powerfull actor.
Great cast, but you dont get a 7 in imdb easily :)

59min Wiseguy Tennis.. Supa


I might go out & get me the Godfather box tomorrow :)

Monday, May 28, 2007

25

Anyone who hasnt said the words by now can crawl into a hole & decompose for all I care (with maybe One exception) Those who cant handle this shouldnt be reading this. There s lots of other sites on the web. Try one of these.. (one, two, three!) There s no roster this time. Noone could be bothered to wait for the day. The Hut REALLY screwed things up for me this year. Its a pitty. 25 is a number to remember. And I will.. 26 will be better!

My busy work schedule did have its costs. I really want to pass this annoying school year, I really want to FINALLY be rid of school! But by god, if Id have known the cost.. I d probably have gone into it differently. Or maybe plainly just not at all. I mean, I dont really value the rubbish they thought me. & I still believe that I d have made it without all those useless years. I got to deploy myself in ways i d probably wouldnt have had the time for otherwise. And those are rich experiences. But its not what school taught me. Its what utterly ignoring school enabled me to achieve. Asfor my internship.. I can honestly say that the ONLY appliance of my X year education was the fact that they told me about wireshark. And I would have figured that out by my own too! I realize (again the s-z problem - amazing) now even more that the rubbish they value so high is Actually worth Nothing more than I supposedly ignorantly suspected.

As expected today was utter shite. I actually started the day by walking into dog excrement. (yeah, shite for those that dont understand)

Oh & I also found out why I can barely find anyone to play games with me anymore.. I tought they just didnt enjoy it as much as I do.. As it appears, I was wrong! How naive.

I should go to sleep but I wont like the day I wake up to, so Im putting it off. One heap of excrement, I tells ya!


I wanted to buy the latest gloomcookie (Thats 5) yesterday, but the guy didnt know the exact price, so I couldnt. Utterly depressing So I got 3 episodes (apparently thats all of them) of Nightmares & Fairy Tales. They re all by Serena Valentino & the good people at Slave Labor Graphics (SLG)
Plus some other commics. A dragon ball & 2 Dufaux et Marini commics L'Etoile du Désert (lol, I just discovered they got Rapaces translated in english. They re called Raptors. funny. & good too, they deserve it. They should to the scorpion too. That one s even BETER) and 3 dvds while we re making the list & checking it twice.. Sin City, Donnie Brasco (can you believe I havent seen this movie!!) & Aeon Flux (I REALLY need to get me them series DVDs from Amazon!!)


Battlestar Galactica looks promising & Im extremely happy to have GTA Vice City to play. Its SUCH a good game.. Amazing!


Im off to bed
Mini already pointed out I am staying up waay beyond what I originally planned. pf. I just dont feel like tomorrow!


ah & tonight will be the first night of No Muscle Relaxants! I hope Im not cripled in the morning!! I look forward to a pure night of sleep tough :)





.. things will get better! Only 3 more weeks, 5 more weeks & 4 months.. Ive been saying this for the last 2 years, only 4 more months :) No time to get burnt out, thats for sure!

Oh & the bitches at my provider didnt restore my database after the crash. I'm going to mail tomorrow & HOPE they can.. But I somehow dont think they will :s Its a lesson. You cant even trust the people you pay to do it, to backup & safeguard your valuable data. Thank Me I keep the valuable data here & backed up on an external location. .. pff And to think that I am seriously considering moving my blog to that environment. I might have lost my total blog data last week. Imagine that. Maybe I should make myself a book out of all this :) That d be rich :D

So, no real reflections as of now, maybe later. Tough reflections might be more of a 31 december kind of thing. Its a healthy thing to do once in a while :)

Sunday, May 27, 2007

Mancala

On Boardgamegeek, Wikipedia, Tradgames or Mastersgames..

Its always nice to discover that there are many different ways to play a game

Anywho, I finally got a mancala set :) Mini bought me one for my BDay & its just Lovely! A hand made woodcut design. Lovely :) Cant wait to play! (& Win :D moeha - lil hint to my future victims: link - Havent read it tough..)

Saturday, May 19, 2007

Climate change: A guide for the perplexed - earth - 16 May 2007 - New Scientist Environment

the 26 most common climate myths and misconceptions.

Human CO2 emissions are too tiny to matter

We can't do anything about climate change

The 'hockey stick' graph has been proven wrong

Chaotic systems are not predictable

We can't trust computer models of climate

They predicted global cooling in the 1970s

It's been far warmer in the past, what's the big deal?

It's too cold where I live - warming will be great

Global warming is down to the Sun, not humans

It’s all down to cosmic rays

CO2 isn't the most important greenhouse gas

The lower atmosphere is cooling, not warming

Antarctica is getting cooler, not warmer, disproving global warming

The oceans are cooling

The cooling after 1940 shows CO2 does not cause warming

It was warmer during the Medieval period, with vineyards in England

We are simply recovering from the Little Ice Age

Warming will cause an ice age in Europe

Ice cores show CO2 increases lag behind temperature rises, disproving the link to global warming

Ice cores show CO2 rising as temperatures fell

Mars and Pluto are warming too

Many leading scientists question climate change

It's all a conspiracy

Hurricane Katrina was caused by global warming

Higher CO2 levels will boost plant growth and food production

Polar bear numbers are increasing




Great read!

May 16, 1988: Nicotine Declared As Addictive as Heroin, Cocaine

Addicts.. No better than a heroin junk
More info at Nicotine Addiction 101 - checkit, interesting!!


only socially accepted..

Sunday, May 13, 2007

Hey mister tambourine man..

its late
but im chilling, so thats ok I guess


After discovering GNU Backgammon, DS backgammon in 42 all times classics feels silly. Good for nobrain games tough.. The AI on my cell is even worse. I cant play anything else than easy on it.. easy = almost nobrain.. Im really impressed by the GNU version tough!

I just played the chess in it for the first time.. I never started it, because I didnt feel like investing the time.. And I didnt feel like losing because I didnt really Play.
But I did now. On easy. And I screwed up, early in the game. & I mean I SCREWED UP! I lost my queen on the 6th move or so. But then the AI just Sucked. And I won. Unbelievable. The mess I was in.. Even an easy chess player should have beat me. I wasnt really concentrating on the game. But none the less.. I won. A slight dissapointment! I'll play for serious & on the more difficult scale tomorrow.


I AM sleepy & there IS a place I'm going to..
bed..

Saturday, May 12, 2007

Hamusutā to Kurasou, which translates to, "Let's Spend Time With Hamsters."

Amazing!!

Check out the site, what a game
unbelievable :D

Mini is cute

talking in her sleep n all
I really look forward to spending more time with her :)

Reflexes, Series & Mint

My reflexes have really improved the last few months. Ive always had em but I ve just tuned into them even more.


I dont get why people watch lost.. I watch lost myself & .. gawd it sucks! True, Season 3 is the best yet, but still .. it SUCKS! The quality is just .. missing!
Want to see great tv? something new? something recent? Try Heroes! You dont want that? Ever considered Sopranos? Yeah, I know, its running to its last days.. Anything else? Care for a laugh? Something Exceedingly witty? Tune into Desperate Housewives!
But maddon' Just QUIT watching Lost!
Forget the fact that you re curious & realise that its just plain junk. Nothing EVER happens nor will! Lets all just be honest. It sucks


We have a mint plant in the kitchen. One of those scrawny things you buy in a supermarket. My lovely honey moved it into a real pot (instead of the crappy original) and its Overly happy, growing like weeds.
And because of this, I discovered.. there s nothing as good as fresh mint :) The smell, the sweet taste, .. At first I only craved for an iced Mojito, but by now I just cant stop eating it :) Nonetheless; I will get myself Rum, Ice, .. ASAP!

Thursday, May 10, 2007

I'm Tired

I'm FINALLY tired!

I took me about three months of hell, but I'm there - I'm Tired. The whole double shifts, 7 days a week thing.. Im glad I proved myself & everyone that I can do it :) but now that its almost over, .. I am happy it is.

I dont feel like going back to school , back to the useless shite after spending my days doing stuff that actually matters to anyone. At least i can do something that matters at pizzahut - how sad is that? Anywho, its only for some months & then I'll be able to do interesting stuff. Stuff I actually LIKE doing

oh god I'll be glad to get out of school! Finally


I had a fun & interesting internship.
Installing some linux boxes & stuff.. yeah! Extremely Fun :)
& nothing as nice as seeing it all come together. The real user using the systems.. The stuff minituesly prepared.. Carefully tested & then brought into action. Abused compared to the careful testing it had before.. Its great to see it all comming together :)


& so is red dwarf :) Smeggin amazing series


I feel like having a glass of whisky.. I should get a softer one than I have right now. Pure Turf

My back is killing me!
I'll have to call the hut & the doctor tomorrow! I wont be able to keep it up for more than 20m :/ Annoying!


..
tired!

& now the circle is round :)

Wednesday, May 09, 2007

New Sopranos is just plain old AMAZING

Stuff keeps on coming, piling up..
Amazing!


My back s been killing me for some days now
muscle ache.. Its really bad. But its improving
Maybe it ll be alright by the time I need to work my next shift at the hut
Lets hope so
Or I'll have to go see a doctor about all this


& probably just because I slept too cold some nights ago :s (i think)

Tuesday, May 08, 2007

What do you mean, I'm funny?

"What do you mean, I'm funny?...You mean the way I talk? What?...Funny how? I mean, what's funny about it?...But I'm funny how? I mean, funny like I'm a clown? I amuse you? I make you laugh? I'm here to f--kin' amuse you? What do you mean, funny? Funny how? How'm I funny??...How the f--k am I funny? What the f--k is so funny about me? Tell me? Tell me what's funny!..."

- Goodfellas

Monday, May 07, 2007

Enough already with the Penguins


No More Penguins Stamp
by =yanagi-san on deviantART


Seriously.. After the tapdancing .. Surfing?
Get a Grip, man!

Saturday, May 05, 2007

Pizza Rimini in Gent

Usually I dont really seek visitors or whatever, but this time is different. The phone number of the delicious pizza restaurant "Rimini" in Ghent! Best pizza in Gent but The ONLY restaurant of which you cant for the love of GOD find the telephone number online! This has to change, once too many times did I waste time looking for it & then still having to go downstairs & cross the street to order one of their delicious pizzas!

The Rimini uses a cell phone for their orders & the number (or telefoonnummer in dutch) is 0484 618417. Thats Zero Four Eight Four, Six One, Eight Four, One Seven! Nul Vier Acht Vier, Zes Een, Acht Vier, Een Zeven. And thats in Belgium for those foreign peeps, thats +32, drop the zero!

Update - Just finished eating..
Cell (GSM) : 0473 792559
Regular : 09 2235023

They do seem to prefer people using the regular phone number!

Wednesday, May 02, 2007

Whisky

I dont know if I mentioned this, but I went flat out of whiskey some weeks ago. My last bottle - EMPTY!

So last weekend, I bought myself a new bottle! Another bottle of Lagavulin



Last one lasted about a year.. Try to find something that ll cost ya €40 & ll give you a years pleasure.. Whisky is cheap :D


I just realized what I d like for my next BDay.. Some bottles of NICE whiskey!
I just NEED a bottle of Blackadder :)
And maybe another nice one :) .. Edradour? (great whiskey!) Maybe another one? Who Knows :)

I really feel like passing by the Glengarry to get some!
yummy :)

Tuesday, May 01, 2007

I Finally finished my Dracula. Finally! Its been a while since I took that long to finish a book. and such a good one for that matter! amazing book. I hadnt expected it to be This good :)

Anywho,
This opens the path to .. my next book :) First first on the list is that lovely commic set ..

LE DIPTYQUE DRACULA de Pascal Croci et Françoise-Sylvie Pauly

and I'll probably start The Electric Kool-Aid Acid Test (Wolfe) and after that, FINALLY, my newest Hobb book :) I cant wait.. And then there s that other book.. & in between them I'll have to read some more EA Poe! Those thick books are just standing there.. lol


oh & I might really cut them old dreadz some day soon.. There are some undeniable downsides to them.. When and If I do, it will be an act of pure impulse, thats for sure.. On the other hand.. I really DO like them :)