Michael Santos

Results 82 comments of Michael Santos

Hey @PiedPieper ! Your code worked without any changes for me on linux: ~~~ erlang -module(icmpt). -include("procket.hrl"). -export([t/0, t/1]). %%% %%% erlc -I include icmpt.erl %%% t() -> t({192,168,7,83}). t({IP1,...

@geib Sorry for the delay, didn't get the notification for this issue! Some hints on debugging: * strace the emulator to ensure the socket options are not being reset by...

On Thu, Jan 21, 2016 at 09:37:21AM -0800, amuessig wrote: > Hey, > > I am trying to build up a middlebox device which is reading packets from a socket,...

Here's a working example: ``` erlang -module(resend). -export([init/1]). init(Dev) -> {ok, ListenSock} = procket:open(0, [{protocol, 16#0008}, {type, raw}, {family, packet}]), IfIndex = packet:ifindex(ListenSock, Dev), ok = packet:bind(ListenSock, IfIndex), Port =...

There's an old example here: https://gist.github.com/msantos/446057#file-rst-erl And some explanation: http://blog.listincomprehension.com/2010/06/fun-with-raw-sockets-in-erlang-abusing.html You'll probably need to swap the MAC address of your MITM host as the source MAC address when sending the...

> It's working very well. Great! > however, I couldn't find anything how to forward frames/packets/segments to the applications of the > host where my Erlang is running. > >...

Sure, it is pretty simple. Construct an ARP packet then write it to a PF_PACKET or BPF socket: https://github.com/msantos/farp/blob/master/src/farp.erl#L192 To populate the ARP cache, open any network connection to the...

It's a little tricky since a sockaddr is a pointer to different types of sockaddrs with a common header. One way to do it would be to create a new...

Thank you for letting me know about this! Should be fixed in version 0.9.3.

Weird! I may have messed something up! Could you check you are using the latest version of the procket_mktmp module? ~~~ erlang > procket_mktmp:module_info(). [{module,procket_mktmp}, ... {attributes,[{vsn,[152993229612997397851889811591875413266]}]}, ... {md5,}] ~~~...