- macOS Big Sur v11.4
- Python 3.8.2
- Poetry 1.1.7
url: https://qiita.com/kimisyo/items/916f58ac6571815851ff
- pip 21.2.4
- python 3.8.2
pip3 install requests pdfminer.six
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
| # ==================== Emojis ==================== | |
| # 🎉 :tada: 初めてのコミット(Initial Commit) | |
| # 🔖 :bookmark: バージョンタグ(Version Tag) | |
| # ✨ :sparkles: 新機能(New Feature) | |
| # 🐛 :bug: バグ修正(Bagfix) | |
| # ♻️ :recycle: リファクタリング(Refactoring) | |
| # 📚 :books: ドキュメント(Documentation) | |
| # 🎨 :art: デザインUI/UX(Accessibility) |
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
| # ref: https://reverseengineering.stackexchange.com/questions/23469/way-to-get-basic-blocks-of-a-binary-using-ghidra | |
| from ghidra.program.model.block import BasicBlockModel | |
| from ghidra.util.task import TaskMonitor | |
| bbm = BasicBlockModel(currentProgram) | |
| blocks = bbm.getCodeBlocks(TaskMonitor.DUMMY) | |
| block = blocks.next() | |
| bbl_cnt = 0 | |
| while block: |
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
| #include<stdio.h> | |
| #include<stdlib.h> | |
| #include<jansson.h> | |
| void jansson_pack_stdout_free(json_t *root) { | |
| char *out = json_dumps(root, JSON_ENCODE_ANY); | |
| printf("out:%s\r\n", out); | |
| free(root); | |
| free(out); |
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
| #include<stdio.h> | |
| int main(void) { | |
| for(int i = 0; i < 8; i++) { | |
| for(int x = 0; x < 20; x++) { | |
| int d = x - 10; | |
| if (d <= 0) { | |
| d *= -1; | |
| } | |
| char c = ' '; |
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
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <fcntl.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define BUFFSIZE 512 | |
| #define err(mess) { fprintf(stderr,"Error: %s.\n", mess); exit(1); } |
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 subprocess | |
| # $cat input > output | |
| subprocess.run(['cat'], stdin=open("input", 'r'), stdout=open("output", 'a')) |
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
| using System; | |
| using System.Runtime.InteropServices; | |
| namespace PInvokeSamples | |
| { | |
| public static class Program | |
| { | |
| [DllImport("libc.so.6")] | |
| private static extern int fork(); | |
| [DllImport("libc.so.6")] |