MtnMCG

flippercc.lua

Dec 24th, 2025 (edited)
150
0
Never
7
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.46 KB | None | 0 0
  1. -- flipper.lua
  2. -- Universal CC:Tweaked Pentesting Tool
  3. -- Single-file design for ender pocket computers
  4.  
  5. -- ============================================
  6. -- CONFIGURATION
  7. -- ============================================
  8. local DATA_FILE = ".flipper_data"
  9. local VERSION = "1.0"
  10.  
  11. -- ============================================
  12. -- GLOBALS
  13. -- ============================================
  14. local modem = peripheral.find("modem")
  15. if not modem then
  16. print("No modem found!")
  17. return
  18. end
  19.  
  20. local data = {
  21. targets = {},
  22. captured = {},
  23. settings = { autoSave = true }
  24. }
  25.  
  26. local isJamming = false
  27. local openChannels = {}
  28.  
  29. -- ============================================
  30. -- CLEANUP - Close ALL channels on startup
  31. -- Fixes "too many open channels" error
  32. -- ============================================
  33. local function cleanupChannels()
  34. for i = 1, 65535 do
  35. pcall(function() modem.close(i) end)
  36. end
  37. end
  38.  
  39. -- Run cleanup immediately on load
  40. cleanupChannels()
  41.  
  42. -- ============================================
  43. -- UTILITY FUNCTIONS
  44. -- ============================================
  45.  
  46. local function clear()
  47. term.clear()
  48. term.setCursorPos(1, 1)
  49. end
  50.  
  51. local function color(c)
  52. if term.isColor() then term.setTextColor(c) end
  53. end
  54.  
  55. local function header(title)
  56. clear()
  57. local w = term.getSize()
  58. color(colors.cyan)
  59. print(string.rep("=", w))
  60. local pad = math.floor((w - #title - 4) / 2)
  61. print(string.rep(" ", pad) .. "[ " .. title .. " ]")
  62. print(string.rep("=", w))
  63. color(colors.white)
  64. end
  65.  
  66. local function prompt(msg)
  67. color(colors.gray)
  68. write(msg or "> ")
  69. color(colors.white)
  70. return read()
  71. end
  72.  
  73. local function pause()
  74. color(colors.gray)
  75. print("\nPress any key...")
  76. os.pullEvent("key")
  77. end
  78.  
  79. local function saveData()
  80. local f = fs.open(DATA_FILE, "w")
  81. f.write(textutils.serialize(data))
  82. f.close()
  83. end
  84.  
  85. local function loadData()
  86. if fs.exists(DATA_FILE) then
  87. local f = fs.open(DATA_FILE, "r")
  88. local content = f.readAll()
  89. f.close()
  90. data = textutils.unserialize(content) or data
  91. end
  92. end
  93.  
  94. -- Deep scan a message for interesting fields
  95. local function analyzeMessage(msg)
  96. local flags = {}
  97. if type(msg) ~= "table" then return flags end
  98.  
  99. local function scan(t, depth)
  100. if depth > 5 then return end
  101. for k, v in pairs(t) do
  102. local kl = tostring(k):lower()
  103. if kl:find("password") or kl:find("pass") or kl:find("pw") then
  104. table.insert(flags, "CRED:" .. tostring(v))
  105. elseif kl:find("secret") or kl:find("token") or kl:find("key") then
  106. table.insert(flags, "SECRET:" .. tostring(v))
  107. elseif kl == "command" or kl == "action" or kl == "type" then
  108. table.insert(flags, "CMD:" .. tostring(v))
  109. end
  110. if type(v) == "table" then scan(v, depth + 1) end
  111. end
  112. end
  113. scan(msg, 0)
  114. return flags
  115. end
  116.  
  117. local function formatMessage(msg)
  118. if type(msg) == "table" then
  119. return textutils.serialize(msg):gsub("\n", " "):sub(1, 50)
  120. end
  121. return tostring(msg):sub(1, 50)
  122. end
  123.  
  124. -- ============================================
  125. -- SCAN MODE
  126. -- ============================================
  127.  
  128. local function modeScan()
  129. header("SCAN")
  130. print("Scan for active channels & devices\n")
  131. print("[1] Quick Scan (1-100, 2469)")
  132. print("[2] Full Scan (1-65535)")
  133. print("[3] Custom Range")
  134. print("[B] Back")
  135.  
  136. local choice = prompt()
  137.  
  138. local ranges = {}
  139. if choice == "1" then
  140. for i = 1, 100 do table.insert(ranges, i) end
  141. table.insert(ranges, 2469)
  142. table.insert(ranges, 65533)
  143. table.insert(ranges, 65535)
  144. elseif choice == "2" then
  145. for i = 1, 65535 do table.insert(ranges, i) end
  146. elseif choice == "3" then
  147. print("Enter start channel:")
  148. local s = tonumber(prompt()) or 1
  149. print("Enter end channel:")
  150. local e = tonumber(prompt()) or 100
  151. for i = s, e do table.insert(ranges, i) end
  152. else
  153. return
  154. end
  155.  
  156. header("SCANNING...")
  157. local found = {}
  158.  
  159. -- Open channels in batches of 128
  160. local batch = {}
  161. for i, ch in ipairs(ranges) do
  162. table.insert(batch, ch)
  163. if #batch >= 128 or i == #ranges then
  164. -- Open batch
  165. for _, c in ipairs(batch) do
  166. modem.open(c)
  167. end
  168.  
  169. -- Send ping on each
  170. for _, c in ipairs(batch) do
  171. modem.transmit(c, c, "ping")
  172. modem.transmit(c, c, {type = "ping"})
  173. modem.transmit(c, c, {command = "ping"})
  174. end
  175.  
  176. -- Listen briefly
  177. local timer = os.startTimer(0.5)
  178. while true do
  179. local event, p1, p2, p3, p4, p5 = os.pullEvent()
  180. if event == "modem_message" then
  181. local ch, reply, msg = p2, p3, p4
  182. if not found[ch] then found[ch] = {} end
  183. table.insert(found[ch], {reply = reply, msg = msg})
  184. elseif event == "timer" and p1 == timer then
  185. break
  186. end
  187. end
  188.  
  189. -- Close batch
  190. for _, c in ipairs(batch) do
  191. modem.close(c)
  192. end
  193. batch = {}
  194.  
  195. -- Progress
  196. term.setCursorPos(1, 5)
  197. term.clearLine()
  198. print("Scanned: " .. i .. "/" .. #ranges)
  199. end
  200. end
  201.  
  202. -- Display results
  203. header("SCAN RESULTS")
  204. local count = 0
  205. for ch, responses in pairs(found) do
  206. count = count + 1
  207. color(colors.lime)
  208. write("Ch " .. ch .. ": ")
  209. color(colors.white)
  210. print(#responses .. " response(s)")
  211.  
  212. for _, r in ipairs(responses) do
  213. local flags = analyzeMessage(r.msg)
  214. local dtype = "unknown"
  215. if type(r.msg) == "table" then
  216. if r.msg.command == "pong" then dtype = "turtle"
  217. elseif r.msg.type then dtype = r.msg.type
  218. elseif r.msg.action then dtype = r.msg.action
  219. end
  220. end
  221.  
  222. -- Save target
  223. table.insert(data.targets, {
  224. channel = ch,
  225. replyId = r.reply,
  226. type = dtype,
  227. lastSeen = os.epoch("utc"),
  228. sample = r.msg
  229. })
  230. end
  231. if count >= 15 then
  232. print("... and more")
  233. break
  234. end
  235. end
  236.  
  237. if count == 0 then
  238. print("No responses detected.")
  239. else
  240. print("\n" .. count .. " active channel(s) found")
  241. if data.settings.autoSave then saveData() end
  242. end
  243.  
  244. pause()
  245. end
  246.  
  247. -- ============================================
  248. -- SNIFF MODE
  249. -- ============================================
  250.  
  251. local function modeSniff()
  252. header("SNIFF")
  253. print("Monitor traffic on channel(s)\n")
  254. print("[1] Single Channel")
  255. print("[2] Multi-Channel (up to 128)")
  256. print("[3] Common Channels (1,2,5,2469)")
  257. print("[B] Back")
  258.  
  259. local choice = prompt()
  260. local channels = {}
  261.  
  262. if choice == "1" then
  263. print("Enter channel:")
  264. local ch = tonumber(prompt())
  265. if ch then table.insert(channels, ch) end
  266. elseif choice == "2" then
  267. print("Enter channels (comma-separated):")
  268. local input = prompt()
  269. for num in input:gmatch("%d+") do
  270. table.insert(channels, tonumber(num))
  271. if #channels >= 128 then break end
  272. end
  273. elseif choice == "3" then
  274. channels = {1, 2, 5, 2469, 65535}
  275. else
  276. return
  277. end
  278.  
  279. if #channels == 0 then return end
  280.  
  281. -- Open channels
  282. for _, ch in ipairs(channels) do
  283. modem.open(ch)
  284. end
  285.  
  286. header("SNIFFING - Press Q to stop")
  287. print("Channels: " .. table.concat(channels, ", ") .. "\n")
  288.  
  289. local captureCount = 0
  290.  
  291. while true do
  292. local event, p1, p2, p3, p4, p5 = os.pullEvent()
  293.  
  294. if event == "modem_message" then
  295. local ch, reply, msg, dist = p2, p3, p4, p5
  296. captureCount = captureCount + 1
  297.  
  298. local flags = analyzeMessage(msg)
  299. local flagStr = #flags > 0 and " " .. table.concat(flags, " ") or ""
  300.  
  301. -- Color based on content
  302. if flagStr:find("CRED") then
  303. color(colors.red)
  304. elseif flagStr:find("SECRET") then
  305. color(colors.orange)
  306. elseif flagStr:find("CMD") then
  307. color(colors.yellow)
  308. else
  309. color(colors.lightGray)
  310. end
  311.  
  312. local time = textutils.formatTime(os.time(), true)
  313. print("[" .. time .. "] Ch" .. ch .. " ID:" .. reply)
  314. color(colors.white)
  315. print(" " .. formatMessage(msg))
  316. if #flags > 0 then
  317. color(colors.red)
  318. print(" ^^ " .. table.concat(flags, " "))
  319. color(colors.white)
  320. end
  321.  
  322. -- Store capture
  323. table.insert(data.captured, {
  324. time = os.epoch("utc"),
  325. channel = ch,
  326. sender = reply,
  327. message = msg,
  328. flags = flags
  329. })
  330.  
  331. elseif event == "key" then
  332. if p1 == keys.q then break end
  333. end
  334. end
  335.  
  336. -- Close channels
  337. for _, ch in ipairs(channels) do
  338. modem.close(ch)
  339. end
  340.  
  341. print("\nCaptured " .. captureCount .. " messages")
  342. if data.settings.autoSave and captureCount > 0 then saveData() end
  343. pause()
  344. end
  345.  
  346. -- ============================================
  347. -- ATTACK MODE
  348. -- ============================================
  349.  
  350. local function modeAttack()
  351. header("ATTACK")
  352. print("Targeted exploits\n")
  353. print("[1] Replay - Resend captured message")
  354. print("[2] Inject - Send custom message")
  355. print("[3] Spoof - Forge sender ID")
  356. print("[4] Flood - DoS a channel")
  357. print("[B] Back")
  358.  
  359. local choice = prompt()
  360.  
  361. if choice == "1" then
  362. -- Replay
  363. header("REPLAY")
  364. if #data.captured == 0 then
  365. print("No captured messages to replay.")
  366. pause()
  367. return
  368. end
  369.  
  370. print("Recent captures:")
  371. local start = math.max(1, #data.captured - 9)
  372. for i = start, #data.captured do
  373. local c = data.captured[i]
  374. print("[" .. i .. "] Ch" .. c.channel .. " -> " .. formatMessage(c.message):sub(1,30))
  375. end
  376.  
  377. print("\nEnter # to replay (or B to back):")
  378. local idx = tonumber(prompt())
  379. if idx and data.captured[idx] then
  380. local cap = data.captured[idx]
  381. modem.open(cap.channel)
  382. modem.transmit(cap.channel, cap.sender, cap.message)
  383. modem.close(cap.channel)
  384. color(colors.lime)
  385. print("Replayed to channel " .. cap.channel)
  386. color(colors.white)
  387. end
  388. pause()
  389.  
  390. elseif choice == "2" then
  391. -- Inject
  392. header("INJECT")
  393. print("Enter target channel:")
  394. local ch = tonumber(prompt())
  395. if not ch then return end
  396.  
  397. print("Enter message (Lua table or string):")
  398. local input = prompt()
  399. local msg = loadstring("return " .. input)
  400. if msg then
  401. msg = msg()
  402. else
  403. msg = input
  404. end
  405.  
  406. print("Enter reply channel (default: " .. ch .. "):")
  407. local reply = tonumber(prompt()) or ch
  408.  
  409. modem.open(ch)
  410. modem.transmit(ch, reply, msg)
  411. modem.close(ch)
  412.  
  413. color(colors.lime)
  414. print("Injected message to channel " .. ch)
  415. color(colors.white)
  416. pause()
  417.  
  418. elseif choice == "3" then
  419. -- Spoof
  420. header("SPOOF")
  421. print("Send message with forged sender ID\n")
  422. print("Enter target channel:")
  423. local ch = tonumber(prompt())
  424. if not ch then return end
  425.  
  426. print("Enter spoofed sender ID:")
  427. local spoofId = tonumber(prompt()) or 0
  428.  
  429. print("Enter message (Lua table or string):")
  430. local input = prompt()
  431. local msg = loadstring("return " .. input)
  432. if msg then
  433. msg = msg()
  434. else
  435. msg = input
  436. end
  437.  
  438. modem.open(ch)
  439. modem.transmit(ch, spoofId, msg)
  440. modem.close(ch)
  441.  
  442. color(colors.lime)
  443. print("Sent with spoofed ID " .. spoofId .. " to channel " .. ch)
  444. color(colors.white)
  445. pause()
  446.  
  447. elseif choice == "4" then
  448. -- Flood
  449. header("FLOOD")
  450. print("DoS attack on channel\n")
  451. print("Enter target channel:")
  452. local ch = tonumber(prompt())
  453. if not ch then return end
  454.  
  455. print("Enter duration (seconds, max 60):")
  456. local duration = math.min(tonumber(prompt()) or 5, 60)
  457.  
  458. print("\nFlooding channel " .. ch .. " for " .. duration .. "s...")
  459. print("Press any key to stop early.\n")
  460.  
  461. modem.open(ch)
  462. local endTime = os.clock() + duration
  463. local count = 0
  464.  
  465. while os.clock() < endTime do
  466. for i = 1, 50 do
  467. modem.transmit(ch, math.random(1, 65535), {
  468. garbage = string.rep("X", 100),
  469. rand = math.random(),
  470. ts = os.epoch("utc")
  471. })
  472. count = count + 1
  473. end
  474.  
  475. term.setCursorPos(1, 8)
  476. term.clearLine()
  477. print("Sent: " .. count .. " packets")
  478.  
  479. local timer = os.startTimer(0.05)
  480. while true do
  481. local event, p1 = os.pullEvent()
  482. if event == "key" then
  483. modem.close(ch)
  484. print("\nStopped. Total: " .. count)
  485. pause()
  486. return
  487. elseif event == "timer" and p1 == timer then
  488. break
  489. end
  490. end
  491. end
  492.  
  493. modem.close(ch)
  494. color(colors.lime)
  495. print("\nComplete. Sent " .. count .. " packets")
  496. color(colors.white)
  497. pause()
  498. end
  499. end
  500.  
  501. -- ============================================
  502. -- JAM MODE
  503. -- ============================================
  504.  
  505. local function modeJam()
  506. header("JAM")
  507. print("Disrupt ALL wireless communications\n")
  508. print("[1] Jam ALL channels (rotating)")
  509. print("[2] Jam Common (1-100, 2469)")
  510. print("[3] Jam Specific channels")
  511. print("[B] Back")
  512.  
  513. local choice = prompt()
  514. local channels = {}
  515.  
  516. if choice == "1" then
  517. -- Will rotate through all
  518. channels = "all"
  519. elseif choice == "2" then
  520. for i = 1, 100 do table.insert(channels, i) end
  521. table.insert(channels, 2469)
  522. table.insert(channels, 65533)
  523. table.insert(channels, 65535)
  524. elseif choice == "3" then
  525. print("Enter channels (comma-separated):")
  526. local input = prompt()
  527. for num in input:gmatch("%d+") do
  528. table.insert(channels, tonumber(num))
  529. end
  530. else
  531. return
  532. end
  533.  
  534. header("JAMMING...")
  535. print("Press any key to STOP\n")
  536.  
  537. isJamming = true
  538. local count = 0
  539. local currentBatch = 1
  540.  
  541. while isJamming do
  542. local batch = {}
  543.  
  544. if channels == "all" then
  545. -- Rotate through all channels in batches of 128
  546. local start = ((currentBatch - 1) * 128) + 1
  547. local stop = math.min(start + 127, 65535)
  548. for i = start, stop do
  549. table.insert(batch, i)
  550. end
  551. currentBatch = currentBatch + 1
  552. if currentBatch * 128 > 65535 then currentBatch = 1 end
  553. else
  554. batch = channels
  555. end
  556.  
  557. -- Open batch
  558. for _, ch in ipairs(batch) do
  559. pcall(function() modem.open(ch) end)
  560. end
  561.  
  562. -- Flood
  563. for _, ch in ipairs(batch) do
  564. modem.transmit(ch, math.random(1, 65535), {
  565. j = string.rep("X", 200),
  566. r = math.random()
  567. })
  568. count = count + 1
  569. end
  570.  
  571. -- Close batch
  572. for _, ch in ipairs(batch) do
  573. pcall(function() modem.close(ch) end)
  574. end
  575.  
  576. -- Update display
  577. term.setCursorPos(1, 5)
  578. term.clearLine()
  579. if channels == "all" then
  580. print("Batch: " .. currentBatch .. "/512 | Packets: " .. count)
  581. else
  582. print("Packets sent: " .. count)
  583. end
  584.  
  585. -- Check for key press
  586. local timer = os.startTimer(0.02)
  587. while true do
  588. local event, p1 = os.pullEvent()
  589. if event == "key" then
  590. isJamming = false
  591. break
  592. elseif event == "timer" and p1 == timer then
  593. break
  594. end
  595. end
  596. end
  597.  
  598. color(colors.lime)
  599. print("\nJamming stopped. Sent " .. count .. " packets")
  600. color(colors.white)
  601. pause()
  602. end
  603.  
  604. -- ============================================
  605. -- TARGETS VIEW
  606. -- ============================================
  607.  
  608. local function modeTargets()
  609. header("TARGETS")
  610.  
  611. if #data.targets == 0 then
  612. print("No targets discovered yet.")
  613. print("Run SCAN first.")
  614. pause()
  615. return
  616. end
  617.  
  618. print("Discovered devices:\n")
  619. local shown = math.min(#data.targets, 15)
  620. for i = #data.targets - shown + 1, #data.targets do
  621. local t = data.targets[i]
  622. color(colors.yellow)
  623. write("[" .. i .. "] ")
  624. color(colors.white)
  625. print("Ch:" .. t.channel .. " ID:" .. (t.replyId or "?") .. " Type:" .. (t.type or "?"))
  626. end
  627.  
  628. print("\n[C] Clear all | [B] Back")
  629. local choice = prompt()
  630. if choice:lower() == "c" then
  631. data.targets = {}
  632. saveData()
  633. print("Cleared.")
  634. sleep(0.5)
  635. end
  636. end
  637.  
  638. -- ============================================
  639. -- MAIN MENU
  640. -- ============================================
  641.  
  642. local function mainMenu()
  643. loadData()
  644.  
  645. while true do
  646. header("FLIPPER CC v" .. VERSION)
  647.  
  648. local w = term.getSize()
  649. print("")
  650. print(" [1] SCAN - Find devices")
  651. print(" [2] SNIFF - Monitor traffic")
  652. print(" [3] ATTACK - Targeted exploits")
  653. print(" [4] JAM - Block all comms")
  654. print("")
  655. print(" [T] Targets (" .. #data.targets .. " saved)")
  656. print(" [C] Captured (" .. #data.captured .. " msgs)")
  657. print(" [Q] Quit")
  658. print("")
  659.  
  660. local choice = prompt()
  661.  
  662. if choice == "1" then
  663. modeScan()
  664. elseif choice == "2" then
  665. modeSniff()
  666. elseif choice == "3" then
  667. modeAttack()
  668. elseif choice == "4" then
  669. modeJam()
  670. elseif choice:lower() == "t" then
  671. modeTargets()
  672. elseif choice:lower() == "c" then
  673. header("CAPTURED")
  674. if #data.captured == 0 then
  675. print("No captured messages.")
  676. else
  677. local start = math.max(1, #data.captured - 10)
  678. for i = start, #data.captured do
  679. local c = data.captured[i]
  680. print("[" .. i .. "] Ch" .. c.channel .. ": " .. formatMessage(c.message):sub(1,35))
  681. end
  682. end
  683. print("\n[X] Clear all | [B] Back")
  684. if prompt():lower() == "x" then
  685. data.captured = {}
  686. saveData()
  687. end
  688. elseif choice:lower() == "q" then
  689. saveData()
  690. cleanupChannels() -- Ensure all channels closed
  691. clear()
  692. print("Flipper CC closed.")
  693. return
  694. end
  695. end
  696. end
  697.  
  698. -- ============================================
  699. -- ENTRY POINT
  700. -- ============================================
  701.  
  702. mainMenu()
  703.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Hokfadfo
    16 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment