- Windows 8.x
- Windows 10
- Server 2012 R2
- Server 2016
- Server 2019
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:<drive>:\sources\sxs
some foobar
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:<drive>:\sources\sxs
Lists zones:
ipfw zone list
Show rules (Zone ID 2 for example):
ipfw -x 2 show
Show all tables
ipfw -x 2 table all list
Show authenticated/allowed clients (in)
ipfw -x 2 table 1 list
Show authenticated/allowed clients (out)
ipfw -x 2 table 2 list
Patch for pfSense 2.2.5 to redirect proxy users to the authentification portal.
*** captiveportal.inc Wed Nov 04 22:52:22 2015 --- captiveportal_patched.inc Mon Dec 14 17:12:42 2015 *************** *** 539,544 **** --- 539,548 ---- EOD; $rulenum = 65310; + /* Deny direct access to local services before captive portal authentication */ + $local_service_ports="3128,3129"; + $cprules .= "add {$rulenum} skipto 65314 ip from any to table(100) {$local_service_ports} in\n"; + $cprules .= "add {$rulenum} skipto 65314 ip from table(100) {$local_service_ports} to any out\n"; /* These tables contain host ips */ $cprules .= "add {$rulenum} pass ip from any to table(100) in\n"; $rulenum++; *************** *** 578,591 **** else $listenporthttps = 8001 + $cpzoneid; if (!isset($config['captiveportal'][$cpzone]['nohttpsforwards'])) { ! $cprules .= "add 65531 fwd 127.0.0.1,{$listenporthttps} tcp from any to any dst-port 443 in\n"; } } $cprules .= <<<EOD # redirect non-authenticated clients to captive portal ! add 65532 fwd 127.0.0.1,{$listenporthttp} tcp from any to any dst-port 80 in # let the responses from the captive portal web server back out add 65533 pass tcp from any to any out # block everything else --- 582,596 ---- else $listenporthttps = 8001 + $cpzoneid; if (!isset($config['captiveportal'][$cpzone]['nohttpsforwards'])) { ! $cprules .= "add 65530 fwd 127.0.0.1,{$listenporthttps} tcp from any to any dst-port 443 in\n"; } } $cprules .= <<<EOD # redirect non-authenticated clients to captive portal ! add 65531 fwd 127.0.0.1,{$listenporthttp} tcp from any to any dst-port 80 in ! add 65532 fwd 127.0.0.1,{$listenporthttp} tcp from any to any dst-port 3128 in # let the responses from the captive portal web server back out add 65533 pass tcp from any to any out # block everything else
Diff created with WinMerge.
Hold down [Shift] while choosing Restart
or
shutdown.exe /r /o
Check the status of the shared SYSVOL
dcdiag /test:netlogons
Verify DNS registration and functionality
dcdiag /test:dns
Verify communication with other domain controllers
nltest /dclist: <domain name>
Verify replication with other domain controllers
dcdiag /test:replications
Verify the availability of the operations masters
dcdiag /s: domaincontroller /test:knowsofroleholders /verbose dcdiag /s: domaincontroller /test:fsmocheck
[via]https://technet.microsoft.com/en-us/library/cc781459%28v=ws.10%29.aspx[/via]
Connect to VirtualCenter Server and enter credentials
Connect-VIServer -Server <Server>
Save the credentials to the credential store file (By default the credential store file is stored - encrypted - under the user profile directory)
New-VICredentialStoreItem -Host <Server> -User "<Username>" -Password "<Password>"
[via]https://blogs.vmware.com/PowerCLI/2011/11/have-you-seen-powerclis-credential-store-feature.html[/via]
Open a telnet connection to the router and run the following commands for a warm or cold reboot:
warm reboot (also soft reboot)
do/o/b
cold reboot (also cold boot, hard reboot or hard boot)
do/o/c
For Windows Vista and newer try to run the following:
winmgmt /verifyrepository
winmgmt /salvagerepository
winmgmt /verifyrepository
To fully rebuild the WMI Repository follow these steps:
for /f %s in ('dir /b *.mof') do mofcomp %s
for /f %s in ('dir /b en-us\*.mfl') do mofcomp en-us\%s
for /f %s in ('dir /b de-DE\*.mfl') do mofcomp de-DE\%s
[via]https://support.software.dell.com/de-de/vworkspace/kb/88861[/via]
update tableA a left join tableB b on a.name_a = b.name_b set validation_check = if(start_dts > end_dts, 'VALID', '')
UPDATE payments p INNER JOIN users u ON p.pay_id=u.user_id SET p.pay_email=u.user_email, p.pay_firstname=u.user_firstname, p.pay_lastname=u.user_lastname, p.pay_date=u.user_date
[via]http://stackoverflow.com/a/1262848[/via]
Don'ts
Dos
PHP
// Generate or return salted passwords function crypt2($password, $salt = "") { if($salt == "") { // A higher "cost" is more secure but consumes more processing power $cost = 10; // Create a random salt $salt = strtr(base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)), '+', '.'); // Prefix information about the hash so PHP knows how to verify it later. // "$2a$" Means we're using the Blowfish algorithm. The following two digits are the cost parameter. $salt = sprintf("$2a$%02d$", $cost) . $salt; } // Hash the password with the salt $hash = crypt($password, $salt); return $hash; }
// Save password $hash = crypt2($user_password); // hash the password with salt dbquery("UPDATE users SET user_hash='".$hash."' WHERE user_id='1'");
// Login $sql = "SELECT user_hash FROM users WHERE user_loginname='Admin' LIMIT 1"; [...] $data = dbarray($result); if (hash_equals($data['user_hash'], crypt2($user_pass, $data['user_hash']))) { // Ok! }
[via]http://stackoverflow.com/questions/401656/secure-hash-and-salt-for-php-passwords/, https://alias.io/2010/01/store-passwords-safely-with-php-and-mysql/[/via]