FB: 交大網路安全策進會
calee@cs.nctu.edu.tw
交大資工 大三
交大 BambooFox 新手村成員
[user]@[host]$ [command] -[short opt] --[long opt] args
root@[host]# [command] -[short opt] --[long opt] args
sudo dpkg --add-architecture i386
udo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
ls
: 列出目前資料夾下的東西ls -a
: 全部ls -l
: 清單ls -R
: 遞迴man
--help
rm -rf /*
#!/usr/bin/env python
# single line comment
Output
print('hahaha')
print("%d %d" % (100, 20))
print("{1}{0}".format('hi', 'CA'))
sys.stdout.write()
Input
s = input()
s = raw_input()
Integer
int()
0x00
int(x, 16)
hex(23) #0x17
+ - * / %
** //
Float
3.14...
2.12e-3
小數不精確性質
'single line string'
'''
multi line string
also comment
'''
len('abcdefg1234567')
s[3]
s[:-2:3]
'a'.join(['b', 'c', 'd'])
ascii table
ord('a')
chr(0x61)
"7061756c".decode("hex")
'zzZ'.encode('hex')
List
li = ['b', 1, 2, 'a']
li.append('abc')
li.remove(2)
li.sort()
li.reverse()
s.split('/')
Tuple
a = (2, 3, 5)
zip('abc', '123')
if a == b and c == 0:
print('a==b')
elif a < b or c == 0:
print('a<b')
else:
print('a>b')
for i in range(10):
print i
for x in 'abc123':
print(x)
while True:
print('hi')
def function_name(parameter):
statement
return (None)
import requests
from bs4 import BeautifulSoup
import os as hi
hi.system('echo $PATH')
Install
apt-get update
apt-get install python2.7 python-pip python-dev git libssl-dev libffi-dev build-essential
pip install --upgrade pip
pip install --upgrade pwntools
from pwn import *
context(arch = 'i386', os = 'linux') # 32bits
context(arch = 'amd64', os = 'linux') # 64bits
r = remote('exploitme.example.com', 31337)
r.recv()
r.sendline()
r.senduntil()
r.interactive()
p32()
p64()
import requests
r = requests.get('https://cs.nctu.edu.tw')
r.status_code
r.text
import requests
from bs4 import BeautifulSoup
soup = BeautifulSoup(html_doc, 'lxml')
soup.prettify()
soup.find_all('a')
tmux attach
tmux list
Ctrl-B %
Ctrl-B &
Ctrl-B c
Ctrl-B s
Ctrl-B d
Ctrl-B ${Number}
...
https://github.com/zardus/ctf-tools
import requests
proxies = {
'http': 'http://127.0.0.1:9050',
'https': 'http://127.0.0.1:9050',
}
requests.get('http://www.president.gov.tw/', proxies=proxies)
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing