zsh: permission denied

monsterwolf00

New Member
Joined
Jul 8, 2021
Messages
10
Reaction score
0
Credits
60
I have root access but when I try to run ./ipsweeper.sh .It shows zsh: permission denied ... I tried different thing but I can't get it to work. Please tell me how to fix it.
 


captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,910
Reaction score
1,972
Credits
18,114
from shell window(terminal ) cd to directory where ipsweeper.sh is and give us please output of :
Code:
prompt-$  ls -l

actually we don't want to see all your stuff make it :


Code:
pronpt-$  ls -l ipsweeper.sh

also so as we ca ncompare can you share output of :

Code:
prompt-$  whoami

lastly if you give us the link to download ipsweeper.sh somebody might have time to try it and see if they can get it to work is it this one ?

Code:
#!/bin/bash

if [ "$1" == "" ]
then
        echo "You forgot an IP adress!"
        echo "Syntax: ./ipsweep.sh xxx.xxx.x"

else
        for ip in `seq 1 254`; do
        ping -c 1 $1.$ip | grep "64 bytes" | cut -d " " -f 4 | tr -d ":" &
        done
fi
if so works for me
Are you on Arch derivative or Kali- i think they just made defualt shell zsh


Code:
andrew@darkstar:~/Desktop]$ sudo chmod a+x ipsweeper.sh                        (07-09 11:14)

[sudo] password for andrew: 
[andrew@darkstar:~/Desktop]$ ./ipsweeper.sh                                     (07-09 11:14)
You forgot an IP adress!
Syntax: ./ipsweep.sh xxx.xxx.x
[andrew@darkstar:~/Desktop]$ ./ipsweeper.sh 192.168.0.1                         (07-09 11:14)
ping: 192.168.0.1.2: Name or service not known
 
Last edited:
OP
M

monsterwolf00

New Member
Joined
Jul 8, 2021
Messages
10
Reaction score
0
Credits
60
-rwxr-xr-x 1 kali kali 94 jul 5 09:41 ipsweeper.sh
it was the output of ipsweeper line
 

captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,910
Reaction score
1,972
Credits
18,114
well the file is owned by kali and group kali ; its got read and execute permission on owner and group and from "UGO" perspective it cam be run by owner and from group but , "others" won't be able to run since the script needs read permission in order to run. So what output do you get from the shell you are using to run the script and entering code below? :
prompt-$ whoami
 
OP
M

monsterwolf00

New Member
Joined
Jul 8, 2021
Messages
10
Reaction score
0
Credits
60
Here i took a photo
 

Attachments

  • IMG20210709192652.jpg
    IMG20210709192652.jpg
    3 MB · Views: 1,754
OP
M

monsterwolf00

New Member
Joined
Jul 8, 2021
Messages
10
Reaction score
0
Credits
60
Should it look like this... Cz I don't know this is my first time
 

Attachments

  • IMG20210709194151.jpg
    IMG20210709194151.jpg
    3.2 MB · Views: 1,189

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,259
Reaction score
4,732
Credits
45,987
Can you share the source of the ipsweeper.sh script that you are using?
 
D

Deleted member 108694

Guest
Should it look like this... Cz I don't know this is my first time
Did you run the terminal from the folder that the ipsweeper.sh file is in - is does not look like it - I don't know if Kali has a right click open terminal here function or not - since I do not use it - navigate to where the file is stored right click and select open terminal here then run the code listed above
 
OP
M

monsterwolf00

New Member
Joined
Jul 8, 2021
Messages
10
Reaction score
0
Credits
60
I am totally new so i don't know if I am doing anything wrong
 

Attachments

  • IMG20210709195117.jpg
    IMG20210709195117.jpg
    2.7 MB · Views: 489

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,259
Reaction score
4,732
Credits
45,987
there is an app called hackerx I was trying to learn from it...
You should learn how the system(GNU/Linux) works before trying to learn how to hack. Learn to walk before you try to run.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,259
Reaction score
4,732
Credits
45,987
I am totally new so i don't know if I am doing anything wrong
Source isn't a screenshot of the script but the link where you downloaded it from.
 
D

Deleted member 108694

Guest
first thing I see is your script is using the seq function has been replaced by value
The old line :
for ip in `seq 1 254` ; do
The new command should be:
for ip in {1..254} ; do

also where it says |grep "64 byts" should say |grep "64 bytes"
 
Last edited by a moderator:

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,259
Reaction score
4,732
Credits
45,987
yes because its a sh file and has bin/bash if its the same script that i'm using - sometimes incompatibility running bash with zsh ?
Shouldn't be a problem if bash is installed since the script uses a shebang pointing to /bin/bash.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,259
Reaction score
4,732
Credits
45,987

Staff online

Members online


Top