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
cmdkey /generic:TERMSRV/192.168.1.100 /user:owner /pass:test1234 |
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
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol="icmpv4:8,any" dir=in action=allow |
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
rem "Win server 2022 standard VDYBN-27WPP-V4HQT-9VMD4-VMK7H" | |
rem "Win server 2022 DC WX4NM-KYWYW-QJJR4-XV3QB-6VM33" | |
rem "Windows 10/11 pro W269N-WFGWX-YVC9B-4J6C9-T83GX" | |
rem "Windows 10/11 pro for workstation NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J" | |
slmgr /ipk NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J | |
slmgr /skms kms.internal.ip-com.co.il |
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
{ | |
if ( ([ /interface/lte/monitor lte1 once as-value ]->"functionality") = "full" ) do={ | |
if ( ([ /interface/lte/monitor lte1 once as-value ]->"access-technology") = "LTE" ) do={ | |
:log info "LTE Connection"; | |
if ( ([ /interface/lte/monitor lte1 once as-value ]->"rsrp") < -95 ) do={ | |
:log info "Low LTE reception"; | |
} else={ | |
:log info "HIGH LTE reception"; | |
} | |
} else={ |
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
$path = "C:\Users\eliez" | |
### First give system permissions | |
$identity = "SYSTEM" | |
$acl = Get-Acl -Path $path | |
$ace = New-Object System.Security.Accesscontrol.FileSystemAccessRule ($identity, "FullControl", "Allow") | |
$acl.AddAccessRule($ace) | |
Set-Acl -Path $path -AclObject $acl |
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 sh | |
IPVERSION="$1" | |
INTERFACE="$2" | |
case ${IPVERSION} in | |
4|v4|ipv4|ip4|6|v6|ipv6|ip6) | |
;; | |
*) | |
echo "Missing ip version to remove: 4 or 6" | |
exit 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
{ | |
:local BridgeName "switch1" | |
/interface bridge add name=$BridgeName | |
:for LoopCount from=1 to=24 do={ | |
:put "working on: ether$LoopCount"; | |
/interface bridge port add bridge=$BridgeName interface="ether$LoopCount" | |
} | |
} |
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 sh | |
apk update | |
apk add openvswitch openvswitch-bash-completion bash bash-completion openvswitch-doc openvswitch-openrc vim tcpdump ruby ruby-rdoc git | |
sed -i -e "s@mouse\=a@mouse=r@g" /usr/share/vim/vim*/defaults.vim | |
grep "mouse=a" /usr/share/vim/vim*/defaults.vim | |
grep "auto switch0" /etc/network/interfaces >/dev/null | |
RES="$?" |
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
{ | |
:do { | |
:log info "STARTING BACKUP"; | |
:global customerIdentificationVar; | |
:local customerIdentification "{{ customer_identifictation }}"; | |
if ( [:len $customerIdentificationVar] > 0 ) do={ | |
:set customerIdentification "$customerIdentificationVar"; |
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
{ | |
/export show-sensitive file=routeros-generic-config.rsc; | |
:local deviceSerialNumber "1234"; | |
:local apiUsername "$deviceSerialNumber"; | |
:local apiPassword "secretPassword"; | |
:lcal backupServerDomain "cep-backup.ngtech.home" | |
:local fileContent [/file get routeros-generic-config.rsc contents]; | |
:local apiUrl "https://$backupServerDomain/api/v1/backup/$apiUsename/generic"; | |
:local postData "$fileContent"; | |
:local contentLength [:len $fileContent]; |