public
Created

How to solve the Main2 challenge.

  • Download Gist
hack_main2.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14
>>> import Main2 as M2
>>> M2.declaredMethods
array(java.lang.reflect.Method, [public static void Main2.main(java.lang.String[]), private static boolean Main2.login(java.lang.String,java.lang.String), private static void Main2.fetch_users()])
>>> M2.declaredMethods[-1]
private static void Main2.fetch_users()
>>> fu = M2.declaredMethods[-1]
>>> fu.accessible = True
>>> fu.invoke(M2)
>>> M2.declaredFields
array(java.lang.reflect.Field, [private static java.lang.String Main2.username, private static java.lang.String Main2.password])
>>> for x in M2.declaredFields:
... x.accessible = True
... print x.get(M2)
...

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.