Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected transient String doInBackground(String as[])
- {
- HttpURLConnection httpurlconnection;
- android.content.SharedPreferences.Editor editor1;
- URL url;
- URL url1;
- URL url2;
- StringBuilder stringbuilder;
- String s;
- StringBuilder stringbuilder1;
- DataOutputStream dataoutputstream;
- Map map1;
- Iterator iterator2;
- java.util.Map.Entry entry1;
- Iterator iterator3;
- String s4;
- try
- {
- url = new URL("http://pikabu.ru/ajax/ajax_login.php");
- }
- catch (MalformedURLException malformedurlexception)
- {
- malformedurlexception.printStackTrace();
- url1 = null;
- continue; /* Loop/switch isn't completed */
- }
- url1 = url;
- _L16:
- url2 = url1;
- httpurlconnection = (HttpURLConnection)url2.openConnection();
- httpurlconnection.setRequestMethod("POST");
- stringbuilder = new StringBuilder();
- s = stringbuilder.append("mode=login&username=").append(as[0]).append("&password=").append(as[1]).append("&remember=1").toString();
- httpurlconnection.setRequestProperty("Connection", "keep-alive");
- httpurlconnection.setRequestProperty("Content-Length", String.valueOf(s.length()));
- httpurlconnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
- stringbuilder1 = new StringBuilder();
- httpurlconnection.setRequestProperty("Cookie", stringbuilder1.append("PHPSESS=").append(mPHPSess).toString());
- httpurlconnection.setRequestProperty("Host", "pikabu.ru");
- httpurlconnection.setRequestProperty("Origin", "http://pikabu.ru");
- httpurlconnection.setRequestProperty("Referer", "http://pikabu.ru");
- httpurlconnection.setRequestProperty("User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36");
- httpurlconnection.setRequestProperty("X-Csrf-Token", mPHPSess);
- httpurlconnection.setRequestProperty("X-Requested-With", "XMLHttpRequest");
- httpurlconnection.setDoOutput(true);
- dataoutputstream = new DataOutputStream(httpurlconnection.getOutputStream());
- dataoutputstream.writeBytes(s);
- dataoutputstream.flush();
- dataoutputstream.close();
- if (httpurlconnection.getResponseCode() != 200) goto _L2; else goto _L1
- _L1:
- map1 = httpurlconnection.getHeaderFields();
- editor1 = mUserSharedPreferences.edit();
- iterator2 = map1.entrySet().iterator();
- _L6:
- if (!iterator2.hasNext()) goto _L4; else goto _L3
- _L3:
- entry1 = (java.util.Map.Entry)iterator2.next();
- if (entry1.getKey() == null || !((String)entry1.getKey()).equals("Set-Cookie")) goto _L6; else goto _L5
- _L5:
- iterator3 = ((List)entry1.getValue()).iterator();
- do
- {
- if (!iterator3.hasNext())
- {
- break;
- }
- s4 = (String)iterator3.next();
- if (phpDug2Checker(s4))
- {
- editor1.putString("access token", s4);
- Log.d("---", s4);
- }
- if (mPHPSessChecker(s4))
- {
- editor1.putString("phpSess", s4.substring(1 + s4.indexOf('='), s4.indexOf(';')));
- mPHPSess = s4.substring(1 + s4.indexOf('='), s4.indexOf(';'));
- Log.d("---", s4.substring(1 + s4.indexOf('='), s4.indexOf(';')));
- }
- } while (true);
- label0:
- {
- if (android.os.Build.VERSION.SDK_INT < 9)
- {
- break label0;
- }
- editor1.apply();
- }
- goto _L6
- editor1.commit();
- goto _L6
- _L4:
- BufferedReader bufferedreader;
- StringBuffer stringbuffer;
- InputStreamReader inputstreamreader = new InputStreamReader(httpurlconnection.getInputStream(), "windows-1251");
- bufferedreader = new BufferedReader(inputstreamreader);
- stringbuffer = new StringBuffer();
- _L7:
- String s2 = bufferedreader.readLine();
- if (s2 == null)
- {
- break MISSING_BLOCK_LABEL_845;
- }
- stringbuffer.append(s2);
- goto _L7
- _L2:
- android.content.SharedPreferences.Editor editor;
- Iterator iterator;
- Map map = httpurlconnection.getHeaderFields();
- editor = mUserSharedPreferences.edit();
- iterator = map.entrySet().iterator();
- _L10:
- if (!iterator.hasNext()) goto _L4; else goto _L8
- _L8:
- java.util.Map.Entry entry = (java.util.Map.Entry)iterator.next();
- if (entry.getKey() == null || !((String)entry.getKey()).equals("Set-Cookie")) goto _L10; else goto _L9
- _L9:
- Iterator iterator1 = ((List)entry.getValue()).iterator();
- _L13:
- if (!iterator1.hasNext()) goto _L10; else goto _L11
- _L11:
- String s1 = (String)iterator1.next();
- if (!mPHPSessChecker(s1)) goto _L13; else goto _L12
- _L12:
- editor.putString("phpSess", s1.substring(1 + s1.indexOf('='), s1.indexOf(';')));
- mPHPSess = s1.substring(1 + s1.indexOf('='), s1.indexOf(';'));
- if (android.os.Build.VERSION.SDK_INT < 9)
- {
- break MISSING_BLOCK_LABEL_834;
- }
- editor.apply();
- _L14:
- Log.d("---", s1.substring(1 + s1.indexOf('='), s1.indexOf(';')));
- doInBackground(new String[0]);
- return null;
- editor.commit();
- goto _L14
- String s3;
- bufferedreader.close();
- Log.d("---", stringbuffer.toString());
- s3 = stringbuffer.toString();
- return s3;
- IOException ioexception;
- ioexception;
- ioexception.printStackTrace();
- return null;
- if (true) goto _L16; else goto _L15
- _L15:
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement