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
package main | |
import "fmt" | |
const ( | |
debugLevel = iota | |
infoLevel | |
warnLevel | |
errorLevel | |
fatalLevel |
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
// Package errors provides a way to return errors if they are not nil | |
// without `if err != nil { return err }` spam. | |
package errors | |
// handleError represents an error raised by ErrReturn. | |
// it is here to provide a diference between normal panics and error panics | |
type handleError struct { | |
err error | |
} |
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
-- Sulution for https://www.seas.upenn.edu/~cis194/spring13/hw/01-intro.pdf | |
toDigits :: Integer -> [Integer] | |
toDigits n | |
| n < 1 = [] | |
| otherwise = map (\x -> read [x] :: Integer) $ show n | |
toDigitsRev :: Integer -> [Integer] | |
toDigitsRev n = reverse (toDigits n) | |
-- taken and modified from stackoverflow to be more readable, |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
) | |
func main() { | |
cmd := exec.Command("npm", "start") |
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
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"os/exec" |
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
package main | |
import ( | |
"fmt" | |
"math/big" | |
"os" | |
"strconv" | |
) | |
func main() { |
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
-- Program to pwn rednet comunications | |
-- Options | |
-- WireDoplphin replay - prompt repeating coms with custom message & sender ids | |
-- WireDoplphin listen - just listen and display comunications | |
-- TODO | |
-- add listening at the same time as repeating | |
-- more commandline options (gnu standered parsing?) | |
-- log how meny messages from every computer id sent and what spam was filtered | |
local helptext = "Usage: WireDoplphin <option>\noptions are:\nreplay - prompt repeating coms with custom message & sender ids\nlisten - just listen and display comunications" |
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
local a=[[ | |
Usage: ncat <option> | |
options are: | |
replay - prompt repeating coms with custom message & sender ids | |
fuzz - make everyone have a bad time (WIP NOT DONE YET) | |
listen - just listen and display comunications | |
]]local b={...}if#b~=1 then print("Usage: ncat <option>")return end;local c=require("math")local d={}local e=65535;local f;local g;local h;local i;local j={}for k,l in ipairs(peripheral.getNames())do if peripheral.getType(l)=="modem"then i=peripheral.wrap(l)end end;if not i then error("Failed to find modem.")end;local function m(n)if type(n)~="table"then return false end;if n.message and type(n.nMessageID)=="number"and not j[n.nMessageID]then return true end;if n.nMessageID==nil then return false end;if type(n.nMessageID)=="number"and not j[n.nMessageID]then return true end;return false end;local function o()while true do local p,p,p,q,n=os.pullEvent("modem_message")if m(n)then return q,n end end end;local function r(s)io.write(s)return io.read()end;function d.fuzz()local t,n=o()end;function d |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"os/exec" | |
"strings" | |
"sync" | |
) |
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/python3 | |
import os | |
import socket | |
import subprocess | |
import sys | |
from webbrowser import open_new | |
# Create a socket | |
def socket_create(): | |
try: |