Skip to main content

Posts

Showing posts from 2015

Check MSSQL data and send email alert through Gmail

Today, I got a task about checking data in MSSQL and send alert email if there is something wrong with it. Of course you can do it with nagios plugin but i just don't want to implement with nagios. No why :) This what i did to finish this little task. -------------------------------------------------------------------------------------------------------------------------  A Batch script: ------------------------------------------------------------------------------------------------------------------------- @echo off @setlocal enableextensions enabledelayedexpansion del result.txt cd C:\Program Files\Microsoft SQL Server\100\Tools\Binn SQLCMD.EXE -U username -P password -S ipaddress -i D:\Scripts\check_match_active.sql -o result.txt findstr /m "1 rows affected" result.txt if %errorlevel%==0 ( cscript "sendemail_ok.vbs" ) else ( cscript "sendemail_fail.vbs" ) ----------------------------------------------------------------------------

Slowloris POC and breaking down

I will go very basic from step by step. As you are already known, Slowloris is a hacking tool that sends http request slowly to web server like Apache which shall get down the resource that should be available to serve for more connection. I think you guy are used a lot of tool those are created base on the slow HTTP request's theory. But do you really understand what Slowloris and like-Slowloris tools is working? What is HTTP request's detail that browser send to web server? And how the tools send slowly Header HTTP request to web server? I always keep in my mind, tool is not your skill. It is really difference. Use tool only without understanding principle of how it works, you just a scripting kid. Nothing more! That why today i will do a Proof Of Concept (POC) using Python, just to dig into it to understand principle of slow HTTP request. At first of all, let's talk about environment. For anything you haven't done it before, we will need an environment to