Skip to content

Instantly share code, notes, and snippets.

module "aws_waf_owasp_top_10_rules" {
source = "modules/aws_waf_owasp_top_10_rules"
# For a better understanding of what are those parameters mean,
# please read the description of each variable in the variables.tf file:
# https://github.com/traveloka/terraform-aws-waf-owasp-top-10-rules/blob/master/variables.tf
product_domain = "ss"
service_name = "sswaf"
environment = "production"
@markz0r
markz0r / p.sh
Created September 17, 2019 05:02
number=$1
i=$2
f=0
while [[ $i -le `expr $number / 2` ]]; do
if test `expr $number % $i` -eq 0
then
f=1
fi
i=`expr $i + 1`
#!/usr/bin/python
def pt(n):
trow = [1]
y = [0]
for x in range(max(n,0)):
print(trow)
trow=[l+r for l,r in zip(trow+y, y+trow)]
return n>=1
pt(5)
import java.util.Scanner;
public class PrFa {
public static void main(String args[]){
int number;
Scanner sc = new Scanner(System.in);
System.out.println("Enter a number ::");
number = sc.nextInt();
for(int i = 2; i< number; i++) {
import java.util.Scanner;
public class PrFa {
public static void main(String args[]){
int number;
Scanner sc = new Scanner(System.in);
System.out.println("Enter a number ::");
number = sc.nextInt();
for(int i = 2; i< number; i++) {
#!/bin/bash
# chain_collector.sh [domain] [port]
# output to stdout
if [ $# -ne 2 ]; then
echo "USAGE: chain_collector.sh [domain] [port]"
exit 1
fi
SOURCE="${BASH_SOURCE[0]}"
# Random ID Generator
resource "random_id" "this" {
count = "${lower(var.target_scope) == "regional" || lower(var.target_scope) == "global" ? "1" : "0"}"
byte_length = "8"
keepers = {
target_scope = "${lower(var.target_scope)}"
}
@markz0r
markz0r / Export-AWS-ECR-VulnFinings.ps1
Created October 7, 2023 14:58
aws-ecr-vulnerability-report on all latest images
# Set exit on error
$ErrorActionPreference = 'Stop'
# Show list of AWS profiles configured on the system with numbered selection then prompt for selection and set the $AWS_PROFILE variable to the corresponding profile name, not the profile number
$AWS_PROFILES = aws configure list-profiles
$AWS_PROFILES | ForEach-Object -Begin { $i = 1 } -Process { Write-Host "$i. $_"; $i++ }
$AWS_PROFILE = Read-Host "Select AWS Profile Number"
$AWS_PROFILE = $AWS_PROFILES[$AWS_PROFILE - 1]
write-host "You selected $AWS_PROFILE"
$PULL_DATE = Get-Date -Format "yyyyMMdd"
######################################################
# SET YOUR PARAMETERS
$SAWResourceGroupName = 'saw_resource_group'
$SAWLocation = 'AustraliaEast'
$SAWHostPoolName = 'saw_host_pool'
$SAWWorkspaceName = 'saw_workspace'
$SAWAppGroupName = 'saw_app_group'
$SAWUserGroupName = 'saw_user_group'
$SAWVDIGroupRole = 'Desktop Virtualization User'
$SAWAppGroupResourceType = 'Microsoft.DesktopVirtualization/applicationGroups'