Skip to content

Instantly share code, notes, and snippets.

View InstallOpenSSH.Windows.GKI.ps1.md

Create folder location

New-Item -Path c:\ -Name temp -ItemType Directory

Download openssh

(New-Object System.Net.WebClient).DownloadFile('https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.9.0.0p1-Beta/OpenSSH-Win64.zip','C:\temp\OpenSSH-Win64.zip')

Unzip the files

Expand-Archive -Path "c:\temp\OpenSSH-Win64.Zip" -DestinationPath "C:\Program Files\OpenSSH"

Install service

. "C:\Program Files\OpenSSH\OpenSSH-Win64\install-sshd.ps1"

Set firewall permissions

New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22

View InstallWinGet.WinScripts.GKI.ps1md
# ############## Менеджер пакетов WinGet в Windows 10 ############## #
# ############## VARIANT 1 Installer: ############## #
# ### с помощью PowerShell скачать appxbundle файл winget с GitHub и установить его (https://github.com/microsoft/winget-cli/releases):
Invoke-WebRequest -Uri "https://github.com/microsoft/winget-cli/releases/download/v0.1.4331-preview/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle" -OutFile "C:\PS\WinGet.appxbundle"
Add-AppxPackage "C:\PS\WinGet.appxbundle"
##===========================================================================
## установка winget в windows 10 из appxbundle:
##===========================================================================
View Debloat-Windows10.ps1
<#
NAME
Debloat-Windows10.ps1
DESCRIPTION
Debloats and customizes Windows 10 Enterprise N LTSB.
It changes your privacy options in the settings app and disables scheduled tasks and services that are there
to gather information about you. It also tweaks the registry to customize settings, make your font display properly
on DPI scaling 125% and disable OneDrive completely. Windows Features are also disabled, such as Internet Explorer
and XPS Viewer, while others are enabled such as .NET framework 3.5. On top of it all, it appends new lines to your
hosts file that block Microsoft from collecting data on you, as well as enables or disables local policies to
@numbnet
numbnet / %pre
Last active Nov 27, 2020
kickstart
View %pre
%pre
#!/bin/sh
hds=""
mymedia=""
for file in /proc/ide/h*
do
mymedia=`cat $file/media`
View centos.utils.sh
#!/bin/bash
ver="v1.9.2"
title="Breeze Easy Shell"
title_full="$title $ver"
echo "$title_full"
#-----------------
#типовые функции
#-----------------
#для рабты с цветами
View SSH.ed25519.sh
#!/bin/bash
#====== SSH.ed25519.sh =======#
function variable {
# NKEY='id'
# CKEY='mail@gmail.com'
PKEY="";
# TKEY=rsa;
# TKEY=dsa;
View Backup.sh
#!/bin/bash
function BACKUPMENU {
echo "******* -select- *******"
echo "**************************"
echo " 1) = Backup with RESTIC "
echo " 2) = RESTORE with RESTIC"
echo " 3) = BACKUP with TAR "
echo " 4) = RESTORE with TAR "
echo " *) = EXIT "
echo "**************************"
View metasploit.sh
#!/data/data/com.termux/files/usr/bin/sh
echo "installing Prequisities \n"
apt update && apt upgrade
apt install autoconf bison clang coreutils curl findutils git apr apr-util libffi-dev libgmp-dev libpcap-dev \
postgresql-dev readline-dev libsqlite-dev openssl-dev libtool libxml2-dev libxslt-dev ncurses-dev pkg-config \
postgresql-contrib wget make ruby-dev libgrpc-dev termux-tools ncurses-utils ncurses
echo "\n"
echo "cloning Metasploit framework\n"
@numbnet
numbnet / .zshrc.sh
Last active Nov 22, 2020
Termux.start.script
View .zshrc.sh
## NAME: .zshrc
## AVTOR: numbnet
## If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
## Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
## Set name of the theme to load --- if set to "random", it will load a random theme each time oh-my-zsh is loaded, in which case, to know which specific one was loaded, run: echo $RANDOM_THEME
View backup.sh
#!/bin/bash
BDIR='/home/backup';
FDIR= '/';
EXCLUDE='{"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/home/backup/*","/media/*","/lost+found"}';
if [ -d $BDIR ]; then
echo "Folder exists"
cd /mnt && ln -s $BDIR;
else
You can’t perform that action at this time.