Skip to content

Instantly share code, notes, and snippets.

View anantshri's full-sized avatar
🇮🇳
Working on the next Jugaad

Anant Shrivastava anantshri

🇮🇳
Working on the next Jugaad
View GitHub Profile
# vagrant-hostmanager https://github.com/devopsgroup-io/vagrant-hostmanager
Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp /home/*/.vagrant.d/tmp/hosts.local /etc/hosts
%admin ALL=(root) NOPASSWD: VAGRANT_HOSTMANAGER_UPDATE
# See https://github.com/cogitatio/vagrant-hostsupdater#readme
# vagrant plugin vagrant-hostsupdater.
Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts
@anantshri
anantshri / gnome_shell_extensions.md
Last active May 26, 2020 21:25
MY experiments with various Gnome Shell extensions and tweaks that i had to apply

Introduction

I have come back for the first time to Gnome after they moved to version 3. This environment is very new for me and hence a lot of my experiments are around fixing things which i feel are wrong.

I have realized that they want a certain experiance and then they allow extensions to customize that experiance as per users needs.

I have applied a whole bunch of extensions as per my need to get things working for myself.

list of extensions

04745d6690e8b47c28939f327c669496c12b88b604e00c66111ea4842ba434e96d2b952c3ffcb15193f808b417413ecff7401da10eb9b94b2d199b69d7e8deca90
#!/bin/bash
if [ $# -eq 2 ]
then
end=$2
for i in $(eval echo "{1..$end}")
do
sleep 2
echo $i
adb wait-for-device
adb shell am start -a android.intent.action.CALL -d tel:$1
#!/bin/bash
IP=0.0.0.0
PORT=3000
cd /usr/share/MobSF/
if [ ! -d ~/.mobsf/ ]
then
echo "MobSF Started for the first time: Setup in progress"
echo "Creating directory structure in ~/.mobsf/"
mkdir -p ~/.mobsf/uploads
mkdir -p ~/.mobsf/static/downloads

Setup modern.ie vagrant boxes

Since modern.ie released vagrant boxes, it' no longer necessary to manually import the ova file to virtualbox, as mentioned here.

However, the guys at modern.ie didn't configured the box to work with WinRM. This how-to addresses that, presenting steps to proper repackage these boxes, adding WinRM support. Additionally configures chocolatey package manager and puppet provisioner.

Pre-requisites

@anantshri
anantshri / gist:54dfb341b84a30a993df
Created June 6, 2015 03:09
netsparker automaton
for /F "tokens=*" %%A in (url.txt) do (
"C:\Program Files (x86)\Netsparker\Netsparker.exe" /a /silent /p %Profile% /u http://%%A /rt "Detailed Scan Report" /r "scan_%%A_80_report.html"
"C:\Program Files (x86)\Netsparker\Netsparker.exe" /a /silent /p %Profile% /u https://%%A /rt "Detailed Scan Report" /r "scan_%%A_443_report.html"
)
@anantshri
anantshri / sshpass.rb
Created April 27, 2015 19:32
sshpass.rb
require 'formula'
class Sshpass < Formula
url 'http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz'
homepage 'http://sourceforge.net/projects/sshpass'
sha256 'c3f78752a68a0c3f62efb3332cceea0c8a1f04f7cf6b46e00ec0c3000bc8483e'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
@anantshri
anantshri / replace_equal.py
Created April 15, 2015 11:57
remove all = from a probable base64 string but preserve the last 1 or 2
str1="ssdggagad=gadg=adg=dasgadsg=as=gads=gas=as=asgas214=12rf=sdvgewt23g=vew=g4=="
x=str1[len(str1) - 2:]
if x == "==":
print str1.replace("=","") + x
else:
print str1.replace("=","") + "="
str2="ssdggagad=gadg=adg=dasgadsg=as=gads=gas=as=asgas214=12rf=sdvgewt23g=vew=g4="
x=str2[len(str2) - 2:]
if x == "==":
@anantshri
anantshri / php-fpm-cli
Last active August 29, 2015 14:19 — forked from muhqu/php-fpm-cli
#!/bin/bash
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Mathias Leppich <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell