Skip to content

Instantly share code, notes, and snippets.

@dimiboy
dimiboy / Israel-RedAlert.ps1
Created October 16, 2023 19:42
Israel Red Alert PowerShell
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$session.Cookies.Add((New-Object System.Net.Cookie("Lastalerts", "", "/", "www.oref.org.il")))
$session.Cookies.Add((New-Object System.Net.Cookie("AlertSoundNewFeature", "1", "/", "www.oref.org.il")))
$session.Cookies.Add((New-Object System.Net.Cookie("UsId", "***************", "/", "www.oref.org.il")))
$session.Cookies.Add((New-Object System.Net.Cookie("_ga_V2BQHCDHZP", "GS1.1.1697037833.1.0.1697037833.60.0.0", "/", "www.oref.org.il")))
$session.Cookies.Add((New-Object System.Net.Cookie("_ga", "***************", "/", "www.oref.org.il")))
$session.Cookies.Add((New-Object System.Net.Cookie("_gid", "***************", "/", "www.oref.org.il")))
$session.Cookies.Add((New-Object System.Net.Cookie("_fbp", "***************", "/", "www.oref.org.il")))
$previous = 0
$ProgressPreference = 'SilentlyContinue'
# https://youtube.com/c/dimustech
# https://youtube.com/c/dimustechil
param(
[switch] $mail,
[switch] $baloon,
[switch] $telegram,
[Parameter(Mandatory)]
[string]$subject,
[string]$body = $subject
$ShareLinks = @(
@{Link='https://www.google.com/finance/quote/INTC:NASDAQ';Price='52'}
)
$body = $null
$Summarybody = $null
foreach($share in $shareLinks){
@dimiboy
dimiboy / Windows_Backup_Script.ps1
Created May 2, 2020 12:13
Windows Backup Script
########################################################
# #
# Author: Dima K. #
# YouTube: https://youtube.com/c/dimustech #
# #
########################################################
$SendMail = $true
$from = "john@mail.ru"
@dimiboy
dimiboy / Failed-Login-Reporter.ps1
Created August 10, 2019 20:19
Failed logon reporter with a photo
$NewFailedLogin = $null
$StartDate = get-date
$CamPath = "C:\CommandCam"
$SmtpServer = "smtp.mail.ru"
$From = ""
$to = ""
$Cred = Import-CliXml $CamPath\cred.clixml
$CurrentAudit = (auditpol /get /subcategory:"Logon")[4]
@dimiboy
dimiboy / Telegram-listener.ps1
Created August 6, 2019 07:26
Telegram listener via Powershell
### Edit only this part! ################
$MyToken = ""
$ChatID = ""
#########################################
$InitialMessageDate = 0
$counter = 0
while ($true)
{
function Happy-NewYear {
$frame1 = @"
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&(*..,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%,.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/@
@@@@@@@@@@@@@@@@@@@@@@@@@@
@dimiboy
dimiboy / Check-SSL.ps1
Last active February 5, 2017 21:37
Check-SSL.ps1
<#
.SYNOPSIS
Check if SSL certificate of a specific site will expire within a given threshold.
.DESCRIPTION
Check if SSL certificate of a specific site will expire within a given threshold.
.PARAMETER Threshold
Set the threshold in days to check if the SSL expires within that threshold.
.PARAMETER WebsiteURL
List the websites to check (comma separated)