View Single Post
  #11  
Old 01-16-2011, 02:49 PM
OSSRecording OSSRecording is offline
Junior Member
 
Join Date: Jan 2011
Posts: 3
OSSRecording is on a distinguished road
Default

Re: www.myfreecams.com: How can I record free sex web-cam chat (rtmp:// .flv)


I have no idea. I just know the server range: from 4-96 and 100-232 IIRC. There is probably some way to find it because Lurk4 is doing it.

BTW, bash script I have made
Code:
#!/bin/bash
Password="" # not needed, maybe for group and private?
SessionID=""

usage()
{
  echo "Usage: `basename $0` [OPTIONS] MODELNAME"
  echo "            -c sessionID,  specify your sessionID "
  echo "            -e ffmpeg,        to record in x264/aac
  echo "            -p passcode,   specify your passcode"
  echo "            -h             display this help and exit"
  exit 1 
} 

while getopts :c:e:p:h option
do
  case "$option" in
  c)
    SessionID="${OPTARG}"
    ;;
  e)
    enc="${OPTARG}"
    ;;
  p) # not needed, maybe for group and private?
    Password="${OPTARG}"
    ;;
  \?)
     echo "Invalid option: -$OPTARG" >&2
     usage
     ;;
  :)
     echo "Option -$OPTARG requires an argument." >&2
     usage
     ;;
  esac
done
shift $(($OPTIND - 1))

if [ $# -eq 0 ]
then
  usage
fi

Model="$1"
ModelID=`curl -s http://profiles.myfreecams.com/"${Model}" | grep -oP 'admireUser\(\d+\)' | grep -oP '\d+'`
if [ -z "$ModelID" ] 
  then 
  echo "Unknown model, check the spelling."
  exit 1
fi

vfeed=`lsof -c /npviewer/ -c /chrom/ -aPi tcp:1935 -F n | grep -oP '(?<=->).*'`
while [ -z "${vfeed}" ]
do
  echo "You must start the video."
  read -p "Press Enter when ready…"
  vfeed=`lsof -c /npviewer/ -c /chrom/ -aPi tcp:1935 -F n | grep -oP '(?<=->).*'`
done

while [ -z "${SessionID}" ]
do
  SessionID=`su -c'tcpdump -Anc1 -s112 -i any "src port xprint-server and greater 88 and tcp[13] & 8 != 0" | grep -oP "\b\d{8}\d*\b"|tail -n1'`
done

app="NxServer"
swfUrl="http://www.myfreecams.com/mfc2/flash/MfcVideoBeta.swf"
output="${Model}"_`date -u '+%Y%m%d%H%M%S'`

echo "sessionID: ${SessionID}"
echo "${Model}: ${ModelID}"
echo "${output}"

echo "$vfeed" | while read tcUrl
do
  echo "Testing stream $tcUrl"

  cmdargs_rtmp="-r rtmp://${tcUrl}/${app}/mfc_10${ModelID} \
-W ${swfUrl} \
-t rtmp://${tcUrl}/${app} \
-C N:${SessionID} -C S:${Password} -C N:10${ModelID} \
-C S:DOWNLOAD -C N:${ModelID} \
-m 2 -v"

  cmdargs_ffmpeg="rtmp://${tcUrl}/${app}/mfc_10${ModelID} \
swfUrl=${swfUrl} swfVfy=1 \
tcUrl=rtmp://${tcUrl}/${app} \
conn=N:${SessionID} conn=S:${Password} conn=N:10${ModelID} \
conn=S:DOWNLOAD conn=N:${ModelID} \
timeout=2 live=1"

  trap 'signal=1' SIGINT SIGTERM

if [ "$enc" != "ffmpeg" ]
then
  rtmpdump ${cmdargs_rtmp} -o "${output}".flv
else
  #  Hangs if no audio: https://roundup.ffmpeg.org/issue2213
  ffmpeg -async 1 -re -i "${cmdargs_ffmpeg}"  \
-acodec libfaac -ac 2 -ar 22050 -ab 96k \
-vcodec libx264 -vpre slow -sameq -threads 0 \
"${output}".mp4
fi

  if [[ $? -eq 0 ]] || [[ $? -eq 1 && $signal -eq 1 ]]
  then
    echo "Stream recorded"
    exit 1
  else
    echo "Stream not found"
  fi
  trap SIGINT SIGTERM
done

if [ $? -ne 1 ]
then
  echo "No stream for the requested model was found. please \
check that her video stream is running before starting mfcrecord \
or check you SessionID."
fi
exit
It does not always work, ffmpeg won't if there is no sound or if the connection is bad (see bug report in comment of the script). Also need to be root to fetch the sessionID (I'm using tcpdump for this), but you can specify one with -c sessionID.

You can use any sessionID, assuming it's a real one, it seems it is randomly generated for any new connection to the site, probably just a variable which is incremented. It's not actually tied to an IP or userid.
You can fetch sessionID from other users by listening to chatXX.myfreecam.com (As soon as you're logged to MFC, you are connected to a random chat server on port 8100). You can also see their 'level' (0 guest, 1 basic, 2 premium, 4 model, 5 admin)
The password is never check in Public, I don't know for private or group.
Reply With Quote