Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.
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 | |
# This script will migrate schema and data from a SQLite3 database to PostgreSQL. | |
# Schema translation based on http://stackoverflow.com/a/4581921/1303625. | |
# Some column types are not handled (e.g blobs). | |
# | |
# See also: | |
# - http://stackoverflow.com/questions/4581727/convert-sqlite-sql-dump-file-to-postgresql | |
# - https://gist.github.com/bittner/7368128 |
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
from extensions import db | |
from celery import Celery | |
from flask import Flask | |
from config import config, SELECTED_CONFIG | |
def create_celery_app(app=None): | |
app = app or create_app() | |
celery = Celery(__name__, broker=app.config['CELERY_BROKER_URL']) | |
celery.conf.update(app.config) | |
TaskBase = celery.Task |
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
#!/usr/bin/env python | |
## Tiny Syslog Server in Python. | |
## | |
## This is a tiny syslog server that is able to receive UDP based syslog | |
## entries on a specified port and save them to a file. | |
## That's it... it does nothing else... | |
## There are a few configuration parameters. | |
LOG_FILE = 'youlogfile.log' |
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
def cleanPayload(p): | |
p = str(p) | |
# Clean up packet payload from scapy output | |
return p.split('Raw')[0].split("Padding")[0].replace('|','\n').strip('<')\ | |
.strip('bound method Ether.show of ').replace('>','').replace('[<','[')\ | |
.replace('\n<','<').replace('<','\n'); |
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 Scapy module | |
from scapy.all import * | |
## Create a Packet Count var | |
packetCount = 0 | |
## Define our Custom Action function | |
def customAction(packet): | |
global packetCount | |
packetCount += 1 |
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
from scapy.all import * | |
print sniff(filter="arp",count=10).summary() |
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
from scapy.all import * | |
print sr1(IP(dst="4.2.2.1")/ICMP()).summary() |
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
from scapy.all import * | |
import random | |
# Define end host and TCP port range | |
host = "www.facebook.com" | |
portRange = [22,23,80,443,3389] | |
# Send SYN with random Src Port for each Dst port | |
for dstPort in portRange: | |
srcPort = random.randint(1025,65534) | |
resp = sr1(IP(dst=host)/TCP(sport=srcPort,dport=dstPort,flags="S"),timeout=1,verbose=0) |
OlderNewer