This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# mirror_test.sh | |
# This script tests a list of Apache mirrors for speed | |
# | |
# The scrip is based on Lance Rushing's <lance_rushing AT hotmail DOT com> script | |
# http://ubuntuforums.org/showthread.php?t=251398 for Ubutnu mirrors | |
# | |
# This script is covered under the GNU Public License: http://www.gnu.org/licenses/gpl.txt | |
# @AUTHOR Rad Cirskis <nad2000 AT gmail DOT com> | |
# @SINCE 8/1/2015 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git archive --remote REPO BRANCH SUBDIR | tar xf - | |
git archive --remote ssh://[email protected]:7999/ap/appliance.git develop ./tree/customer/endace/tests/injab0x-test | tar tvf - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <sys/time.h> | |
#include <inttypes.h> | |
#include <time.h> | |
#include <signal.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class configuration(dict): | |
def __getattr__(self, name): | |
return self.get(name) | |
def __setattr__(self, name, value): | |
self[name] = value | |
### | |
conf = configuration() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RUN FORM BASH: | |
# echo http://127.0.0.1:5000/?{1..1000} | xargs -n 1 -P 1000 curl -s | |
from flask import Flask, Response | |
import time | |
request_count = 0 | |
app = Flask(__name__) | |
@app.route("/") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CURL="curl -k -b cookies.txt -c cookies.txt" | |
$CURL --data "d_user_id=user_id&t_user_id=string&c_user_id=string&e_user_id=true&f_user_id=admin&f_password=injab0xn&Login=Login" "http://${TARGET_HOST}/admin/launch?script=rh&template=login&action=login" | |
$CURL "http://${TARGET_HOST}/vision/visualizations" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Example of embedding Python in another program */ | |
// to compile run: | |
// gcc -o test $(python-config --cflags) test.c $(python-config --ldflags) && ./test | |
#include<stdio.h> | |
#include "Python.h" | |
void initxyzzy(void); /* Forward */ | |
main(int argc, char **argv) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $SD - script installation directory (e.g. /opt/tms/lib/dbmgr | |
# for packages it can be arbitrary location) | |
[ -z "$SD" -o ! -e "$SD" ] && SD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true ; do echo -n $RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM | tr "0" "*" ; sleep "0.$RANDOM" ; echo $RANDOM$RANDOM$RANDOM ; sleep "0.$RANDOM" ;done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -E "\\\$1 = '[0-9]+', \\\$2 = '[0-9]+', \\\$3 = '[0-9]+', \\\$4 = '[0-9]+'" /endace/pgsql/pg_log/postgresql-24.log | sed -n "s/.*'\([0-9]*\)'.*'\([0-9]*\)'.*'\([0-9]*\)'.*'\([0-9]*\)'.*/\1,\2,\3,\4/p" | |
grep -E "\\\$1 = '[0-9]+', \\\$2 = '[0-9]+', \\\$3 = '[0-9]+', \\\$4 = NULL, \\\$5 = NULL, \\\$6 = NULL, \\\$7 = 'byte'" /endace/pgsql/pg_log/postgresql-24.log | sed -n "s/.*'\([0-9]*\)'.*'\([0-9]*\)'.*'\([0-9]*\)'.*'\([0-9]*\)'.*/\1,\2,\3,\4/p" | |
grep -E "\\\$1 = '[0-9]+', \\\$2 = '[0-9]+', \\\$3 = '[0-9]+', \\\$4 = NULL, \\\$5 = NULL, \\\$6 = NULL, \\\$7 = 'byte'" /endace/pgsql/pg_log/postgresql-24.log | sed -n "s/.*'\([0-9]*\)'.*'\([0-9]*\)'.*'\([0-9]*\)'.*'\([0-9]*\)'.*/\1,\2,\3,\4/p" | awk -F, '{print $1,$2,$3,$4, $2-$1}' |