Jump to content

operative

Active Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by operative

  1. Hello everyone.

    this is my first code for the ducky / teensy 2.0 board.

    Written with the Arduino / Teensyduino tool.

    The code sends a random keystroke every 1 to 15 seconds.

    Random Key might be from "a" to "z"

    Sorry for the "dirty" switch/case stuff, i'm working on a version with char arrays.

    this has no special purpose. it's only to annoy some workmates ^^

    int ledPin = 11; 
    long randNumber;
    long randNumber2;
    
    void setup() { 
    Serial.begin(9600);
    randomSeed(analogRead(0));  
    pinMode(ledPin, OUTPUT); 
    }
    
    void loop() 
    {
    digitalWrite(ledPin, HIGH); // set the LED on
    randNumber2 = random(1,28);
    switch (randNumber2) {
        case 1:
          Keyboard.print("a");
          break;
        case 2:
          Keyboard.print("b");
          break;
        case 3:
          Keyboard.print("c");
          break;      
        case 4:
          Keyboard.print("d");
          break;
        case 5:
          Keyboard.print("e");
          break;
        case 6:
          Keyboard.print("f");
          break;
        case 7:
          Keyboard.print("g");
          break;
        case 8:
          Keyboard.print("h");
          break;
        case 9:
          Keyboard.print("i");
          break;
        case 10:
          Keyboard.print("j");
          break;
        case 11:
          Keyboard.print("k");
          break;
        case 12:
          Keyboard.print("l");
          break;      
        case 13:
          Keyboard.print("m");
          break;
        case 14:
          Keyboard.print("n");
          break;
        case 15:
          Keyboard.print("o");
          break;
        case 16:
          Keyboard.print("p");
          break;
        case 17:
          Keyboard.print("q");
          break;
        case 18:
          Keyboard.print("r");
          break;
        case 19:
          Keyboard.print("s");
          break;      
        case 20:
          Keyboard.print("t");
          break;
        case 21:
          Keyboard.print("u");
          break;
        case 22:
          Keyboard.print("v");
          break;
        case 23:
          Keyboard.print("w");
          break;
        case 24:
          Keyboard.print("x");
          break; 
        case 25:
          Keyboard.print("y");
          break;     
        case 26:
          Keyboard.print("z");
          break;
        default: 
        Keyboard.print("alr");
      }
    delay(500);
    digitalWrite(ledPin, LOW);
    randNumber = random(15000);
    delay(randNumber);
    }

  2. Hello everyone,

    a few days ago, i added 2 used hdds to my gentoo machine (80gb and 160gb IDE). i've tested both drives on my desktop and they worked fine. mounted them in the server, connected everything (80gb as primary slave and 160gb as secondary master) and started the box. The bios recognized the drives, so did my gentoo installation (/dev/hdb and /dev/hdc)

    i partitioned both disks using fdisk and created 1 partition on both disks using the full capacity. formatted them using mkefs -j for ext3.

    now for the problem:

    i can mount both drives manually to /data1 and /data2 (also umount and mount them again)

    but if i reboot the machine, the automount based on the fstab entry fails for both drives. manual mount also fails telling me that the partitions are allready mounted or in use (that's not the case).

    if i delete the partitions, reboot, recreate the partitions i can mount them until the next reboot.

    i'm stuck :( don't what i can try.

  3. Did you chmod the executable with 4755 and make sure the owner of the executable is root (Sorry, forgot to mention that bit)

    yeah

    root@servant:~# ls -al
    total 52
    drwx------  2 root root  4096 2009-09-22 06:02 .
    drwxr-xr-x 21 root root  4096 2009-09-22 02:23 ..
    -rwxr-xr-x  1 root root 10995 2009-09-22 06:02 a.out
    -rw-------  1 root root  2582 2009-09-22 06:01 .bash_history
    -rw-r--r--  1 root root  2227 2008-12-23 10:53 .bashrc
    -rw-r--r--  1 root root   160 2009-09-22 05:01 code.c
    -rw-r--r--  1 root root   561 2009-09-22 02:33 .htoprc
    -rw-r--r--  1 root root   140 2007-11-19 09:57 .profile
    -rwsr-xr-x  1 root root 10995 2009-09-22 06:01 whoami_uid
    root@servant:~# a.out
    whoami: cannot find name for user ID 3352884648
    root@servant:~# whoami_uid
    whoami: cannot find name for user ID 2284944168

  4. The ThinkPads are a special case when it comes to removing / resetting the bios password.

    Most Lenovo (IBM) Laptops are only secured by a hdd password which can (you guessed it) removed by replacing the hdd. you'll most likely get errors / warnings about a none genuine lenovo harddisk blablabla (that one can be fixed by an update from the lenovo support website)

    As far as i know, most of the never thinkpads, especially the T series, have TPM chips (some are on a removable board). don't even try to remove the TPM board an start the machine, it won't work.

    If only the Bios Master password is set, you might have a change because you can get into the bios in some sort of "user mode". That means that you can change only some options.

  5. Hello everyone,

    I'm trying to write a php file that executes a shell command (using shell_exec()) to kill a process when a button on a website is pressed.

    The reason why i'm doing this is, that this server (wow server emulator) crashes sometimes and i don't want to log on via ssh every time and kill it using the kill (or pkill).

    so far i'm getting the PID of the server using 'pidof' or directly using pkill -f in a shell script.

    What i totally forgot was the fact, that the wow server is running under it's own user (apache2 also has it's own user)

    so my question is: how can i kill the process of another user using shell script?

    This is my configuration:

    Ubuntu 9.04 Server

    wow server emulator

    apache2 + php

×
×
  • Create New...