Code Monkey home page Code Monkey logo

prism's Introduction

prism

http://criticalengineering.org/projects/prism-the-beacon-frame/ great works from Julian Oliver and Danja Vasiliev

#code----------------------------------------

#!/bin/bash

# figlet -f slant "Starting up..."
echo "Starting up..."
echo "Press 'Q' for a clean exit"
echo "//---------------------------------------------------------------->"

#MNCs=$(source MNCS.txt)
MNCs=(01 02 03 07 20)
TXTS=(
"State Spying Reform 2014-A6. Embrace Our Transparency."
"NSA Thanks You For Use Of Your Device"
"This Device Has Cooperated. We Thank It."
"Intercepted For Future Use. GCHQ Thanks You."
"Trans Atlantic Upload Complete."
"Remain Still. Do Not Switch Off Device - GCHQ"
)
LOG=$(date +%Y-%m-%d_%H:%M:%S)_tmsis.log
KEY=''

while [ "x$KEY" != "xQ" ];
    do 
        read KEY 
        for i in ${MNCs[@]}; 
            do 
                MNC=$i; 
                # Set the BTS to the new MNC 
                echo "config GSM.Identity.MNC $MNC" | ./OpenBTSCLI
                echo "We're working with MNC: " $MNC
                # Poll every 60 seconds 
                for j in {1..60}:
                    do 
                        sleep 1
                        # Check if we've caught any IMSIs
                        if [ $(echo "tmsis"|./OpenBTSCLI|tail -n +15|awk '{\
                        print $2 }'|sed '/^\s*$/d'|wc -l) -gt 0 ]
                            then
                                for IMSI in $(echo "tmsis"|./OpenBTSCLI | tail -n +15 | awk \ 
                                    '{ print $2 }' | sed '/^\s*$/d');
                                    do
                                        # Randomly choose an SMS to send them
                                        SMS="${TXTS[RANDOM%${#TXTS[@]}]}"
                                        # Send it
                                        echo "sendsms $IMSI $SMS"|./OpenBTSCLI
                                        echo IMSI $IMSI was sent $SMS 
                                        # Append this event to log
                                        echo $IMSI $(date +%Y-%m-%d_%H-%M-%S) $MNC $SMS >> $LOG
                                        #sleep 1
                                    done
                                # Clear the TMSIS table
                                echo "tmsis clear" | ./OpenBTSCLI
                            else
                                echo "No IMSI joined us this round."
                        fi
                    done
            done
done

echo "//<----------------------------------------------------------------"
echo "Quitting..."

cat $LOG | sort -n | uniq -u > $LOG.sorted
echo "We hit" $(cat $LOG.sorted | wc -l) "devices this session."

prism's People

Contributors

b4ss3k avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.