Skip to content

Instantly share code, notes, and snippets.

@budanthara
Created November 5, 2015 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save budanthara/1d1f066dcdb764f05a6b to your computer and use it in GitHub Desktop.
Save budanthara/1d1f066dcdb764f05a6b to your computer and use it in GitHub Desktop.
SchoolCTF 2015 PPC 200
def search():
flag = ''
start = 'start.txt'
st = True
while st:
with open(start, 'r') as f:
x = f.readlines()
c = x[0]
start = c[6:].replace("\n", "")
print "Membaca file %s " % (start)
flag += x[1]
if start == '':
st = False
print "\n Ditemukan flag: %s" % (flag)
def main():
search()
if __name__ == '__main__':
main()
"""
Output:
Membaca file uspom/yvawi/uihcw/jukrd/ndycl.txt
Membaca file hfxzr/xwvww/nbgku/gtllw/ghqqv/dxlzy.txt
Membaca file xlmhr/tmjbb/ebqyr/bknuv/tazas/naehz.txt
Membaca file jogxi/uhvfo/qfofe/krrdt/pvpdt/tvvfm.txt
Membaca file jogxi/ffuqp/ymdld/dwyxh/pemgt/eunjh.txt
Membaca file lgquw/dhuxg/pokut/fpyvm/cjzgt.txt
Membaca file xlmhr/hbgww/klmeo/hwseq/gxhec/vxamr.txt
Membaca file xlmhr/tvwzs/kqyxv/zqdnb/jtamd/nnufk.txt
Membaca file hfxzr/nsxka/mxndz/ohtcg/jdrxx/cxxoy.txt
Membaca file zflgw/fqeek/yfizl/oexhp/wymbi/jnjpf.txt
Membaca file uspom/tsyrw/erblc/rkqux/aljxg/bgebn.txt
Membaca file nqddz/nkjbd/fkftk/rwrcy/vwxqa/wpmix.txt
Membaca file nqddz/neccl/dpnvp.txt
Membaca file satac/olwyn/warao/ewnbf/rqeoc/whjcc.txt
Membaca file uspom/tsyrw/nxxzp/nxogh/nvzjc/aitdh.txt
Membaca file uspom/dzwpb/msupu/tonho/ugsxs.txt
Membaca file jogxi/bwloc/qrapp/dcqhi/shfvv/osnsi.txt
Membaca file satac/cuzco/rlrke/ziung/tufpp/xqlkk.txt
Membaca file niphy/chzvq/wglln/wegig.txt
Membaca file xlmhr/zeonb/fyktc/kiyej/tqdrq/sipsx.txt
Membaca file hfxzr/jljfo/kyohd/djxug/glkyx/rxthg.txt
Membaca file nqddz/neccl/zrzqs/vpley/yepgr/veopr.txt
Membaca file
Ditemukan flag: flag_1s_1t_w@s_t00_easy
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment