FlyFar

main.go

Jun 16th, 2023
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 5.05 KB | Cybersecurity | 0 0
  1. package main
  2.  
  3. import (
  4.     "fmt"
  5.     //"os"
  6.     "log"
  7.     "net/http"
  8.     "os/exec"
  9.     "runtime"
  10.     "io/ioutil"
  11.     "flag"
  12. )
  13.  
  14.  
  15. func clear() {
  16.     out, err := exec.Command("clear").Output()
  17.         if err != nil {
  18.             fmt.Println("%s", err)
  19.         }
  20.         fmt.Println("Command Successfully Executed")
  21.         output := string(out[:])
  22.         fmt.Println(output)
  23. }
  24.  
  25.  
  26. func viurs() {
  27.     urlvirus := "https://bit.ly/3ild93L"
  28.  
  29.     fmt.Println(urlvirus)
  30. }
  31.  
  32.  
  33. func Command() {
  34.     out, err := exec.Command("pwd").Output()
  35.     if err != nil {
  36.         fmt.Printf("%s", err)
  37.     }
  38.     output := string(out[:])
  39.     fmt.Println("[+] Current Dir", output)
  40. }
  41.  
  42.  
  43. func check() {
  44.     if runtime.GOOS == "windows" {
  45.         fmt.Println("Can't Execute this on a windows machine")
  46.     if runtime.GOOS == "linux" {
  47.         fmt.Println("[+] Looks Good.....")
  48.         fmt.Println("[+] Testing.....")
  49.     }
  50.     } else {
  51.         fmt.Println("[+] Looks Good.....")
  52.         fmt.Println("[+] Testing.....")
  53.         out, err := exec.Command("clear").Output()
  54.         if err != nil {
  55.             fmt.Println("%s", err)
  56.         }
  57.         fmt.Println("Command Successfully Executed")
  58.         output := string(out[:])
  59.         fmt.Println(output)
  60.     }
  61. }
  62.  
  63. // use of color go get github.com/fatih/color
  64.  
  65. func urltest() {
  66.     url1 := "https://youtube.com"
  67.     url2 := "https://google.com"
  68.     url3 := "https://hulu.com"
  69.     url4 := "https://netflix.com"
  70.     url5 := "https://www.twitter.com/"
  71.     url6 := "https://www.facebook.com"
  72.     url7 := "https://instagram.com"
  73.     url8 := "https://keybase.io"
  74.     url9 := "https://doxbin.org"
  75.  
  76.     fmt.Println("-------------- Testing URL's ------------------")
  77.     fmt.Println("[+] -> ", url1)
  78.     fmt.Println("[+] -> ", url2)
  79.     fmt.Println("[+] -> ", url3)
  80.     fmt.Println("[+] -> ", url4)
  81.     fmt.Println("[+] -> ", url5)
  82.     fmt.Println("[+] -> ", url6)
  83.     fmt.Println("[+] -> ", url7)
  84.     fmt.Println("[+] -> ", url8)
  85.     fmt.Println("[+] -> ", url9)
  86.     fmt.Println("------------------------------------------------")
  87.     resp0, err := http.Get(url1)
  88.     resp1, err := http.Get(url2)
  89.     resp2, err := http.Get(url3)
  90.     resp3, err := http.Get(url4)
  91.     resp4, err := http.Get(url5)
  92.     resp5, err := http.Get(url6)
  93.     resp9, err := http.Get(url7)
  94.     resp6, err := http.Get(url8)
  95.     resp7, err := http.Get(url9)
  96.  
  97.     if err != nil {
  98.         log.Fatal(err)
  99.     }
  100.     if resp7.StatusCode >= 200 && resp7.StatusCode <= 299 {
  101.         fmt.Println("OK")
  102.     }
  103.     if resp6.StatusCode >= 200 && resp6.StatusCode <= 299 {
  104.         fmt.Println("OK")
  105.     }
  106.     if resp5.StatusCode >= 200 && resp5.StatusCode <= 299 {
  107.         fmt.Println("OK")
  108.     }
  109.     if resp4.StatusCode >= 200 && resp4.StatusCode <= 299 {
  110.         fmt.Println("OK")
  111.     }
  112.     if resp3.StatusCode >= 200 && resp3.StatusCode <= 299 {
  113.         fmt.Println("OK")
  114.     }
  115.     if resp2.StatusCode >= 200 && resp2.StatusCode <= 299 {
  116.         fmt.Println("OK")
  117.     }
  118.     if resp1.StatusCode >= 200 && resp1.StatusCode <= 299 {
  119.         fmt.Println("OK")
  120.     }
  121.     if resp9.StatusCode >= 200 && resp9.StatusCode <= 299 {
  122.         fmt.Println("OK")
  123.     }
  124.     if resp0.StatusCode >= 200 && resp0.StatusCode <= 299 {
  125.         fmt.Println("OK")
  126.     } else {
  127.         fmt.Println("OK")
  128.     }
  129. }
  130.  
  131. func secondtest() {
  132.     resp, err := http.Get("http://golangcode.com")
  133.     if err != nil {
  134.         log.Fatal(err)
  135.     }
  136.  
  137.     // Print the HTTP Status Code and Status Name
  138.     fmt.Println("HTTP Response Status:", resp.StatusCode, http.StatusText(resp.StatusCode))
  139.  
  140.     if resp.StatusCode >= 200 && resp.StatusCode <= 299 {
  141.         fmt.Println("Returned Error => ", resp.StatusCode)
  142.     }
  143.     if resp.StatusCode >= 200 && resp.StatusCode <= 299 {
  144.         fmt.Println("HTTP Returned in range of 200 ")
  145.     } else {
  146.         fmt.Println("Argh! Broken")
  147.     }
  148. }
  149.  
  150. // why not make a nicer bannr than the other one had  
  151. func banner() string {
  152.     b, err := ioutil.ReadFile("ascii.txt")
  153.     if err != nil {
  154.         panic(err)
  155.     }
  156.     fmt.Println(string(b))
  157.     return (string(b))
  158. }
  159.  
  160.  
  161. func userin() {
  162.     var name string;
  163.     fmt.Printf("Write Device >>> ")
  164.     fmt.Scanf("%s", &name)
  165. //  name :=
  166.  
  167. }
  168.  
  169.  
  170. func cmdarg() {
  171.     output := flag.Bool("output", false, "Android")
  172.     input := flag.Bool("input", true, "Iphone")
  173.     flag.Parse()
  174.     fmt.Println("Android => ",*output)
  175.     fmt.Println("Iphone  => ",*input)
  176.  
  177.  
  178. }
  179.  
  180. func payloads() {
  181.  
  182.     fmt.Println("-------------- IPHONE SEND PAYLOADS --------------------")
  183.     fmt.Println("  effective. ")
  184.     fmt.Println("      Power  ")
  185.     fmt.Println("            لُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ")
  186.     fmt.Println("冗")
  187.     fmt.Println("------------------ ANDROID MANUAL PAYLOADS ------------")
  188.     fmt.Println("https://bit.ly/3ild93L")
  189.     fmt.Println("https://bit.ly/3fX8ljZ")
  190.     fmt.Println("-----------------------")
  191.     fmt.Println(" sorry there is not more (◕‿◕)♡ have a great day! ")
  192.  
  193. }
  194.  
  195. func dir() {
  196.     if runtime.GOOS == "windows" {
  197.         fmt.Println("Can't Execute this on a windows machine")
  198.     } else {
  199.         out, err := exec.Command("pwd").Output()
  200.         if err != nil {
  201.             fmt.Println("%s", err)
  202.         }
  203.         //fmt.Println("Command Successfully Executed")
  204.         output := string(out[:])
  205.         fmt.Println("                    Working Dir : ",output)
  206.     }
  207. }
  208.  
  209.  
  210. func main() {
  211.     clear()
  212.     urltest()
  213.     check()
  214.     Command()
  215.     secondtest()
  216.     clear()
  217.     banner()
  218.     dir()
  219.     //cmdarg()
  220.     //userin()
  221.     payloads()
  222.  
  223. }
Tags: go
Add Comment
Please, Sign In to add comment