Jump to content

Xcross87

Members
  • Content Count

    42
  • Joined

  • Last visited

Everything posted by Xcross87

  1. Thank you@ I've fixed that damn thing :D Problem solved!
  2. By mistake, I selected 'Expand' properties for gnome main menu panel, then everything is grouped into center. Then I try to reselected 'Expand' properties, it doesn't go back to normal. Here's how it looks: How can I fix this problem? [moved from Software by spinynorman]
  3. I've created 3 files: swap.h and swap.c then make static library from it gcc -Wall -c swap.c ar -cvq libswap.a swap.o Then I write 2 program to test this library: test_swap.c and test_swap.cpp I compile $ gcc -Wall -o testc test_swap.c libswap.a $ ./testc a = 100 | b = 1 $ g++ -Wall -o testcpp test_swap.cpp libswap.a /home/user/tmp/cc2Lcf8G.o: In function `main': test_swap.cpp:(.text+0x2b): undefined reference to `swap_int(int*, int*)' collect2: ld returned 1 exit status What's wrong with this in C++? Here the source code + swap.h #ifndef __SWAP_H__ #define __SWAP_H__ void swap_int( int *, int * ); #endif // __SWAP_H__ + swap.c #include "swap.h" void swap_int( int *a, int *b ) { int tmp = *a; *a = *b; *b = tmp; } + test_swap.c #include <stdio.h> #include "swap.h" int main ( ) { int a = 1, b = 100; swap_int( &a, &b ); printf("a = %d | b = %d\n", a, b ); return 0; } + test_swap.cpp #include <iostream> #include "swap.h" int main( ) { int a = 1, b = 100; swap_int( &a, &b ); std::cout << "a = " << a << "b = " << b << std::endl; return 0; }
  4. I have 3 files: main.c, mylib.h, mylib.c Now I want to put mylib.h into : /usr/include/mydir/mylib.h And I create a static library: libmylib.a, and put into the folder: /usr/lib/mydir/libmylib.a Then I compile: $ gcc -o main main.c Then I got linking error main.c:(.text+0x3e): undefined reference to `extract_v1' main.c:(.text+0x7b): undefined reference to `modify_v1' collect2: ld returned 1 exit status So I try with -l options: $ gcc -o main main.c -lmylib I still got error /usr/bin/ld: cannot find -lmylib collect2: ld returned 1 exit status Any idea about this? Also, I want to ask about: how to create my own header and library to put into /usr/include/mylib/ and /usr/lib/mylib/, so when I use function in my program, the compiler will automatically link to library. It's like when you #include <stdio.h>, and you compile: $ gcc -o program program.c, you don't need to specify any linking folder or library.
  5. Customize my Mandriva, so love it since it's so kooooool :D

  6. You can share to me and others :) My solution is to locate the controls theme, usually at : /usr/share/themes/Theme-Name/gtk-2.0/gtkrc Open gtkrc file with superuser right, then add this line at top if it doesn't exist: gtk-icon-sizes = "panel-menu=16,16" Logout and pick that theme :) Anyway, I'm wondering if there is any way to reduce icon size on top panel (the one contains main menu bar) ?
  7. The toplevel menu bar (Application Places System) contains menu-item icons way too big, everytime I click over them the list displays like half of the screen. After a while checking with some themes, I can see they change the list smaller (it takes only 1/5 of the screen). I've found out because they make the icon size smaller. I'm wondering how I can modify icon size on menu bar list? Thanks for your support.
  8. How can I write a script that can list all processes use over 10%CPU time, process id and name are written into a text file as a report? [moved from Other Distributions by spinynorman]
  9. yeah, now it works...what I did is just switch to another driver, then switch back to previous driver...then it worked.
  10. oh...damn..this is bad.. I've just tried to change to another driver then it switches back to the my previous driver...and it just works like charm. Just don't get it ...^^!
  11. Just 1 hour ago, the sound was running fine. I came back, turn on movie player...it doesn't work...it's calm now. To check whether my card is good or not. Switch into Windows, it's running fine. So it's certainly Mandriva problem. I don't know what to do now. Someone please help me! Here a little info about my device Identification Vendor: ‎Intel Corporation Description: ‎82801G (ICH7 Family) High Definition Audio Controller Media class: ‎Audio device Connection Bus: ‎PCI PCI domain: ‎0 Bus PCI #: ‎0 PCI device #: ‎27 PCI function #: ‎0 Vendor ID: ‎0x8086 Device ID: ‎0x27d8 Sub vendor ID: ‎0x1179 Sub device ID: ‎0xff10 Driver Module: ‎snd_hda_intel Alternative drivers: ‎unknown My system: Linux localhost 2.6.29.6-desktop-1mnb #1 SMP Sun Jul 5 19:57:54 EDT 2009 i686 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz GNU/Linux Thanks for your attention! Best regards, [moved from Software by Greg2]
  12. Hi Mandri-ers, I'm currently studying security under Linux. However, it doesn't seem to work for me in Mandriva. The source: (of source, 100% buffer overflow) #include <stdio.h> #include <string.h> int main( int argc, char *argv[] ) { char buffer[100]; strcpy( buffer, argv[1] ); return 0; } I've Googled and did all these: 1. Disable GCC Stack Protector (-fno-stack-protector) 2. Disable source check (-D_FORTIFY_SOURCE=0) 3. Disable ASLR (kernel.randomize_va_space=0) 4*. Enable GNU_STACK ELF Markings (-z exestack) I've done 1,2,3, including 4 in final compiling command: $ gcc -fno-stack-protector -z exestack -D_FORTIFY_SOURCE=0 -o overflow overflow.c && readelf -l overflow | grep -i stack GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 Guess what? It still doesn't work out. EIP is not overwritten... As you can see above, the ./overflow still can't execute stack even I specify option "-z exestack" (RWE), it still gives the final binary (RW) instead. My system info: Mandriva Linux 2009.1 Linux localhost 2.6.29.6-desktop-1mnb #1 SMP Sun Jul 5 19:57:54 EDT 2009 i686 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz GNU/Linux Anyone know how can I setup the environment for this? I really need helps right now. Best regards,
  13. Thanks! This is exactly patching :) Since MouseWheel only works under Windows, it should be commented out under Linux.
  14. Thanks! It seems like to be a Perl-Tk bug. Do you know how to fix it in Mandriva?
  15. Who cares about its outdate since it's quite done for use.
  16. Hi MUsers, I'm currently doing practices under Linux w/ blah crackmes: Link: http://crackmes.de/users/lord/easy_linux_crackme/ This is the dump result: blah: file format elf32-i386 Disassembly of section .text: 08048094 <.text>: 8048094: 31 c0 xor %eax,%eax 8048096: b8 2f 00 00 00 mov $0x2f,%eax 804809b: cd 80 int $0x80 804809d: 3d ad de 00 00 cmp $0xdead,%eax 80480a2: 75 16 jne 0x80480ba <-- I want to NOP this line 80480a4: b8 04 00 00 00 mov $0x4,%eax 80480a9: bb 01 00 00 00 mov $0x1,%ebx 80480ae: b9 c4 90 04 08 mov $0x80490c4,%ecx 80480b3: ba 06 00 00 00 mov $0x6,%edx 80480b8: cd 80 int $0x80 80480ba: 31 c0 xor %eax,%eax 80480bc: 40 inc %eax 80480bd: 31 db xor %ebx,%ebx 80480bf: cd 80 int $0x80 As I comment above, I want to patch that line by 2 - NOP bytes. I wrote this code: #include <stdio.h> int main( int argc, char *argv[] ) { int offset[2] = { 0x75, 0x16 }; /* origin */ char patch[2] = { 0x90, 0x90 }; /* nop */ FILE *file; int i; file = fopen( "blah", "rb+" ); if( file != NULL ) { for( i = 0; i < 2; ++i ) { fseek( file, offset[i], SEEK_SET ); /* search */ fprintf( file, "%c", patch[i] ); /* patch */ } printf("Patched Done.\n"); } else { printf("[Error]: file not found. \n"); } fclose( file ); return 0; } However, I don't know why it doesn't work??? May some1 help me this?
  17. I'm trying to run LIDA (Linux Disassembler) at http://lida.sourceforge.net/ However, when I try to run the binary: ./lida it occurred error. no event type or button # or keysym at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/Tk/Widget.pm line 1105. at ./lida.pl line 2458 I try to googling that error for solution but it seems to be not helpful. Anyone know how to fix this? Also, is there any linux disassembler package in Mandriva Repo? Thanks for your attention! [moved from Software by spinynorman]
  18. tks scarecrow for reply. It's just an external harddrive with an adapter for power and USB cable. I also suspect this adapter, somehow, if I only connect the power to the drive with connecting with turn-off computer, it's getting hot (just warm lightly, not hot). It didn't happen like this before. Could you think of any idea for this?
  19. Hey guys, I have a big trouble here. I have an external hard drive WD7500, and it worked fine but just 2 days ago, something happened and now I can't access to anything inside it. First, i try lsscsi [0:0:0:0] disk ATA Hitachi HTS54161 SB4O /dev/sda [1:0:0:0] cd/dvd MATSHITA DVD-RAM UJ-850S 1.10 /dev/sr0 [2:0:0:0] disk WD 7500AA External 200i /dev/sdb it founds my external harddrive WD. Then I try to look for it in partition table with diskdrake, then the result is ERROR: asr: reading /dev/sdb[Input/output error] ERROR: ddf1: reading /dev/sdb[Input/output error] ERROR: ddf1: reading /dev/sdb[Input/output error] ERROR: hpt37x: reading /dev/sdb[Input/output error] ERROR: hpt45x: reading /dev/sdb[Input/output error] ERROR: isw: reading /dev/sdb[Input/output error] ERROR: jmicron: reading /dev/sdb[Input/output error] ERROR: lsi: reading /dev/sdb[Input/output error] ERROR: nvidia: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: sil: reading /dev/sdb[Input/output error] ERROR: via: reading /dev/sdb[Input/output error] ERROR: asr: reading /dev/sdb[Input/output error] ERROR: ddf1: reading /dev/sdb[Input/output error] ERROR: ddf1: reading /dev/sdb[Input/output error] ERROR: hpt37x: reading /dev/sdb[Input/output error] ERROR: hpt45x: reading /dev/sdb[Input/output error] ERROR: isw: reading /dev/sdb[Input/output error] ERROR: jmicron: reading /dev/sdb[Input/output error] ERROR: lsi: reading /dev/sdb[Input/output error] ERROR: nvidia: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: pdc: reading /dev/sdb[Input/output error] ERROR: sil: reading /dev/sdb[Input/output error] ERROR: via: reading /dev/sdb[Input/output error] Then. I try to connect it to Windows Vista, in Disk Management section => it shows: Disk 1 (Unknown): Unreadable, 698GB Unallocated. There's no other options for me to do anything like: Format, Create New Volume, Initialize Disk (MBR/GPT) .. Then, I try to connect my external drive to another computer using Vista, in Disk Management => it shows: Disk 1 (Unknown): Uninitialized, 698GB Unallocated. It gives me the options: 1) Initialize the disk: I try this one, and choose MBR but it went to errors "This request could not be performed because of I/O device error" 2) Create A Simple Volume: I try this one, and the same error appeared. => Thought of driver, I tried to reinstall driver, update .... none of them worked. Can't think of anything, I try to connect to XP, well, XP doesn't even recognize anything. And then, I tried to connect my external harddrive to MacBook, in Disk Utility, it recognized my drive, however, can't format, can't do anything over it because they all give the same error: "Resource is busy" .... Again, I tried to look for solution, thought of hardware problem: power supply, adapter, cable, connection device .... but it isn't. I don't really know what to do now .... Please give me some help, a little hope that I know I can survive my drive...
  20. I found this: http://koji.fedoraproject.org/koji/buildinfo?buildID=101042 https://bugzilla.redhat.com/show_bug.cgi?id=498041 It's a gnome-power-manager bug affecting All Linux. The latest release of Gnome-Power-Manager: 2.26.1-3 I wonder if it works...
  21. I dont know why my screen always goes blanking automatically...it's kinda annoying while watching movie. Is there any way to fix it? tks for help.
×
×
  • Create New...