This file contains 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
package main | |
import ( | |
"net" | |
"time" | |
"fmt" | |
"errors" | |
) | |
func main() { |
This file contains 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
openssl rsa -in ~/.ssh/id_rsa -out ~/.ssh/id_rsa.nocrypt | |
mv ~/.ssh/id_rsa.nocrypt ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa |
This file contains 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
PS1="\n\[\e[30;1m\]\[\016\]l\[\017\][\[\e[34;1m\]\u@\h\[\e[30;1m\]]-[\[\e[34;1m\]\t\[\e[30;1m\]]->\[\e[30;1m\]\n\[\016\]m\[\017\]-[\[\[\e[32;1m\]\w\[\e[30;1m\]]-[\[\e[32;1m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files, \$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\e[30;1m\]]--> \[\e[0m\]" |
This file contains 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
split_clients "${remote_addr}${http_user_agent}${date_gmt}" $variant { | |
25% dg1; | |
25% dg2; | |
25% dg3; | |
25% dg4; | |
} | |
server { | |
listen 80; | |
listen 443 ssl; |
This file contains 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 | |
#this script used monitor mysql network traffic.echo sql | |
tcpdump -i eno1 -s 0 -l -w - dst port 3306 | strings | perl -e ' | |
while(<>) { chomp; next if /^[^ ]+[ ]*$/; | |
if(/^(SELECT|UPDATE|DELETE|INSERT|SET|COMMIT|ROLLBACK|CREATE|DROP|ALTER|CALL)/i) | |
{ | |
if (defined $q) { print "$q\n"; } | |
$q=$_; | |
} else { | |
$_ =~ s/^[ \t]+//; $q.=" $_"; |
This file contains 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
find ./ -name '*.php' -exec grep -l '^<?php.*eval' {} \; | xargs sed -i '1s/.*/<?php/' | |
find ./ -name '*.php' -o -name '*.html' -exec grep -l '<script id="data:text/javascript;charset=utf-8;base64' {} \; | xargs sed -i 's#^<script id="data:text/javascript;charset=utf-8;base64.*$##g' |
This file contains 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
package com.example.swop.avcrmmobile; | |
import android.app.Service; | |
import android.content.Intent; | |
import android.os.IBinder; | |
public class StubService extends Service { | |
public StubService() { | |
} |
This file contains 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
insert into host_inventory (hostid, inventory_mode) SELECT hostid, 1 FROM hosts; |
This file contains 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
# find next free ip address | |
# fping required | |
# | |
export SUBNET=25; echo $(for i in $(seq 10 253); do ip="172.16.${SUBNET}.${i}"; fping -c 1 -t 500 $ip &> /dev/null; if [ $? -eq 1 ]; then echo $ip; break; fi; done) |
This file contains 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
apt-get install software-properties-common python-software-properties | |
add-apt-repository 'deb http://packages.dotdeb.org wheezy-php56 all' | |
add-apt-repository 'deb-src http://packages.dotdeb.org wheezy-php56 all' | |
~~~~~~~~~~~~ jessy | |
add-apt-repository 'deb http://packages.dotdeb.org jessie all' | |
add-apt-repository 'deb-src http://packages.dotdeb.org jessie all' | |
~~~~~~~~~~~~ | |
wget http://www.dotdeb.org/dotdeb.gpg |