Skip to content

Instantly share code, notes, and snippets.

Avatar
🐧
Tux Ta Tux Tax

Do Hoang huyhoang8398

🐧
Tux Ta Tux Tax
View GitHub Profile
@huyhoang8398
huyhoang8398 / amazon-ec2-ftp.md
Created Jan 25, 2023 — forked from gunjanpatel/amazon-ec2-ftp.md
amazon ec2 LAMP and FTP installation and setup
View amazon-ec2-ftp.md
@huyhoang8398
huyhoang8398 / php-docker-ext
Created Jan 10, 2023 — forked from hoandang/php-docker-ext
Complete list of php docker ext
View php-docker-ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
View test.c
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
setuid(0);
system("/bin/bash");
return 0;
View slideshow.js
var slideIndex = 1;
showSlides(slideIndex);
function plusSlides(n) {
showSlides(slideIndex += n);
}
function currentSlide(n) {
showSlides(slideIndex = n);
}
View slideshow.css
* {box-sizing: border-box}
body {font-family: Verdana, sans-serif; margin:0}
.mySlides {display: none}
img {vertical-align: middle;}
/* Slideshow container */
.slideshow-container {
max-width: 1000px;
position: relative;
margin: auto;
View test.php
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {box-sizing: border-box}
body {font-family: Verdana, sans-serif; margin:0}
.mySlides {display: none}
img {vertical-align: middle;}
/* Slideshow container */
.slideshow-container {
max-width: 1000px;
View gist:146a599cfe1f67ec2b5f3585f25946fd
<div id="chartContainer1" style="height: 500px; width: 100%;"></div>
<br/><br/><br/><br/>
<div id="chartContainer2" style="height: 500px; width: 100%;"></div>
<br/><br/><br/><br/>
<div id="chartContainer3" style="height: 500px; width: 100%;"></div>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<script>
function chart(chartId = "chartContainer1", _data, nameChart) {
console.log(_data)
points = [];
View client.py
import socket
import time
ETH_P_ALL = 3
interface = 'lo'
dst = b'\x08\x00\x27\xdd\xd7\x43' # destination MAC address
src = b'\x08\x00\x27\x8e\x75\x44' # source MAC address
proto = b'\x88\xb5' # ethernet frame type
# print (payload)
# while True:
s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(ETH_P_ALL))
View sever.py
import socket
import codecs
from struct import *
from stringexec import parseString
import scapy
src = b'\x08\x00\x27\xdd\xd7\x43' # destination MAC address
dst = b'\x08\x00\x27\x8e\x75\x44' # source MAC address
proto = b'\x88\xb5'
ETH_P_ALL = 3
ETH_FRAME_LEN = 1514 # Max. octets in frame sans FCS