Install Bugzilla
Bugzilla 來學習一下安裝Bugzilla ,參考 https://cloudinfrastructureservices.co.uk/how-to-install-bugzilla-bug-tracker-on-ubuntu-server-20-04-tutorial/ 最近剛透過 VirtualBox 裝 Ubuntu 23.04 ,參考下面網址來達到背景模式執行 h…
ALL POSTS
Bugzilla 來學習一下安裝Bugzilla ,參考 https://cloudinfrastructureservices.co.uk/how-to-install-bugzilla-bug-tracker-on-ubuntu-server-20-04-tutorial/ 最近剛透過 VirtualBox 裝 Ubuntu 23.04 ,參考下面網址來達到背景模式執行 h…
Taint analysis Valgrind taint analysis tool :taintgrind 前幾天有說想要關聯所有variable 最簡單的方式可以用taintgrind ,這邊找尋一下variable之間的關聯 Git clone https://github.com/eembc/coremark.git /home/gcc-plugin/coremark…
Trying to get variable dependencies with libclang 如何用 libclang 的前端解析所有的.c .cpp 展開ast tree,目前進度只有 callee 和caller 的關係,還有參數 ,function variable 的資訊 假設你有安裝llvm 應該會在 code Copy find /usr/lib/x86_64…
q learning python3 Copy import numpy as np import random import os import time # 定義迷宮地圖 maze = np . array ([ [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], [ 0 , 1 , 0 , 1 , 1 , 1 , 0 , 0 ], [ 0 , 0 , 0…
在gcc 可以下 code Copy -fdump-rtl-all-all 得到gcc 執行rtl pass的優化結果,其中目前我的平台是 x86 那唯一看到rtl tree有真正執行 並且變化的 pass有三個 code Copy combine reload cprop_hardreg 這是在pass中所呈現的rtl tree code Copy (insn 31 30 3…
trace gdb 最近在看能不能在gdb攔截一些有關於runtime的程式的pc address ,gdb背後底層原理是ptrace,大概從各個檔案裏面去埋print(printf_unfiltered (("hello\n"));),來稍微紀錄一下 arch arch 資料夾存放的是有關於指令架構的一些function也就是當觸發斷點時候可以透過不同的arch將不同的reg…
傾向性分析 JOSPON-with-Pytorch 在這個github中他提供的範例,可以直接顯示評價是接近於正面還是負面 流程大概如下 先處理wiki data,準備製作w2v模型 使用檔案:w2v_seg.py 使用處理好的wiki data訓練w2v模型 使用檔案:w2v_train.py 取得waimai資料集句向量,製作waimai_10k_tw.pkl 使用檔案:m…
lstm python Copy import torch import torch.nn as nn import numpy as np import torch.optim as optim import strategy.popular_model as popmoder import os import matplotlib.pyplot as plt from sk…
chatgpt 目前收費最貴的是 https://openai.com/api/pricing/ davinci,openai已經封裝好了 https://dev.to/codemee/yong-python-chuan-jie-openai-mo-ni-chatgpt-liao-tian-ji-qi-ren-2fh6 python Copy import os import…
無聊重構以前的回測軟體 之前的預言家模型每次anaconda更換環境都會出問題,在策略格式每個都不太一樣這次順便全部依國外網站的格式讓所有策略都兼容 https://github.com/WillKoehrsen/Data-Analysis/blob/master/stocker/Stocker%20Prediction%20Usage.ipynb 這邊不用以前的fbprob…
linux hook 之前有分享 linux hook的方式,包括ld_preload,目前有個情況需要額外override 原本的某個function在linux 環境,這邊記錄一下可行方案 lief https://github.com/lief-project/LIEF code Copy pip install lief 如果採用直接修改elf 是否有可能直接hook…
custom llvm pass inline / unrol loop pass 最近有空更新一下,如果要異動llvm 內部的pass應該從哪裡下手呢 Writing an LLVM Pass — LLVM 16.0.0git documentation 這邊可以大概看到一些架構,不過我們要在llvm10達成pass的修改,根據我們的需求任意的對某個fucntion 進行in…
python auto script 紀錄一下自動化腳本的過程,其實gdb是可以讀入python 腳本達到自動化debug的 bash Copy b main so ./test.py c Copy #include <stdio.h> int foo2 ( int b ){ int c = 0 ; c = b + 1 ; return c ; } int foo ( int…
update new control flow graph 後來後續更新有更好的呈現方式 這個分支現在可以更清楚的顯示迴圈了 https://github.com/Kazhuu/asm2cfg/pull/37
double free & use-after-free https://bbs.pediy.com/thread-266757.htm 前天在寫llvm pass又重新看到的angr 想起以前看到有人寫 https://xz.aliyun.com/t/7275 double free & use-after-free漏洞挖掘,他這種寫法可能導致z3求解狀態過多 https:…
llvm pass https://reviews.llvm.org/D70199 https://zhuanlan.zhihu.com/p/122522485 https://juejin.cn/post/6844904030636867598 https://llvm.org/devmtg/2019-10/slides/Warzynski-WritingAnLLVMPass…
gcc plugin 補足之前,影響fucntion 是否inline 版本,額外新增了可以影響unroll loop rtl層 pass的撰寫,這邊一併附上 這次比較特別趕上了chatgtp,rtl pass 這部分語法都是透過chatgpt幫助下進行撰寫,基本上不當機的情況下都快變成google 2.0了,包括這個文章都是用chatgpt產生,但是要注意除非你是領域上的專家…
asm control flow grpah domator tree 要做靜態分析要找出相似的basic block想以肉眼進行判斷,我們進一步透過tarjan-algorithm找出支配樹的節點,意味者可以找到cfg裡面的loop. https://www.geeksforgeeks.org/tarjan-algorithm-find-strongly-connected-…