- Run
( < /dev/zero ssh-keygen -q -N ""); echo ""; cat .ssh/id_rsa.pub
in container CLI - Copy the output
ssh-rsa XXXXXXXXXXXXXXXXXX root@334134babe59
- Paste it to Github -- Settings -- SSH and GPG Keys -- New SSH Key
- In container CLI, clone your repo with SSH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import struct | |
import argparse | |
import pcapng.blocks | |
from pcapng import FileScanner | |
def unpackCANFrame(frame,reverse=False): | |
#https://github.com/hardbyte/python-can/blob/ae0bc1746c04b3c1ccd8b56aba99895d50c87d2d/can/interfaces/socketcan/socketcan.py#L511 | |
CAN_FRAME_HEADER_STRUCT = struct.Struct(">IBB2x") if reverse == False else struct.Struct("=IBB2x") | |
can_id, can_dlc, flags = CAN_FRAME_HEADER_STRUCT.unpack_from(frame) | |
data = frame[8 : 8 + can_dlc] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
method = 'POST' | |
url = 'https://www.zhihu.com/node/QuestionAnswerListV2' | |
headers = {'Origin': 'https://www.zhihu.com', 'Content-Length': '93', 'Accept-Language': 'en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4', 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0(Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36', 'Host': 'www.zhihu.com', 'X-Requested-With': 'XMLHttpRequest', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache', 'Referer': 'https://www.zhihu.com/question/19563390', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Cookie': 'd_c0="ACBCIuNN5AqPTukv-7RO2Eqf2ixB8sRZkh8=|1479899930"; q_c1=650fee33b22647cfa5c335eb424ed790|1479899930000|1479899930000; l_cap_id="NzU3NzQ4YmMyNTgxNDEyNjk1NjkwODk2YjBlMzJiYTk=|1479899930|6e41c4f08075457e53f3d37650e2cff841596ce5"; cap_id="NmZkMDYyMTU5NjAxNGVjMmIxOTE1YjVjNzhhZWI2Mjc=|1479899930|365f20a0d522da2b6a8122e940426e3a31f624e8"; n_c=1'} | |
data |