-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgithub-community-helper.sh
More file actions
executable file
Β·394 lines (331 loc) Β· 12.7 KB
/
github-community-helper.sh
File metadata and controls
executable file
Β·394 lines (331 loc) Β· 12.7 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
#!/bin/bash
#
# NullSec GitHub Community Helper
# Version: 1.1
# Finds open issues you can answer and generates response templates
# Author: bad-antics
# Repository: https://github.com/bad-antics/nullsec
#
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
CYAN='\033[0;36m'
NC='\033[0m'
GITHUB_USER="bad-antics"
FLIPPER_SUITE="https://github.com/bad-antics/nullsec-flipper-suite"
PINEAPPLE_SUITE="https://github.com/bad-antics/nullsec-pineapple-suite"
banner() {
echo -e "${CYAN}"
echo "βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ"
echo "β NullSec GitHub Community Helper β"
echo "β Find issues to answer & build reputation β"
echo "βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ"
echo -e "${NC}"
}
search_issues() {
local query="$1"
local limit="${2:-10}"
echo -e "${YELLOW}π Searching: ${query}${NC}"
gh search issues "$query" --state=open --limit "$limit" 2>/dev/null
}
find_flipper_issues() {
echo -e "\n${GREEN}βββ FLIPPER ZERO ISSUES βββ${NC}\n"
echo -e "${BLUE}π I-Am-Jakoby/Flipper-Zero-BadUSB${NC}"
gh issue list --repo I-Am-Jakoby/Flipper-Zero-BadUSB --state open --limit 10 2>/dev/null
echo -e "\n${BLUE}π UberGuidoZ/Flipper${NC}"
gh issue list --repo UberGuidoZ/Flipper --state open --limit 10 2>/dev/null
echo -e "\n${BLUE}π flipperdevices/flipperzero-firmware${NC}"
gh issue list --repo flipperdevices/flipperzero-firmware --state open --limit 10 --search "badusb OR payload" 2>/dev/null
}
find_hak5_issues() {
echo -e "\n${GREEN}βββ HAK5 ISSUES βββ${NC}\n"
echo -e "${BLUE}π hak5/usbrubberducky-payloads${NC}"
gh issue list --repo hak5/usbrubberducky-payloads --state open --limit 10 2>/dev/null
echo -e "\n${BLUE}π hak5/bashbunny-payloads${NC}"
gh issue list --repo hak5/bashbunny-payloads --state open --limit 10 2>/dev/null
}
find_security_issues() {
echo -e "\n${GREEN}βββ SECURITY TOOL ISSUES βββ${NC}\n"
search_issues "badusb script not working" 10
echo ""
search_issues "ducky payload help" 10
echo ""
search_issues "powershell payload" 10
}
generate_answer_template() {
local issue_type="$1"
case "$issue_type" in
"not_working")
cat << 'EOF'
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π TEMPLATE: Scripts Not Working
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Hey! Here's a troubleshooting guide for BadUSB payload issues:
### Common fixes:
**1. PowerShell execution policy**
```
STRING powershell -ExecutionPolicy Bypass -WindowStyle Hidden
```
**2. Increase delays (Windows 11 is slower)**
```
DELAY 2000
```
**3. USB mode instead of Bluetooth**
Press LEFT on the script β Config β Set to USB
**4. Keyboard layout**
Add at the top:
```
DUCKY_LANG US
```
### Working payloads
I maintain tested payloads here:
π https://github.com/bad-antics/nullsec-flipper-suite
Let me know if you need specific help!
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
EOF
;;
"virus")
cat << 'EOF'
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π TEMPLATE: Virus/AV Detection
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
This is expected! Windows Defender correctly identifies these as potentially malicious because they do things malware does.
### Solutions:
1. **Add exclusion folder**
Windows Security β Virus & Threat Protection β Exclusions β Add Folder
2. **Use Windows Sandbox or VM**
Test in isolated environment
3. **Download via git CLI**
```
git clone [REPO_URL]
```
4. **Temporarily disable Real-time protection**
β οΈ Only on test machines!
### Safe demo payloads
For learning without AV issues, check my prank payloads:
π https://github.com/bad-antics/nullsec-flipper-suite
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
EOF
;;
"macos")
cat << 'EOF'
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π TEMPLATE: macOS BadUSB
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
macOS payloads work differently than Windows. Key changes:
### Open Spotlight (instead of Run):
```
GUI SPACE
DELAY 500
```
### Open Terminal:
```
STRING terminal
ENTER
DELAY 1000
```
### Example macOS payload:
```
REM macOS Recon
DELAY 1000
GUI SPACE
DELAY 500
STRING terminal
ENTER
DELAY 1000
STRING whoami && id && sw_vers
ENTER
```
### Working macOS payloads
Check `23_MacOSRecon.txt` in my collection:
π https://github.com/bad-antics/nullsec-flipper-suite
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
EOF
;;
"linux")
cat << 'EOF'
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π TEMPLATE: Linux BadUSB
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Linux payloads need different approach than Windows:
### Open terminal (varies by distro):
```
CTRL ALT t
DELAY 1000
```
### Example Linux payload:
```
REM Linux Recon
DELAY 1000
CTRL ALT t
DELAY 1500
STRING whoami && id && uname -a && cat /etc/os-release
ENTER
```
### Working Linux payloads
Check `21_LinuxRecon.txt` and `22_LinuxReverseShell.txt`:
π https://github.com/bad-antics/nullsec-flipper-suite
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
EOF
;;
*)
cat << 'EOF'
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π TEMPLATE: General Help
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Happy to help! Could you share:
1. What OS are you targeting?
2. What payload are you trying to run?
3. What error/behavior are you seeing?
In the meantime, check my tested payload collection:
π https://github.com/bad-antics/nullsec-flipper-suite
Contains 25+ payloads for Windows, Linux, and macOS!
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
EOF
;;
esac
}
post_answer() {
local repo="$1"
local issue_num="$2"
local answer="$3"
echo -e "${YELLOW}Posting answer to ${repo}#${issue_num}...${NC}"
gh issue comment "$issue_num" --repo "$repo" --body "$answer"
if [ $? -eq 0 ]; then
echo -e "${GREEN}β
Answer posted successfully!${NC}"
else
echo -e "${RED}β Failed to post answer${NC}"
fi
}
view_issue() {
local repo="$1"
local issue_num="$2"
echo -e "\n${CYAN}βββ ISSUE DETAILS βββ${NC}\n"
gh issue view "$issue_num" --repo "$repo" 2>/dev/null
}
interactive_menu() {
while true; do
echo -e "\n${GREEN}βββ MAIN MENU βββ${NC}"
echo "1) Find Flipper Zero issues"
echo "2) Find Hak5 issues"
echo "3) Find general security issues"
echo "4) Generate answer template"
echo "5) View specific issue"
echo "6) Post answer to issue"
echo "7) Check my PR status"
echo "8) Quick search"
echo "q) Quit"
echo ""
read -p "Select option: " choice
case "$choice" in
1) find_flipper_issues ;;
2) find_hak5_issues ;;
3) find_security_issues ;;
4)
echo -e "\nTemplate types:"
echo " 1) not_working - Scripts not working"
echo " 2) virus - AV detection issues"
echo " 3) macos - macOS payloads"
echo " 4) linux - Linux payloads"
echo " 5) general - General help"
read -p "Select template: " tmpl
case "$tmpl" in
1) generate_answer_template "not_working" ;;
2) generate_answer_template "virus" ;;
3) generate_answer_template "macos" ;;
4) generate_answer_template "linux" ;;
5) generate_answer_template "general" ;;
esac
;;
5)
read -p "Enter repo (e.g., I-Am-Jakoby/Flipper-Zero-BadUSB): " repo
read -p "Enter issue number: " num
view_issue "$repo" "$num"
;;
6)
read -p "Enter repo: " repo
read -p "Enter issue number: " num
echo "Enter your answer (end with EOF on new line):"
answer=""
while IFS= read -r line; do
[[ "$line" == "EOF" ]] && break
answer+="$line"$'\n'
done
post_answer "$repo" "$num" "$answer"
;;
7)
echo -e "\n${CYAN}βββ YOUR OPEN PRs βββ${NC}\n"
gh pr list --author "$GITHUB_USER" --state open
;;
8)
read -p "Enter search query: " query
search_issues "$query" 15
;;
q|Q)
echo -e "${GREEN}Goodbye!${NC}"
exit 0
;;
*) echo -e "${RED}Invalid option${NC}" ;;
esac
done
}
# Quick mode - just list issues
quick_mode() {
banner
find_flipper_issues
find_hak5_issues
echo -e "\n${GREEN}βββ QUICK ANSWER TEMPLATES βββ${NC}"
echo "Run with -t flag to see templates:"
echo " $0 -t not_working"
echo " $0 -t virus"
echo " $0 -t macos"
echo " $0 -t linux"
}
# Main
case "${1:-}" in
-i|--interactive)
banner
interactive_menu
;;
-t|--template)
generate_answer_template "${2:-general}"
;;
-s|--search)
search_issues "${2:-badusb}" "${3:-15}"
;;
-f|--flipper)
find_flipper_issues
;;
-h|--hak5)
find_hak5_issues
;;
-p|--post)
# Quick post: ./script.sh -p repo issue_num template_type
if [ -n "$2" ] && [ -n "$3" ] && [ -n "$4" ]; then
answer=$(generate_answer_template "$4")
post_answer "$2" "$3" "$answer"
else
echo "Usage: $0 -p <repo> <issue_num> <template_type>"
fi
;;
--help)
echo "NullSec GitHub Community Helper"
echo ""
echo "Usage: $0 [option]"
echo ""
echo "Options:"
echo " -i, --interactive Interactive menu mode"
echo " -t, --template TYPE Show answer template"
echo " -s, --search QUERY Search for issues"
echo " -f, --flipper Find Flipper Zero issues"
echo " -h, --hak5 Find Hak5 issues"
echo " -p, --post Post answer to issue"
echo " --help Show this help"
echo ""
echo "Template types: not_working, virus, macos, linux, general"
;;
*)
quick_mode
;;
esac