Fwd: Crashing the Linux System
-- Forwarded message - From: LitHack Date: Sat, 17 Jun 2023 at 08:52 Subject: Crashing the Linux System To: Running the yes command in command substitution will crash the linux shell. According to me inside command the substitution it is creating multiple process(fork). Command: `yes` or $(yes) Here is the bug report: Bug report <https://bugzilla.kernel.org/show_bug.cgi?id=217565>
Fwd: Command execution by creating file.
-- Forwarded message - From: LitHack Date: Wed, Jun 21, 2023, 7:31 AM Subject: Command execution by creating file. To: Special character '*' can be used to execute the command. We have to just create a directory and make a file of any character or word and then make alias of the command which we want to execute assigned with created file. Now just type the * in terminal and you will that the command be executed. But why this happens, * (special character) is used for auto completion and if used as alone it should just print the name of file why it's execute the file name as command. Command:mkdir dir;cd dir:<>file;alias file=ls -l;*
Re: Fwd: Command execution by creating file.
Sorry instead of alias we have to use the function. Corrected command: mkdir dir;cd dir;<>file;file()bash;* Thanks and regards. On Wed, Jun 21, 2023, 8:46 AM Lawrence Velázquez wrote: > On Tue, Jun 20, 2023, at 10:52 PM, LitHack wrote: > > -- Forwarded message - > > From: LitHack > > Date: Wed, Jun 21, 2023, 7:31 AM > > Subject: Command execution by creating file. > > To: > > > > > > Special character '*' can be used to execute the command. > > We have to just create a directory and make a file of any character or > word > > and then make alias of the command which we want to execute assigned with > > created file. Now just type the * in terminal and you will that the > command > > be executed. > > This is not true. Alias expansion occurs before filename expansion. > > > But why this happens, * (special character) is used for auto completion > and > > if used as alone it should just print the name of file why it's execute > the > > file name as command. > > This is not true either. What makes you think that it should "just > print the name of file"? > > > Command:mkdir dir;cd dir:<>file;alias file=ls -l;* > > Did you actually run these commands? They don't agree with you. > > bash-5.2$ mkdir dir > bash-5.2$ cd dir > bash-5.2$ <> file > bash-5.2$ alias file='ls -l' > bash-5.2$ * > Usage: file [bcCdEhikLlNnprsvzZ0] [-e test] [-f namefile] [-F > separator] [-m magicfiles] [-M magicfiles] file... >file -C -m magicfiles > Try `file --help' for more information. > > -- > vq >
Alias in command substitution
Normally declaring a alias inside the command substitution would not reflect in main shell like lithack@aura:~$ `alias l=ls` lithack@aura:~$ l l: command not found But using this command . lithack@aura:~$ `alias l=ls;alias` lithack@aura:~$ l api Desktop Downloads Music __py__ v v.zip Arjun dir idafree82_linux.run Pictures snap vi BurpSuiteCommunity Documents 'IDA Freeware 8.2.desktop' Public Templates Videos It runs in main shell. Is this a bug? Note: This only works in bash shell.