-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
92 lines (85 loc) · 3.01 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: 'Get iTunes Headers & Kbsync'
inputs:
apple_id:
required: true
apple_id_pwd:
required: true
ngrok_token:
description: "Token for RDP debugging"
required: false
runs:
using: "composite"
steps:
- name: Check if initialized
id: check
run: |
echo "Checking if we need to initialize iTunes again"
if [[ "$(cat /c/.iTunesInitialized)" == "${{ inputs.ngrok-token }}" ]]; then
echo " Need to re-init iTunes"
echo "::set-output name=NEED_INIT::1"
else
echo " Needn't to do anything"
echo "::set-output name=NEED_INIT::0"
fi
working-directory: ${{ github.action_path }}
shell: bash
- name: Setup iTunes
if: ${{ steps.check.outputs.NEED_INIT == 1 }}
run: |
echo Setup iTunes...
start /wait taskkill /f /im iTunes* python*
workflow_helper\iTunesInstall\install_itunes.bat
working-directory: ${{ github.action_path }}
shell: cmd
- name: Setup Python Dependencies
if: ${{ steps.check.outputs.NEED_INIT == 1 }}
run: |
echo Setup Python Dependencies...
pip3 install pywinauto frida Flask
working-directory: ${{ github.action_path }}
shell: cmd
- uses: NyaMisty/reverse-rdp-windows-github-actions-ng@master
if: ${{ always() && github.event_name == 'workflow_dispatch' && github.event.inputs.itunes_debug_enabled }}
with:
ngrok-token: ${{ inputs.ngrok_token }}
password: Aa123456
foreground: false
- name: Login iTunes
if: ${{ steps.check.outputs.NEED_INIT == 1 }}
env:
APPLEID: ${{ inputs.apple_id }}
APPLEID_PWD: ${{ inputs.apple_id_pwd }}
run: |
echo Login iTunes...
python3 workflow_helper/itunes_auto_login.py %APPLEID% %APPLEID_PWD%
working-directory: ${{ github.action_path }}
shell: cmd
- name: Finish Initialization
if: ${{ steps.check.outputs.NEED_INIT == 1 }}
env:
APPLEID: ${{ inputs.apple_id }}
run: |
echo "Finish Initialization..."
echo "$APPLEID" > /c/.iTunesInitialized
working-directory: ${{ github.action_path }}
shell: bash
- name: Start Frida Header Server
run: |
echo Start Frida Header Server!
curl -Lo psexec64.exe https://github.com/ComputerGuyYash/psexec/raw/main/PsExec64.exe
psexec64.exe -accepteula -nobanner -i -d cmd /c "python3.exe workflow_helper/iTunesDownload/get_header.py > C:\get_header.log 2>&1"
exit 0
working-directory: ${{ github.action_path }}
shell: cmd
- name: Test Frida Header Server
run: |
sleep 5
ret=0
echo "---------------- Before query headers ----------------"
cat /c/get_header.log
curl --fail-with-body -vv 127.0.0.1:9000 || ret=$?
echo "---------------- After query headers ----------------"
cat /c/get_header.log
exit $ret
working-directory: ${{ github.action_path }}
shell: bash