Jump to content

AlfAlfa

Active Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by AlfAlfa

  1. I beg to differ! Sure it probably has more power to push your radio waves out, then to pull far signals to you, (unless you do like barry and also have a yagi at the other end also) however I've had good success with even just a moderate yagi! With just having it at one end, it still is noticeably much much better! For example instead of dropping out all the time, and having a poor connection and with even having to place the adapter in just the perfect spot hanging off the ceiling or mounted to the wall with the factory 5dbm antenna pointed in just the right way. You can have a good/great connection with a single yagi pointed in the right direction and rarely drop out! Thank you Mr. Yagi and Mr. Uda!! lol
  2. Yes try what barry says it's good advice and yes those vmware adapters most likely aren't related at all to the problem (since yes vmware does install those and it needs them to bridge your internet access to virtual machines) Otherwise since you don't have a valid IP address maybe something weird is going on with DHCP... Try manually giving yourself a valid IP address and specifying the correct gateway (your routers IP) netmask 255.255.255.0 and DNS set to the same IP as the gateway (or the dns you prefer) That looks like windows 10, but in the versions of Windows I've used, sometimes for some strange reasons dhcp wouldn't work and give me a valid ip... In those cases not always but often times if you manually configure the IP address it will work. Try that and if it works, then unset the manual IP and see if you get a dhcp assigned IP address. (I'm not saying there's anything really wrong with dhcp on your router, but on the windows end something could be screwing up) If you've never done it before it's easy (you'll have to find how to get there in win10 though but should be pretty straightforward to find): http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/ This simple technique has saved me many times with both ethernet and wifi connections! When it wont give me a valid IP, I tell it which one I want to use :) (just make sure no other devices are using the IP you choose, I like using a high number that I know I'll never have that many devices connected, like 10.0.0.99 or 192.168.1.99 (depending on your gateway ip) P.S. those auto windows "fixes" are worthless they've never once fixed anything it's a pretend lets look like we know how to fix this and always just say fail when we inevitablely fail to even diagnose the issue let alone fix it! lol :D Well actually it worked for me ONCE when also just disabling and re-enabling the adapter would've also fixed it, since that's all it really did! ha
  3. Not so fast! I decided to set up my own hosted AP to show you how it's done! (and I've been meaning to get this going anyway) I figured it out, and made my own guide, try this one it'll work this time :) Hint: use hostapd not airbase Your main problem is your config file(s) with incorrect input, or placed in the wrong place... Follow along with this closely and get it right, substituting your proper interface, etc, where it needs to go. Prerequisites: apt-get install hostapd udhcpd udhcpc hostapd - which will use your desired and compatible interface to enable "master" mode/AP mode udhcpd will be your dhcp server daemon (for giving ips to devices connecting to your AP) udhcpc will be your dhcp client (for getting an ip address from your internet connected interface) Instructions: After installing the required daemons and dhcp client, first lets create your hostapd config file... These commands should be run as root I'm using wlan0 as my access point and using wlan1 has the internet access with which to share with devices connected to my AP! (on wlan0) :) 1. nano /etc/hostapd/hostapd.conf shift+insert this default config and customize it (change interface, ssid, and wpa_passphrase, leave other options unless you run into issues) interface=wlan0 driver=nl80211 ssid=MySuperAwesomeHomemadeAP hw_mode=g channel=7 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=3 wpa_passphrase=starwars wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP Ok so now you have that saved as /etc/hostapd/hostapd.conf hostapd should work now, but NetworkManager conflicts with it, more specifically wpa_supplicant does. This is because when the network manager is managing your interfaces it automatically keeps your interfaces in managed mode (or whatever mode its using) which will interrupt the process of starting the access point. Let's make sure hostapd works real fast before we continue. You may need to specify the proper driver name for you if yours is different than nl80211 or wext. (I'm already assuming you know your device is capable of AP mode) Do: (to stop the confliciting network manager and wpa_supplicant) systemctl stop NetworkManager systemctl stop wpa_supplicant Then: (start hostapd in the background and -d for more verbose output {in case things don't work out, you can see more of what could've gone wrong}) hostapd -d -B /etc/hostapd/hostapd.conf If you see something like this at the end: "wlan0: interface state UNINITIALIZED->ENABLED wlan0: AP-ENABLED wlan0: Setup of interface done." Now you should see it visible and popup in network scans! If you try to connect though there isn't any DHCP server running to give you one. 2.Now let's get your DHCP server working... nano /etc/dhcp/dhcpd.conf configuration to use 10.0.0.1 as your gateway IP for your AP, which gives IP addresses from 10.0.0.2 - 10.0.0.254 and gives them openDNS directly as their DNS. (let's just make sure it works we can force them to use our own dns server later) :D ddns-update-style none; ignore client-updates; authoritative; subnet 10.0.0.0 netmask 255.255.255.0 { # --- default gateway option routers 10.0.0.1; # --- Netmask option subnet-mask 255.255.255.0; # --- Broadcast Address option broadcast-address 10.0.0.255; # --- Domain name servers, tells the clients which DNS servers to use. option domain-name-servers 10.0.0.1, 208.67.222.222, 208.67.220.220; option time-offset 0; range 10.0.0.2 10.0.0.254; default-lease-time 1209600; max-lease-time 1814400; } With that config saved, running these next two commands should work: ifconfig wlan0 10.0.0.1 netmask 255.255.255.0 dhcpd wlan0 First we make sure we have wlan0 with the same IP we put for default gateway in the dhcpd.conf, then run the dhcp daemon for wlan0. If all went well you should now be able to connect to your access point and automatically get assigned an IP address from our dhcp daemon we launched and will stay running in the background giving out IP addresses as needed. 3. Lets now get our internet sharing interface (wlan1) set up to share it's access with our clients connected to our AP (wlan0) If you remember now, wait a minute, since we had to stop NetworkManager and we can't use it at the same time as hostapd how are we going to connect our wlan1 interface to get internet to share with wlan0 AP clients? Restarting the NetworkManager service won't do us any good, it will screw up your hostapd and just give you internet back on your wlan1.. So what can we do? Answer: We have to connect with wpa/wpa2 and stay connected via the command line in some way. a. manually use wpa_supplicant to authenticate, and udhcpc to get a dynamic IP address. b. configure your internet interface in /etc/network/interfaces and use "ifup wlan1" and let it handle the wpa_supplicant for you. Either way create a /etc/wpa_supplicant/wpa_supplicant.conf with credentials to your access point with internet that your going to share on your hostapd hosted AP... ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="YourInternetConnectedAP" psk="password" } for method a, do: #start wpa_supplicant in background for [interface that has internet] wpa_supplicant -B -i wlan1 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf #obtain an ip address from dhcp server on your network that has internet access udhcpc -i wlan1 #dhclient -i wlan1 #or you could use this one You should now be connected to the internet with one interface, and simultaneously hosting an AP with the other. You still don't get internet with your clients connected to your hosted AP though until-> sysctl -w net.ipv4.ip_forward=1 #replace wlan1 with the interface that has internet iptables --table nat --append POSTROUTING --out-interface wlan1 -j MASQUERADE #replace wlan0 with the interface with your hosted AP iptables --append FORWARD --in-interface wlan0 -j ACCEPT Now you should have internet working everywhere :D Internet on your main machine, with one interface getting internet wirelessly, and a second interface hosting an access point that shares it! For method b, edit /etc/network/interfaces set to something like this # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback iface wlan1 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet static address 192.168.1.99 netmask 255.255.255.0 network 192.168.1.0 gateway 192.168.1.1 I have the IP configured manually, but you could change it to "iface wlan1 inet dhcp" and skip the other lines below it for dhcp instead of manual IP selection. Then instead of the wpa_supplicant and udhcpc/dhclient commands, just do: ifup wlan1 This way it should still connect and maintain your connection similar to what NetworkManager would do, but without using it. Now you have your very own hosted access point that shares internet from another access point! :D My Success In Action: http://webm.land/media/6EAf.webm The two scripts I ended up with to automate launching my custom pineapple (sort of) start-ap.sh #startap.sh #wlan0 will be my hosted access point, and wlan1 is the interface with internet access... systemctl stop NetworkManager systemctl stop wpa_supplicant ifconfig wlan0 up 10.0.0.1 netmask 255.255.255.0 sleep 2 #start dhcp server for [your AP interface] interface dhcpd wlan0 #start hostapd in background with specified config hostapd -d -B /etc/hostapd/hostapd.conf #bring up interface and let wpa_cli handle staying connected... ifdown --force wlan1 ifup wlan1 # edit: /etc/network/interfaces #enable internet forwarding from wlan1 to wlan0 sysctl -w net.ipv4.ip_forward=1 iptables --flush iptables --table nat --flush iptables --delete-chain iptables --table nat --delete-chain iptables --table nat --append POSTROUTING --out-interface wlan1 -j MASQUERADE iptables --append FORWARD --in-interface wlan0 -j ACCEPT stop-ap.sh ifdown --force wlan1 killall dhcpd killall udhcpc killall hostapd killall wpa_supplicant systemctl restart NetworkManager Surely you are able to get it working for you now :) P.S. Hey Cooper I pulled it off using two separate interfaces one for the hosted ap and the second to get internet from. Would it work if instead it was one device virtually separated into two virtual interfaces? Anyway that's how the shared ap works in Windows (called virtual wifi sharing or something like that). Although it doesn't work well and maybe because it's trying to be an AP and a client at the same time with one physical device... This works much better, so even if one device for both would also work on linux I think it's best to have one adapter dedicated to being your AP and the other dedicated to getting that signal!
  4. Just try to screw it on :) Yes this kind of antenna connector might seem weird at first but it's awesome once you realize! EDIT: Actually inspect it closely first and make sure one sticks inward (even though it has the pin) and seems like it'll fit the other one It's SMA and RP-SMA (reverse polarity SMA) it's a form of coaxial for precision connections. When you unscrew the default antenna, doesn't it look like the same connector as your new yagi? I have the Alfa NHA and it connects to my RP-SMA yagi just fine :D
  5. Change log: [v1.1] *Added .pixie files that are saved with the latest reaver's -H option as an acceptable input file with -i (ex. -i /path/to/bssid.pixie) They are treated differently than text files containing pixie data to be parsed, as they are simply set to be executable and then executed since the command is already built at the end of files in the .pixie format and in executable form. *Added -pd / --pixie-dir option which allows you to scan through a directory and all subdirectories within it for .pixie files to execute and/or text files containing pixie data to parse. This expands on the usefulness of the application by making it easier to get pixie data into it! *Added -pe / --pixie-exts option that lets you filter the files which the -pd option will even look at by extension. So for example if you have only .pixie files and .txt files containing pixie data you can prevent it from opening up just any file *.* (which is the default with --pixie-dir option) *Fix: Small Diffie Hellman doesn't have to be specified and shouldn't unless you know all your files containing pixie data all use small diffie hellman, it is determined that if pkr isn't set up to the point where it's about to execute, it assumes small diffie hellman. *Reorganized and cleaned up the code a bit Thanks to ephemient from stackoverflow for the clean and concise directory searching code. root@kali:~/codeblocks/quickpixie# ./quickpixie -h quickpixie 1.1 ~ AlfAlfa quickpixie extracts arguments for pixiewps from text copied to the clipboard which was output from reaver. It then uses those arguments to build the command to execute as well as executing it automatically... Now supports executing .pixie files and recursive directory searching for pixie data / .pixie files -i [file/-] or --input [file/-] uses a file/stdin for pixiewps command generation instead of the clipboard. -pd or --pixie-dir [pixie data files directory] will execute all .pixie files / build pixie commands in dir and sub dirs. -pe or --pixie-exts [ext1 ext2 ext3 etc] limits checking files for pixie data / executing .pixie files by extension -S is for small diffie hellman (PKR not needed) -b or --e-bssid is for passing a bssid to pixiewps if needed -f or --force is for --force -j or --just-display only prints the command(s) without executing -v is for most verbose output (-v 3) usage: quickpixie -f (pass --force to pixiewps) quickpixie -j (just display the generated command(s) but don't execute) quickpixie -v -b 11:22:33:44:55:66 -i data-for-pixie.txt (pass most verbose and bssid to pixiewps and use input from file) quickpixie -i pixiefile.pixie (execute a pixie file created from latest version of reaver with -H option) quickpixie -pd ~/reaverwork/pixiefiles (in specified dir and sub dirs, execute all .pixie files and read every single file for pixie data) quickpixie -pd /root/pixiedata -pe pixie txt (in specified dir and sub dirs, execute all .pixie files and only read .txt files for pixie data) pixie-data-piping-app -o | quickpixie -i - (pipe data from somewhere to be processed as input by quickpixie) In action with main mode (uses clipboard): http://webmshare.com/nrGXa Usually we use reaver with the -K 1 switch so reaver automatically does the pixie attack for us. However sometimes you might be running pixiewps manually and if you have done so, you know it's kind of a pain to build up the command copying and pasting the pke, pkr, ehash1, ehash2, and authkey one by one... So I created quickpixie to get around that! If you copy the whole block all the way from at least the PKE field to the E-Hash2 field you'll have the minimum required to run pixiewps. Then just run pixiewps and it builds and runs the command for you! :) I recommend also including the enonce as well even though it's optional as it can help and now it's no more trouble to do so(just start copying from enonce instead of pke). If there are multiple concatenations of usable pixiewps data, it also handles as many as you can throw at it. When using an input file "-i" instead, it ignores the clipboard and uses pixie data from that file to generate and execute pixiewps commands. You can also specify to use stdin instead of a regular file so you can pipe the output of another application and use it as input to generate pixiewps command lines from :D similar to: (piping words from crunch to aircrack) crunch 8 8 0123456789 | aircrack-ng MY-AP*.cap -w - You can: (round about way of doing "quickpixie -i multi-pixie.txt" cat multi-pixie.txt | quickpixie -i - and: (round about way of doing almost the same as just "quickpixie" with no arguments) xclip -selection clipboard -o | quickpixie -i - The best thing you could do with that is if you had a cool application that outputs data needed for pixie attacks maybe from your pixie attack cluster and you feed that into quickpixie for batch processing automated pixie attacking ;) Prerequisites: (* == comes with kali) pixiewps * xclip* (for standard mode which reads from the clipboard) g++ * (to compile it) Install: 1. download and move "quickpixie.cpp" to somewhere 2. cd to that location 3. g++ -std=c++0x -o quickpixie quickpixie.cpp (optional 4: cp quickpixie /usr/bin/quickpixie {recommended so you can execute it from anywhere}) Now from that directory execute it: ./quickpixie (or just quickpixie if you copied it to /usr/bin) Output of quickpixie with no arguments when example below was on the clipboard! Was on clipboard: PKE: 20:2a:5f:30:66:da:4d:25:9a:f3:72:09:b4:94:25:6a:5b:bc:87:49:27:64:ee:2f:c9:ad:b7:d6:33:7c:5c:b3:61:9d:7d:57:2a:9c:43:16:70:aa:0f:5e:71:20:da:f1:07:db:7e:71:db:3c:1e:32:2a:44:f9:f5:56:5d:ed:70:03:3c:e5:2d:59:34:ab:8b:36:1d:cc:cb:4c:87:bd:12:61:43:a3:05:c9:b4:79:8c:42:9e:12:6a:04:33:58:68:28:21:fd:2d:b0:b0:d0:cf:ab:23:f6:be:65:f7:6f:69:32:f3:4a:24:10:c9:72:48:9e:38:fa:1d:36:3b:65:95:73:93:c4:af:8f:86:04:77:3c:d8:ba:3a:c7:00:fc:a8:a1:c3:c7:74:aa:8b:ff:1d:f6:fd:6b:e1:a0:3d:0d:bf:82:49:3b:e1:a7:7b:f8:b3:95:9c:b0:bf:5d:99:e5:7e:80:6c:ee:4c:cb:46:f9:49:69:3e:35:c8:03:05:cf:6a [P] WPS Manufacturer: Ralink Technology, Corp. [P] WPS Model Name: Ralink Wireless Access Point [P] WPS Model Number: RTXXXX [P] Access Point Serial Number: XXXXXXXX [+] Received M1 message [P] R-Nonce: 00:bd:d0:7c:6e:74:47:4d:b4:e9:ba:56:20:03:62:d1 [P] PKR: 11:97:bc:f9:42:c0:ce:4b:07:09:1e:12:50:0b:bb:e1:8e:7d:0f:ef:98:a8:f9:95:a8:de:e3:7d:a9:e8:2d:2a:07:06:b7:2b:f3:17:2a:b9:f6:70:24:f4:89:9f:be:51:b7:df:90:d8:23:40:bd:36:8d:ef:1c:cd:ac:6a:1a:98:b4:fa:1c:d6:b0:39:e1:09:dd:18:e5:ea:6d:b3:d9:0c:92:f3:10:39:4f:60:36:ea:07:1d:4e:a0:74:2c:6d:d6:6b:6f:f5:41:2c:bb:a1:9f:95:00:cd:1b:b0:61:00:7b:47:03:37:15:6d:fb:43:a8:5d:60:6e:65:b2:10:e5:d8:d8:14:58:48:c4:4e:74:15:5d:ab:68:37:68:04:dc:fc:5b:3a:bd:dc:00:8a:59:ae:53:c0:98:75:06:0f:ed:80:5e:7d:b3:39:dd:12:ea:36:c2:52:47:46:c5:8b:59:ee:f2:90:e4:77:45:c7:dd:19:fa:3e:cd:90:50:f0:55:57 [P] AuthKey: 4b:d8:3f:55:aa:15:0a:33:e6:3a:03:b7:c8:c0:6e:51:dc:e6:50:98:33:d6:4c:63:5f:c8:5f:bf:ca:1c:a2:de [+] Sending M2 message [+] Received M1 message [+] Received M1 message [+] Received M1 message [+] Received M1 message [+] Received M1 message [+] Received M1 message [+] Received M1 message [+] Received M1 message [+] Received M1 message [P] E-Hash1: 6b:2c:c1:b4:78:da:a4:e9:78:8c:96:8d:b0:85:68:51:ad:4c:43:84:9f:77:38:20:7a:5c:51:7d:94:d8:a9:69 [P] E-Hash2: 2e:db:1d:8f:f8:a6:34:5f:70:2c:33:c2:7e:28:17:45:65:5c:85:6c:17:d4:c5:fc:f7:9d:e8:98:89:b1:4c:33 quickpixie.cpp /* 12.24.2015 ~ AlfAlfa | quickpixie 1.1 Updated: 02.06.2016 */ #include <sys/stat.h> #include <ftw.h> #include <fnmatch.h> #include <string.h> #include <iostream> #include <memory> #include <vector> std::string enonce, rnonce, pke, pkr, authkey, ehash1, ehash2, optional_arguments, input_file, pixieDir; std::vector<std::string> pixieExts; bool just_display = false, small_diffie_hellman = false, most_verbose = false, piped_input = false, using_clipboard = true, using_pixie_dir = false; size_t pixiecount = 0; class ProcessExecutor { private: static std::unique_ptr<ProcessExecutor> mainInstance; public: FILE *file; std::string output; char buffer[4096]; ProcessExecutor() { memset(buffer, 0, sizeof(buffer)); } static std::unique_ptr<ProcessExecutor> make() { return std::unique_ptr<ProcessExecutor>(new ProcessExecutor()); } static ProcessExecutor *get() { if(!mainInstance.get()) mainInstance = make(); return mainInstance.get(); } int run(const char *cmd, bool printout = false) { file = popen(cmd,"r"); if(!file) return 1; output.clear(); while(fgets(buffer, sizeof(buffer), file) != 0) { output += buffer; if(printout) std::cout << buffer; } if(printout) std::cout << "\n"; pclose(file); return 0; } }; std::unique_ptr<ProcessExecutor> ProcessExecutor::mainInstance; class KeyValueGrabber { private: std::string *keysandvalues; public: size_t currentPosition, wouldBeNextPos, lastKeyPos; KeyValueGrabber() { currentPosition = 0; } std::string valueForKey(const char *key) { if(key != 0 && keysandvalues->length() > 0) { size_t valueStartPos = lastKeyPos = keysandvalues->find(key, currentPosition); if(valueStartPos != std::string::npos) { valueStartPos += strlen(key); size_t valueEndPos = keysandvalues->find("\n",valueStartPos); if(valueEndPos == std::string::npos) valueEndPos = keysandvalues->length(); wouldBeNextPos = valueEndPos + 1; return keysandvalues->substr(valueStartPos, (valueEndPos - valueStartPos)); } } return std::string(""); } size_t movePosition(size_t newPos = 0) { if(newPos == 0) currentPosition = wouldBeNextPos; else currentPosition = newPos; return lastKeyPos; } void resetPosition() { currentPosition = 0; } void set(std::string *p) { keysandvalues = p; } }; class QuickPixie { public: static void buildAndExecute() { std::string pixiecommand = "pixiewps -e " + pke; if(!pkr.empty()) pixiecommand += " -r " + pkr; pixiecommand += " -s " + ehash1 + " -z " + ehash2 + " -a " + authkey; if(!enonce.empty()) pixiecommand += " -n " + enonce; if(!rnonce.empty()) pixiecommand += " -m " + rnonce; if(!optional_arguments.empty()) pixiecommand += optional_arguments; //If small diffie hellman isn't set for every command, but pkr is still empty at this point, just assume small diffie hellman... if(!small_diffie_hellman && pkr.empty()) pixiecommand += " -S"; std::cout << "{" << ++pixiecount << "}\n" << pixiecommand << "\n\n"; if(!just_display) { auto pixiewps = ProcessExecutor::make(); pixiewps->run(pixiecommand.c_str(), true); } } static void executePixieFile(std::string pixieFilePath) { if(most_verbose) std::cout << "Executing pixie file: " << pixieFilePath << "\n"; chmod(pixieFilePath.c_str(), S_IRWXU); //set executable for owner //then execute it! if(pixieFilePath.find('/') == std::string::npos) ProcessExecutor::make()->run(("./" + pixieFilePath).c_str(), true); else ProcessExecutor::make()->run(pixieFilePath.c_str(), true); } static int parseTextFile(std::string pixieTextFilePath) { FILE *pixieTextFile = fopen(pixieTextFilePath.c_str(), "r"); if(!pixieTextFile) { std::cout << "ERROR: Could not open input file \"" << pixieTextFilePath << "\"\n"; return 1; } if(most_verbose) std::cout << "Parsing file for pixie data: " << pixieTextFilePath << "\n"; return parseTextFile(pixieTextFile); } static int parseTextFile(FILE *pixieTextFile) { if(!pixieTextFile) { std::cout << "ERROR: No file passed in to parseTextFile member function"; return 1; } std::unique_ptr<KeyValueGrabber> kv(new KeyValueGrabber()); auto exec = ProcessExecutor::get(); std::string currentLine; kv->set(&currentLine); while(fgets(exec->buffer, sizeof(exec->buffer), pixieTextFile) != 0) { currentLine = exec->buffer; std::string enonce = kv->valueForKey("E-Nonce: "); std::string pke = kv->valueForKey("PKE: "); std::string rnonce = kv->valueForKey("R-Nonce: "); std::string pkr = kv->valueForKey("PKR: "); std::string authkey = kv->valueForKey("AuthKey: "); std::string ehash1 = kv->valueForKey("E-Hash1: "); std::string ehash2 = kv->valueForKey("E-Hash2: "); if(!enonce.empty()) ::enonce = enonce; else if(!pke.empty()) ::pke = pke; else if(!rnonce.empty()) ::rnonce = rnonce; else if(!pkr.empty()) ::pkr = pkr; else if(!authkey.empty()) ::authkey = authkey; else if(!ehash1.empty()) ::ehash1 = ehash1; else if(!ehash2.empty()) ::ehash2 = ehash2; if(!(::pke.empty() || ::authkey.empty() || ::ehash1.empty() || ::ehash2.empty())) { buildAndExecute(); clear(); } } fclose(pixieTextFile); return 0; } static void parseClipboard() { if(most_verbose) std::cout << "Parsing pixie data from clipboard\n"; std::unique_ptr<KeyValueGrabber> kv(new KeyValueGrabber()); auto exec = ProcessExecutor::get(); exec->run("xclip -selection clipboard -o"); if(most_verbose) std::cout << exec->output << "\n\n"; kv->set(&exec->output); size_t pos = 0; while(pos != std::string::npos) { //optional arguments enonce = kv->valueForKey("E-Nonce: "); rnonce = kv->valueForKey("R-Nonce: "); //required arguments pke = kv->valueForKey("PKE: "); pkr = kv->valueForKey("PKR: "); authkey = kv->valueForKey("AuthKey: "); ehash1 = kv->valueForKey("E-Hash1: "); ehash2 = kv->valueForKey("E-Hash2: "); pos = kv->movePosition(); if(pos == std::string::npos) break; if(pke.empty() || authkey.empty() || ehash1.empty() || ehash2.empty()) { std::cout << "ERROR: Your copied to clipboard input for pixiewps is missing a required argument...\n"; std::cout << "PKE, PKR, E-Hash1, E-Hash2, and AuthKey are all required arguments.(except PKR when -S is used)\n"; std::cout << "You have:\n" << "PKE: " << pke << "\n" << "PKR: " << pkr << "\n" << "E-Hash1: " << ehash1 << "\n" << "E-Hash2: " << ehash2 << "\n" << "AuthKey: " << authkey << "\n"; continue; } buildAndExecute(); clear(); } } static std::string extensionOf(std::string filePath) { if(!filePath.empty()) { size_t ePos = filePath.rfind('.'); if(ePos != std::string::npos) { ePos++; return filePath.substr(ePos, filePath.length() - ePos); } } return std::string(""); } static void clear() { pke.clear(); pkr.clear(); authkey.clear(); ehash1.clear(); ehash2.clear(); enonce.clear(); rnonce.clear(); } }; //Thanks to ephemient from stackoverflow for this static int directorySearchCallback(const char *fpath, const struct stat *sb, int typeflag) { /* if it's a file */ if(typeflag == FTW_F) { /* for each filter, */ for(size_t i = 0; i < pixieExts.size(); i++) { /* if the filename matches the filter, */ if(fnmatch(pixieExts[i].c_str(), fpath, FNM_CASEFOLD) == 0) { if(QuickPixie::extensionOf(fpath) == "pixie") QuickPixie::executePixieFile(fpath); else QuickPixie::parseTextFile(fpath); break; } } } /* tell ftw to continue */ return 0; } int main(int argcount, char *args[]) { std::cout << "quickpixie 1.1 ~ AlfAlfa\n\n"; for(int i = 0; i < argcount; i++) { if(strcmp(args[i], "-j") == 0 || strcmp(args[i], "--just-display") == 0) just_display = true; else if(strcmp(args[i], "-f") == 0 || strcmp(args[i], "--force") == 0) optional_arguments += " --force"; else if(strcmp(args[i], "-S") == 0) { optional_arguments += " -S"; small_diffie_hellman = true; } else if(strcmp(args[i], "-v") == 0) { optional_arguments += " -v 3"; most_verbose = true; } else if(strcmp(args[i], "-b") == 0 || strcmp(args[i], "--e-bssid") == 0) { if(i == (argcount - 1)) break; optional_arguments += " -b "; optional_arguments += args[i+1]; } else if(strcmp(args[i], "-i") == 0 || strcmp(args[i], "--input") == 0) { if(i == (argcount - 1)) break; input_file = args[i+1]; if(input_file == "-") piped_input = true; using_clipboard = false; } else if(strcmp(args[i], "-pd") == 0 || strcmp(args[i], "--pixie-dir") == 0) { if(i == (argcount - 1)) break; pixieDir = args[i+1]; using_pixie_dir = true; } else if(strcmp(args[i], "-pe") == 0 || strcmp(args[i], "--pixie-exts") == 0) { if(i == (argcount - 1)) break; int z = i; while(*args[++z] != '-') { pixieExts.push_back(std::string("*.") + args[z]); if(z == (argcount - 1)) break; } } else if(strcmp(args[i], "-h") == 0 || strcmp(args[i], "--help") == 0) { std::cout << "quickpixie extracts arguments for pixiewps from text copied to the clipboard which was output from reaver.\n"; std::cout << "It then uses those arguments to build the command to execute as well as executing it automatically...\n"; std::cout << "Now supports executing .pixie files and recursive directory searching for pixie data / .pixie files\n"; std::cout << "-i [file/-] or --input [file/-] uses a file/stdin for pixiewps command generation instead of the clipboard.\n"; std::cout << "-pd or --pixie-dir [pixie data files directory] will execute all .pixie files / build pixie commands in dir and sub dirs.\n"; std::cout << "-pe or --pixie-exts [ext1 ext2 ext3 etc] limits checking files for pixie data / executing .pixie files by extension\n"; std::cout << "-S is for small diffie hellman (PKR not needed)\n"; std::cout << "-b or --e-bssid is for passing a bssid to pixiewps if needed\n"; std::cout << "-f or --force is for --force\n"; std::cout << "-j or --just-display only prints the command(s) without executing\n"; std::cout << "-v is for most verbose output (-v 3)\n"; std::cout << "usage:\nquickpixie -f (pass --force to pixiewps)\n"; std::cout << "quickpixie -j (just display the generated command(s) but don't execute)\n"; std::cout << "quickpixie -v -b 11:22:33:44:55:66 -i data-for-pixie.txt (pass most verbose and bssid to pixiewps and use input from file)\n"; std::cout << "quickpixie -i pixiefile.pixie (execute a pixie file created from latest version of reaver with -H option)\n"; std::cout << "quickpixie -pd ~/reaverwork/pixiefiles (in specified dir and sub dirs, execute all .pixie files and read every single file for pixie data)\n"; std::cout << "quickpixie -pd /root/pixiedata -pe pixie txt (in specified dir and sub dirs, execute all .pixie files and only read .txt files for pixie data)\n"; std::cout << "pixie-data-piping-app -o | quickpixie -i - (pipe data from somewhere to be processed as input by quickpixie)\n"; return 2; } } if(using_pixie_dir) { if(pixieExts.empty()) pixieExts.push_back("*.*"); if(most_verbose) { std::cout << "Filtering by extensions: {"; for(size_t i = 0; i < pixieExts.size(); i++) { std::cout << " " << pixieExts[i]; if(i != (pixieExts.size() - 1)) std::cout << ","; } std::cout << " }\n"; } ftw(pixieDir.c_str(), directorySearchCallback, 16); } else if(using_clipboard) QuickPixie::parseClipboard(); else { FILE *file = stdin; if(!piped_input) { file = fopen(input_file.c_str(),"r"); if(!file) { std::cout << "ERROR: Could not open input file \"" << input_file << "\"\n"; return 1; } fclose(file); if(QuickPixie::extensionOf(input_file) == "pixie") { QuickPixie::executePixieFile(input_file); return 0; } } QuickPixie::parseTextFile(file); } return 0; } Hope this is useful to you, happy holidays! :)
  6. Thanks for the tip Cooper! I've applied it to the previous post, and the latest best post is visible without expanding anything. :) That's cool, whenever you do though, maybe the text isn't on the clipboard as a text format. Perhaps it's encoded or encrypted and stored on the clipboard in a data format or custom format! Did you think of that? I haven't however found a way to determine the clipboard size of any available clipboard format though. I think you just have to know how to read whatever format you need... So maybe the next thing would be to actually get the data from all available formats and read the first 10 bytes or something like that and see if anything looks familiar or if it looks encrypted :)
  7. In an effort to not turn this thread into walls of code (lol) I have edited my third post with my third update... With a new method, hopefully the CTRL+V plus getwindowtext will work for us :D P.S. I added a "SetDebugPrivileges()" function since you mentioned XP... Since it might help for XP... I remember having to use that to get full administrator access within your application on XP (even though you are always running as administrator it was just an extra step on XP, on later systems it didn't seem to matter much though and instead you needed administrator access in cases where SetDebugPrivileges with SE_DEBUG_NAME privilege would work on XP) I mean this is just the clipboard here, it shouldn't be this tricky just to grab whats on it! :)
  8. Yeee Heee WOoOT! :) Now this will be, a pineapple for me!! Just tell the FCC to let me be me on HAK5 TV and we're all good :D lol okay okay calm down... I seriously think I'll get one though! I've basically been pineappling anyway just without a dedicated device for it, just using a compatible wifi device and good tools (even if custom)... So now I'd have one just to have one :D P.S. AR9271 for the win :P
  9. Well actually I meant to make it "std::unique_ptr<wchar_t[]>" that way you can index an individual character if you wanted: clipboardContents... Yes you don't have to though, but I like using them that way you just keep it in scope for as long as you want it to live and it frees itself when it goes out of scope or you re-assign it or reset it! C++ does like the smarter way to garbage collect, it's not garbage collection though, it's still manual memory management but in a smart way! EDIT: To be more clear the line constructs both a std::unique_ptr object and it's constructor gets passed the construction of your actual object or array of objects you want the unique pointer to point to... shared pointer used if you need multiple references to the same object lol remember: char *rawCharacters = (char*)malloc(1024); memset(rawCharacters, 0, 1024); //... free(rawCharacters); :) EDIT: dustbyter another update... You went to a console application so I went to a GUI application for a couple reasons: To test whether adding a window handle of a window we own to the OpenClipboard call would help, and because I came up with a new idea... I got the idea from usb devices that also function as keyboards often used for exploitation. If we're having trouble with the APIs to grab the clipboard, maybe lets just simulate a CTRL+V keypress and capture whatever gets pasted in a window we create, then grab the text from there! It's worth a try, and it is an alternative method :) I've divided this one up into 3 tests ran on 3 separate threads, but it waits for each test to complete before running the next one. 1st: send CTRL+V via SendInput after waiting for the application to open and have focus on the edit control, then use GetWindowTextW to grab the text from it as unicode 2nd: IsClipboardFormatAvailable called on all three text formats CF_UNICODETEXT, CF_TEXT, and CF_OEMTEXT (because of synthesized clipboard formats, this shouldn't be necessary since as long as any text format is available it will convert to your desired text format which is unicode in this case) 3rd: EnumClipboardFormats to show you ALL of the available formats and display the unicode text format contents if they are available Finally in your last post you said it failed with the error described in your first post, but that was only using IsClipboardFormatAvailable, what is your results for the enumeration of formats test (test 3) ? If it's failing saying unicode text isn't available that shouldn't be the case as long as any text is available since I learned that it will automatically convert between the text formats to the one you want when you call GetClipboardData(format); And if it's failing there, that means it didn't fail on the OpenClipboard call right? So we do, have access to the clipboard, it's just what is actually on it... Maybe there really isn't text on the clipboard and it's another format... That's why I wanted to see the results of the enumeration rather than just checking one particular format individually! Let me know if the control + v paste and grab text method works... It closes the window after the third test finishes so you won't leave it running if your testing this on a remote machine :D #include <Windows.h> #include <stdio.h> #include <memory> #include <thread> #define ID_EDITCHILD 200 LRESULT WINAPI WindowProcedure(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam); int SetDebugPrivileges(); void PrintLastError (const char *msg); class AppData { private: static std::unique_ptr<AppData> data; public: HINSTANCE hInst; HWND hWnd, editWnd; wchar_t clipboardText[2048]; char debugText[1024]; AppData() { hInst = 0; hWnd = 0; editWnd = 0; memset(clipboardText, 0, 4096); } static AppData* get() { if(!data.get()) data = std::unique_ptr<AppData>(new AppData()); return data.get(); } }; std::unique_ptr<AppData> AppData::data; AppData *d = AppData::get(); class Clipboarder { public: static std::unique_ptr<wchar_t[]> contents; static std::thread spawnTest1() { return std::thread( [=] { NEWControlVGetText_test1(); } ); } static std::thread spawnTest2() { return std::thread( [=] { isTextOfAnyKindAvailable_test2(); } ); } static std::thread spawnTest3() { return std::thread( [=] { enumerateAllFormatsWhatFormatsAreAvailable_test3(); } ); } static void NEWControlVGetText_test1() { INPUT ip[2]; OutputDebugStringW(L"\r\nTest1... Hit Control+V, wait a couple seconds, then grab the text from the edit control window :)"); memset(&ip[0], 0, sizeof(INPUT)*2); // Pause for 3 seconds. Sleep(3000); SetForegroundWindow(AppData::get()->hWnd); SetForegroundWindow(AppData::get()->editWnd); SetFocus(AppData::get()->editWnd); // Set up a generic keyboard event. ip[0].type = ip[1].type = INPUT_KEYBOARD; // Press the "CTRL" key ip[0].ki.wVk = VK_LCONTROL; // virtual-key code for the left control key // Press the "V" key ip[1].ki.wVk = 'V'; // virtual-key code for the "v" key SendInput(2, &ip[0], sizeof(INPUT)); // Release both keys ip[0].ki.dwFlags = ip[1].ki.dwFlags = KEYEVENTF_KEYUP; // KEYEVENTF_KEYUP for key release SendInput(2, &ip[0], sizeof(INPUT)); // Pause for another 2 seconds. Sleep(2000); //Then grab pasted text (if it pasted successfully to our edit control within our window) GetWindowTextW(AppData::get()->editWnd, AppData::get()->clipboardText, 2048); OutputDebugStringW(L"Control+V Paste And GetWindowText Clipboard Contents:"); contents = makeWideString(AppData::get()->clipboardText); OutputDebugStringW(contents.get()); std::thread test2 = spawnTest2(); test2.join(); std::thread test3 = spawnTest3(); test3.join(); SendMessageW(AppData::get()->hWnd, WM_CLOSE, 0, 0); //close the application after our 3 tests complete... } static void isTextOfAnyKindAvailable_test2() { HANDLE hToken; wchar_t *wGlobal; OutputDebugStringW(L"\r\nTest2... Use IsClipboardFormatAvailable to check if text of any kind is available..."); if(IsClipboardFormatAvailable(CF_UNICODETEXT) || IsClipboardFormatAvailable(CF_TEXT) || IsClipboardFormatAvailable(CF_OEMTEXT)) { //If any one of the three is available, then all should be available as GetClipboardData will convert between the text types for you as long as one is available... OutputDebugStringW(L"CF_UNICODETEXT and CF_TEXT and CF_OEMTEXT should all be available..."); if(!OpenClipboard(AppData::get()->hWnd)) { PrintLastError("Error-Cannot Open Clipboard"); return; } hToken = GetClipboardData(CF_UNICODETEXT); if(!hToken) { PrintLastError("Error-no hToken"); return; } wGlobal = (wchar_t*)GlobalLock(hToken); contents = makeWideString(wGlobal); OutputDebugStringW(L"Clipboard Contents From Test2:\r\n"); OutputDebugStringW(contents.get()); GlobalUnlock(hToken); CloseClipboard(); } else { PrintLastError("Niether CF_UNICODETEXT nor CF_TEXT nor CF_OEMTEXT are present... (according to IsClipboardFormatAvailable())"); } } static void enumerateAllFormatsWhatFormatsAreAvailable_test3() { HANDLE hToken; wchar_t *wGlobal; OutputDebugStringW(L"\r\nTest3... Enumerate all available formats, show them, and grab unicode text successfully as long as any kind of text is available..."); AppData *d = AppData::get(); if(OpenClipboard(d->hWnd)) { OutputDebugStringW(L"Getting Available Clipboard Formats...\r\n"); int numFormats = CountClipboardFormats(); sprintf_s(d->debugText,"Number of available clipboard formats: %u\r\n",numFormats); OutputDebugStringA(d->debugText); UINT format = EnumClipboardFormats(0); UINT i = 0; while(format != 0) { if(format == CF_OEMTEXT) sprintf_s(d->debugText,"#%u available format: %u (CF_OEMTEXT)\r\n",++i,format); else if(format == CF_TEXT) sprintf_s(d->debugText,"#%u available format: %u (CF_TEXT)\r\n",++i,format); else if(format == CF_UNICODETEXT) sprintf_s(d->debugText,"#%u available format: %u (CF_UNICODETEXT)\r\n",++i,format); else if(format == CF_BITMAP) sprintf_s(d->debugText,"#%u available format: %u (CF_BITMAP)\r\n",++i,format); else if(format == CF_OWNERDISPLAY) sprintf_s(d->debugText,"#%u available format: %u (CF_OWNERDISPLAY)\r\n",++i,format); else if(format == CF_WAVE) sprintf_s(d->debugText,"#%u available format: %u (CF_WAVE)\r\n",++i,format); else sprintf_s(d->debugText,"#%u available format: %u\r\n",++i,format); OutputDebugStringA(d->debugText); //No need to check for the other two here, EnumClipboardFormats will have unicode as an available format if CF_TEXT or CF_OEMTEXT is available. if(format == CF_UNICODETEXT) { hToken = GetClipboardData(format); if(!hToken) { OutputDebugStringW(L"Error-no hToken"); continue; } wGlobal = (wchar_t*)GlobalLock(hToken); //output contents if unicode is an available format returned from EnumClipboardFormats! (it should be as long as any kind of text is available...) contents = makeWideString(wGlobal); OutputDebugStringW(L"Clipboard Contents From Test3:\r\n"); OutputDebugStringW(contents.get()); GlobalUnlock(hToken); } format = EnumClipboardFormats(format); } CloseClipboard(); } } static std::unique_ptr<wchar_t[]> makeWideString(wchar_t *fromWideString) { int stringLength = wcslen(fromWideString) + 1; //(null terminator) std::unique_ptr<wchar_t[]> madeWideString(new wchar_t[stringLength]); memcpy(madeWideString.get(),fromWideString,stringLength*sizeof(wchar_t)); return std::move(madeWideString); } }; std::unique_ptr<wchar_t[]> Clipboarder::contents; int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd) { MSG messages; WNDCLASSEXA wcx; LPCSTR szClassName = "ClipboarderClass", szWindowName = "Clipboarder-ng"; d->hInst = hInstance; wcx.hInstance = d->hInst; wcx.lpszClassName = szClassName; wcx.lpfnWndProc = WindowProcedure; wcx.style = CS_HREDRAW|CS_VREDRAW; wcx.cbSize = sizeof(WNDCLASSEXW); wcx.hIcon = LoadIcon(0, IDI_APPLICATION); wcx.hIconSm = LoadIcon(0, IDI_APPLICATION); wcx.hCursor = LoadCursor(0, IDC_ARROW); wcx.lpszMenuName = 0; wcx.cbClsExtra = 0; wcx.cbWndExtra = 0; wcx.hbrBackground = (HBRUSH)COLOR_BTNFACE; if(!RegisterClassExA(&wcx)) return 0; SetDebugPrivileges(); //might help on XP systems... d->hWnd = CreateWindowA(szClassName,szWindowName,WS_SYSMENU | WS_THICKFRAME,CW_USEDEFAULT,CW_USEDEFAULT,600,420,HWND_DESKTOP,0,d->hInst,0); d->editWnd = CreateWindowExW(0,L"EDIT", 0, // no window title WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL, 0, 0, 0, 0, // set size in WM_SIZE message d->hWnd, // parent window (HMENU) ID_EDITCHILD, // edit control ID (HINSTANCE) GetWindowLong(d->hWnd, GWL_HINSTANCE), 0); // pointer not needed UpdateWindow(d->hWnd); ShowWindow(d->hWnd, nShowCmd); std::thread test1 = Clipboarder::spawnTest1(); //test1 also spawns tests 2 and 3... while(GetMessage(&messages,0,0,0)) { TranslateMessage(&messages); DispatchMessage(&messages); } test1.join(); //join up with all three tests before exiting... return messages.wParam; } LRESULT WINAPI WindowProcedure(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam) { switch(message) { case WM_PAINT: ValidateRect(hwnd,FALSE); return TRUE; case WM_SIZE: // Make the edit control the size of the window's client area. MoveWindow(d->editWnd, 0, 0, // starting x- and y-coordinates LOWORD(lParam), // width of client area HIWORD(lParam), // height of client area TRUE); // repaint window return 0; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hwnd,message,wParam,lParam); } return 0; } int SetDebugPrivileges() { TOKEN_PRIVILEGES priv = {0}; HANDLE hToken = NULL; if( OpenProcessToken( GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken ) ) { priv.PrivilegeCount = 1; priv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; if( LookupPrivilegeValue( NULL, SE_DEBUG_NAME, &priv.Privileges[0].Luid ) ) { if(AdjustTokenPrivileges( hToken, FALSE, &priv, 0, NULL, NULL ) == 0) { sprintf_s(AppData::get()->debugText,"AdjustTokenPrivilege Error! [%u]\n",GetLastError()); OutputDebugStringA(AppData::get()->debugText); } else OutputDebugStringW(L"Debug Privileges Set Successfully!"); } CloseHandle( hToken ); } return GetLastError(); } void PrintLastError (const char *msg) { DWORD errCode = GetLastError(); char *err; if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, errCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // default language (LPTSTR) &err, 0, NULL)) return; static char buffer[1024]; //sprintf(buffer,"%s: %X %s\n", msg, errCode, err); sprintf_s(buffer,"%s: %X %s\n", msg, errCode, err); OutputDebugStringA(buffer); LocalFree(err); } My results of running this application with all three tests: (after copying text from within Microsoft Visual C++ IDE)
  10. Okay dustbyter I threw your code into visual studio with a blank project and added an int main()... The clipboard grabbing code itself seems right, but if you only want unicode to be able to be copied just have it like, you don't need the 'or CF_TEXT' part: // if we don't find any text of UNICODE format, then we can't copy it if(IsClipboardFormatAvailable(CF_UNICODETEXT)) { Now I was unable to reproduce your problem though, either with debugging or running it straight up and as a release build... But I think it's probably because there isn't much going on in my test app, and in yours you probably use it many times and have much more going on in memory... However I suspect the problem is you are referencing a memory location that you don't own and trying to keep a pointer to it like you'll always be able to access it freely. Try making your own copy of the unicode text after the GlobalLock call, but before unlocking... Test this bare bones example which I used your code and it seemed to work for me, then I made my change to it using a std::unique_ptr to hold onto a copy of the retrieved clipboard contents, you could manually worry about having to free a raw wchar_t* but that's too old school I'm on the latest (C++11, C++ 14) C++ features now :D See if you can reproduce your problem in a test application, even though I haven't been able to... By the way what environment are you using, it could be something particular with that, or just something particular with your code... I hope you get it working, I'll help you further if you were able to have a small full example that reproduces your problem! :)
  11. Yes what is the question? Can't answer until after 6:30am as this is my last post until then so you should've just asked it lol... Windows APIs are my specialty before I started with all the linux goodness P.S. did you try the --make-it-work option? lol
  12. AlfAlfa

    No handshake

    I had a similar problem recently, for some reason the handshake was actually captured but airodump failed to say that it had actually captured the handshake! Check the capture file(s) with aircrack to see if in fact there is a handshake that has been caught. aircrack-ng your_ap*.cap I was like wtf, so all that time I was waiting for a handshake (since deauthing didn't seem to get through but actually maybe it did) and I had it the whole time, it just failed to mention that it had gotten it! I don't know what causes this, but it's worth mentioning... Also those who know, do you have to be close enough to both the client and AP, or just the AP or just the client?
  13. Looks like Cooper solved it again :) He's right unless you have a dhcp server running, there is nothing to assign an ip address to your client trying to connect. Configure the IP manually and it should connect. That's not good though for auto-connecting with a automatically assigned IP address so, get a DHCP server up and running. This excript taken from ubuntu forums but I think kali also will work to grab this one: -> Open up a terminal and type: sudo apt-get install isc-dhcp-server There are two main files /etc/default/isc-dhcp-server and /etc/dhcp/dhcpd.conf which we will need to configure so lets take the first. Open up a terminal and using your favorite text editor type: sudo vim /etc/default/isc-dhcp-server You should get the following: #Defaults for dhcp initscript#sourced by /etc/init.d/dhcp#installed at /etc/default/isc-dhcp-server by the maintainer scripts##This is a POSIX shell fragment##On what interfaces should the DHCP server (dhcpd) serve DHCP requests"#Separate multiple interfaces with spaces, e.g. “eth0 eth1".INTERFACES="eth0" Replace eth0 above with the name of your network interface that you want the server to lease addresses on. Onto the next file. Open up a terminal and type: sudo vim /etc/dhcp/dhcpd.conf which should give you the output below. ##Sample configuration file for ISC dhcpd for Debian##Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as#configuration file instead of this file.##....option domain-name “example.org”;option domain-name-servers ns1.example.org, ns2.example.org;option domain-name “comtech.com”;default-lease-time 600;max-lease-time 7200;log-facility local7;subnet 10.0.0.0 netmask 255.255.255.0 {range 10.0.0.150 10.0.0.253;option routers 10.0.0.2;option subnet-mask 255.255.255.0;option broadcast-address 10.0.0.254;option domain-name-servers 10.0.0.1, 10.0.0.2;option ntp-servers 10.0.0.1;option netbios-name-servers 10.0.0.1;option netbios-node-type 8; ......} This needs a little bit of explaining. Adjust your settings according to your network requirements. The option domain name is your dns zone name. For example mine is set to comtech.com. Range should be the range of ip addresses that you want the server to give out to clients. Now restart the dhcp service by typing: sudo service isc-dhcp-server restart Thats it!! Your dhcp server should be running
×
×
  • Create New...