Skip to main content

Posts

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" ) ----------------------------------------------------------------------------
Recent posts

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

SQL Injection

  I got an sql injection tutorial, it's quite useful for you guy want to know about it. So if you are interested with SQL Injection ( a part of hacking and penetration ) just take a look below. SQL Injection Tutorial created by ande for www.evilzone.org In this tutorial 1.0 What is SQL? 1.1 Types of SQL or SQL engines 1.2 Understanding the SQL structure 1.3 Finding vulnerabilities 1.4 Exploiting vulnerabilities 1.5 Securing vulnerabilities 1.0 What is SQL? SQL stands for Structured Query Language. It is a way to store, modify and update data secure, fast and reliable. SQL is mostly used for web sites but can however be used for almost any application and or service which is in need of storing, editing and or updating data in a good and structured way. In this tutorial I will be using PHP as script language for examples. PHP is a web script engine. Its the most widely used one, its the best one and its the one you are most likely to encounter in real life s