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
import asyncio | |
import sys | |
from json import loads, dumps | |
import redis.asyncio as redis | |
async def main(argv): | |
pool = redis.ConnectionPool.from_url("redis://redis") | |
client = redis.Redis.from_pool(pool) |
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
#!/bin/sh | |
echo "<h1>Utilisateurs connectes</h1>" | |
set -x | |
total=0 | |
for interface in $(iwinfo |grep "ESSID:" | cut -d' ' -f1); do | |
nb_interface_users=$(iwinfo $interface assoclist | grep dBm | wc -l) | |
total=$((total + nb_interface_users)) | |
done |
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
#!/bin/bash | |
# from https://gist.github.com/cb372/4567f624894706c70e65 | |
es_url=$1 | |
index=$2 | |
response=$(curl -s -H 'content-type: application/json' $es_url/$index/_search?scroll=1m -d @query.json) | |
scroll_id=$(echo $response | jq -r ._scroll_id) | |
hits_count=$(echo $response | jq -r '.hits.hits | length') | |
hits_so_far=hits_count | |
echo Got initial response with $hits_count hits and scroll ID $scroll_id |
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
EVAL "local vals = redis.call('SMEMBERS', KEYS[1]); local len = redis.call('SCARD', KEYS[1]); for k, v in pairs(vals) do redis.call('HSET', KEYS[2], v, '0'); end; return len;" 2 setkey mapkey |
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
package org.icij.datashare; | |
import java.util.LinkedHashSet; | |
import java.util.Map; | |
import java.util.concurrent.*; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import java.util.concurrent.atomic.AtomicReference; | |
import java.util.function.Consumer; | |
import java.util.function.Supplier; |
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
package org.icij.datashare; | |
import java.util.HashMap; | |
import java.util.Map; | |
import static java.util.Arrays.stream; | |
import static java.util.Collections.unmodifiableMap; | |
public class FileExtension { |
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
sudo woeusb --target-filesystem NTFS --device Downloads/Win10_1809Oct_English_x64.iso /dev/sda |
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
sudo ngrep '' -d lo udp port 514 & | |
logger -n localhost -p local7.info log by udp |
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
curl -i --request PROPFIND --insecure --digest -u user:password --header "Content-Type: text/xml" --header "Brief:t" \ | |
https://dav.url/card.php/addressbooks/user/default/ | |
curl -i --request PROPFIND --insecure --digest -u user:password --header "Content-Type: text/xml" --header "Brief:t" \ | |
https://dav.url/cal.php/principals/user/ | |
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
tcpdump -i br-lan host android-25ac02f8e4ea5f61 | |
13:47:46.547385 IP dune.io.imaps > android-25ac02f8e4ea5f61.lan.36478: Flags [P.], seq 1966813352:1966813398, ack 521680810, win 261, options [nop,nop,TS val 3655118434 ecr 23066180], length 46 | |
13:47:46.670093 IP dune.io.imaps > android-25ac02f8e4ea5f61.lan.48402: Flags [P.], seq 1986507477:1986507523, ack 632287404, win 243, options [nop,nop,TS val 3655118464 ecr 23066192], length 46 | |
13:47:46.735749 IP android-25ac02f8e4ea5f61.lan.36478 > dune.io.imaps: Flags [.], ack 46, win 1822, options [nop,nop,TS val 23075340 ecr 3655118434], length 0 | |
13:47:46.736316 IP android-25ac02f8e4ea5f61.lan.48402 > dune.io.imaps: Flags [.], ack 46, win 1550, options [nop,nop,TS val 23075340 ecr 3655118464], length 0 | |
13:47:51.550928 ARP, Request who-has android-25ac02f8e4ea5f61.lan tell OpenWrt.lan, length 28 | |
13:47:51.648474 ARP, Reply android-25ac02f8e4ea5f61.lan is-at 84:cf:bf:8b:32:e4 (oui Unknown), length 28 | |
13:47:58.244076 ARP, Request who-has OpenWrt.lan tell android-25ac02f8 |
NewerOlder