From cb23f465b1b649b521e4ca44bc9d93f1f2e62476 Mon Sep 17 00:00:00 2001 From: taoky Date: Thu, 5 Nov 2020 17:11:25 +0800 Subject: [PATCH] add letter from future src --- official/来自未来的信笺/src/exp/exp.sh | 16 +++ official/来自未来的信笺/src/files/COMMITS | 39 ++++++++ official/来自未来的信笺/src/files/META | 97 +++++++++++++++++++ official/来自未来的信笺/src/files/repo/flag | 1 + .../来自未来的信笺/src/generate_qrcode.sh | 21 ++++ 5 files changed, 174 insertions(+) create mode 100755 official/来自未来的信笺/src/exp/exp.sh create mode 100644 official/来自未来的信笺/src/files/COMMITS create mode 100644 official/来自未来的信笺/src/files/META create mode 100644 official/来自未来的信笺/src/files/repo/flag create mode 100755 official/来自未来的信笺/src/generate_qrcode.sh diff --git a/official/来自未来的信笺/src/exp/exp.sh b/official/来自未来的信笺/src/exp/exp.sh new file mode 100755 index 0000000..9a4a51e --- /dev/null +++ b/official/来自未来的信笺/src/exp/exp.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +unzip ../frames.zip +[ -e repo.tar ] && rm repo.tar +touch repo.tar + +for i in frame-*.png; do +echo "$i" +# https://stackoverflow.com/questions/60506222/encode-decode-binary-data-in-a-qr-code-using-qrencode-and-zbarimg-in-bash +# requires zbar >= 0.23.1 +zbarimg --raw -q -Sbinary "$i" >> repo.tar +done; + +tar -xf repo.tar + +rm frame-* \ No newline at end of file diff --git a/official/来自未来的信笺/src/files/COMMITS b/official/来自未来的信笺/src/files/COMMITS new file mode 100644 index 0000000..c8f8a85 --- /dev/null +++ b/official/来自未来的信笺/src/files/COMMITS @@ -0,0 +1,39 @@ +[ + { + "sha": "e9b69800c7e1229c867beb2120ef6702a95080e4", + "node_id": "MDY6Q29tbWl0MjE0MDg5Mzg4OmU5YjY5ODAwYzdlMTIyOWM4NjdiZWIyMTIwZWY2NzAyYTk1MDgwZTQ=", + "commit": { + "author": { + "name": "root", + "email": "root@machine", + "date": "2019-09-15T12:19:51Z" + }, + "committer": { + "name": "root", + "email": "root@machine", + "date": "2019-09-15T12:28:22Z" + }, + "message": "There's no flag in META and COMMITS!", + "tree": { + "sha": "92ac058c70159e4e61e0a6356096b9bfb1955036", + "url": "https://api.github.com/repos/openlug/nonexist/git/trees/92ac058c70159e4e61e0a6356096b9bfb1955036" + }, + "url": "https://api.github.com/repos/openlug/nonexist/git/commits/e9b69800c7e1229c867beb2120ef6702a95080e4", + "comment_count": 0, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "url": "https://api.github.com/repos/openlug/nonexist/commits/e9b69800c7e1229c867beb2120ef6702a95080e4", + "html_url": "https://github.com/openlug/nonexist/commit/e9b69800c7e1229c867beb2120ef6702a95080e4", + "comments_url": "https://api.github.com/repos/openlug/nonexist/commits/e9b69800c7e1229c867beb2120ef6702a95080e4/comments", + "author": null, + "committer": null, + "parents": [ + + ] + } +] \ No newline at end of file diff --git a/official/来自未来的信笺/src/files/META b/official/来自未来的信笺/src/files/META new file mode 100644 index 0000000..314557c --- /dev/null +++ b/official/来自未来的信笺/src/files/META @@ -0,0 +1,97 @@ +{ + "id": 214089388, + "node_id": "MDEwOlJlcG9zaXRvcnkyMTQwODkzODg=", + "name": "nonexist", + "full_name": "openlug/nonexist", + "private": false, + "owner": { + "login": "openlug", + "id": 55339572, + "node_id": "MDQ6VXNlcjU1MzM5NTcy", + "avatar_url": "https://avatars0.githubusercontent.com/u/55339572?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/openlug", + "html_url": "https://github.com/openlug", + "followers_url": "https://api.github.com/users/openlug/followers", + "following_url": "https://api.github.com/users/openlug/following{/other_user}", + "gists_url": "https://api.github.com/users/openlug/gists{/gist_id}", + "starred_url": "https://api.github.com/users/openlug/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/openlug/subscriptions", + "organizations_url": "https://api.github.com/users/openlug/orgs", + "repos_url": "https://api.github.com/users/openlug/repos", + "events_url": "https://api.github.com/users/openlug/events{/privacy}", + "received_events_url": "https://api.github.com/users/openlug/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/openlug/nonexist", + "description": "This is just an example. Flag is in the repo.tar.xz.", + "fork": false, + "url": "https://api.github.com/repos/openlug/nonexist", + "forks_url": "https://api.github.com/repos/openlug/nonexist/forks", + "keys_url": "https://api.github.com/repos/openlug/nonexist/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openlug/nonexist/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openlug/nonexist/teams", + "hooks_url": "https://api.github.com/repos/openlug/nonexist/hooks", + "issue_events_url": "https://api.github.com/repos/openlug/nonexist/issues/events{/number}", + "events_url": "https://api.github.com/repos/openlug/nonexist/events", + "assignees_url": "https://api.github.com/repos/openlug/nonexist/assignees{/user}", + "branches_url": "https://api.github.com/repos/openlug/nonexist/branches{/branch}", + "tags_url": "https://api.github.com/repos/openlug/nonexist/tags", + "blobs_url": "https://api.github.com/repos/openlug/nonexist/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openlug/nonexist/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openlug/nonexist/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openlug/nonexist/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openlug/nonexist/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openlug/nonexist/languages", + "stargazers_url": "https://api.github.com/repos/openlug/nonexist/stargazers", + "contributors_url": "https://api.github.com/repos/openlug/nonexist/contributors", + "subscribers_url": "https://api.github.com/repos/openlug/nonexist/subscribers", + "subscription_url": "https://api.github.com/repos/openlug/nonexist/subscription", + "commits_url": "https://api.github.com/repos/openlug/nonexist/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openlug/nonexist/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openlug/nonexist/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openlug/nonexist/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openlug/nonexist/contents/{+path}", + "compare_url": "https://api.github.com/repos/openlug/nonexist/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openlug/nonexist/merges", + "archive_url": "https://api.github.com/repos/openlug/nonexist/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openlug/nonexist/downloads", + "issues_url": "https://api.github.com/repos/openlug/nonexist/issues{/number}", + "pulls_url": "https://api.github.com/repos/openlug/nonexist/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openlug/nonexist/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openlug/nonexist/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openlug/nonexist/labels{/name}", + "releases_url": "https://api.github.com/repos/openlug/nonexist/releases{/id}", + "deployments_url": "https://api.github.com/repos/openlug/nonexist/deployments", + "created_at": "2019-10-10T04:51:59Z", + "updated_at": "2020-09-02T13:25:39Z", + "pushed_at": "2019-10-10T04:53:25Z", + "git_url": "git://github.com/openlug/nonexist.git", + "ssh_url": "git@github.com:openlug/nonexist.git", + "clone_url": "https://github.com/openlug/nonexist.git", + "svn_url": "https://github.com/openlug/nonexist", + "homepage": null, + "size": 9, + "stargazers_count": 31, + "watchers_count": 31, + "language": "Python", + "has_issues": false, + "has_projects": false, + "has_downloads": true, + "has_wiki": false, + "has_pages": false, + "forks_count": 5, + "mirror_url": null, + "archived": true, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 5, + "open_issues": 0, + "watchers": 31, + "default_branch": "master", + "temp_clone_token": null, + "network_count": 5, + "subscribers_count": 1 +} \ No newline at end of file diff --git a/official/来自未来的信笺/src/files/repo/flag b/official/来自未来的信笺/src/files/repo/flag new file mode 100644 index 0000000..f869bfe --- /dev/null +++ b/official/来自未来的信笺/src/files/repo/flag @@ -0,0 +1 @@ +flag{HELL0_from_Arct1c!} \ No newline at end of file diff --git a/official/来自未来的信笺/src/generate_qrcode.sh b/official/来自未来的信笺/src/generate_qrcode.sh new file mode 100755 index 0000000..8f1dbfe --- /dev/null +++ b/official/来自未来的信笺/src/generate_qrcode.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +# generate repo.tar +dd if=/dev/urandom of=files/repo/file_1MB bs=1024 count=1000 +tar -C files/repo/ -cJf files/repo.tar.xz flag file_1MB +tar -C files/ -cf repo.tar META COMMITS repo.tar.xz + +split -b 2953 repo.tar + +for i in x*; do +echo "$i" +qrencode -r "$i" -8 -v 40 -o frame-"$i".png; +done; + +zip -r frames.zip frame-*.png + +# cleanup +rm x* +rm frame-*.png +rm files/repo.tar.xz +rm files/repo/file_1MB \ No newline at end of file