SHOW:
|
|
- or go back to the newest paste.
| 1 | #!/bin/sh | |
| 2 | # | |
| 3 | # Star Wars: The Old Republic Password Hash Extractor | |
| 4 | # Used for running the game on Wine. | |
| 5 | # | |
| 6 | # Instructions: | |
| 7 | # Run the launcher and log in. | |
| 8 | # Click play. | |
| 9 | # Run script. | |
| 10 | # Copy the arguments and paste it on PlayOnLinux configuration. | |
| 11 | # Run the hack. | |
| 12 | # | |
| 13 | ||
| 14 | # Sample Args: | |
| 15 | # C:\Program Files (x86)\Electronic Arts\BioWare\Star Wars - The Old Republic\swtor\RetailClient\swtor.exe -set username sampleuser -set password somelonghashxxyy== -set platform gamepad.swtor.com:443 -set environment swtor -set lang en-us -set torsets main,en-us @swtor_dual.icb | |
| 16 | ||
| 17 | PID=`pidof swtor.exe` | |
| 18 | ||
| 19 | ||
| 20 | if [ -z "$PID" ]; then | |
| 21 | echo "No PID found. Exiting." | |
| 22 | zenity --title "SWTOR Arguments" --text "No SWTOR PID found." --info | |
| 23 | exit 1; | |
| 24 | fi | |
| 25 | ||
| 26 | ALLPID=$PID | |
| 27 | ||
| 28 | case "$PID" in | |
| 29 | *\ * ) | |
| 30 | echo "Invalid PID: $PID." | |
| 31 | found=0 | |
| 32 | # look for the proper PID. | |
| 33 | for testpid in $PID | |
| 34 | do | |
| 35 | TESTARG=$(cat "/proc/$testpid/cmdline") | |
| 36 | case "$TESTARG" in | |
| 37 | *username*) | |
| 38 | PID=$testpid | |
| 39 | found=1 | |
| 40 | ;; | |
| 41 | *);; | |
| 42 | esac | |
| 43 | done; | |
| 44 | ||
| 45 | if [ "$found" -eq "0" ];then | |
| 46 | zenity --title "SWTOR Arguments" --text "Too many SWTOR PIDs found. $PID No appropriate PID found." --info & | |
| 47 | exit 1 | |
| 48 | fi | |
| 49 | ;; | |
| 50 | *) echo "PID Found is: $PID" ;; | |
| 51 | esac | |
| 52 | ||
| 53 | ||
| 54 | ARGPATH="/proc/$PID/cmdline" | |
| 55 | ||
| 56 | OUTPUT="swtor.exe " | |
| 57 | ||
| 58 | echo "Commandline Executed is in: $ARGPATH" | |
| 59 | ||
| 60 | WRITE=0 | |
| 61 | ||
| 62 | for i in $(cat $ARGPATH | xargs -0 echo); do | |
| 63 | #printf "cmd: %s \n" "$i"; | |
| 64 | if [ "$WRITE" -eq "1" ];then | |
| 65 | OUTPUT="$OUTPUT $i" | |
| 66 | fi | |
| 67 | ||
| 68 | # This effectively skips the swotr.exe part. | |
| 69 | if [ "$WRITE" -eq "0" ];then | |
| 70 | case "$i" in | |
| 71 | *swtor.exe*) WRITE=1 ;; | |
| 72 | *) ;; | |
| 73 | esac | |
| 74 | fi | |
| 75 | ||
| 76 | done; | |
| 77 | - | echo "Killing stray SWTOR process..." |
| 77 | + | |
| 78 | - | kill -9 $PID |
| 78 | + | |
| 79 | ||
| 80 | zenity --title "SWTOR Arguments" --text "Copy/Paste these arguments: $OUTPUT" --info --width 800 & | |
| 81 | ||
| 82 | for testpid in $ALLPID | |
| 83 | do | |
| 84 | echo "Killing all stray SWTOR processes..." | |
| 85 | kill -9 $testpid | |
| 86 | done; |