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 ip_to_bigint(ip): | |
ip_parts = ip.split('.') | |
part_1 = int(ip_parts[0]) * 16777216 | |
part_2 = int(ip_parts[1]) * 65536 | |
part_3 = int(ip_parts[2]) * 256 | |
part_4 = int(ip_parts[3]) | |
bigint_ip = part_1 + part_2 + part_3 + part_4 |
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
*.DS_Store | |
.AppleDouble | |
.LSOverride | |
# Icon must end with two \r | |
Icon | |
# Thumbnails | |
._* |
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
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist |
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
# branch_name = New branch not MASTER e.g. new_dev | |
git checkout {branch_name} | |
git merge -s ours master | |
git checkout master | |
git merge {branch_name} |
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
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain 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
/api/v1/pulses/activity/?modified_since=2016-04-25T22:49:03.704867&limit=10&page=1 | |
{ | |
"count": 487, | |
"next": "https://otx.alienvault.com/api/v1/pulses/activity?page=2", | |
"previous": null, | |
"results": [ | |
{ | |
"id": "5760336e2957b90134ede223", | |
"name": "Intrusion into the Democratic National Committee", |
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
######################################## | |
# Tested on Elasticsearch Version: 2.x # | |
######################################## | |
from elasticsearch import Elasticsearch | |
import certifi | |
index_name = 'index name here' | |
index_type = 'index type here' |
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
### Disable User | |
`sudo usermod -L -e 1 [username]` | |
### Enable user | |
`sudo usermod -U -e "" [username]` |
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
## Taken from: http://www.brianlinkletter.com/how-to-set-up-a-new-userid-on-your-amazon-aws-server-instance/ | |
Create a new userid, with password | |
We will create a new account with userid brian. If you run into any trouble, consult the Amazon AWS documentation. To create the new account, first login to your AWS server with a command similar to: | |
Laptop:$ ssh -i ~/Documents/Ubuntu-2-keypair.pem ubuntu@54.175.34.164 | |
Then create the new user brian (or your choice) using the command: | |
ubuntu@AWS:$ sudo adduser brian |
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
11:07:05.883154 IP 212.71.238.108.45939 > 139.59.178.38.2481: UDP, length 229 | |
11:07:05.885476 IP 212.71.238.108.45939 > 139.59.178.38.2481: UDP, length 1 | |
11:07:05.887707 IP 212.71.238.108.45939 > 139.59.178.38.2481: UDP, length 48 | |
11:07:05.890172 IP 212.71.238.108.35351 > 139.59.178.38.2469: UDP, length 46 | |
11:07:05.890191 IP 212.71.238.108.52112 > 139.59.178.38.2465: UDP, length 113 | |
11:07:05.890198 IP 212.71.238.108.42957 > 139.59.178.38.2466: UDP, length 113 | |
11:07:05.890206 IP 212.71.238.108.45027 > 139.59.178.38.2471: UDP, length 46 | |
11:07:05.890225 IP 212.71.238.108.59236 > 139.59.178.38.2484: UDP, length 50 | |
11:07:05.898955 IP 212.71.238.108.54349 > 139.59.178.38.2458: UDP, length 61 | |
11:07:05.898975 IP 212.71.238.108.40055 > 139.59.178.38.2462: UDP, length 61 |
OlderNewer