Permalink
Browse files

Use symbols instead of integers for creating ICMP payload

  • Loading branch information...
1 parent 58d9865 commit e7375d3b21735f0b861e25e499e6a32da576d5c4 @msantos committed Jun 14, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/icmp.erl
View
@@ -93,7 +93,7 @@ make_packet(Id, Seq) ->
{Mega,Sec,USec} = erlang:now(),
% Pad packet to 64 bytes
- Payload = list_to_binary(lists:seq(32, 75)),
+ Payload = list_to_binary(lists:seq($\s, $K)),
CS = makesum(<<?ICMP_ECHO:8, 0:8, 0:16, Id:16, Seq:16, Mega:32, Sec:32, USec:32, Payload/binary>>),
<<

0 comments on commit e7375d3

Please sign in to comment.