I hereby claim:
- I am pwntester on github.
- I am pwntester (https://keybase.io/pwntester) on keybase.
- I have a public key whose fingerprint is 4777 762E 3F49 932D 4CAD 5BFE CB38 D5E4 FEA7 40AB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
Context fourgoatsAppContext = null; | |
try { | |
fourgoatsAppContext = createPackageContext("org.owasp.goatdroid.fourgoats", Context.CONTEXT_IGNORE_SECURITY); | |
} catch (NameNotFoundException e) { | |
} |
private class ValidateCredsAsyncTask extends | |
AsyncTask<Void, Void, HashMap<String, String>> { | |
Login mActivity; | |
public ValidateCredsAsyncTask(Login activity) { | |
mActivity = activity; | |
} | |
@Override |
public HashMap<String, String> validateCredentials(String userName, | |
String password) throws Exception { | |
RestClient client = new RestClient("https://" + destinationInfo | |
+ "/fourgoats/api/v1/login/authenticate"); | |
client.AddParam("userName", userName); | |
client.AddParam("password", password); | |
client.Execute(RequestMethod.POST, context); | |
return LoginResponse.parseLoginResponse(client.getResponse()); |
public CustomSSLSocketFactory(KeyStore truststore) | |
throws NoSuchAlgorithmException, KeyManagementException, | |
KeyStoreException, UnrecoverableKeyException { | |
super(truststore); | |
TrustManager tm = new X509TrustManager() { | |
public java.security.cert.X509Certificate[] getAcceptedIssuers() { | |
return null; | |
} |
private void executeRequest(HttpUriRequest request, String url, | |
Context context) { | |
HttpClient client = CustomSSLSocketFactory.getNewHttpClient(); | |
HashMap<String, String> proxyInfo = Utils.getProxyMap(context); | |
String proxyHost = proxyInfo.get("proxyHost"); | |
String proxyPort = proxyInfo.get("proxyPort"); | |
if (!(proxyHost.equals("") || proxyPort.equals(""))) { | |
HttpHost proxy = new HttpHost(proxyHost, |
public static HttpClient getNewHttpClient() { | |
try { | |
KeyStore trustStore = KeyStore.getInstance(KeyStore | |
.getDefaultType()); | |
trustStore.load(null, null); | |
SSLSocketFactory sf = new CustomSSLSocketFactory(trustStore); | |
sf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); | |
HttpParams params = new BasicHttpParams(); |
<activity | |
android:name=".activities.ViewCheckin" | |
android:exported="true" | |
android:label="@string/view_checkin" > | |
</activity> | |
<activity | |
android:name=".activities.ViewProfile" | |
android:exported="true" | |
android:label="@string/profile" > |
<service android:name=".services.LocationService" > | |
<intent-filter> | |
<action android:name="org.owasp.goatdroid.fourgoats.services.LocationService" /> | |
</intent-filter> | |
</service> | |
<receiver | |
android:name=".broadcastreceivers.SendSMSNowReceiver" | |
android:label="Send SMS" > | |
<intent-filter> |
Intent tokenIntent = new Intent(); | |
tokenIntent.setComponent(new ComponentName("org.owasp.goatdroid.fourgoats","org.owasp.goatdroid.fourgoats.activities.SocialAPIAuthentication")); | |
startActivityForResult(tokenIntent, STATIC_INTEGER_VALUE); |