Skip to content

Instantly share code, notes, and snippets.

jan.masarik janmasarik

Block or report user

Report or block janmasarik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@janmasarik
janmasarik / iap-desktop-auth.py
Last active Jul 9, 2019
Script for desktop app flow authentication to IAP
View iap-desktop-auth.py
import os
import requests
import json
import traceback
from webbrowser import open_new_tab
from time import sleep
other_client_id = os.environ["OTHER_CLIENT_ID"] # Other client id in the same project as IAP secured app
other_client_secret = os.environ["OTHER_CLIENT_SECRET"] # Other client secret in the same project as IAP secured app (not a secret actually)
@janmasarik
janmasarik / sumo.py
Created Jun 9, 2018
Source code of IA158 homework - Lego EV3(dev) sumo robot
View sumo.py
#!/usr/bin/python3
from ev3dev.ev3 import LargeMotor, ColorSensor, InfraredSensor, TouchSensor, Button, Sound
from time import sleep
from threading import Thread
m1 = LargeMotor('outA')
m2 = LargeMotor('outD')
cl = ColorSensor()
ir = InfraredSensor()
View IA158_HW.md

sPyd3r

Lego MINDSTORMS EV3 SUMO robot

IA158 Real Time systems homework

Task performed

  • created robot from a scratch
  • flashed ev3dev debian based linux image to sd card and then booted it
  • implemented functionality of the robot in python
@janmasarik
janmasarik / sumo.py
Created May 15, 2018
Source code of IA158 homework - Lego EV3(dev) sumo robot
View sumo.py
#!/usr/bin/python3
from ev3dev.ev3 import LargeMotor, ColorSensor, InfraredSensor, TouchSensor, Button, Sound
from time import sleep
from threading import Thread
m1 = LargeMotor('outA')
m2 = LargeMotor('outD')
cl = ColorSensor()
ir = InfraredSensor()
@janmasarik
janmasarik / execute.php
Created May 12, 2018
source code from DEF CON Quals 2018 - Easy Pisy challenge
View execute.php
<?php
include 'common.php';
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
print highlight_string(file_get_contents("execute.php"), TRUE);
exit(0);
}
$keys = get_keys();
@janmasarik
janmasarik / secret_pickle.py
Created May 7, 2018
Python source code for Blaze CTF 2018 - secret_pickle
View secret_pickle.py
#!/usr/bin/env python3
import pickle
import hashlib
import os
import sys
class Note:
def __init__(self, name, date, content):
self.name = name
self.date = date
View keybase.md

Keybase proof

I hereby claim:

  • I am janmasarik on github.
  • I am sl4ve (https://keybase.io/sl4ve) on keybase.
  • I have a public key ASDtny5-gzswBO2UP71K3YNIrwomIrthIfX9PVp9iJH09go

To claim this, I am signing this object:

@janmasarik
janmasarik / vikend_task.py
Created Sep 21, 2016
review of python vikend task.
View vikend_task.py
#!/usr/bin/env python3
import sys
import re
import datetime
# "kernel" of this script
# i use many parameters, so it's memory intensive, but i start this function recursively so i need it
def heart_of_script(data, which, length, string, future_destination, future_arrival_date, future_arrival_time,
You can’t perform that action at this time.