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
| alias sta='sudo systemctl start' | |
| alias sto='sudo systemctl stop' | |
| alias stt='sudo systemctl status' | |
| alias rst='sudo systemctl restart' | |
| alias enb='sudo systemctl enable' | |
| alias dsb='sudo systemctl disable' | |
| alias s='sudo apt install' | |
| alias i='sudo apt install' | |
| alias r='sudo apt remove' |
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
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Scanner; | |
| public class FourInALine { | |
| public static final Scanner scanner = new Scanner(System.in); | |
| public static final int WIN_MIN_LENGTH = 4; | |
| public static final int ROW_COUNT = 6; | |
| public static final int COLUMN_COUNT = 7; |
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 python2 | |
| # Problem: http://9gag.com/gag/a6Qq368?ref=fb.s | |
| # sudo pip2 install python-constraint | |
| from constraint import * | |
| variables = "a", "b", "c" | |
| problem = Problem() | |
| for v in variables: | |
| problem.addVariable(v, range(10)) | |
| problem.addConstraint(AllDifferentConstraint()) | |
| problem.addConstraint(FunctionConstraint(lambda a, b, c: (a == 5) + (b == 4) + (c == 8) == 1), variables) |
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
| powershell %UserProfile%\Desktop\msi.ps1 on |
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
| <# | |
| .SYNOPSIS | |
| MSI-mode utility | |
| .DESCRIPTION | |
| Main purpose of this script is turning on MSI-mode for all PCI devices in bulk. Script offers four modes which can be selected through following command line arguments: | |
| 'on' - turning MSI-mode on; | |
| 'off' - turning MSI-mode off; | |
| 'reg' - printing reg-file for backup purposes (to save text to reg-file use standard redirection or piplining to comandlet Out-File); | |
| - started without command line argument script prints devices capable for MSI-mode. |
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 python3 | |
| # An Unblock Me solver written using A* search algorithm | |
| # perfect solution | |
| # Author: Saren | |
| SIZE = 6 | |
| """ | |
| GOAL = ( | |
| (' ', ' ', ' ', ' ', ' ', ' '), | |
| (' ', ' ', ' ', ' ', ' ', ' '), | |
| (' ', ' ', ' ', ' ', 'T', 'G'), |
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 python3 | |
| """ | |
| Failed in this case, does not know why. | |
| 1 | |
| 6 | |
| 2 3 2 5 4 3 | |
| """ | |
| FORMAT = "Case #{}: {}" |
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 | |
| # This script should be run by a Minecraft server | |
| # Notice: You will NOT be able to connect ddos.protected-server.domain from the same | |
| # public IP address as vulnerable-minecraft-server.domain has. I have wasted at least | |
| # 8 hours then found out that. | |
| REMOTE_DOMAIN="ddos.protected-server.domain" | |
| PROTECTOR_PORT=8080 |
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 | |
| # This script should be run by a DDoS protected server | |
| REMOTE_DOMAIN="vulnerable-minecraft-server.domain" | |
| PROTECTOR_PORT=8080 | |
| PROTECTED_PORT=25565 | |
| echo Fetching IPs... | |
| PROTECTOR_IP=$(ip a | grep inet | awk 'FNR == 3 {print $2}' | sed 's/\/[0-9]\{1,\}//g') |
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 python3 | |
| from pybrain.datasets import SupervisedDataSet | |
| from pybrain.structure import TanhLayer | |
| from pybrain.supervised.trainers import BackpropTrainer | |
| from pybrain.tools.shortcuts import buildNetwork | |
| from pyquery import PyQuery as pq | |
| from os.path import exists | |
| import urllib.request | |
| import pickle |