Posts Tagged ‘script’

Parsing logs for TOP IPs (Potentially BOT , brutforce , etc .)

Rename SQL Server Database Using TSQL Script

Posted: 27th October 2016 by admin in all
Tags: , , , ,

Using the below TSQL Script a Database Administrator can rename an existing SQL Server Database. USE [master] GO ALTER DATABASE [OLD_DB] SET SINGLE_USER WITH ROLLBACK IMMEDIATE GO ALTER DATABASE [OLD_DB] MODIFY NAME = NEW_DB GO ALTER DATABASE [NEW_DB] SET MULTI_USER GO

It is an assignment from a recent interview that I got when trying to get new job The task was do to below things: Install an EC2 instance  *   AWS has a free usage tier – http://aws.amazon.com/free/ *   Instantiate an EC2 micro instance  *   the instance creation should be done using the AWS developer tools http://aws.amazon.com/developertools *   […]

Bash Whois Script

Posted: 2nd April 2012 by admin in all
Tags: , ,

PasteBin.com link http://pastebin.com/G2dvRzVr             #!/bin/bash echo -e “\e[00;31mPlease inter Domain List\e[00m” read domains #Random cases com1=”http://www.networksolutions.com/whois-search/$x” #| sed -e ‘s/<[^>]*>//g’ | tr -s ‘ ‘ |grep “Name Server” com2=”http://reports.internic.net/cgi/whois?whois_nic=$x&type=domain” # | sed -e ‘s/<[^>]*>//g’ | tr -s ‘ ‘ | grep “Name Server\|nserver” il1=”http://who.is/whois/$x” # | sed -e ‘s/<[^>]*>//g’ | […]

Bash script removing malicious .pl && .cgi scripts

Posted: 28th February 2012 by admin in all
Tags: , , , , , , , , ,

During mass Plesk hack around the world,couple of our servers were hacked(not rooted). http://kb.parallels.com/en/113321 There little script for checking malicious perl and cgi scripts in cgi-bin directory #!/bin/bash find /var/www/vhosts/*/cgi-bin/*.cgi >>domlist find /var/www/vhosts/*/cgi-bin/*.pl >>domlist echo “***********************************************************” cat domlist echo TOTAL FILES $(cat domlist|wc -l) echo “***********************************************************” echo “wanna remove? [yes] || [no] || [q]” echo […]