Scripts created for increasing productivity & help the devs.
The script checks whether the device has sudo command or not. If the command exists, it checks shell has sudo permission.
Outputs:
Zero(0)means havesudocommands, but it does not havesudopowers/permissions on that terminal.One(1)means havesudocommands, but it hassudopowers/permissions on that terminal.Minus One(-1)means have nosudocommands.
sh check-sudo.sh
OR
bash check-sudo.shThis script creates binary files of a given bash script to be run on Unix/Linux based machines.
-
Be sure to have this awesome tool called
shc. You can access here.-
For ubuntu or debian based OS:
sudo add-apt-repository ppa:neurobin/ppa sudo apt-get update sudo apt-get install shc
-
For MacOS:
brew install shc
-
-
After that, you are good to go.
sh create-sh-binary.sh -f create-sh-binary.sh
OR
sh create-sh-binary.sh -f create-sh-binary.sh -o my-binary
#Yes, can convert itself. :DAnd then move your my-binary file to the usr/local/bin/ folder to run in your terminal. Just type
my-binary example-1 example-2The Script helps to tunneling using SocketXp for remote development or connecting to IoT devices.
-
You need to create an account on SocketXp.
-
Also, you need to follow to the steps to create an Authentication Token and connect to remote devices.
- You can follow it here.
-
After that, you are good to go.
# You could pass your sudo password with the "echo"
echo 'sudoPassword' | sh remote-tunneling.sh -a your-auth-token -d device-id-to-connect -o local-port-to-opened -p host-port -u username for ssh
# If you already permitted to your terminal just run
sh remote-tunneling.sh -a your-auth-token -d device-id-to-connect -o local-port-to-opened -p host-port -u username-for-ssh- Alternatively, you could create a binary file using Create SH Binary to use it.
remote-tunneling -a your-auth-token -d device-id-to-connect -o local-port-to-opened -p host-port -u username-for-ssh