Skip to content

Instantly share code, notes, and snippets.

画像整理するだけのShellscript

ITC Advent Calendar(1) 2日目

https://adventar.org/calendars/2563

ブログに書くほどでもないのでGistに書こうと思う

Introduction

@kamijin-fanta
kamijin-fanta / README.md
Last active December 2, 2015 04:38
C#でスクレイピングつらい

C#でスクレイピングつらい

OIC ITCreate Club Advent Calendar 2015 1日目ってことにしておいてください。

HTTPクライアント周りあまり触ったことなかったから触ってみたけどつらい。 これだけ書くのにハマったりしながら3時間位かかった…

試しにPixivのブックマークの1ページ目のイラストを保存するものを書いてみた

@yattom
yattom / Crypto.java
Last active January 8, 2021 06:39
AES暗号・復号をJavaとRubyで実装したサンプルです。言語間で相互に暗号化・復号ができます。
import java.security.AlgorithmParameters;
import java.security.Key;
import java.security.SecureRandom;
import javax.crypto.*;
import javax.crypto.spec.*;
import java.security.spec.*;
import org.apache.commons.codec.binary.Base64;
@dergachev
dergachev / setuid-root-backdoor.md
Last active March 16, 2024 00:49
How to use setuid to install a root backdoor.

Why You Can't Un-Root a Compromised Machine

Let's say somebody temporarily got root access to your system, whether because you "temporarily" gave them sudo rights, they guessed your password, or any other way. Even if you can disable their original method of accessing root, there's an infinite number of dirty tricks they can use to easily get it back in the future.

While the obvious tricks are easy to spot, like adding an entry to /root/.ssh/authorized_keys, or creating a new user, potentially via running malware, or via a cron job. I recently came across a rather subtle one that doesn't require changing any code, but instead exploits a standard feature of Linux user permissions system called setuid to subtly allow them to execute a root shell from any user account from the system (including www-data, which you might not even know if compromised).

If the "setuid bit" (or flag, or permission mode) is set for executable, the operating system will run not as the cur

@skyscribe
skyscribe / .gdbinit
Created October 30, 2012 03:04
GDB init file to print STL containers and data members
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@taichi
taichi / code_reading.md
Last active April 10, 2024 13:04
太一のコードの読み方メモ

太一のコードの読み方メモ

全体として太一が感覚的に実践している事を論理的に説明しようと試みている為、
説明の粒度が適切でなかったり一貫性が無いように見える部分があるかもしれない。
普段やっているけども書ききれていない事も多分きっとある。

コードを読むとは何か

  • コードを嗜む
  • コードを学ぶ
  • 武器を手に入れる