This file contains hidden or 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
| # Simple NPM Supply Chain Attack Scanner (ref https://www.bleepingcomputer.com/news/security/hackers-hijack-npm-packages-with-2-billion-weekly-downloads-in-supply-chain-attack/ ) | |
| # Scans package.json and package-lock.json in current directory for compromised packages | |
| # Usage: .\ScanNPM.ps1 [optional-directory-path] | |
| param( | |
| [string]$Path = "." | |
| ) | |
| # Compromised packages from September 2025 attack | |
| $CompromisedPackages = @{ |
This file contains hidden or 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
| # Assignment 2 - Vahid Konicanin | |
| # | |
| # Terraform code to deploy an Azure infrastructure with a virtual network, subnet, network security group, | |
| # and two virtual machines (Windows and Linux), each with its own public IP address. | |
| terraform { | |
| required_providers { | |
| azurerm = { | |
| source = "hashicorp/azurerm" | |
| version = "=3.0.0" |
This file contains hidden or 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
| # Assignment 1 - Vahid Konicanin | |
| # | |
| # Script to move files with specified extension while preserving directory structure | |
| # Usage: .\assignment1.ps1 -SourceDirectory "C:\Source" -TargetDirectory "C:\Target" -FileExtension "pdf" | |
| param ( | |
| [string]$SourceDirectory, | |
| [string]$TargetDirectory, | |
| [string]$FileExtension = "*" | |
| ) |
This file contains hidden or 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 xlsxwriter | |
| from collections import Counter | |
| import re | |
| from difflib import SequenceMatcher | |
| workbook = xlsxwriter.Workbook("example.xlsx") | |
| worksheet = workbook.add_worksheet() | |
| categories = [ | |
| 'Best Cop', |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>The Matrix</title> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| } |
This file contains hidden or 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
| """ | |
| Network Packets Entropy Analyzer | |
| Author: Vahid Konicanin | |
| Part of a Research Paper "Detecting Network Anomalies with Shannon Entropy: A Novel Approach to Cybersecurity" | |
| International Balkan University, 2024 | |
| """ | |
| import math | |
| import hexdump | |
| import dpkt |
This file contains hidden or 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 xlsxwriter | |
| from collections import Counter | |
| import re | |
| workbook = xlsxwriter.Workbook("example.xlsx") | |
| worksheet = workbook.add_worksheet() | |
| categories = ['Best Cop', 'Best Paramedic', | |
| 'Best Hitman', 'Best Gunrunner', 'Best Thief', | |
| 'Best Driver', 'Best Pilot', 'Best Disappearer', 'Best Dressed Player', |
This file contains hidden or 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 xlsxwriter | |
| workbook = xlsxwriter.Workbook("example.xlsx") | |
| worksheet = workbook.add_worksheet() | |
| categories = ['Best Cop', 'Best Paramedic', | |
| 'Best Hitman', 'Best Gunrunner', 'Best Thief', | |
| 'Best Driver', 'Best Pilot', 'Best Dressed Player', | |
| 'Best Gold Rush Finder', 'Funniest Player', 'Most Helpful Player', | |
| 'Best New Player', 'Most Reformed Player', 'NG Couple', 'Server Bitch', |
This file contains hidden or 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
| String timeAgoSinceDate({bool numericDates = true}) { | |
| DateTime date = this.createdTime.toLocal(); | |
| final date2 = DateTime.now().toLocal(); | |
| final difference = date2.difference(date); | |
| if (difference.inSeconds < 5) { | |
| return 'Just now'; | |
| } else if (difference.inSeconds < 60) { | |
| return '${difference.inSeconds} seconds ago'; | |
| } else if (difference.inMinutes <= 1) { |
This file contains hidden or 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
| palette="#121C21:#E44754:#89BD82:#F7BD51:#5486C0:#B77EB8:#50A5A4:#FFFFFF:#52606B:#E44754:#89BD82:#F7BD51:#5486C0:#B77EB8:#50A5A4:#FFFFFF" | |
| foreground="#B3B8C3" | |
| background="#121B21" | |
| cursor="#E95420" | |
| darkstyle="true" # true or false | |
| gsettings set io.elementary.terminal.settings palette "$palette" | |
| gsettings set io.elementary.terminal.settings foreground "$foreground" | |
| gsettings set io.elementary.terminal.settings background "$background" | |
| gsettings set io.elementary.terminal.settings cursor-color "$cursor" |
NewerOlder