Jump to content

barrytone

Active Members
  • Posts

    191
  • Joined

  • Last visited

Posts posted by barrytone

  1. Thanks cooper.

    Having talked to a few others, this seems to be the general consensus.

    I think PHP and it's min() have softened me up :roll:

    I'm just gonna pass the length of the array to the function and use:

    int minvalue(int iar[], int size) {
    
    
    
       int ret = iar[0], count=0;
    
    
    
       while (count < size) {
    
    
    
          if (iar[count] < ret) {
    
             ret = iar[count];
    
          }
    
       count++;
    
       }
    
    
    
    return(ret);
    
    }

    Oh: one last thing... Why can't I call the array "iar"? I don't know Hungarian. I just meant it to be "Input ARray" :roll:

  2. I've hit a bit of a problem with a function I wrote in C.

    I needed a function to find the minimum value in an array of integers, without knowing it's size. I started with this:

    int minvalue(int iar[]) {
    
    
    
        int ret = iar[0], count=0;
    
    
    
        while (iar[count]) {
    
    
    
            if (iar[count] < ret) {
    
                ret = iar[count];
    
            }
    
        count++;
    
        }
    
    
    
    return(ret);
    
    }

    But I then realised I would hit problems if the array contained a '0' half way though, and the loop would stop executing.

    So then I tried this:

    int minvalue(int iar[]) {
    
    
    
        int ret = iar[0], count=0;
    
        int size = sizeof(iar)/4;
    
    
    
        while (count < size) {
    
    
    
            if (iar[count] < ret) {
    
                ret = iar[count];
    
            }
    
        count++;
    
        }
    
    
    
    return(ret);
    
    }

    I'm sure it's a feature and not a bug, but the sizeof() function doesn't seem to be returning the size of the array that's fed to the function. It just returns '4' no matter what.

    If anyone could help me out and explain what it is I have to do to make this work, or has a neat little function of their own that they wouldn't mind sharing, that would be fantastic :)

    Many thanks.

    Oh, and yes: I am a C newbie.

  3. That's pretty cool :)

    If you didn't want to mess with the mains: you could use an old mic or even an old speaker and amplify the output to drive some LEDs/lights. Shouldn't be too hard to do with batteries. It'd flash to any sound source too.

  4. psexec %1 -u administrator -p %3 sc config messenger start= auto
    
    psexec %1 -u administrator -p %3 net start messenger
    
    psexec %2 -u administrator -p %3 sc config messenger start= auto
    
    psexec %2 -u administrator -p %3 net start messenger
    
    psexec %2 -u administrator -p %3 net send %1 "%4"

    save as sendmsg.bat

    http://sysinternals.com -> pstools.

    Make sure psexec is in your PATH or in the same dir as the above file.

    sendmsg.bat <recipient ip> <sender ip> <admin password> <message>

    That should work fine.

    You can use the at command to schedule it

  5. Although a you can use the GET method and put the details into the url, this won't work for a lot of websites written in php.

    Newer versions of php have register globals turned off by default (or has been turned of deliberately). With the result that the code has to reference $HTTP_GET_VARS[varname] instead of just $varname to get the value inputted by file.php?varname=somevalue.

    Basically, unless the coder intended the variable's value to be taken from the url, it won't work.

  6. It might be cheating, but you could just wire one of the pots from one of the analog sticks into a circuit for controlling the speed of the motor. Not as efficient as PWM, but it would work.

    Otherwise: look here and here, and try to come up with a circuit that would read signals from the data pin and turn it into something usefull.

    The latter method seems a little over the top if you ask me.

  7. Try and pick a name that's something to do with where it is.

    As stupid as it may seem: where I was living till recently, in a place called Aire Vally, there was a guitar shop opened called "Aire Guitars". I thought it was a sucky name, but then they won an award for it.

    Seriously though, I passed a computer shop yesterday called "MEGABYTE". So I'm sure you can do better than that :roll:

    Or call it "Less Than Three"

  8. Am I the only one with a good experience of Ubuntu? :?

    My laptop is only a few months old. I can't get BackTrack, Auditor, Knoppix or any of the other live cds I've tried to boot.

    I couldn't get suse to install. Or slackware, or debian, or fedora.

    Ubuntu just worked. And not only that, it detected ALL my hardware.

    I'm not saying Ubuntu will work for everybody, but I don't want it getting a completely bad rep. It's the best "easy to use" distro I've used.

  9. They won't be able to figure out who "You" is. The exit node can tell someone on the network requested something, but he won't know who it was.

    Although this may be true, I think it (again :P ) depends on the network setup. If you're planning on plugging into an network port and the admin knows the network pretty well (or has a topology diagram), they can find you in no time at all. If they notice you that is.

  10. Right... I've just moved to Uni, and as such I've had to leave my testing lab at home... I only have a laptop and my (now dead :evil: ) server here with me.

    What I want to know is: would setting a static ARP entry for your default gateway help lessen the effects of Man in the Middle (MitM) attacks?

    I figured that the most likely choice of two machines for an attacker to position themselves between would be the target and the respectve gateway to the internet, and that by setting a static arp entry for the gateway it would be possible to stop the attacker from reading traffic going from the target to the gateway.

    I'm not sure if this would work, and have no means to test it, so if anyone could give it a try for me, that would be nice :)

    Note: I'm not saying this would prevent MitM attacks, just make it a little harder for an attacker to get passwords and things.

  11. Thanks for the tips. Does anyone know how I could find out if such software made any changes to the PC (registry, .dlls etc.) or if it left the PC "clean"?

    Yes! There is.

    Two little apps from sysinternals will do the job nicely. I use them for when I'm trying to force applications to deploy across a network :)

    FileMon is a little utility that monitors all changes to files. You can set filters so you only see changes made by certain applications etc.

    And RegMon is utility that does the exact same thing, but monitors changes to the registry instead of changes to files :)

  12. Good episode guys. I have similar opinions to others about the sound quality. Gotta keep the filesize down though, I know :)

    But he asked my question!!! :D (to the uninitiated, the VI or Emacs one. And by the way, it's pronounced Vee Ai, as if it were an abbreviation even though it isn't)

    Of course, Dana answered wrong (Notepad... Pffff! Noob!), but I guess that just goes to show even a software Jedi has some stuff left to learn. ;)

    Pfft. Damn Jedis. I use Vi for my programming under Windows... Or EditPad.

    Honestly :P

  13. I got an XDA a few months back, and I've been having great fun with it. I've become organised all of a sudden too! :P

    I've been playing around with WiFiFoFum, the ARM version of Cain and a few other bits and pieces.

    War walking is great fun, and WiFiFoFum works really well. The mobile cain is pretty usefull, but obviously doesn't include most of the functionality of it's x86 bigger brother :P

    So here's my questions...

    What security/enumeration/script kiddie apps do you use on your PDA (if you have one obviously), what do you use them for, and what do you think of them? :)

×
×
  • Create New...