Martin0815

Get URLs for multi-photo or animated GIF data from Twitter

Aug 2nd, 2014
4,844
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 1.68 KB | None | 0 0
  1. package require http;
  2. package require tls;
  3.  
  4. http::register https 443 ::tls::socket;
  5.  
  6. # get the HTML page respecting the redirections
  7. set ncode 0;
  8.  
  9. while {$ncode == 0 || ($ncode >= 300 && $ncode < 400)} {
  10.     if {[catch {set t [http::geturl $url];} reason options] == 1} {
  11.         return -options $options $reason;
  12.     }
  13.  
  14.     set ncode [http::ncode $t];
  15.     set meta  [http::meta $t];
  16.     if {$ncode >= 300 && $ncode < 400} {
  17.         set url [dict get $meta location];
  18.         http::cleanup $t;
  19.     }
  20. }
  21.  
  22. set encoding [lindex [split [split [dict get $meta content-type] ";"] "="] end]
  23. set data     [http::data $t];
  24.  
  25. http::cleanup $t;
  26.  
  27. # check for a multi-photo or animated-gif HTML page
  28. set multiPhotoNodes [regexp -inline -all {<\w+\s+(?:\w+="[^\"]*"\s+)*class="(?:(?:\w+(?:\s|-))*)(?:multi-photo\s+photo-\d+)(?:(?:(?:\s|-)\w+)*)"(?:[^>]+)>\s*<img\s+(?:\w+="[^\"]*"\s+)*src="([^\"]+)"([^>]+)>} $data];
  29. if {[llength $multiPhotoNodes]} {
  30.     foreach {whole imgUrl} $multiPhotoNodes {
  31.         # do something with the image URL
  32.     }
  33. } else {
  34.     set animatedGifodes [regexp -inline -all {(?:<img\s+(?:(?:\w+="[^\"]*"\s+)*)src="([^\"]+)"\s+(?:\w+="[^\"]*"\s)*class="\w*(?:\s|-)?animated-gif(?:\s|-)?\w*")|(?:<video\s+(?:\w+="[^\"]*"\s)*class="\w*(?:\s|-)?animated-gif(?:\s|-)?\w*"\s*[^>]*>\s+<source\s+(?:(?:\w+="[^\"]*"\s+)*)video-src="([^\"]+)")} $data];
  35.     if {[llength $animatiedGifNodes] == 4} {
  36.         foreach {whole url} $animatedGifodes {
  37.             if {[string match {<img*} $whole]} {
  38.                 # process the thumbnail image URL
  39.             } else {
  40.                 # process the animated GIF video URL
  41.             }
  42.         }
  43.     }
  44. } else {
  45.     # ...
  46. }
Advertisement
Comments
  • Sinjenor
    67 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment