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
#enter ilo IP address here | |
$ilourl = "https://192.168.1.14" | |
$jsonpage = $ilourl + "/json/login_session" | |
#disable certificate check | |
add-type @" | |
using System.Net; | |
using System.Security.Cryptography.X509Certificates; | |
public class TrustAllCertsPolicy : ICertificatePolicy { | |
public bool CheckValidationResult( | |
ServicePoint srvPoint, X509Certificate certificate, |
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
#PowerShell to create an gibberishaes(and openssl) compatible aes string with salt | |
#Salted__8bitsalt/aesstring | |
#thanks for .netcode -> http://stackoverflow.com/questions/5452422/openssl-using-only-net-classes | |
function OpenSSLEncrypt($passphrase, $plainText) | |
{ | |
# generate salt | |
[byte[]] $key | |
[byte[]] $iv; | |
[byte[]] $salt = RandomByteArray |
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
import requests | |
from datetime import datetime, date, timedelta | |
import re | |
CONF_CONSUMER = "recycleapp.be" | |
CONF_APPAPI="https://recycleapp.be/api/app/v1/" | |
# CONF_DAYSINFUTURE = 14 | |
CONF_DAYSINFUTURE = 31 | |
CONF_LANG='nl' | |
CONF_USERAGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0" |
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
#Microsoft LAPS, https://support.microsoft.com/en-us/kb/3062591, doesn't handle user creation that well, and GPP is deprecated since ms14-025 | |
#might get solved with startupscript (tested on win10) | |
#get users in local administrator | |
$obj_group = [ADSI]"WinNT://$($env:COMPUTERNAME)/Administrators,group" | |
$Administrators = @($obj_group.psbase.Invoke("Members")) | foreach{([ADSI]$_).InvokeGet("Name")} | |
#get local users | |
$adsi = [ADSI]"WinNT://$($env:COMPUTERNAME)" | |
$Users = $adsi.psbase.children | where {$_.psbase.schemaClassName -match "user"} | select @{n="Name";e={$_.name}} |
OlderNewer