Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time関数は外側で呼ぶと楽かも #1

Open
kmyk opened this issue Dec 23, 2018 · 2 comments
Open

time関数は外側で呼ぶと楽かも #1

kmyk opened this issue Dec 23, 2018 · 2 comments

Comments

@kmyk
Copy link

kmyk commented Dec 23, 2018

SECCON 2018 domestic の本番で使ったのは以下のようなものでした。

#include <stdlib.h>

time_t time(time_t *tloc) {
    return atoll(getenv("TIME"));
}
# Python 3.x
t = int(time.time())
proc = subprocess.run([ './generate_random_hands', str(t) ], env={ 'TIME': str(t), 'LD_PRELOAD': './libtime.so' }, stdout=subprocess.PIPE)
@kmyk
Copy link
Author

kmyk commented Dec 23, 2018

ところで、ちゃんと復習していてえらい

@mmxsrup
Copy link
Owner

mmxsrup commented Dec 23, 2018

外部で時間計算して環境変数で渡すの賢いですね

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants