flat assembler
Message board for the users of flat assembler.
Index
> Linux > Beep console for linux? |
Author |
|
Gonzalo28 21 Jun 2008, 01:51
Hi all!
Beep console for linux? Sorry for my english |
|||
21 Jun 2008, 01:51 |
|
kohlrak 21 Jun 2008, 16:05
No more giving back...
Last edited by kohlrak on 07 Aug 2008, 14:31; edited 1 time in total |
|||
21 Jun 2008, 16:05 |
|
LocoDelAssembly 21 Jun 2008, 18:46
Code: format ELF executable entry start segment readable executable start: mov eax, 4 ; SYS_WRITE mov ebx, 1 ; STDOUT mov ecx, beep mov edx, 1 int $80 mov eax,1 xor ebx,ebx int $80 beep db 0x7 This does a beep on my Debian Etch at least but of course is very far from specifying duration and frequency... Maybe the answer is writting to something from /dev/ but I can't investigate that right now. |
|||
21 Jun 2008, 18:46 |
|
System86 21 Jun 2008, 21:01
Or you can use the KDMKTONE or KIOCSOUND IOCTL.
|
|||
21 Jun 2008, 21:01 |
|
gunslinger_ 06 Jun 2010, 14:11
in c language:
Code: #include <stdlib.h> #include <fcntl.h> #include <linux/kd.h> int main(int argc, char *argv[]) { int fd = open("/dev/tty10", O_RDONLY); if (fd == -1 || argc != 3) return -1; return ioctl(fd, KDMKTONE, (atoi(argv[2])<<16)+(1193180/atoi(argv[1]))); } and i use assembly Code: global _start _start: jmp short ender starter: xor eax, eax mov al,5 pop ebx mov ecx, edx int 80h mov ebx, eax push byte 54 pop eax mov ecx, 4294948047 not ecx mov edx, 61211100 int 80h xor eax, eax inc al xor ebx, ebx int 80h ender: call starter ;put the address of the string on the stack db '/dev/tty10' and i use to make shellcode http://inj3ct0r.com/exploits/12492 <-- high frequency system beep http://inj3ct0r.com/exploits/12493 <-- low frequency system beep gunslinger_ [/code] |
|||
06 Jun 2010, 14:11 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.