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
| #!/bin/bash | |
| tshark -r <YOUR_WIRELESS_CAPTURE> -T fields -e "radiotap.dbm_antsignal" -e "radiotap.dbm_antnoise" \ | |
| | awk '{ sum_signal += $1; sum_noise += $2; n++ } END { if (n > 0) print '\ | |
| '"\n802.11 Avgs (dbm)\n=================\nSignal: " sum_signal / n "\nNoise: " sum_noise / n ; }' |
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
| #!/usr/bin/env python3 | |
| #-*- coding:utf-8 -*- | |
| # Modified existing script for PyQt5 (https://stackoverflow.com/questions/14090353/) | |
| from PyQt5 import QtCore | |
| from PyQt5.QtWidgets import QWidget, QLineEdit, QPushButton, QHBoxLayout, \ | |
| QMainWindow, QApplication | |
| class widgetB(QWidget): | |
| procDone = QtCore.pyqtSignal(str) |
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
| #!/bin/bash | |
| # This script will install network-manager-l2tp on linux distros from source. | |
| # Only instructions x86_64, per https://github.com/nm-l2tp/network-manager-l2tp | |
| # Untested everywhere (i.e. this is a rough draft) | |
| # Get the required files | |
| git clone https://github.com/nm-l2tp/network-manager-l2tp.git | |
| cd network-manager-l2tp | |
| git checkout 1.2.2 |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """Unittest practice | |
| This program does basic arithmetic and provides a test class to test it. | |
| # Running | |
| python3 -m unittest test_simple_calculator.py | |
| """ | |
| import unittest |
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
| #!/usr/bin/env python3 | |
| # encoding=UTF-8 | |
| """ | |
| ### SharkWrappyr ### | |
| This script is a python wrapper for tshark that takes a pcap and filters | |
| and returns the filtered pcap. Requires tshark to be installed. | |
| Usage: filtered_pcap = shark_wrappyr(pcap_in, pcap_filters) | |
| """ | |
| import subprocess |
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
| class First(object): | |
| def __init__(self): | |
| super(First, self).__init__() | |
| print("first") | |
| def print_b(self): | |
| print('b') | |
| class Second(First): | |
| def __init__(self): |
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
| #!/bin/bash | |
| # This script will move the files in a repository into a branch in another repository | |
| # arg 1 is file source repo 1, arg 2 is repo 2 that will get a new branch | |
| # arg 3 is repo 1 name, arg 4 is repo 2 name, arg 5 is the branch name | |
| # Get files | |
| cd /tmp | |
| git clone $1 | |
| git clone $2 | |
| cd $4 |
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
| whois $(dig +short $1 | tail -n -1) |
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
| " *** Get a vimwiki with markdown support up quickly *** | |
| " 1. git clone https://github.com/vimwiki/vimwiki.git ~/.vim/pack/plugins/start/vimwiki | |
| " 2. Paste/append this file to ~/.vimrc | |
| " 3. Change the location of the vimwiki path | |
| "Vimwiki settings | |
| set nocompatible | |
| filetype plugin on | |
| syntax on |
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
| " Ross Jacobs' original .vimrc | |
| " VUNDLE | |
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() |