Posts

Showing posts from October, 2019

Convert a shell script into an executable binary

Image
Convert a shell script into an executable binary This article will help you to create binary file of your shell script, so no one can see the source code of your script and we can use them as a command. To create binary file from a script we use SHC compiler written by Francisco Javier Rosales GarcĂ­a . Shell Script Compiler (SHC) 1. Download shc and install it $ wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9.tgz $ tar xvfz shc-3.8.7.tgz $ cd shc-3.8.7 $ make 2. Verify that shc is installed properly. $ ./shc -v shc parse ( -f ) : No source file specified shc Usage: shc [ -e date ] [ -m addr ] [ -i iopt ] [ -x cmnd ] [ -l lopt ] [ -rvDTCAh ] -f script 3. Create a Sample Shell Script $ vi test.sh #!/bin/bash need to put at the beginning of a script file. #!/bin/bash echo -n "Test" 4. Create Binary of Script $ ./shc -T -f test.sh -T : this will allow the created binary files to be traceable using programs like strace...

Problem solve: UniFi USG firmware upgrade failed

Image
Problem solve: UniFi USG firmware upgrade failed Problem I upgraded the wifi equipment and replaced it with the UniFi Series products a few days ago. UniFi Controller can manage all the UniFi devices through the browser, it is very easy to use. However, I got a problem while upgrading the USG to the newer firmware. There are several ways the upgrade the firmware: Via the Controller Web UI Upgrade by pressing “upgrade icon” (on the top right) via controller web UI. After upgrade, my “upgrade icon” is still over there… so Im going to try another way. Via SSH to the device Connect to a device using an SSH, then run the following command: upgrade http://dl.ui.com/unifi/firmware/UGW3/4.4.44.5213844/UGW3.v4.4.44.5213844.tar However, I got the error message: ‘Upgrade image does not support the device.’ Solution Here’s the solution, if you try out all the way that you can do it. Modify the upgrade program in the device: SSH into the USG. Issue ...