ajout fichier bashrc complémentaire et iptables pour interdire samba
This commit is contained in:
parent
f3266bd6bb
commit
4695d52c22
25
cpp/makefile
25
cpp/makefile
|
@ -1,25 +1,34 @@
|
|||
# var. C/C++
|
||||
# var
|
||||
CC = gcc
|
||||
#CC = g++
|
||||
CFLAGS = -Wall -std=c11 -g
|
||||
#CFLAGS = -Wall -O0 -g -std=c++1y -Werror=uninitialized -Werror=conversion
|
||||
CFLAGS = -Wall -std=c11 -g -fno-stack-protector -z execstack
|
||||
CANARY = -Wall -std=c11 -g -fstack-protector --param ssp-buffer-size=64
|
||||
AFLAGS = -S -Wall -std=c11 -g
|
||||
RM = /bin/rm
|
||||
|
||||
# src, .o, .out
|
||||
SRC = ${wildcard *.c}
|
||||
HEAD = ${SRC:.c=.h}
|
||||
ASM = ${SRC:.c=.s}
|
||||
OBJ = ${SRC:.c=.o}
|
||||
ELF = ${SRC:.c=.out}
|
||||
|
||||
# target
|
||||
# targets
|
||||
all: ${ELF}
|
||||
:
|
||||
asm: ${ASM}
|
||||
:
|
||||
|
||||
# rules
|
||||
${ELF}: ${OBJ}
|
||||
${CC} ${OBJ} -o ${ELF}
|
||||
|
||||
|
||||
# object
|
||||
%.o: %.c
|
||||
${CC} -c ${CFLAGS} $< -o $@
|
||||
|
||||
%.s: %.c
|
||||
${CC} ${AFLAGS} $< -o $@
|
||||
|
||||
# cleanall
|
||||
clean:
|
||||
${RM} -f ${ELF} ${OBJ}
|
||||
|
||||
${RM} -f ${ELF} ${OBJ} ${ASM}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
alias l='ls -lhp --color=always --time-style=long-iso'
|
||||
alias ll='ls -lrthp --color=always --time-style=long-iso'
|
||||
alias lll='ls -lArthp --color=always --time-style=long-iso'
|
||||
alias rm='rm -iv'
|
||||
alias cp='cp -iv'
|
||||
alias mv='mv -iv'
|
||||
alias du='du -h --si'
|
||||
alias df='df -h --si'
|
||||
alias scp='scp -v'
|
||||
alias less='less -R'
|
||||
alias v='vim -R'
|
||||
alias p='python3'
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias c='cc -Wall -g -O0 -std=c11'
|
||||
alias g='g++ -Wall -g -O0 -std=c++1y -Werror=conversion -Werror=uninitialized'
|
||||
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
TTY=$(tty | grep -o tty)
|
||||
if [ -z $TTY ]; then
|
||||
man() {
|
||||
env LESS_TERMCAP_mb=$'\E[01;31m' \
|
||||
LESS_TERMCAP_md=$'\E[01;38;5;74m' \
|
||||
LESS_TERMCAP_me=$'\E[0m' \
|
||||
LESS_TERMCAP_se=$'\E[0m' \
|
||||
LESS_TERMCAP_so=$'\E[38;5;246m' \
|
||||
LESS_TERMCAP_ue=$'\E[0m' \
|
||||
LESS_TERMCAP_us=$'\E[04;38;5;146m' \
|
||||
man "$@"
|
||||
}
|
||||
fi
|
||||
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u\[\033[00m\]\[\033[01;34m\]@\[\033[00m\]\[\033[01;31m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
|
|
@ -13,3 +13,9 @@ iptables -A INPUT -p tcp --destination-port 445 -j REJECT
|
|||
iptables -A INPUT -p tcp --destination-port 137 -j REJECT
|
||||
iptables -A INPUT -p tcp --destination-port 138 -j REJECT
|
||||
|
||||
ip6tables -A INPUT -p tcp --destination-port 135 -j REJECT
|
||||
ip6tables -A INPUT -p tcp --destination-port 139 -j REJECT
|
||||
ip6tables -A INPUT -p tcp --destination-port 445 -j REJECT
|
||||
ip6tables -A INPUT -p tcp --destination-port 137 -j REJECT
|
||||
ip6tables -A INPUT -p tcp --destination-port 138 -j REJECT
|
||||
|
||||
|
|
Loading…
Reference in New Issue