I will give an example of a file transfer script via SFTP in Windows.
The script every second displays the number of incoming and outgoing packets per second on the specified network interface.Place the contents of the script into a file, for example, pps.sh and execute by specifying the name of the network interface:
I will give an example of a PHP script to which I send SMS messages through the GoIP4 gateway. First, we choose tariffs with only monthly charges (I chose everything, excluding with daily charges, since there are fewer of them):
To see data from one column, it is enough to execute the SQL query (where “abcd” is the name of the column in the table): To export to a file, just run the command in Linux: Here is an example of exporting email addresses from a mysql table to an http page using PHP. The […]
For the test, I sketched a Cisco Catalyst 6509-E automatic backup configuration script. Actually the script itself: Add the contents of the script, for example, to the backup_cisco.sh file and add it to cron, adding the following line to the /etc/crontab file: The file can be opened for example in the text editor nano (Ctrl+X […]
Actually, this is my script: Where 192.168.0.50 – cadant, 192.168.0.1 – tftp server. You can add the script to /etc/crontab for automatic execution (for example, every day at one in the morning):
In Linux, you can convert a list of IP addresses into DNS names, for example, by a simple script. To do this, create an empty file with the extension .sh, make it executable and add the content to it: Where ip_traf.lst is a file with a list of IP addresses that need to be converted […]
I’ll give an example of the scripts I used before, in the allowip list IP addresses were added to which the Internet is allowed, and in denyip those were redirected to the http page with information about the negative deposit.
It took one day to write a script to add to ipset all the IP for which the session was started on the access server, Abills billing was used, so I decided to take IP addresses from the MySQL billing table. The first step is to create a test ipset:
On old router firmware Asus often noticed that the web interface is not fully open, not all the menus are displayed, so it can not be configured accordingly and can not be restarted if remote access is also available, since the reset button is not displayed. So he took the Asus RT-N12E router, ran the […]