Posts

Showing posts with the label Geek

Bash script tutorial with a minimum example

It uses variable, function, for loop, if else: #!/bin/bash function hi () { #no matter what get print out, it will get returned author= $1 echo " ${author} : \n" echo "hi,\n" ; echo "you" ; } #yingshaoxo="$(echo yingshaoxo)" yingshaoxo= "yingshaoxo" var=$(hi $yingshaoxo ) echo -e $var echo -e $var echo -e "\n" my_list=( "dog" "human" "cat" ); for word in ${my_list[@]} ; do if [[ $word == "human" ]] ; then echo " ${word} !!!" elif [[ $word == "dog" ]]; then echo " $word ." else echo $word fi done exit The bash syntax is similar to PHP, which treats list and map data structure as one single object. Use declare -A map_name to declare a map Use declare -a list_name to declare a list More info:  https://www.geeksforgeeks.org/bash-scripting-array ...

Basic network knowledge for hackers

Some command lines you should know  ifconfig ipconfig ip address ping 192.168.1.1 telnet 192.168.1.1 22 ssh root@192.168.1.1 finger sudo -s iptables -S netstat -rn netstat traceroute 10.0.2.15 rustscan -a 10.0.2.15 -- -Pn -t 10000 nslookup google.com dig bing.com nmap 127.0.0.1 rustscan -a yandex.com -- -Pn -t 10000 whois baidu.com whois yingshaoxo.xyz xdg-open 'google.com/search?q=yingshaoxo' More information Search for: hacking path with xxx Search for: how to xxx ​

Dev Tools 2022 to 2023 - by yingshaoxo

General Solution:   Virtual Container Docker and docker-compose VPN V2ray Gateway Traefik Node Solution: database https://github.com/prisma/prisma or https://github.com/Automattic/mongoose interface https://github.com/improbable-eng/ts-protoc-gen or https://github.com/apollographql/apollo-server https://github.com/dotansimha/graphql-code-generator or https://github.com/expressjs/express Golang Solution: database https://github.com/prisma/prisma-client-go or https://github.com/go-gorm/gorm interface https://github.com/gin-gonic/gin or https://grpc.io/docs/languages/go/quickstart/ or https://github.com/99designs/gqlgen compile https://github.com/mitchellh/gox Python Solution (only for restful: database https://github.com/coleifer/peewee or https://github.com/RobertCraigie/prisma-client-py interface https://github.com/tiangolo/fastapi Rust Solution: database https://github.com/Brendonovich/prisma-client-rust interface https://github.com/hyperium/ton...