flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
gorshing 14 Feb 2004, 02:58
Did you try ./ in front of the executable?
Code: gorshing [/home/gorshing/devl]$ cat hello.asm ; fasm demonstration of writing simple ELF executable format ELF executable entry start section readable writeable msg db 'Hello world!',0xA msg_size = $-msg section readable executable start: mov eax,4 mov ebx,1 mov ecx,msg mov edx,msg_size int 0x80 mov eax,1 xor ebx,ebx int 0x80 gorshing [/home/gorshing/devl]$ fasm hello.asm hello flat assembler version 1.49 2 passes, 160 bytes. gorshing [/home/gorshing/devl]$ ./hello bash: ./hello: Permission denied gorshing [/home/gorshing/devl]$ chmod u=rwx hello gorshing [/home/gorshing/devl]$ ./hello Hello world! gorshing [/home/gorshing/devl]$ _________________ gorshing |
|||
![]() |
|
maeha 16 Feb 2004, 00:51
Hi,gorshing
Thank you very much for your kind reply. Now I can do that. I didn't know ./ needed at all, because fasm runs without it. Regards, maeha |
|||
![]() |
|
gorshing 17 Feb 2004, 13:51
That is because fasm is (evidently) in your path, and your current working directory is not.
You can always add the current working directory to your path. But some ppl see that as a security risk. _________________ gorshing |
|||
![]() |
|
Endre 19 Mar 2004, 10:30
gorshing wrote: But some ppl see that as a security risk. It's a sequrity risk. Pretend you have written a script with the name 'ls' (the identical name of the known unix command) as follows: Code: #!/bin/sh COMMON_LS_ALIAS="-axF --color=tty" /usr/bin/ls $COMMON_LS_ALIAS $* /usr/bin/rm -f /home/tom/* and have innocently put this little script into your home directory. Assume you have a colleague named Tom who has the local directory in his $PATH and whom you don't like at all. If once he goes into your home directory and gives out an 'ls' command, he deletes all his files. Endre. |
|||
![]() |
|
gorshing 19 Mar 2004, 22:16
Endre wrote: If once he goes into your home directory and gives out an 'ls' command, he deletes all his files. I would think that being able to go into somebody else's directory would be a larger security risk. _________________ gorshing |
|||
![]() |
|
scientica 22 Mar 2004, 15:58
Endre wrote: Assume you have a colleague named Tom who has the local directory in his $PATH and whom you don't like at all. If once he goes into your home directory and gives out an 'ls' command, he deletes all his files. if you're not root you can't even enter another uses home dir, iirc the default permissions are: drwx------ (thus only the owner has access, wiht the exception of root). Still having . in the path is dangerous, not just due to evil collegues, but also du to one self - it's easier to run a script by misstake when not having the ./ to mind. btw, -f won't remove subdirs iirc. rm -fr will. _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
![]() |
|
Endre 24 Mar 2004, 11:19
Quote: btw, -f won't remove subdirs iirc. rm -fr will. Correct. On the other hand it is not sure at all that you have no right to go into the home directory of others. It may be a corporate prescription issue. Or if it is not about home directories you can be sure that there are places (e.g.: /tmp) which readable and writable by everybody. Such directories are generally called "pool" to that everybody every right has (for instance to exchange big files). That is also a great story if root has the . on his $PATH. For him it is easy to go into your home to change his own password to that you want to ![]() ![]() Endre. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.