Skip to content

Instantly share code, notes, and snippets.

View Ciyfly's full-sized avatar
😄
Work & Study

recar Ciyfly

😄
Work & Study
View GitHub Profile
class IPv6Packet:
def __init__(self, main_header_length, extension_headers):
self.main_header_length = main_header_length
self.extension_headers = extension_headers
def process_packet(packet):
total_length = packet.main_header_length
# Vulnerable loop: doesn't check for integer underflow
for header_length in packet.extension_headers:
@winuxue
winuxue / puppeteer-ubuntu-1804.md
Created May 22, 2019 01:15
Solution for common dependences issues using puppeteer in ubuntu 18.04 (Bionic)

puppeteer dependeces in ubuntu 18.04 (Bionic)

error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

sudo apt-get install libnss3

error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

sudo apt-get install libxss1
@leolovenet
leolovenet / net.Listener.SetsockoptInt.IP_TRANSPARENT.for.Linux.go
Created October 21, 2018 09:33
SetsockoptInt IP_TRANSPARENT for net.Listener in golang
package main
import (
"fmt"
"net"
"os"
"os/signal"
"reflect"
"syscall"
)
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active October 25, 2025 18:28
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

import requests
import sys
import json
def waybackurls(host, with_subs):
if with_subs:
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host
else:
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host