Results 1 to 5 of 5
Discuss Photoswap script at the AppStore Software - Hackint0sh.org; Here is the script we promised. Please make sure to fill in the strings at ...
  1. #1
    Newbie Array

    Join Date
    Mar 2010
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default Photoswap script

    Here is the script we promised. Please make sure to fill in the strings at the beginning of the script before you run it or it won't work! I'll admit the script isn't perfect, but it works.

    You'll need a few tools first:

    - Wireshark to sniff your iPhone traffic and grab a few strings from your iPhone when you connect and send photos to photoswap
    - A picture taken with your iPhone in the same dir as the script named photo.jpg and lowered resolution (so not to be a 1 or 2 meg file)
    - Linux/Unix/MacOS
    - Curl
    - Sed
    - Gzip
    - xxd

    Enjoy!


    #!/bin/sh

    # Your UID sent after Content Disposition
    HEADERUID=""
    # u string with mmm.php and uuu.php
    USTRING=""
    # f string with mmm.php and uuu.php
    FSTRING=""
    # f string with mmm.php and uuu.php
    LSTRING=""
    # the directory you want to save downloaded photoswaps
    OUTPUTDIR=""

    OUTPUTFILE=`date +%Y%m%d-%H%M%S-%N`
    TIMESTORUN=$[ ( $RANDOM % 15 ) + 1 ]
    RANDOMSLEEP=$[ ( $RANDOM % 30 ) + 4 ]

    echo "Will Photoswap $TIMESTORUN times and will then exit"
    echo ""

    echo "--_888888888_" > send.jpg
    echo "Content-Disposition: form-data; name="file1"; filename="file1"" >> send.jpg
    echo "Content-Type: application/octet-stream" >> send.jpg
    echo "" >> send.jpg

    cat photo.jpg >> send.jpg

    echo "--_888888888_" >> send.jpg
    echo "Content-Disposition: form-data; name="cc"" >> send.jpg
    echo "" >> send.jpg
    echo "$HEADERUID" >> send.jpg
    echo "--_888888888_--" >> send.jpg

    curl \
    -A "picker1/1.0 CFNetwork/459 Darwin/10.0.0d3" \
    http://iphone.padadaz.com/mmm.php?m=n\&i=i\&u=$USTRING\&f=$FSTRING\&l=$LSTRI NG

    sleep 2

    curl \
    --request POST \
    --header "Host: iphone.padadaz.com" \
    --header "User-Agent: picker1/1.0 CFNetwork/459 Darwin/10.0.0d3" \
    --header "Content-Type: multipart/form-data; boundary=_888888888_" \
    --header "Accept: */*" \
    --header "Accept-Language: en-us" \
    --header "Accept-Encoding: gzip, deflate" \
    -T send.jpg \
    http://iphone.padadaz.com/uuu.php?m=s\&i=1\&u=$USTRING\&f=$FSTRING\&l=$LSTRI NG \
    > $OUTPUTFILE.jpg.gz

    gzip -d -f $OUTPUTFILE.jpg.gz

    xxd -g4 $OUTPUTFILE.jpg | sed s/53574150/ffd8ffe0/ | xxd -r > $OUTPUTDIR/$OUTPUTFILE.jpg

    OLDOUTPUTFILE=$OUTPUTFILE

    cp $OUTPUTDIR/$OUTPUTFILE.jpg $OUTPUTDIR/1.jpg

    echo "Output file: $OLDOUTPUTFILE1"

    echo "Sleeping for $RANDOMSLEEP seconds"
    sleep $RANDOMSLEEP

    for (( i = 1; i <= $TIMESTORUN; i++ ))
    do
    NEWOUTPUTFILE=`date +%Y%m%d-%H%M%S-%N`
    RANDOMSLEEP=$[ ( $RANDOM % 30 ) + 4 ]

    echo "--_888888888_" > sendtemp.jpg
    echo "Content-Disposition: form-data; name="file1"; filename="file1"" >> sendtemp.jpg
    echo "Content-Type: application/octet-stream" >> sendtemp.jpg
    echo "" >> sendtemp.jpg

    echo "Old output file is: $OLDOUTPUTFILE$i.jpg"

    cat $OUTPUTDIR/$OLDOUTPUTFILE.jpg >> sendtemp.jpg

    echo "--_888888888_" >> sendtemp.jpg
    echo "Content-Disposition: form-data; name="cc"" >> sendtemp.jpg
    echo "" >> sendtemp.jpg
    echo "$HEADERUID" >> sendtemp.jpg
    echo "--_888888888_--" >> sendtemp.jpg

    curl \
    --request POST \
    --header "Host: iphone.padadaz.com" \
    --header "User-Agent: picker1/1.0 CFNetwork/459 Darwin/10.0.0d3" \
    --header "Content-Type: multipart/form-data; boundary=_888888888_" \
    --header "Accept: */*" \
    --header "Accept-Language: en-us" \
    --header "Accept-Encoding: gzip, deflate" \
    -T sendtemp.jpg \
    http://iphone.padadaz.com/uuu.php?m=s\&i=1\&u=$USTRING\&f=$FSTRING\&l=$LSTRI NG \
    > $NEWOUTPUTFILE.jpg.gz

    gzip -d -f $NEWOUTPUTFILE.jpg.gz

    xxd -g4 $NEWOUTPUTFILE.jpg | sed s/53574150/ffd8ffe0/ | xxd -r > $OUTPUTDIR/$NEWOUTPUTFILE.jpg
    rm $NEWOUTPUTFILE.jpg

    OLDOUTPUTFILE=$NEWOUTPUTFILE

    echo "Output file: $OLDOUTPUTFILE"

    rm sendtemp.jpg

    echo "Sleeping for $RANDOMSLEEP seconds, run $i of $TIMESTORUN"
    sleep $RANDOMSLEEP
    done

    rm $OUTPUTFILE.jpg
    rm $OUTPUTDIR/1.jpg



  2. #2
    Please confirm your eMail or contact staff! Array

    Join Date
    Aug 2007
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I keep getting Error 36. Any thoughts?

  3. #3
    Newbie Array

    Join Date
    Mar 2011
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    This is driving me insane! So close, and yet so far....

    I'm getting one Zero KB file with the format "20110316-130651-N.jpg" created once when I first run the script, and nothing more as the script performs multiple runs. Other Zero KB files are created but immediately deleted. Something seems to be off with the file naming and the second cat operation in the script. This is my terminal output in case anyone can help (Pretty please?):

    Will Photoswap 4 times and will then exit

    ??MR0#pXHave fun photoswapping! Do you like Photoswap and want to support us? Try our game 'Bix' in the AppStore, the lite version is free!
    - Padadaz Team

    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 529k 100 18725 100 511k 6770 184k 0:00:02 0:00:02 --:--:-- 194k
    Output file:
    Sleeping for 30 seconds
    Old output file is: 20110316-234415-N1.jpg
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 13064 100 12783 140 281 17394 382 --:--:-- --:--:-- --:--:-- 21199
    Output file: 20110316-234450-N
    Sleeping for 25 seconds, run 1 of 4
    Old output file is: 20110316-234450-N2.jpg
    cat: //Downloads/PswapCaps/20110316-234450-N.jpg: No such file or directory
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 21472 100 21191 140 281 56958 755 --:--:-- --:--:-- --:--:-- 95026
    Output file: 20110316-234516-N
    Sleeping for 32 seconds, run 2 of 4
    Old output file is: 20110316-234516-N3.jpg
    cat: //Downloads/PswapCaps/20110316-234516-N.jpg: No such file or directory
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 21502 100 21221 140 281 22726 300 --:--:-- --:--:-- --:--:-- 26361
    Output file: 20110316-234549-N
    Sleeping for 31 seconds, run 3 of 4
    Old output file is: 20110316-234549-N4.jpg
    cat: //Downloads/PswapCaps/20110316-234549-N.jpg: No such file or directory
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 23414 100 23133 140 281 44690 542 --:--:-- --:--:-- --:--:-- 62861
    Output file: 20110316-234623-N
    Sleeping for 11 seconds, run 4 of 4
    Last edited by Roamerick; 03-17-2011 at 02:14 AM.

  4. #4
    Newbie Array

    Join Date
    Mar 2011
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    YES! Finally got it to work. All it needed was for the OUTPUTDIR to be a subfolder of the script folder. Done!

  5. #5
    Newbie Array

    Join Date
    Aug 2011
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    hey can you help me with this? where do i paste the script. i have a windows and ubuntu system. i can only find wireshark for windows and mac. also how do i go about doing it? thanks.


 

 

Similar Threads

  1. Photoswap hacked - without iPhone
    By greenguy78 in forum AppStore Software
    Replies: 1
    Last Post: 02-01-2011, 06:18 PM
  2. Apple Script
    By JayBird in forum Genuine Mac Support
    Replies: 29
    Last Post: 02-13-2009, 08:40 PM
  3. [1.1.3] run a script when docked (?)
    By dbenc in forum General
    Replies: 0
    Last Post: 02-19-2008, 01:29 AM
  4. [1.1.2 OTB] All in one script?
    By hiimcliff in forum iPhone "2G" (Rev. 1)
    Replies: 0
    Last Post: 01-18-2008, 04:27 PM
  5. script in Iphone
    By lolof in forum Free Toolchain Software
    Replies: 4
    Last Post: 10-15-2007, 06:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 01:23 AM.
twitter, follow us!