1. 程式人生 > >迪士尼 樂拍通 獲取中等清晰度照片免費獲取

迪士尼 樂拍通 獲取中等清晰度照片免費獲取

最近去淘寶上翻了一圈,也有很多人拿這個賺錢的。本文只是簡單介紹 迪士尼簡單 的一般清晰度 照片的獲取。

迪士尼的這個樂拍通 如果大家願意花錢,其實是可以拿到從相機的原圖, 大概是4k的一張照片, 淘寶上很多都是用這個來拼單的。

第二種比較便宜的是利用了手機APP上的請求,使用過樂拍通APP的都知道。每張相片的詳細都是模糊的,只有點選才能看到部分的圖片。

這個模糊其實只是一個模糊的圖層,後臺的手機其實已經下載了這個相關的一般清晰度圖片。大概1024X768左右。

但是我們想看到這個請求。具體是怎麼樣的。 

我們可以使用一些網路連線嗅探器來做到這一點  我們可以使用 Charles 這個工具來做

然後我們可以發現一個請求:

http://www.disneyphotopass.com.cn:4000/media/ba5a2d253f8e1ec796cfb66e817116a0a6b426aff62506fab  這樣的類似請求

是一張   或者 其他的沒啥意義的圖片。。。。。但是他們的大小有點詭異,一個300X200的jpg圖片就有100K

這個是不正常的。。說明這個圖片裡面有一些貓膩 

我們可以使用其他的一些檔案比較工具來比較這個檔案和正常的jpg檔案有什麼區別





其中的貓膩 ,大家已經發現了出來。。紅色的部分是有問題的部分,是迪士尼伺服器獨有的請求。我們可以剔除這部分,就可以拿到真正的圖片。

程式碼如下:

    private static void testImg(File resultF,String outputFile){
//
FileInputStream fileInputStream = null;
FileOutputStream fos = null;
        try {
            fileInputStream = new FileInputStream(resultF);
//
byte[] temp = new byte[1024];
ByteArrayOutputStream byteArrayOutputStream = new 
ByteArrayOutputStream(); int length = 0; while ((length = fileInputStream.read(temp)) >= 0) { byteArrayOutputStream.write(temp, 0, length); } byte[] result = byteArrayOutputStream.toByteArray(); StringBuilder stringBuilder = new StringBuilder(); for (byte t : result) { String s = Integer.toHexString(t); if (s.length() >= 2) { stringBuilder.append(s.charAt(s.length() - 2)); } else { stringBuilder.append('0'); } stringBuilder.append(s.charAt(s.length() - 1)); } String s = stringBuilder.toString(); String ress = "ffd8ff" + s.substring(s.indexOf("e000104a4649460001010101")); ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(hexStr2Bytes(ress));fos = new FileOutputStream(outputFile); while ((length = byteArrayInputStream.read(temp)) >= 0) { fos.write(temp, 0, length); } fos.flush(); } catch (Exception e) { e.printStackTrace(); } finally { if(fos!=null){ try { fos.close(); } catch (IOException e) { e.printStackTrace(); } } } } private static byte uniteBytes(String src0, String src1) { byte b0 = Byte.decode("0x" + src0).byteValue(); b0 = (byte) (b0 << 4); byte b1 = Byte.decode("0x" + src1).byteValue(); byte ret = (byte) (b0 | b1); return ret; } /** * bytes轉換成十六進位制字串 */ public static byte[] hexStr2Bytes(String src) { int m = 0, n = 0; int l = src.length() / 2; System.out.println(l); byte[] ret = new byte[l]; for (int i = 0; i < l; i++) { m = i * 2 + 1; n = m + 1; ret[i] = uniteBytes(src.substring(i * 2, m), src.substring(m, n)); } return ret; }

如果大家有需求和問題的的話,也可以私信給我。