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
option :client_options, { | |
:site => 'https://manage.stripe.com', | |
:authorize_url => '/oauth/authorize', | |
:token_url => '/oauth/token', | |
} | |
option :token_params, { | |
:parse => :query | |
} |
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
k=0; | |
for(rapidjson::Value::ConstValueIterator itr = parameters["nsset"].Begin(); itr != parameters["nsset"].End(); itr++) { | |
k++; | |
for (rapidjson::Value::ConstMemberIterator itr2 = itr->MemberBegin(); itr2 != itr->MemberEnd(); itr2++) { |
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
uin16_t icmp6_checksum(const u_char *src_addr, const u_char *dest_addr, u_char *buff, size_t dlen, uint16_t *target) { | |
uint16_t word16; | |
uint32_t sum=0; | |
size_t i; | |
uint16_t pad; | |
pad=dlen&1; | |
for (i=0;i<16;i=i+2){ | |
word16 =((src_addr[i]<<8)&0xFF00)+(src_addr[i+1]&0xFF); | |
sum += (uint32_t)word16; |
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 <arpa/inet.h> | |
uint16_t icmp6_checksum(const unsigned char *src_addr, const unsigned char *dest_addr, unsigned char *buff, size_t dlen, uint16_t *target) { | |
uint16_t word16; | |
uint32_t sum=0; | |
size_t i; | |
uint16_t pad; | |
pad=dlen&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
case 0x87: // v6 ndp | |
buffer[ICMP6_O_TYPE] = 0x88; // reply | |
buffer[ICMP6_O_CODE] = 0x0; | |
*(uint32_t*)(buffer+ICMP6_O_DATA) = 0x40; // solicited | |
memcpy(buffer + ETH_O_SOURCE, config->mac, ETH_ALEN); | |
memcpy(buffer + IP6_O_DADDR, config->ip6_addr.s6_addr, 16); | |
memcpy(buffer + ICMP6_O_DATA + 4, config->ip6_addr.s6_addr, 16); | |
memcpy(buffer + ICMP6_O_DATA + 22, config->mac, 6); | |
buffer[ICMP6_O_DATA + 20] = 2; | |
break; |
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
int base64num(int ch) { | |
if (ch == '=') return 0; | |
if (ch == '/') return 63; // bug was these | |
if (ch == '+') return 62; // two lines | |
if (ch >= 'a') return ch-'a'+26; | |
if (ch >= 'A') return ch-'A'; | |
if (ch >= '0') return ch-'0'+52; | |
return 0; | |
} |
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
whitelist = { "google.com.", "cnn.com." } | |
function preresolve(remoteip, domain, qtype) | |
if (domain == ".") then | |
return -1, {} | |
end | |
-- skip top level domains | |
if (string.match(domain,"^[^.]+.?$")) then | |
return -1, {} | |
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 <iostream> | |
#include <zmq.hpp> | |
using namespace std; | |
class TestClass { | |
public: | |
TestClass(): d_ctx(1), d_sock(d_ctx, ZMQ_REQ) { | |
d_sock.connect("ipc:///tmp/pdns.0"); | |
}; |
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/sbin/pdns_server -- gen_context(system_u:object_r:named_exec_t,s0) | |
/etc/pdns(/.*)? -- gen_context(system_u:object_r:named_conf_t,s0) | |
/etc/pdns(/.*)? -d gen_context(system_u:object_r:named_conf_t,s0) | |
/var/run/pdns\.controlsocket -s gen_context(system_u:object_r:named_var_run_t,s0) | |
/var/run/pdns\.pid -- gen_context(system_u:object_r:named_var_run_t,s0) | |
/usr/bin/pdns_control -- gen_context(system_u:object_r:ndc_exec_t,s0) | |
/usr/bin/pdnssec -- gen_context(system_u:object_r:ndc_exec_t,s0) | |
/var/cache/pdns(/.*)? -- gen_context(system_u:object_r:named_cache_t,s0) | |
/var/cache/pdns(/.*)? -d gen_context(system_u:object_r:named_cache_t,s0) |
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
## <summary></summary> |
OlderNewer