Bash | PowerShell | Bash Example | PowerShell Example |
---|---|---|---|
find | Get-ChildItem | find . -type f -name "matchme" | Get-ChildItem -Filter "matchme" -Recurse -File |
ls | Get-ChildItem | ls -R dir/ | Get-ChildItem '.\dir' -Recurse |
which | Get-Command | which python | Get-Command python |
env | Get-ChildItem env: | env | Get-ChildItem env: |
echo | echo | echo $ENV{'PATH'} | echo $Env:path |
grep | Select-String | grep 'foobar' file.txt | Select-String -Path '.\file.txt'-Pattern 'foobar' |
useradd |
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
#!/usr/bin/env perl | |
# This can be used as part of git pre-commit hooks without the need to install deps | |
# because FindBin and File::Find are core perl. We use this in .husky/pre-commit. | |
# This runs on Mac OS, Linux, and WSL | |
use strict; | |
use warnings; | |
use feature 'say'; | |
use FindBin qw($Bin); | |
use File::Find; |
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
#!/usr/bin/env bash | |
function _sed() { | |
if [ `uname` = 'Darwin' ]; then | |
# for MacOS | |
sed -i '' -e "$1" "$2" | |
else | |
# for Linux and Windows | |
sed -i'' -e "$1" "$2" | |
fi |
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
#!/bin/bash | |
rm -rf plugins | |
mkdir plugins | |
for i in $(seq 1 2); do | |
curl -s "https://wordpress.org/plugins/browse/popular/page/$i/" | \ | |
grep --color "https://wordpress.org/plugins/" | \ | |
grep "<h3 class=\"entry-title\">" | sed "s/.*a href=\"//g" | sed "s/\" rel.*//g" | \ | |
xargs -I{} curl -s {} | grep downloadUrl | grep -Eo "https:[^\"]+" | \ |
WAPT-https://github.com/KathanP19/HowToHunt/blob/master/CheckList/Web_Checklist_by_Chintan_Gurjar.pdf
Authenication-https://github.com/HolyBugx/HolyTips/blob/main/Checklist/Authentication.pdf
Oauth Misconfiguration-https://binarybrotherhood.io/oauth2_threat_model.html
File Upload-https://github.com/HolyBugx/HolyTips/blob/main/Checklist/File%20Upload.pdf
Filter | Description | Example |
---|---|---|
allintext | Searches for occurrences of all the keywords given. | allintext:"keyword" |
intext | Searches for the occurrences of keywords all at once or one at a time. | intext:"keyword" |
inurl | Searches for a URL matching one of the keywords. | inurl:"keyword" |
allinurl | Searches for a URL matching all the keywords in the query. | allinurl:"keyword" |
intitle | Searches for occurrences of keywords in title all or one. | intitle:"keyword" |
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
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <time.h> | |
void print_bits (uint8_t vals); | |
void bitwise_and (); | |
void bitwise_and_assign (); | |
void bitwise_or (); | |
void bitwise_or_assign (); |
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
# | |
# Configuration files for Manjaro i3 on Lenovo Yoga 2 pro | |
# to scale properly on HiDPI (3200x1800) | |
# | |
##################################################### | |
~/.profile # | |
##################################################### | |
# UI element scaling, icons | |
export GDK_SCALE=2 |
NewerOlder