creo le regole in
/etc/iptables/rules.v4
per salvare le modifiche
iptables-restore < /etc/iptables/rules.v4
creo le regole in
/etc/iptables/rules.v4
per salvare le modifiche
iptables-restore < /etc/iptables/rules.v4
montare partizione windows
/mnt/Windows/System32/config
chntpw -u NOMEUTENTE SAM
qualora non ricordiamo l’utente : chntpw -l SAM
Controllare la cache arp:
arp -n | grep macdatrovare
##CUSTOM ALIAS SHELL (~/.bashrc):
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval “$(dircolors -b ~/.dircolors)” || eval “$(dircolors -b)”
alias ls=’ls –color=auto’
alias Ssh=’ssh -o HostKeyAlgorithms=ssh-dss -o KexAlgorithms=diffie-hellman-group14-sha1 ‘
alias ping=’ping -O’
alias Ping=’ping -a -O’
#alias dir=’dir –color=auto’
#alias vdir=’vdir –color=auto’
fi
##VIRTUALBOX REBUILD MODE:
sudo dpkg-reconfigure virtualbox-dkms
——————————————
##SSH CONNECTION MY SHELL:
– SSH Nuovo protocollo:
ssh -l root 192.168.XXX.XXX
– SSH Vecchio protocollo:
Ssh root@192.168.XXX.XXX
——————————————
##MC LOCAL CONNECTION:
MC left pc -> F9 – Shell link.. – root@192.168.XXX.XXX
——————————————
##RASPBERRY CONFIGURATION:
autostart.sh -> remmina -c /home/pi/RDP.remmina
——————————————
##GRUTILITY CRASH
/etc/init.d/apache2 start
——————————————
##ENABLE CONNECT SSH:
passwd root
systemctl stop iptables
——————————————
##MOUNT:
mkdir /mnt/usb
mount -t vfat /dev/sdb1 /mnt/usb
ntfs-3g /dev/sda1 /mnt/windows
——————————————
##CHANGE PSW WINDOWS:
cd Windows/System32/config
chntpw -l SAM (o sam)
chntpwd -u Administrator SAM
2
q
y
——————————————
##CLONE:
Clonazione disco (pv=avanzamento)
dd if=/dev/sda | pv | dd of=/dev/sdb
Clonazione da disco grande a piccolo
– Gparted -> Resize e poi spostare partizione di recupero lasciando spazio vuoto alla fine
– Usare il dd
– gdisk -> w -> y
– riporto disco normale
# backup
dd if=/dev/hdx | gzip > /path/to/image.gz
# restore
gzip -dc /path/to/image.gz | dd of=/dev/hdx
——————————————
Clonazione disco RESCUE
ddrescue -r2 -f /dev/sdc /dev/sdb
-> -r + numero = tentativi retray
-> -f = Force overwrite of outfile. Needed when outfile is not a regular file, but a device or partition.
——————————————
##SAMBA NETWORK SHARE CONNECT
sudo mount -t cifs //192.168.84.11/c$ /mnt/Temp -o uid=1000,gid=1000,rw,user,username=Administrator,domain=gruppo-grigolin.local
——————————————
##CONTROL PRINTERS VIA CMD:
@echo off
REM RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n “HP Officejet Pro 8500”
@echo Add a network printer from windows command line
rem cscript C:\windows\system32\Printing_Admin_Scripts\it-IT\prnmngr.vbs -p “printername” -s “servername”
@echo Get the list of printers added to the system from Windows command line(CMD).
rem cscript C:\windows\system32\Printing_Admin_Scripts\it-IT\prnmngr.vbs -l
@echo Get the default printer details from command line.
rem cscript C:\windows\system32\Printing_Admin_Scripts\it-IT\prnmngr.vbs -g
@echo Set default printer from windows command line.
rem cscript C:\windows\system32\Printing_Admin_Scripts\it-IT\prnmngr.vbs -t -p “\\Servername\printername”
pause
—————————————–
##DISABLE/ENABLE NETMASK:
netsh interface set interface “Ethernet 2” disable
netsh interface show interface
—————————————–
##CHANGE TYPE CONNECTION:
Get-NetConnectionProfile
Set-NetConnectionProfile -InterfaceIndex xx -NetworkCategory Private
—————————————–
##PREVIEW KEYS:
Word Preview : HKCR\CLSID\{84F66100-FF7C-4fb4-B0C0-02CD7FB668FE}
PowerPoint Preview : HKCR\CLSID\{65235197-874B-4A07-BDC5-E65EA825B718}
Excel Preview : HKCR\CLSID\{00020827-0000-0000-C000-000000000046}
——————————————-
##FUNCTION MAIUSCOLO:
Sub Maiuscolo()
For Each Cell In Selection
If Not Cell.HasFormula Then
Cell.Value = UCase(Cell.Value)
End If
Next Cell
End Sub
——————————————-
#Per proxy ovveride (c’è la sezione ProxyOvveride dove mettere gli indirizzi separati da 😉
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
——————————————-
Solo cartelle vuote:
Get-ChildItem ‘Y:\’ -Recurse -Directory | Where-Object {[System.IO.Directory]::GetFileSystemEntries($_.FullName).Count -eq 0} | ForEach-Object {$_.FullName}
——————————————-
Framework Offline .Net3
Dism.exe /online /enable-feature /featurename:NetFX3 /All /Source:D:\sources\sxs /LimitAccess
——————————————-
Framework Offline .Net2
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
——————————————-
Powershell Fix App:
Get-AppXPackage -allusers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}
——————————————-
TPM 2.0 Not trusted:
from C:\users\$dir\AppData\Local\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy
to C:\users\$dir\AppData\Local\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy.old
——————————————-
##CHECK NAME FILE/FOLDER LENGHT:
dir /s /b | sort /r /+261 > out.txt
——————————————-
#GET FILE FROM HTML
wget -r -np -nH –cut-dirs=3 -R index.html http://hostname/aaa/bbb/ccc/ddd/
Explanation:
It will download all files and subfolders in ddd directory
-r : recursively
-np : not going to upper directories, like ccc/…
-nH : not saving files to hostname folder
–cut-dirs=3 : but saving it to ddd by omitting first 3 folders aaa, bbb, ccc
-R index.html : excluding index.html files
——————————————
##Excel Psw Breaker:
Sub PasswordBreaker()
‘Breaks worksheet password protection.
Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer
Dim i4 As Integer, i5 As Integer, i6 As Integer
On Error Resume Next
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
Debug.Print Chr(i) & Chr(j) & Chr(k) _
& Chr(l) & Chr(m) & Chr(i1) _
& Chr(i2) & Chr(i3) & Chr(i4) _
& Chr(i5) & Chr(i6) & Chr(n)
DoEvents
ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
If ActiveSheet.ProtectContents = False Then
MsgBox “One usable password is ” & Chr(i) & Chr(j) & _
Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
Exit Sub
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
End Sub
mkdir /mnt/windows –> disco da dove copio
mkdir /mnt/usb –> disco di destinazione copia
ntfs-3g disco di origine a disco usb
ddrescue -r2 /mnt/windows /mnt/usb
se ripristino in un nuovo disco
ddrescue -r2 -f /dev/sda /dev/sdb
finito tutto
gdisk /dev/partizione
dare w
e poi yes
1. Shut down the virtual machine you want to reduce disk size;
2. Using SSH, connect to the console of the ESXi host the VM is registered on;
3. Go the directory the VMDK file of your VM is located in:
cd /vmfs/volumes/datastore/test-VM
4. Display the contents of the virtual disk configuration file (*.vmdk) using the cat command:
cat test_vm_3.vmdk
5. The size of the vmdk disk is shown in the #Extent description section (after the RW characters).
In this case, it is 167772160 (80 GB *1024*1024*1024 / 512);
I want to reduce my VMDK disk from 80 to 40 GB. It means that I have to specify 83886080 (40 GB*1024*1024*1024 / 512) in the Extent description section. Set a new size of your virtual disk using a text editor (vi or nano);
I am using vi:
vi test_vm_3.vmdk
Using the down arrow key, go to the line containing the disk size and press i (to edit it). Specify the new size of the virtual
disk. Press ESC to exit the edit mode and then type :wq -> Enter to save the changes; shrink vmdk file size on vmware datastore
6. Then just clone or migrate (using Storage vMotion) the virtual machine to another datastore. After moving the virtual machine
files, the new size of its virtual disk will be displayed in its properties.
Tip. If you have only one ESXi host, one VMFS datastore, you won’t be able to use the Storage vMotion. Then you can clone vmdk using this command:vmkfstools -i test_vm_3.vmdk test_vm_3_newsize.vmdkvmkfstools – clone file with reducing file size
Remove the source VMDK disk, clone the reaming VMDK disk again and rename it by specifying its original name:
rm test_vm_3.vmdk
rm test_vm_3-flat.vmdk
vmkfstools -i test_vm_3_newsize.vmdk test_vm_3.vmdk
da amministrazione , portale, configurazione, da sicurezza togli il flag invio mail alla login
nel menù Configurazione servizi Polyedro attiva anche la sottovoce ‘Servizio autenticazione’ e inserisci le credenziali dell’utente admin del portale TSX (admin di TSX, non di Gamma). Se ti restituisce errore in fase di salvataggio prova a chiudere e riaprire più volte il menù e dovresti trovare attiva la voce. In alternativa potresti provare a bypassare mediante la query in modo da compilare la fw90. Quindi esegui sul db la seguente query: update FW90_TPSERVICES set FW90_USERNAME = ‘wsuser’, FW90_PWDAUTH= ‘admin’, FW90_FLGATTIVO = 1, FW90_PWD =’admin’ , FW90_USERAUTH = ‘admin’where FW90_IDSERVIZIO = 4.La password dell’utente admin del portale deve essere quella di default ‘admin’. Se non è ‘admin’ ti consiglio di eseguire come amministratore prima il batch ‘Ripristina password admin TS Experience’ che trovi nel menù Start di Windows. A quel punto una volta resettata la password ad admin tramite batch puoi lanciare la query. Infine rientrare in Gamma e riprovare a fare la pubblicazione.
in ambiente mettere FORZAPWDBASE X
Disabilitare le ACLAPG attive ed all’accesso la pwd admin sarà :
teamsystem_password
e su indirizzario dare invio
