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
/* | |
** | |
** Example of Interprocess communication in Node.js through a UNIX domain socket | |
** | |
** Usage: | |
** server> MODE=server node ipc.example.js | |
** client> MODE=client node ipc.example.js | |
** | |
*/ |
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 | |
""" | |
Based on script by Aman Deep | |
A simple keylogger witten in python for linux platform | |
All keystrokes are recorded in a log file. | |
The program terminates when grave key(`) is pressed | |
grave key is found below Esc key |
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
# Nmap to scan the top 1000 most | |
# common ports, give us the service | |
# version information for any open | |
# ports, write it to an output | |
# file and use our csv file as a | |
# list of IPs to scan. | |
sudo nmap -sSV -oA OUTPUTFILE -T4 -iL IPS.csv |
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 | |
import os | |
import time | |
from Xlib import display | |
old_x = 0 | |
old_y = 0 | |
old_dur = 0 | |
end_time = 0 | |
logfile = os.environ['HOME'] + '/.cursor.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
#!/bin/bash | |
# zipcode--Given a ZIP code, identifies the city and state. Use city-data.com, | |
# which has every ZIP code configured as its own web page. | |
baseURL="http://www.city-data.com/zips" | |
/bin/echo -n "ZIP code $1 is in " | |
curl -s -dump "$baseURL/$1.html" | \ | |
grep -i '<title>' | \ | |
cut -d\( -f2 | cut -d\) -f1 | |
exit 0 |
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 | |
import os | |
import sys | |
import requests | |
from bs4 import BeautifulSoup as bs | |
from urllib.parse import urlencode | |
from pytube import YouTube | |
qstring = sys.argv[1] | |
out_dir = sys.argv[2] |
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 requests | |
import pandas as pd | |
import datetime | |
url = 'https://query.wikidata.org/sparql' | |
query_infected = """ | |
SELECT ?infectedDate ?infectedValue | |
WHERE | |
{ | |
wd:Q83889294 p:P1603 ?infectedItem. | |
?infectedItem ps:P1603 ?infectedValue. |
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 python2 | |
# -*- coding: utf-8 -*- | |
from __future__ import division | |
import numpy as np | |
from math import cos, sin, pi, sqrt, atan2 | |
d2r = pi/180 | |
class Geometry(object): | |
def circle_intersection(self, circle1, circle2): |
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
<ifModule mod_headers.c> | |
Header always set Content-Security-Policy "upgrade-insecure-requests;" | |
</IfModule> |
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 socket | |
UDP_IP = "::1" # localhost | |
UDP_PORT = 5005 | |
MESSAGE = "Hello, World!" | |
print "UDP target IP:", UDP_IP | |
print "UDP target port:", UDP_PORT | |
print "message:", MESSAGE |