Skip to content

Instantly share code, notes, and snippets.

@udomsak
udomsak / basic-robot
Created April 30, 2015 10:40
Basic usage of RobotFramework.
*** Settings ***
Library Selenium2Library
*** Variables ***
${BROWSER} firefox
${DELAY} 0
${USERNAME} acme
${PASSWORD} acmeacme
${SERVER} uat.acme.com
@udomsak
udomsak / gist:b322e1d0c087a4dbf7c6
Created May 27, 2015 08:25
exercise robotframework span class.
<div style="width: 200px;" id="u_0_0" class="pluginLoginButton pluginLoginButtonMedium">
<div>
<div class="_4z_b _4z_8 _4z_d" role="button" tabindex="0" id="u_0_1">
<table class="uiGrid _51mz" cellpadding="0" cellspacing="0">
<tbody>
<tr class="_51mx">
<td class="_51m-">
<div class="_4z_g"><img class="_4z_e img" src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/yB/r/t4ZSL-NWK2R.png" alt="" height="16" width="16"><img class="_4z_5 img" src="https://fbstatic-a.akamaihd.net/rsrc.php/v2/yE/r/49Rx-CGUu94.gif" alt="" height="18" width="20"></div>
</td>
<td class="_51m- _51mw"><span class="_4z_9"><span class="_4z_f fwb">Log In</span></span>
*** Settings ***
Test Template Sanity4 Template
Resource resource.txt
*** Test Case *** url eUsername ePassword username password sButton cString
tt-check
http://{username}:{password}@{domain}
I not sure what the way you want. Between Learn about the attacker or how to protect website. ( should to have both. )
1. On server site - If you want to protect website.
use application firewall like mod_security or NAXSI OWASP project ( may be wrong name ). This by reduce risk from matric.
Protect your user permission and hardening system. Network host Segragrate and segmentation to reduce impact when occur.
@udomsak
udomsak / command-usage
Last active August 29, 2015 14:24
Vagrantfile for vagrant libvirt driver
# Do vagrant add ubuntu/vivid64 ( Ubuntu 15.04 )
# Do vagrant init base environment
vagrant box add ubuntu/vivid64
vagrant init ubuntu/vivid64 Ubuntu-KVM-Vagrant
cd Ubuntu-KVM-Vagrant
#Edit Vagrantfile refer to vagrantfile-libvirt-kvm
@udomsak
udomsak / Vagrantfile
Created April 13, 2016 14:19
Fedora core 23 - Vagrantfile - Window 7
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This deploy Fedora core 23 Cloud image.
# Prepare port-forward
# Install docker base service.
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
#!/bin/bash
NGINX_VERSION=1.11.3
NAXSI_VERSION="master"
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
wget python-pip python-geoip logtail curl \
gcc make libpcre3-dev libssl-dev \
supervisor libgeoip-dev
apt-get update
apt-get install python-dev make
curl -L http://bit.ly/glances | /bin/bash
@udomsak
udomsak / run-rpm.sh
Last active September 2, 2016 13:28
yum update
yum install -y curl python-devel make python-pip
curl -L http://bit.ly/glances | /bin/bash