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
#!/usr/bin/env ruby | |
DEFAULT_REPEAT = '10' | |
DEFAULT_CHARS = 16 | |
TEMPLATE_NUMBER = '0123456789' | |
TEMPLATE_SHORT = TEMPLATE_NUMBER + 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
TEMPLATE_LONG = TEMPLATE_SHORT + '!@#$%^&*()_+|~`\={}[];:<>,./?"\'' | |
$template = TEMPLATE_SHORT | |
$chars = DEFAULT_CHARS |
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
-- ================================================= | |
-- IEEE1722 for 61883_IIDC_SUBTYPE, MPEG2-TS | |
-- ================================================= | |
function addfielditem(tree, range, value, table) | |
for i, fmt in ipairs(table) do | |
tree:add(fmt, range, value) | |
end | |
return range:len() | |
end |
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
#include <pcap.h> | |
#include <unistd.h> | |
int main(int argc, char **argv) | |
{ | |
struct bpf_program bpfprog; | |
int dflag = 0; | |
int c; | |
while ((c = getopt(argc, argv, "d")) != -1) { |
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
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <net/if.h> | |
#include <net/ethernet.h> | |
#include <netinet/in.h> | |
#include <netinet/ip.h> | |
#include <arpa/inet.h> | |
#include <netpacket/packet.h> |