Skip to content

Instantly share code, notes, and snippets.

View capJavert's full-sized avatar
🤘
Kicking ass!

Ante Barić capJavert

🤘
Kicking ass!
View GitHub Profile
# Poglavlje 1
Informacijska imovina - skup informacija koje posjedujemo (na računalu ili osobno)
Informatička imovina - hardware-ska i fizička imovina
Povjerljivost - povjerljivost podataka koji se nalaze na Internet
Incident - Sigurnosni incident je čin narušavanja propisanih ili podrazumijevanih sigurnosnih normi vezanih uz Internet i usluge
Anonimnost - ne vidljivost i nepoznatost nekog identiteta/osobe
Autentikacija - provjera necijeg identiteta nekog subjekta.
Autorizacija - provjera da li je netko ovlašten izvršiti neku radnju
Identifikacija - dokazivanje identiteta
Bilježenje (Auditing) - bilježenje i logiranje pristupa i izvršenih radnji
@capJavert
capJavert / volatility-commands-demo.ps1
Last active March 20, 2017 15:30
Simple volitality demo ps script.
# Volatility DEMO
# Powershell script
# si@foi.hr
# Image env: Win8SP1x86 on VirtualBox machine
# GIST: https://gist.github.com/capJavert/fd962d7f56ae3aa890ec36d208b8e351
# get general image info
python C:\volatility\vol.py -f C:/Users/IEUser/Desktop/IE11WIN8_1-20170318-152658.raw imageinfo | Out-File txt/imageinfo.txt
# get KDBG debugging structure for windows kernel
python C:\volatility\vol.py --profile=Win8SP1x86 -f C:/Users/IEUser/Desktop/IE11WIN8_1-20170318-152658.raw kdbgscan | Out-File txt/kdbscan.txt
String adminRegex = "^(-admin)? ?-server (?:(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6})|(localhost)) -port ([8|9][0-9]{3}) -u ([a-zA-Z0-9-_]+) -p ([a-zA-Z0-9-_!#]+) -(pause|stop|start|stat)$";
String userRegex = "^(-korisnik)? ?-s (?:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6})|(localhost)) -port ([8|9][0-9]{3}) -u ([a-zA-Z0-9-_]+) ?(-(a|t) (?:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(((http:\/\/)|(https:\/\/))([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6})|(localhost)))? ?(-w (([1-9]{1})|([1-9]{1}[0-9]{1})|([1-5]{1}[0-9]{0,2})|600))?$";
String showRegex = "^(-prikaz)? ?-s ((:?([a-zA-Z]:|(http:(?:\\\\|\\/))))?(?:(?:\\\\|\\/)?(\\w[\\w ]*.*))+\\.(?:(?i)bin(?-i)))$";
@capJavert
capJavert / credit-cards-regex.txt
Created May 14, 2017 19:36
Credit cards Regex
^(?:4[0-9]{12}(?:[0-9]{3})? # Visa
| (?:5[1-5][0-9]{2} # MasterCard
| 222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}
| 3[47][0-9]{13} # American Express
| 3(?:0[0-5]|[68][0-9])[0-9]{11} # Diners Club
| 6(?:011|5[0-9]{2})[0-9]{12} # Discover
| (?:2131|1800|35\d{3})\d{11} # JCB
)$
@capJavert
capJavert / map.entities
Last active December 27, 2017 13:13
Map entities
Marker {
id: number;
lat: number;
lng: number;
label?: string;
draggable: boolean;
}
Area {
id: number;
@capJavert
capJavert / ints-assignment-3-parser.py
Created December 17, 2017 22:30
ints-assignment-3-parser
import xlsxwriter
import sys
args = sys.argv
workbook = xlsxwriter.Workbook(args[1])
worksheet = workbook.add_worksheet()
# Some data we want to write to the worksheet.
data = [
# all Items that belong to Characters
PREFIX rpg: <http://www.semanticweb.org/javert/ontologies/2017/10/dungeons-and-dragons#>
SELECT ?Character ?Item
WHERE { ?Character rpg:hasItem ?Item }
# all Characters that know Healing Spells
PREFIX rpg: <http://www.semanticweb.org/javert/ontologies/2017/10/dungeons-and-dragons#>
SELECT ?Character ?Spell
WHERE { ?Character rpg:knowsSpell ?Spell .
?Spell rdf:type rpg:Healing }
@capJavert
capJavert / rpg.owl
Last active April 26, 2024 02:23
Simple Dungeon & Dragons ontology
<?xml version="1.0"?>
<rdf:RDF xmlns="http://www.semanticweb.org/javert/ontologies/2017/10/dungeons-and-dragons#"
xml:base="http://www.semanticweb.org/javert/ontologies/2017/10/dungeons-and-dragons"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<owl:Ontology rdf:about="http://www.semanticweb.org/javert/ontologies/2017/10/dungeons-and-dragons"/>
@capJavert
capJavert / push-endpoints.txt
Last active March 22, 2018 00:22
Push service endpoints
POST /push - subscribe user by user_id with device_token
param: device_token: String
param: user_id: Int
Authorization: token: String - user Auth token
returns:
{
...
data: {
user_id: Int,
@capJavert
capJavert / test-server.js
Last active April 19, 2018 09:39
Custom json server using https://github.com/typicode/json-server and enables custom pk assignment for resources.
const jsonServer = require('json-server');
const server = jsonServer.create();
const path = require('path');
const router = jsonServer.router(path.join(__dirname, 'db.json'));
const middlewares = jsonServer.defaults();
// define primary key columns for each resource
const primaryKeys = {
"countries": "code",
"towns": "id",