Skip to content

Instantly share code, notes, and snippets.

View oikuda's full-sized avatar

Valter Vasić oikuda

  • Self-employed
  • Zagreb, Croatia
View GitHub Profile
/* This file is based on the file from http://ha.ckers.org/xss.js
It has been reproduced here due to the extended downtime of ha.ckers.org
This file is being hosted as a courtesy to the security community.
*/
document.write ("This is remote text via xss.js located at xss.rocks " + document.cookie);
alert ("This is remote text via xss.js located at xss.rocks " + document.cookie);
#!/usr/bin/env python2
import sys
import telegram
TOKEN='#bot_token'
CHAT_ID='chat_id 0f communication with bot'
def main():
bot = telegram.Bot(token=TOKEN)
for line in sys.stdin:
@oikuda
oikuda / battery.py
Last active December 11, 2020 17:20
Simple battery script made for polybar, ignores unknown battery statuses and supports multiple batteries, e.g. Thinkpad T470
#!/usr/bin/env python3
"""simple battery script made for polybar, ignores unknown battery statuses and
supports multiple batteries, e.g. Thinkpad T480"""
import subprocess
from os import listdir
POWER_PATH = '/sys/class/power_supply/'
# all icons and codes taken from the material icons:
# - https://material.io/resources/icons/
@oikuda
oikuda / follow_tcp_stream.py
Last active June 8, 2018 06:26
Simple follow TCP stream in python using dpkt
#!/usr/bin/env python
import dpkt
import pcapy
import array
# just two hosts communicating, one stream
fname = "out_of_order.pcap"
upstream = []
downstream = []
@oikuda
oikuda / 0 Strongswan IPsec VPN server (RPi3, PC) setup.md
Last active August 15, 2018 12:28
Strongswan IPsec VPN server (RPi3, PC) setup

Intro

First off, the scenario I deployed is on a Linux machine sitting behind a home router (NAT box). The machine we're doing the setup will be called tux.

Clients ---- Internet ---- ISP ---- Router(NAT) ---- tux(Strongswan)

For this to work port 500 and 4500 on your Router(NAT) should be forwarded to tux.

If you don't have a static IP with yout provider, you should consider a dynamic DNS service that will update the DNS address every day, when the address changes.

NOTE: I preferred to build strongswan from source to get the newest algorithms and Ed25519 curve support instead of standard EC curves. Safecurves