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
# ---- START Cisco IOS ---- | |
interface Port-channel2 | |
description LACP Channel for mk2 | |
switchport trunk encapsulation dot1q | |
switchport trunk allowed vlan 1,2 | |
switchport mode trunk | |
spanning-tree portfast trunk | |
! | |
interface GigabitEthernet1/0/23 | |
description mk2 eth0 |
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
# Column Width | |
PS > Get-CsAnalogDevice | ft Identity,RegistrarPool -> Get-CsAnalogDevice | ft Identity,RegistrarPool | out-string -Width 160 | |
# Collections / Arrays | |
# It might be that the object you’re looking at is an array (a “collection”), and PowerShell is only showing the first few entries in that array, rather than the lot. | |
# Here, the fix is to change the $FormatEnumerationLimit value. If you type it on its own into PowerShell the current value – probably 3 – will be returned. If you set a new value of -1, it’ll output ALL entries in your collection. | |
PS > $FormatEnumerationLimit | |
3 | |
PS > $FormatEnumerationLimit=-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
# https://www.rationallyparanoid.com/articles/tcpdump.html | |
# DHCP debugging with tcpdump | |
# filter to match DHCP packets including a specific Client MAC Address: | |
tcpdump -i br0 -vvv -s 1500 '((port 67 or port 68) and (udp[38:4] = 0x3e0ccf08))' | |
# filter to capture packets sent by the client (DISCOVER, REQUEST, INFORM): | |
tcpdump -i br0 -vvv -s 1500 '((port 67 or port 68) and (udp[8:1] = 0x1))' | |
# Monitoring on interface eth0 |
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
https://www.rationallyparanoid.com/articles/hping.html | |
Hping usage examples | |
Often considered a complementary tool to Nmap, hping is used for network scanning, as well as crafting TCP/IP packets. Please note that given the packet crafting involved, if you are running as root yet you receive an error saying that the operation is not permitted it could be due to a host firewall. | |
Send TCP SYN packets to port 0 on host example.com (note that hping will increment the source port by 1 for each packet sent): | |
hping example.com -S -V | |
Send TCP SYN packets to port 443 on host example.com: | |
hping example.com -S -V -p 443 |
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
https://www.rationallyparanoid.com/articles/netcat.html | |
Netcat usage examples | |
The following commands were done on the Linux version of Netcat. | |
Connect to TCP port 80 on host example.com: | |
nc -vv example.com 80 | |
Port scan TCP ports 7 through 1023 on host example.com | |
nc -v -z example.com 7-1023 |
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
https://www.rationallyparanoid.com/articles/wget.html | |
Wget is a command-line tool for retrieving files using HTTP, HTTPS or FTP. | |
Retrieve /images/pic01.jpg from host example.com: | |
wget http://example.com/images/pic01.jpg | |
Retrieve /images/pic01.jpg from host example.com, specifying the user agent for IE7 on a Windows XP SP2 system instead of "Wget/1.xx": | |
wget --user-agent="Mozilla/4.0 (Windows; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)" http://example.com/images/pic01.jpg | |
Retrieve /images/pic01.jpg from host example.com, specifying "http://anothersite.example.com/search?hl=en&q=pictures" as the referer: |
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
http://brandon.penglase.net/index.php?title=Getting_*nix_to_Netboot_Macs | |
class "Apple-Intel-Netboot" { | |
2 # Limit this class to only Intel Apple machines | |
3 match if substring (option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386"; | |
4 option dhcp-parameter-request-list 1,3,17,43,60; # Send these options to the client (possibly forcing it, if the client didn't request it) | |
5 # From: http://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xml | |
6 # 1 - Subnet Mask | |
7 # 3 - Router | |
8 # 17 - Root Path |
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
https://askubuntu.com/questions/457016/how-to-change-gsettings-via-remote-shell | |
#!/bin/bash | |
# Remember to run this script using the command "source ./filename.sh" | |
# Search these processes for the session variable | |
# (they are run as the current user and have the DBUS session variable set) | |
compatiblePrograms=( nautilus kdeinit kded4 pulseaudio trackerd ) |
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
On a elevated command prompt run this.... | |
runas /u:<domainB>\<username> /netonly mmc | |
On prompt.. type your domainB password. | |
Click File --> Add/Remove Snap-in | |
Choose Active Directory Users and Computers (from left side pane) | |
Click Add > | |
Click Ok |
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
ip nat inside source static tcp 10.51.2.13 443 88.88.8.88 443 extendable |