Tag Archives: Uncategorized

skype for Linux (Ubuntu 12.04 LTS), how to break it on a 64-bit OS.

So, I destroyed my skype install with the unlinking of a few libs thanks to another 3rd party package..

Trying to clean this up is not.. fun…

$ /usr/bin/skype 
bash: /usr/bin/skype: No such file or directory

Now, that does prove an issue… And so does the following:

strace /usr/bin/skype 
execve("/usr/bin/skype", ["/usr/bin/skype"], [/* 38 vars */]) = -1 ENOENT (No such file or directory)
dup(2)                                  = 3
fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4a5a7c8000
lseek(3, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
close(3)                                = 0
munmap(0x7f4a5a7c8000, 4096)            = 0
exit_group(1)                           = ?
$ ldd /usr/bin/skype 
	not a dynamic executable

So, What am I expected to do? Cry? Well, no..

Good thing is, I cleared out the installation in a quiet but brute-ish way after the above results.
Story goes like this – a third party installation killed of a few libs that was needed for skype to.. well, live.

So I took some time on an airport and checked with aptitude what exactly those might be.

Aptitude view of skype.deb

So, then I remembered, I’m a running 64-bit OS, perhaps the ia32-libs got partially destroyed somehow?
Said and done, did the install, and swooosh, the “64-bit” version you download isn’t really 64-bit..

Then I remembered something else.. What did file say about that skype binary?

$ file /usr/bin/skype
/usr/bin/skype: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x06628ce1adec6427dabb21f1ab71194752a638ee, stripped

I’m so… sooo stupid sometimes. Of course my third party application killed of the 32-bit binaries and libs and that caused my only other 32-bit crap to die off..

So, that’s solved! :D.

Tracing the empire

11 * * *
12 Episode.IV (206.214.251.1) 145.959 ms 149.824 ms 148.464 ms
13 A.NEW.HOPE (206.214.251.6) 156.132 ms 157.068 ms 156.233 ms
14 It.is.a.period.of.civil.war (206.214.251.9) 147.855 ms 152.354 ms 149.796 ms
15 Rebel.spaceships (206.214.251.14) 149.474 ms 149.624 ms 150.054 ms
16 striking.from.a.hidden.base (206.214.251.17) 149.339 ms 151.867 ms 149.945 ms
17 have.won.their.first.victory (206.214.251.22) 146.722 ms 148.857 ms 147.671 ms
18 against.the.evil.Galactic.Empire (206.214.251.25) 149.181 ms 152.796 ms 151.277 ms
19 During.the.battle (206.214.251.30) 154.549 ms 155.665 ms 154.825 ms
20 Rebel.spies.managed (206.214.251.33) 150.907 ms 148.952 ms 151.019 ms
21 to.steal.secret.plans (206.214.251.38) 149.545 ms 149.625 ms 148.867 ms
22 to.the.Empires.ultimate.weapon (206.214.251.41) 158.853 ms 157.053 ms 161.862 ms
23 the.DEATH.STAR (206.214.251.46) 148.884 ms 147.116 ms 149.128 ms
24 an.armored.space.station (206.214.251.49) 152.589 ms 150.469 ms 150.571 ms
25 with.enough.power.to (206.214.251.54) 151.442 ms 152.010 ms 151.513 ms
26 destroy.an.entire.planet (206.214.251.57) 153.562 ms 152.332 ms 151.925 ms
27 Pursued.by.the.Empires (206.214.251.62) 166.433 ms 164.253 ms 164.974 ms
28 sinister.agents (206.214.251.65) 152.390 ms 152.968 ms 158.027 ms
29 Princess.Leia.races.home (206.214.251.70) 167.887 ms 165.350 ms 162.404 ms
30 aboard.her.starship (206.214.251.73) 152.582 ms 152.397 ms 158.513 ms
31 custodian.of.the.stolen.plans (206.214.251.78) 151.090 ms 149.627 ms 147.011 ms
32 that.can.save.her (206.214.251.81) 157.147 ms 156.460 ms 157.849 ms
33 people.and.restore (206.214.251.86) 168.422 ms 167.394 ms 166.799 ms
34 freedom.to.the.galaxy (206.214.251.89) 152.440 ms 156.055 ms 155.729 ms
35 0-------------------0 (206.214.251.94) 159.248 ms 159.566 ms 161.032 ms
36 0------------------0 (206.214.251.97) 158.886 ms 157.660 ms 158.146 ms
37 0-----------------0 (206.214.251.102) 150.927 ms 146.796 ms 152.257 ms
38 0----------------0 (206.214.251.105) 148.734 ms 148.287 ms 149.242 ms
39 0---------------0 (206.214.251.110) 150.993 ms 151.684 ms 153.563 ms
40 0--------------0 (206.214.251.113) 150.905 ms 150.150 ms 152.983 ms
41 0-------------0 (206.214.251.118) 156.114 ms 154.121 ms 154.987 ms
42 0------------0 (206.214.251.121) 152.037 ms 153.934 ms 154.416 ms
43 0-----------0 (206.214.251.126) 148.929 ms 152.186 ms 151.089 ms
44 0----------0 (206.214.251.129) 147.375 ms 147.993 ms 148.035 ms
45 0---------0 (206.214.251.134) 151.489 ms 151.317 ms 150.702 ms
46 0--------0 (206.214.251.137) 154.460 ms 156.310 ms 152.253 ms
47 0-------0 (206.214.251.142) 149.767 ms 149.624 ms 150.590 ms
48 0------0 (206.214.251.145) 149.935 ms 152.495 ms 149.886 ms
49 0-----0 (206.214.251.150) 152.357 ms 159.025 ms 157.480 ms
50 0----0 (206.214.251.153) 163.948 ms 159.216 ms 155.574 ms
51 0---0 (206.214.251.158) 147.961 ms 147.007 ms 155.494 ms
52 0--0 (206.214.251.161) 153.767 ms 154.348 ms 159.209 ms
53 0-0 (206.214.251.166) 154.507 ms 153.809 ms 151.638 ms
54 00 (206.214.251.169) 149.155 ms 151.584 ms 152.210 ms
55 I (206.214.251.174) 151.401 ms 147.150 ms 155.210 ms
56 By.Ryan.Werber (206.214.251.177) 153.388 ms 154.689 ms 154.028 ms
57 When.CCIEs.Get.Bored (206.214.251.182) 167.608 ms 171.276 ms 169.846 ms
58 CCIE.38168 (206.214.251.185) 153.669 ms 152.420 ms 149.134 ms
59 FIN (206.214.251.190) 156.793 ms * *

Benchmarking/bored with ighashgpu and GTX470 / GTX580

Yes.. I agree – there should be something better to do on a friday evening like this.

But then again – naaah. Found some old cd’s, and am currently installing a Red Hat 8.0 virtual machine to wack away at.

But, that takes some time. So at work, we had a small discussion on current speeds or perhaps more accurate – average speeds that one can expect while using
simple bruteforce.

So, I got on my old machine that doesn’t have as new setup as my other rig, and well – here’s the proof that one can enjoy the fun parts of a GFX, even if it’s a bit old ;).

GTX470

Edit/Update: So, got bored again and ran the same testbenchmark on my newer rigg with a GTX580 instead.. Results? Tada:

GTX580

SPDY, good/bad/awesome/bullshit?

So, there’s this little project that aims to speed things up over SSL.

I tried it out, and so far I’d say the beta isn’t really doing the job that great.
If you wanna check it out for yourself, head over to Google’s developers page.

It runs with the following specs needed:

Apache 2.2 (≥2.2.4)
mod_ssl enabled

If you like most of the world are using PHP, you need to check out the PHP section in the link.

random chatbots #2, not that good for conversation :(

I don’t dare comment anymore, so I’ll just post the transcript. Lazy bastards would sum it all up ;).

(XX:X1:09) lsalotus@hotmail.com: hello there :)
(XX:X1:45) Me: hi there random spamb0t =)
(XX:X1:54) lsalotus@hotmail.com: nah, I am a vegetarian...  no spam for me! haha
(XX:X2:22) Me: Just got out of the shower?
(XX:X2:31) lsalotus@hotmail.com: Hiya, How ru doing today? Lets chat for a bit ?!? Im bored and wanted to meet new people... 
(XX:X3:15) Me: tell your underaged botbarf to learn to script better. kkthx.
(XX:X3:25) lsalotus@hotmail.com: a what?
(XX:X3:35) Me: a bullwinkle.
(XX:X3:44) lsalotus@hotmail.com: Cool... Well, my name is Jenny i am originally from Miami!! Can I ask you a question?
(XX:X4:14) Me: Awsome. You just rant on don't ya?
(XX:X4:23) lsalotus@hotmail.com: What kinda girls u in to ? Are u more into BIG TITIS or a BIG BOOTY ? :P
(XX:X4:54) Me: BIG BOTS
(XX:X5:03) lsalotus@hotmail.com: bot? like a robot? lol
(XX:X5:43) Me: yes, ain't that funny.
(XX:X5:54) lsalotus@hotmail.com: good question, huh? lol.. I have a lot of both!! ;) want to see? I have some free time now... 
(XX:X6:21) Me: Sure, send me some links and I'll click the same second I see 'em!
(XX:X6:32) lsalotus@hotmail.com: Its http://t.co/vtEzy2z just click the "Accept Invite" button on the left side of the page, its 100% free to join you only need a credit card to verify that you are over 18 ;p 
(XX:X6:45) Me: awsome.
(XX:X6:56) lsalotus@hotmail.com: Cool... let me set up my cam and you can watch me shake my booty!! LOL.. brb 
(XX:X7:15) Me: shouldn't you default back to the first main loop of bull soon?
(XX:X7:26) lsalotus@hotmail.com: Ok! Go here http://t.co/C3c9vQo and we'll have a PRIVATE 1on1 chat..There's plenty pix of me in there, if you like click the "join free" on top, then register and it'll take you straight to my webcam, I'll be there in a minute.. ;)   
(XX:X7:39) Me: geh...
(XX:X7:49) lsalotus@hotmail.com: If it says that im offline, just start signing up.. im getting on now..  
(XX:X8:11) Me: well of course you're 'offline', your'e scripted by a retard.
(XX:X8:23) lsalotus@hotmail.com: There is no charge to sign up, but its gonna ask you for your credit card. Im wearing almost nothing and I dont want any kids watching me!! lol..  
(XX:X8:47) Me: That was a really lame ass try to cover up.. well, nothing.
(XX:X8:59) lsalotus@hotmail.com: yes im real
(XX:X9:13) Me: of course you are dear, of course you are.
(XX:X9:25) lsalotus@hotmail.com: Once you've completed that, it'll automatically redirect you to my webcam page.. u better give me some "gold" when you're on the site lol..it's like a flirt and I'd love some from you ..k? ;-) 
(XX:X9:51) Me: who ever might be reading the transcripts for 'improvements', just rent some moron from a 3rd world country instead then try to script this shit.
(XX:X0:03) lsalotus@hotmail.com: im a mixed heritage
(XX:X0:34) Me: of course. A crossing between noob-land and noob-topia with a sprinkle of lame-ass-land.
(XX:X0:43) lsalotus@hotmail.com: k u in?
(XX:X0:47) Me: yes
(XX:X0:59) lsalotus@hotmail.com: kk, click on private time underneath my cam,  usee it?
(XX:X1:04) Me: yes.
(XX:X1:13) lsalotus@hotmail.com: k ;-) 
(XX:X2:21) Me: Well, start pastebin your code so I can have some lolz!

KiXtart Logonscript.

Found an old relic.

Original post can be found here.

REASON OF POSTING:
This community has given me so much since I started sniffing this place for usefull information – time to give something back.
Code and instructions as follows;

BUILD NOTES:
This build was working correctly with a 2003 AD, kix 4.5x and XP clients.

Create a GPO with user-logon-script pointing toward wkix32.exe
in same catalouge create following files:

kixtart.kix

;Main file.

if NOT @LOGONMODE
Break On
EndIf

$silent=SetOption('Explicit','ON')
$silent=SetOption('CaseSensitivity','OFF')
$silent=SetOption('NoMacrosInStrings','OFF')
 
Dim $func_dir,$file_dir,$FileName
;Define values
$func_dir = @scriptdir
$file_dir = @scriptdir

 
;call functions 
 
$FileName = Dir($func_dir+"\fn*.kix")
While $FileName <> "" and @ERROR = 0
 call $func_dir+"\$FileName"
  $FileName = Dir() ; retrieve next file
Loop
;Call each *.udf file until an error occurs or there are no more files to call.

;next two lines enabled at testphase. 
;MessageBox ("Logon-Script started","Enable and change this text to enable messagebox with info regarding script running",64,)
;fnWriteLog("Script started at: " + @TIME+" "+ @DATE+" "+@LServer+" "+@USERID)

fnRemdrive("1.0") 

fnNetmap($func_dir+"\network.ref")


;fnWriteLog("Script ended at: " + @TIME+" "+ @DATE+" "+@LServer+" "+@USERID)

exit 

network.ref

; Rev 1.0.0 
; Created: 
;  $Revision:  $ $Date: 200y/mm/dd  $
;
; Layout file for logon script
; 
 
[NetworkResources]
SetTime   = SetTime.NetworkResources
Group   = Group.NetworkResources
 
Domain   = Domain.NetworkResources
;Domain.GroupX = Controlgroups to sort by.

/*
[Controlgroup1]
Home.1      = h:,@homeShr,some group
SetTime.1   = ,@lserver,some group
NetShr.2	= i:,\\netshr\path,some group

fnnetmap.kix

; Function for DriveMapping using a standard ini-shaped file (ie - network.ref).

function fnnetmap($path)
Dim $i,$domaingrp,$valuename,$value,$donotmap,$group
 
$i = 0
for each $domaingrp in split(left(readprofilestring($path,"",""), -1),chr(10))
  if $i = 0 and ingroup($domaingrp)
    $i = $i + 1 
    for each $valueName in split(left(readprofilestring($path,$domaingrp,""),-1),chr(10))
      $value = split(readprofilestring($path,$domaingrp,$valueName),",")
      $doNotMap = 0
      for each $group in split($value[2],"|")
        if left($group,1) = "!" and ingroup(substr($group,2))
          $doNotMap = 1
        endif
      next
      for each $group in split($value[2],"|")
        if ingroup($group) - $doNotMap
          select
           case left($valueName,7) = "NetShr."
            use $value[0] $value[1]
            if @error fnwritelog("Error occured in fnnetmap.kix."+ $value[0] +"|"+ $value[1]+"| "+ @error+" , "+ @serror) endif
           ;case left($valueName,8) = "SetTime."
            ;SETTIME "$value[1]"
            ;if @error fnwritelog("Error occured in fnnetmap.kix."+ $value[0] +"|"+ $value[1]+"| "+ @error+" , "+ @serror) endif
           case left($valueName,5) = "Home."
            use $value[0] @HomeShr 
            if @error fnwritelog("Error occured in fnnetmap.kix."+ $value[0] +"|"+ $value[1]+"| "+ @error+" , "+ @serror) endif
          endselect
        endif
      next
    next
  endif
next
endfunction

fnWriteLog.kix

;fnWriteLog.

Function fnWriteLog($text)
   Dim $rc, $loglile, $filehandle
   $filehandle = "7"
   $logfile = ExpandEnvironmentVars(%temp%) + "\logon.log"
   $rc = WriteLine ($filehandle, @Date + " " + @Time " - " + $text + @CRLF)
   If $rc < 0
      $rc = Close ($filehandle)
      $rc = Open ($filehandle, $logfile, 5)
      Select
         Case $rc = -1
            $rc = MessageBox ("Invalid file name (" + $logfile + ") specified for log file.","Logon Script Error",48)
         Case $rc = 0
            fnWriteLog ($text)
         Case $rc => 0
            $rc = MessageBox ("Error(" + $rc + ") while attempting to open log file (" + $logfile + ").","Logon Script Error",48)
      EndSelect
   EndIf
EndFunction

fnRemDrive.kix

;fnRemDrive.

Function fnremdrive($checkvalue)
dim $checkval,$check,$wrcheck
$checkval="HKEY_CURRENT_USER\Software\ACME"
  $check=readvalue($checkval,"script")
  if @error = 0
   if NOT $check = $checkvalue
    USE * /DELETE /PERSISTENT
    $wrcheck=writevalue($checkval,"script",$checkvalue,"REG_SZ")
   endif
  endif
endfunction

Last function was in use due to some error in removing mappings/errors with mapping thanks to faulty handeling of mappings with kix 4.50 and/or a bad damn network.

NOTE: Most of this code exists thanks to this community – this is the reason I give it ‘back’. Many hours of consulting-time was spent on this – but only to put it into production – NOT development – and the hours that was – code was provided to me by the inhabitants of kixtart.org.

Help or code optimation is always welcome. Better commenting as well. Go with the flow.

Explanation:

running wkix32.exe / kix32.exe only will make the script look in @scriptdir for @userid.kix – next in line is kixtart.kix – this exists – and if you ever need a specific login for a user – simply create a main file with the username.

The main – kixtart.kix will enumerate (perhaps in a faulty manner) all fn*.kix files in @scriptdir – thus adding your own function will not require that much energy – and logging can always be added or edited due to the use of the function provided (fnwritelog.kix). The structure of the “ini” file containing the mappings should be self-explained. If errors found – please report it. This is a base to be handled. Several functions has been removed due to customer-specific-builds, built during work-hours and thus not mine to use anymore.

NOTE REGARDING fnRemDrive:
This function uses a reg key to be used as a version-handler – each time you update things you use a new version, if the new version is not equal to the version in the reg-key – remdrive will be used – this was used due to
to much troubleshooting faulty drives when servers was changed – new mappings added / removed.

NOTE REGARDING PATH TO SCRIPT! :
When I wrote and created this in 2006, I used the full scriptpath of\\domain\sysvol\fqdn.topdomain\{id}\[user(think it was)\scripts\ .
A bit messy – but safer than placing it in \\domain\netlogon\ due to 1. harder to find – security can be added within the applied logic – you apply this only to a specific WMI-filter/group-access via the GPO.

ISSUES:
Fast logon opt. may scr*w things up as usual. Nonworking script – disable it.

This is as always – WORK IN PROGRESS.
Questions/etc – provide it in the thread.

Arduino Uno with SHT15

So yeah. I am “done” with the thing. Need to fix it into a permanent state… But here is a demo of it running and getting into “to hot state” in a youtube clip, and another.

You’ll need the SHT1x library if you don’t wanna create it yourself.

Here’s the code I am running:

#include <"SHT1x.h"> 

#define dataPin 8
#define clockPin 12

  int del=100; 
  int delo = 10000;
  int val = 0;
  const int speakerPin = 6;
  const char notes[] = "ccggaagffeeddc ";
  const int beats[] = { 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 4 };
  const int length = sizeof (beats) / sizeof (beats [0]);
  const int tempo = 50;
  
void playTone(int tone, int duration) {
 for (long i = 0; i < duration * 1000L; i += tone * 2) {
   digitalWrite(speakerPin, HIGH);
   delayMicroseconds(tone);
   digitalWrite(speakerPin, LOW);
   delayMicroseconds(tone);
 }
}
void playNote(char note, int duration) {
  const char names[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C' };
  const int tones[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };
  for (int i = 0; i < 8; i++) {
    if (names[i] == note) {
	playTone(tones[i], duration);
    }
   }
}
void playTune (const char* notes, const int* beats, int length, int tempo)
{
  for (int i = 0; i < length; i++) {
    if (notes[i] == ' ') {
     delay(beats[i] * tempo); // rest
  } else {
     playNote(notes[i], beats[i] * tempo);
  }
  }
  delay(tempo / 2);
}

// The setup() method runs once, when the sketch starts
void setup()
{
  Serial.begin(9600);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);  
}

void loop()
{
  SHT1x sht1x(dataPin, clockPin);
  float tempC = sht1x.readTemperatureC();
  float tempF = sht1x.readTemperatureF();
  float humidity = sht1x.readHumidity(); 
  float maxtemp = 25.60; 
  
 
    if (tempC > maxtemp){
      delo = 1000;
      Serial.print("WARNING - HIGH TEMP");
      digitalWrite(2, HIGH);   // turn on LED on pin 2
      delay(del);              // wait (length determined by value of 'del')
      digitalWrite(2, LOW);    // turn it off

      digitalWrite(3, HIGH);   // turn on LED on pin 3
      delay(del);              // wait
      digitalWrite(3, LOW);    // turn it off
      
      digitalWrite(4, HIGH);   // turn on LED on pin 4
      delay(del);              // wait
      digitalWrite(4, LOW);    // turn it off
      
      digitalWrite(5, HIGH);   // turn on LED on pin 5
      delay(del);              // wait
      digitalWrite(5, LOW);    // turn it off
      
      digitalWrite(4, HIGH);   // turn on LED on pin 4
      delay(del);              // wait
      digitalWrite(4, LOW);    // turn it off

      digitalWrite(3, HIGH);   // turn on LED on pin 3
      delay(del);              // wait
      digitalWrite(3, LOW);    // turn it off

      playTune (notes, beats, length, tempo);
      
    }
    else
    {
     delo = 10000;
     digitalWrite(2, HIGH);   // turn on LED on pin 2
     delay(del);              // wait (length determined by value of 'del')
     digitalWrite(2, LOW);    // turn it off  
    }
 
  Serial.print(" delo = ");
  Serial.print(delo);
  Serial.print(" ");
  Serial.print(" Temp C - F: ");
  Serial.print(tempC);
  Serial.print(" - ");
  Serial.print(tempF);
  Serial.print(" Humidity :");
  Serial.print(humidity);
  Serial.print("\n");
  delay(delo); 
}

The schematics is to come. but, you’ll prolly figure it out – hint would be to look at the code.

And to top it of, here’s some stats that apply to Adruino Uno R3 and the Nano;

Speed test
----------
F_CPU = 16000000 Hz
1/F_CPU = 0.0625 us
The next tests are runtime compensated for overhead
  nop                       : 0.063 us
  avr gcc I/O               : 0.125 us
  Arduino digitalRead       : 3.650 us
  Arduino digitalWrite      : 3.903 us
  pinMode                   : 4.623 us
  multiply volatile byte    : 0.632 us
  divide volatile byte      : 12.893 us
  multiply volatile integer : 1.449 us
  divide volatile integer   : 15.218 us
  multiply volatile long    : 4.530 us
  multiply single float     : 7.110 us
  multiply double float     : 7.110 us
  divide double float       : 79.978 us
  itoa()                    : 16.488 us
  ltoa()                    : 239.578 us
  dtostrf()                 : 79.278 us
  random()                  : 94.253 us
  y |= (1<