Skip to content

Instantly share code, notes, and snippets.

View veerendra2's full-sized avatar
🎯
Focusing

Veerendra veerendra2

🎯
Focusing
View GitHub Profile
@veerendra2
veerendra2 / sniff.py
Created December 16, 2016 10:52 — forked from askldjd/sniff.py
import socket, struct, os, array
from scapy.all import ETH_P_ALL
from scapy.all import select
from scapy.all import MTU
class IPSniff:
def __init__(self, interface_name, on_ip_incoming, on_ip_outgoing):
self.interface_name = interface_name

Symmetric Encryption

The only way to encrypt today is authenticated encryption, or "AEAD". ChaCha20-Poly1305 is faster in software than AES-GCM. AES-GCM will be faster than ChaCha20-Poly1305 with AES-NI. Poly1305 is also easier than GCM for library designers to implement safely. AES-GCM is the industry standard.

Use, in order of preference:

  1. The NaCl/libsodium default
@veerendra2
veerendra2 / python-cheat-sheet-basic.py
Created November 15, 2017 21:43 — forked from filipkral/python-cheat-sheet-basic.py
Basic Python Cheat Sheet
#!/usr/bin/env python
"""Basic Python Cheat Sheet by Filip Kral on 2015/02/16"""
"""
Python is a cross-platform, interpreted, object-oriented programming language.
That means you can run it on Linux, Windows, Mac, and other platforms,
you don't need to compile your code to execute it because it is compiled on
the fly, and you can use classes and objects.
@veerendra2
veerendra2 / curl.md
Created November 20, 2017 19:56 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@veerendra2
veerendra2 / hostapd.conf
Created December 6, 2017 16:38 — forked from renaudcerrato/hostapd.conf
Sample hostapd.conf for documentation.
##### hostapd configuration file ##############################################
# Empty lines and lines starting with # are ignored
# AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for
# management frames with the Host AP driver); wlan0 with many nl80211 drivers
interface=wlan0
# In case of atheros and nl80211 driver interfaces, an additional
# configuration parameter, bridge, may be used to notify hostapd if the
# interface is included in a bridge. This parameter is not used with Host AP
@veerendra2
veerendra2 / .screenrc
Last active July 11, 2019 11:56
GNU screen Config CheatSheet
# The following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# enable alternate screen. (just like in xterm)
altscreen on
# Huge scrollback buffer
defscrollback 5000
@veerendra2
veerendra2 / network-config
Created July 10, 2022 16:30
network-config
# This file contains a netplan-compatible configuration which cloud-init will
# apply on first-boot (note: it will *not* update the config after the first
# boot). Please refer to the cloud-init documentation and the netplan reference
# for full details:
#
# https://cloudinit.readthedocs.io/en/latest/topics/network-config.html
# https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html
# https://netplan.io/reference
#
# Please note that, at this time, there is no way to specify the wifi
@veerendra2
veerendra2 / jekyll_site_workflow.yml
Created February 23, 2020 13:50
My Jekyll Site workflow
name: Jekyll site CI/CD
on:
push:
branches:
- source
jobs:
build:
@veerendra2
veerendra2 / config.sample.config
Created October 15, 2022 14:15
Nextcloud's config.sample.config
<?php
/**
* This configuration file is only provided to document the different
* configuration options and their usage.
*
* DO NOT COMPLETELY BASE YOUR CONFIGURATION FILE ON THIS SAMPLE. THIS MAY BREAK
* YOUR INSTANCE. Instead, manually copy configuration switches that you
* consider important for your instance to your working ``config.php``, and
* apply configuration options that are pertinent for your instance.
@veerendra2
veerendra2 / ngrok.service
Created October 21, 2022 19:30
ngrok service
[Unit]
Description=ngrok
After=network.target
[Service]
ExecStart=/opt/ngrok/ngrok start --all --config /opt/ngrok/ngrok.yml
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
IgnoreSIGPIPE=true
Restart=always