Skip to content

Instantly share code, notes, and snippets.

@BrockA
BrockA / waitForKeyElements.js
Created May 7, 2012 04:21
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@yetanotherchris
yetanotherchris / Command-line-argument-parser.cs
Last active February 24, 2019 03:36
Command line argument parser
static void Main(string[] args)
{
string[] example = { @"--arg1=""test"" --arg2= this is wrong --arg3=x --arg4=""value 4""" };
// Default usage
CommandLineTokenizer tokenizer = new CommandLineTokenizer(example);
Console.WriteLine(tokenizer["arg1"]);
Console.WriteLine(tokenizer["arg2"]); // bad tokens are blank strings
Console.WriteLine(tokenizer["arg5"]); // unknown tokens will also be blank string
// Alternative usage
tokenizer = new CommandLineTokenizer();
title description date categories slug
QQ协议分析
QQ协议分析
2014-04-16
protocol
qq-protocol

一. 文字聊天协议族(TCPF, Text Chatting Protocol Family)

@gabonator
gabonator / password.txt
Last active July 3, 2024 07:22
HiSilicon IP camera root passwords
Summary of passwords by sperglord8008s, updated November 1. 2020. For login try "root", "default", "defaul" or "root"
00000000
059AnkJ
4uvdzKqBkj.jg
7ujMko0admin
7ujMko0vizxv
123
1111
1234
@brandt
brandt / README.md
Last active February 3, 2024 01:28
Creates a loopback alias with IP 127.0.0.2 at startup on Mac OS X

Loopback Alias

Creates an alias on the loopback interface (lo0) with the IP 127.0.0.2 on macOS.

Installation

  1. Install the plist to: /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
  2. Set mode: sudo chmod 0644 /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
  3. Set owner: sudo chown root:wheel /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
  4. Load: sudo launchctl load /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
@phith0n
phith0n / fpm.py
Last active June 7, 2024 13:02
Fastcgi PHP-FPM Client && Code Execution
import socket
import random
import argparse
import sys
from io import BytesIO
# Referrer: https://github.com/wuyunfeng/Python-FastCGI-Client
PY2 = True if sys.version_info.major == 2 else False
@sliekens
sliekens / DiscriminatedJsonConverter.cs
Last active December 15, 2022 19:24
Configurable JsonConverter for deserializing discriminated JSON
using System;
using System.Diagnostics;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Infrastructure
{
public sealed class DiscriminatedJsonConverter : JsonConverter
{
@killvxk
killvxk / brute.c
Created June 25, 2019 08:07
IDA Pro
// clang -Werror -Wall -O3 -mssse3 -msha cpu-brute.c sha.c prng.c -o brute && scp brute scanifi:/tmp
#include "sha1.h"
#define gen_bsd_drand48 1
// #define gen_msvc_rand 1
#include "prng.h"
#include <stdint.h>
#include <math.h>
@rcarmo
rcarmo / bt-agent.service
Last active December 12, 2023 13:14
Set up PAN networking on Raspbian Stretch (use sudo to create these files and run all commands)
# in /etc/systemd/system
[Unit]
Description=Bluetooth Agent
[Service]
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput
Type=simple
[Install]
WantedBy=multi-user.target